final updates
This commit is contained in:
@@ -1151,9 +1151,7 @@ CRITICAL: When files are provided in the context:
|
|||||||
const isOpenAI = model.startsWith('openai/gpt-5');
|
const isOpenAI = model.startsWith('openai/gpt-5');
|
||||||
const modelProvider = isAnthropic ? anthropic : (isOpenAI ? openai : groq);
|
const modelProvider = isAnthropic ? anthropic : (isOpenAI ? openai : groq);
|
||||||
const actualModel = isAnthropic ? model.replace('anthropic/', '') :
|
const actualModel = isAnthropic ? model.replace('anthropic/', '') :
|
||||||
(model === 'openai/gpt-5') ? 'gpt-5' :
|
(model === 'openai/gpt-5') ? 'gpt-5' : model;
|
||||||
(model === 'openai/gpt-5-nano') ? 'gpt-5-nano' :
|
|
||||||
(model === 'openai/gpt-5-mini') ? 'gpt-5-mini' : model;
|
|
||||||
|
|
||||||
// Make streaming API call with appropriate provider
|
// Make streaming API call with appropriate provider
|
||||||
const streamOptions: any = {
|
const streamOptions: any = {
|
||||||
@@ -1231,14 +1229,9 @@ It's better to have 3 complete files than 10 incomplete files.`
|
|||||||
|
|
||||||
// Add reasoning effort for GPT-5 models
|
// Add reasoning effort for GPT-5 models
|
||||||
if (isOpenAI) {
|
if (isOpenAI) {
|
||||||
let reasoningEffort = 'medium'; // default for gpt-5-nano and gpt-5-mini
|
|
||||||
if (model === 'openai/gpt-5') {
|
|
||||||
reasoningEffort = 'high';
|
|
||||||
}
|
|
||||||
|
|
||||||
streamOptions.experimental_providerMetadata = {
|
streamOptions.experimental_providerMetadata = {
|
||||||
openai: {
|
openai: {
|
||||||
reasoningEffort: reasoningEffort
|
reasoningEffort: 'high'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3247,6 +3247,48 @@ Focus on the key sections and content, making it clean and modern.`;
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Live streaming response display */}
|
||||||
|
{generationProgress.streamedCode && (
|
||||||
|
<motion.div
|
||||||
|
initial={{ opacity: 0, height: 0 }}
|
||||||
|
animate={{ opacity: 1, height: 'auto' }}
|
||||||
|
exit={{ opacity: 0, height: 0 }}
|
||||||
|
transition={{ duration: 0.3 }}
|
||||||
|
className="mt-3 border-t border-gray-300 pt-3"
|
||||||
|
>
|
||||||
|
<div className="flex items-center gap-2 mb-2">
|
||||||
|
<div className="flex items-center gap-1">
|
||||||
|
<div className="w-2 h-2 bg-green-500 rounded-full animate-pulse" />
|
||||||
|
<span className="text-xs font-medium text-gray-600">AI Response Stream</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex-1 h-px bg-gradient-to-r from-gray-300 to-transparent" />
|
||||||
|
</div>
|
||||||
|
<div className="bg-gray-900 border border-gray-700 rounded max-h-32 overflow-y-auto scrollbar-hide">
|
||||||
|
<SyntaxHighlighter
|
||||||
|
language="jsx"
|
||||||
|
style={vscDarkPlus}
|
||||||
|
customStyle={{
|
||||||
|
margin: 0,
|
||||||
|
padding: '0.75rem',
|
||||||
|
fontSize: '11px',
|
||||||
|
lineHeight: '1.5',
|
||||||
|
background: 'transparent',
|
||||||
|
maxHeight: '8rem',
|
||||||
|
overflow: 'hidden'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{(() => {
|
||||||
|
const lastContent = generationProgress.streamedCode.slice(-1000);
|
||||||
|
// Show the last part of the stream, starting from a complete tag if possible
|
||||||
|
const startIndex = lastContent.indexOf('<');
|
||||||
|
return startIndex !== -1 ? lastContent.slice(startIndex) : lastContent;
|
||||||
|
})()}
|
||||||
|
</SyntaxHighlighter>
|
||||||
|
<span className="inline-block w-2 h-3 bg-orange-400 ml-3 mb-3 animate-pulse" />
|
||||||
|
</div>
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,24 +28,20 @@ export const appConfig = {
|
|||||||
// AI Model Configuration
|
// AI Model Configuration
|
||||||
ai: {
|
ai: {
|
||||||
// Default AI model
|
// Default AI model
|
||||||
defaultModel: 'openai/gpt-5-nano',
|
defaultModel: 'moonshotai/kimi-k2-instruct',
|
||||||
|
|
||||||
// Available models
|
// Available models
|
||||||
availableModels: [
|
availableModels: [
|
||||||
'openai/gpt-5-nano',
|
|
||||||
'openai/gpt-5-mini',
|
|
||||||
'openai/gpt-5',
|
'openai/gpt-5',
|
||||||
'moonshotai/kimi-k2-instruct',
|
'moonshotai/kimi-k2-instruct',
|
||||||
'anthropic/claude-3-5-sonnet-20241022'
|
'anthropic/claude-sonnet-4-20250514'
|
||||||
],
|
],
|
||||||
|
|
||||||
// Model display names
|
// Model display names
|
||||||
modelDisplayNames: {
|
modelDisplayNames: {
|
||||||
'openai/gpt-5-nano': 'GPT-5 Nano',
|
|
||||||
'openai/gpt-5-mini': 'GPT-5 Mini',
|
|
||||||
'openai/gpt-5': 'GPT-5',
|
'openai/gpt-5': 'GPT-5',
|
||||||
'moonshotai/kimi-k2-instruct': 'Kimi K2 Instruct',
|
'moonshotai/kimi-k2-instruct': 'Kimi K2 Instruct',
|
||||||
'anthropic/claude-3-5-sonnet-20241022': 'Claude 3.5 Sonnet'
|
'anthropic/claude-sonnet-4-20250514': 'Sonnet 4'
|
||||||
},
|
},
|
||||||
|
|
||||||
// Temperature settings for non-reasoning models
|
// Temperature settings for non-reasoning models
|
||||||
|
|||||||
Generated
+2
-2
@@ -33,7 +33,8 @@
|
|||||||
"react-icons": "^5.5.0",
|
"react-icons": "^5.5.0",
|
||||||
"react-syntax-highlighter": "^15.6.1",
|
"react-syntax-highlighter": "^15.6.1",
|
||||||
"tailwind-merge": "^3.3.1",
|
"tailwind-merge": "^3.3.1",
|
||||||
"tailwindcss-animate": "^1.0.7"
|
"tailwindcss-animate": "^1.0.7",
|
||||||
|
"zod": "^3.25.76"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "^3",
|
"@eslint/eslintrc": "^3",
|
||||||
@@ -6211,7 +6212,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
||||||
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/colinhacks"
|
"url": "https://github.com/sponsors/colinhacks"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -39,7 +39,8 @@
|
|||||||
"react-icons": "^5.5.0",
|
"react-icons": "^5.5.0",
|
||||||
"react-syntax-highlighter": "^15.6.1",
|
"react-syntax-highlighter": "^15.6.1",
|
||||||
"tailwind-merge": "^3.3.1",
|
"tailwind-merge": "^3.3.1",
|
||||||
"tailwindcss-animate": "^1.0.7"
|
"tailwindcss-animate": "^1.0.7",
|
||||||
|
"zod": "^3.25.76"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "^3",
|
"@eslint/eslintrc": "^3",
|
||||||
|
|||||||
Generated
+3
-17
@@ -23,9 +23,6 @@ importers:
|
|||||||
'@e2b/code-interpreter':
|
'@e2b/code-interpreter':
|
||||||
specifier: ^1.5.1
|
specifier: ^1.5.1
|
||||||
version: 1.5.1
|
version: 1.5.1
|
||||||
'@e2b/sdk':
|
|
||||||
specifier: ^1.13.2
|
|
||||||
version: 1.13.2
|
|
||||||
'@radix-ui/react-slot':
|
'@radix-ui/react-slot':
|
||||||
specifier: ^1.2.3
|
specifier: ^1.2.3
|
||||||
version: 1.2.3(@types/react@19.1.9)(react@19.1.0)
|
version: 1.2.3(@types/react@19.1.9)(react@19.1.0)
|
||||||
@@ -53,6 +50,9 @@ importers:
|
|||||||
dotenv:
|
dotenv:
|
||||||
specifier: ^17.2.1
|
specifier: ^17.2.1
|
||||||
version: 17.2.1
|
version: 17.2.1
|
||||||
|
e2b:
|
||||||
|
specifier: ^1.13.2
|
||||||
|
version: 1.13.2
|
||||||
express:
|
express:
|
||||||
specifier: ^5.1.0
|
specifier: ^5.1.0
|
||||||
version: 5.1.0
|
version: 5.1.0
|
||||||
@@ -185,11 +185,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-mkyKjAW2KN5Yt0R1I+1lbH3lo+W/g/1+C2lnwlitXk5wqi/g94SEO41XKdmDf5WWpKG3mnxWDR5d6S/lyjmMEw==}
|
resolution: {integrity: sha512-mkyKjAW2KN5Yt0R1I+1lbH3lo+W/g/1+C2lnwlitXk5wqi/g94SEO41XKdmDf5WWpKG3mnxWDR5d6S/lyjmMEw==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
'@e2b/sdk@1.13.2':
|
|
||||||
resolution: {integrity: sha512-63NiOOB7Pg6a7OnpF5pGZxQ0GhdVSJ92BjbDGm/oh890prbMrxPdoxd2Ll3chFdBpEKvizcngLbuu2AS43dGZw==}
|
|
||||||
engines: {node: '>=18'}
|
|
||||||
deprecated: 'The package @e2b/sdk has been renamed to e2b. Please uninstall the old one and install the new by running following command: npm uninstall @e2b/sdk && npm install e2b'
|
|
||||||
|
|
||||||
'@emnapi/core@1.4.5':
|
'@emnapi/core@1.4.5':
|
||||||
resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==}
|
resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==}
|
||||||
|
|
||||||
@@ -2578,15 +2573,6 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
e2b: 1.13.2
|
e2b: 1.13.2
|
||||||
|
|
||||||
'@e2b/sdk@1.13.2':
|
|
||||||
dependencies:
|
|
||||||
'@bufbuild/protobuf': 2.6.3
|
|
||||||
'@connectrpc/connect': 2.0.0-rc.3(@bufbuild/protobuf@2.6.3)
|
|
||||||
'@connectrpc/connect-web': 2.0.0-rc.3(@bufbuild/protobuf@2.6.3)(@connectrpc/connect@2.0.0-rc.3(@bufbuild/protobuf@2.6.3))
|
|
||||||
compare-versions: 6.1.1
|
|
||||||
openapi-fetch: 0.9.8
|
|
||||||
platform: 1.3.6
|
|
||||||
|
|
||||||
'@emnapi/core@1.4.5':
|
'@emnapi/core@1.4.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@emnapi/wasi-threads': 1.0.4
|
'@emnapi/wasi-threads': 1.0.4
|
||||||
|
|||||||
Reference in New Issue
Block a user