final updates

This commit is contained in:
Developers Digest
2025-08-08 11:13:52 -04:00
parent 6081a9f50a
commit efdef874d7
6 changed files with 54 additions and 36 deletions
+2 -9
View File
@@ -1151,9 +1151,7 @@ CRITICAL: When files are provided in the context:
const isOpenAI = model.startsWith('openai/gpt-5');
const modelProvider = isAnthropic ? anthropic : (isOpenAI ? openai : groq);
const actualModel = isAnthropic ? model.replace('anthropic/', '') :
(model === 'openai/gpt-5') ? 'gpt-5' :
(model === 'openai/gpt-5-nano') ? 'gpt-5-nano' :
(model === 'openai/gpt-5-mini') ? 'gpt-5-mini' : model;
(model === 'openai/gpt-5') ? 'gpt-5' : model;
// Make streaming API call with appropriate provider
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
if (isOpenAI) {
let reasoningEffort = 'medium'; // default for gpt-5-nano and gpt-5-mini
if (model === 'openai/gpt-5') {
reasoningEffort = 'high';
}
streamOptions.experimental_providerMetadata = {
openai: {
reasoningEffort: reasoningEffort
reasoningEffort: 'high'
}
};
}
+42
View File
@@ -3247,6 +3247,48 @@ Focus on the key sections and content, making it clean and modern.`;
</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>
+3 -7
View File
@@ -28,24 +28,20 @@ export const appConfig = {
// AI Model Configuration
ai: {
// Default AI model
defaultModel: 'openai/gpt-5-nano',
defaultModel: 'moonshotai/kimi-k2-instruct',
// Available models
availableModels: [
'openai/gpt-5-nano',
'openai/gpt-5-mini',
'openai/gpt-5',
'moonshotai/kimi-k2-instruct',
'anthropic/claude-3-5-sonnet-20241022'
'anthropic/claude-sonnet-4-20250514'
],
// Model display names
modelDisplayNames: {
'openai/gpt-5-nano': 'GPT-5 Nano',
'openai/gpt-5-mini': 'GPT-5 Mini',
'openai/gpt-5': 'GPT-5',
'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
+2 -2
View File
@@ -33,7 +33,8 @@
"react-icons": "^5.5.0",
"react-syntax-highlighter": "^15.6.1",
"tailwind-merge": "^3.3.1",
"tailwindcss-animate": "^1.0.7"
"tailwindcss-animate": "^1.0.7",
"zod": "^3.25.76"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
@@ -6211,7 +6212,6 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"license": "MIT",
"peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
+2 -1
View File
@@ -39,7 +39,8 @@
"react-icons": "^5.5.0",
"react-syntax-highlighter": "^15.6.1",
"tailwind-merge": "^3.3.1",
"tailwindcss-animate": "^1.0.7"
"tailwindcss-animate": "^1.0.7",
"zod": "^3.25.76"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
+3 -17
View File
@@ -23,9 +23,6 @@ importers:
'@e2b/code-interpreter':
specifier: ^1.5.1
version: 1.5.1
'@e2b/sdk':
specifier: ^1.13.2
version: 1.13.2
'@radix-ui/react-slot':
specifier: ^1.2.3
version: 1.2.3(@types/react@19.1.9)(react@19.1.0)
@@ -53,6 +50,9 @@ importers:
dotenv:
specifier: ^17.2.1
version: 17.2.1
e2b:
specifier: ^1.13.2
version: 1.13.2
express:
specifier: ^5.1.0
version: 5.1.0
@@ -185,11 +185,6 @@ packages:
resolution: {integrity: sha512-mkyKjAW2KN5Yt0R1I+1lbH3lo+W/g/1+C2lnwlitXk5wqi/g94SEO41XKdmDf5WWpKG3mnxWDR5d6S/lyjmMEw==}
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':
resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==}
@@ -2578,15 +2573,6 @@ snapshots:
dependencies:
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':
dependencies:
'@emnapi/wasi-threads': 1.0.4