codacus commited on
Commit
df766c9
·
unverified ·
1 Parent(s): 6603533

feat: added support for reasoning content (#1168)

Browse files
app/components/chat/Markdown.tsx CHANGED
@@ -7,6 +7,7 @@ import { Artifact } from './Artifact';
7
  import { CodeBlock } from './CodeBlock';
8
 
9
  import styles from './Markdown.module.scss';
 
10
 
11
  const logger = createScopedLogger('MarkdownComponent');
12
 
@@ -22,6 +23,8 @@ export const Markdown = memo(({ children, html = false, limitedMarkdown = false
22
  const components = useMemo(() => {
23
  return {
24
  div: ({ className, children, node, ...props }) => {
 
 
25
  if (className?.includes('__boltArtifact__')) {
26
  const messageId = node?.properties.dataMessageId as string;
27
 
@@ -32,6 +35,10 @@ export const Markdown = memo(({ children, html = false, limitedMarkdown = false
32
  return <Artifact messageId={messageId} />;
33
  }
34
 
 
 
 
 
35
  return (
36
  <div className={className} {...props}>
37
  {children}
 
7
  import { CodeBlock } from './CodeBlock';
8
 
9
  import styles from './Markdown.module.scss';
10
+ import ThoughtBox from './ThoughtBox';
11
 
12
  const logger = createScopedLogger('MarkdownComponent');
13
 
 
23
  const components = useMemo(() => {
24
  return {
25
  div: ({ className, children, node, ...props }) => {
26
+ console.log(className, node);
27
+
28
  if (className?.includes('__boltArtifact__')) {
29
  const messageId = node?.properties.dataMessageId as string;
30
 
 
35
  return <Artifact messageId={messageId} />;
36
  }
37
 
38
+ if (className?.includes('__boltThought__')) {
39
+ return <ThoughtBox title="Thought process">{children}</ThoughtBox>;
40
+ }
41
+
42
  return (
43
  <div className={className} {...props}>
44
  {children}
app/components/chat/ThoughtBox.tsx ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useState, type PropsWithChildren } from 'react';
2
+
3
+ const ThoughtBox = ({ title, children }: PropsWithChildren<{ title: string }>) => {
4
+ const [isExpanded, setIsExpanded] = useState(false);
5
+
6
+ return (
7
+ <div
8
+ onClick={() => setIsExpanded(!isExpanded)}
9
+ className={`
10
+ bg-bolt-elements-background-depth-2
11
+ shadow-md
12
+ rounded-lg
13
+ cursor-pointer
14
+ transition-all
15
+ duration-300
16
+ ${isExpanded ? 'max-h-96' : 'max-h-13'}
17
+ overflow-auto
18
+ border border-bolt-elements-borderColor
19
+ `}
20
+ >
21
+ <div className="p-4 flex items-center gap-4 rounded-lg text-bolt-elements-textSecondary font-medium leading-5 text-sm border border-bolt-elements-borderColor">
22
+ <div className="i-ph:brain-thin text-2xl" />
23
+ <div className="div">
24
+ <span> {title}</span>{' '}
25
+ {!isExpanded && <span className="text-bolt-elements-textTertiary"> - Click to expand</span>}
26
+ </div>
27
+ </div>
28
+ <div
29
+ className={`
30
+ transition-opacity
31
+ duration-300
32
+ p-4
33
+ rounded-lg
34
+ ${isExpanded ? 'opacity-100' : 'opacity-0'}
35
+ `}
36
+ >
37
+ {children}
38
+ </div>
39
+ </div>
40
+ );
41
+ };
42
+
43
+ export default ThoughtBox;
app/lib/modules/llm/providers/deepseek.ts CHANGED
@@ -2,7 +2,7 @@ import { BaseProvider } from '~/lib/modules/llm/base-provider';
2
  import type { ModelInfo } from '~/lib/modules/llm/types';
3
  import type { IProviderSetting } from '~/types/model';
4
  import type { LanguageModelV1 } from 'ai';
5
- import { createOpenAI } from '@ai-sdk/openai';
6
 
7
  export default class DeepseekProvider extends BaseProvider {
8
  name = 'Deepseek';
@@ -38,11 +38,12 @@ export default class DeepseekProvider extends BaseProvider {
38
  throw new Error(`Missing API key for ${this.name} provider`);
39
  }
40
 
41
- const openai = createOpenAI({
42
- baseURL: 'https://api.deepseek.com/beta',
43
  apiKey,
44
  });
45
 
46
- return openai(model);
 
 
47
  }
48
  }
 
2
  import type { ModelInfo } from '~/lib/modules/llm/types';
3
  import type { IProviderSetting } from '~/types/model';
4
  import type { LanguageModelV1 } from 'ai';
5
+ import { createDeepSeek } from '@ai-sdk/deepseek';
6
 
7
  export default class DeepseekProvider extends BaseProvider {
8
  name = 'Deepseek';
 
38
  throw new Error(`Missing API key for ${this.name} provider`);
39
  }
40
 
41
+ const deepseek = createDeepSeek({
 
42
  apiKey,
43
  });
44
 
45
+ return deepseek(model, {
46
+ // simulateStreaming: true,
47
+ });
48
  }
49
  }
app/routes/api.chat.ts CHANGED
@@ -63,6 +63,8 @@ async function chatAction({ context, request }: ActionFunctionArgs) {
63
  const totalMessageContent = messages.reduce((acc, message) => acc + message.content, '');
64
  logger.debug(`Total message length: ${totalMessageContent.split(' ').length}, words`);
65
 
 
 
66
  const dataStream = createDataStream({
67
  async execute(dataStream) {
68
  const filePaths = getFilePaths(files || {});
@@ -247,15 +249,42 @@ async function chatAction({ context, request }: ActionFunctionArgs) {
247
  }
248
  }
249
  })();
250
-
251
  result.mergeIntoDataStream(dataStream);
252
  },
253
  onError: (error: any) => `Custom error: ${error.message}`,
254
  }).pipeThrough(
255
  new TransformStream({
256
  transform: (chunk, controller) => {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  // Convert the string stream to a byte stream
258
- const str = typeof chunk === 'string' ? chunk : JSON.stringify(chunk);
259
  controller.enqueue(encoder.encode(str));
260
  },
261
  }),
 
63
  const totalMessageContent = messages.reduce((acc, message) => acc + message.content, '');
64
  logger.debug(`Total message length: ${totalMessageContent.split(' ').length}, words`);
65
 
66
+ let lastChunk: string | undefined = undefined;
67
+
68
  const dataStream = createDataStream({
69
  async execute(dataStream) {
70
  const filePaths = getFilePaths(files || {});
 
249
  }
250
  }
251
  })();
 
252
  result.mergeIntoDataStream(dataStream);
253
  },
254
  onError: (error: any) => `Custom error: ${error.message}`,
255
  }).pipeThrough(
256
  new TransformStream({
257
  transform: (chunk, controller) => {
258
+ if (!lastChunk) {
259
+ lastChunk = ' ';
260
+ }
261
+
262
+ if (typeof chunk === 'string') {
263
+ if (chunk.startsWith('g') && !lastChunk.startsWith('g')) {
264
+ controller.enqueue(encoder.encode(`0: "<div class=\\"__boltThought__\\">"\n`));
265
+ }
266
+
267
+ if (lastChunk.startsWith('g') && !chunk.startsWith('g')) {
268
+ controller.enqueue(encoder.encode(`0: "</div>\\n"\n`));
269
+ }
270
+ }
271
+
272
+ lastChunk = chunk;
273
+
274
+ let transformedChunk = chunk;
275
+
276
+ if (typeof chunk === 'string' && chunk.startsWith('g')) {
277
+ let content = chunk.split(':').slice(1).join(':');
278
+
279
+ if (content.endsWith('\n')) {
280
+ content = content.slice(0, content.length - 1);
281
+ }
282
+
283
+ transformedChunk = `0:${content}\n`;
284
+ }
285
+
286
  // Convert the string stream to a byte stream
287
+ const str = typeof transformedChunk === 'string' ? transformedChunk : JSON.stringify(transformedChunk);
288
  controller.enqueue(encoder.encode(str));
289
  },
290
  }),
app/utils/markdown.ts CHANGED
@@ -61,7 +61,13 @@ const rehypeSanitizeOptions: RehypeSanitizeOptions = {
61
  tagNames: allowedHTMLElements,
62
  attributes: {
63
  ...defaultSchema.attributes,
64
- div: [...(defaultSchema.attributes?.div ?? []), 'data*', ['className', '__boltArtifact__']],
 
 
 
 
 
 
65
  },
66
  strip: [],
67
  };
 
61
  tagNames: allowedHTMLElements,
62
  attributes: {
63
  ...defaultSchema.attributes,
64
+ div: [
65
+ ...(defaultSchema.attributes?.div ?? []),
66
+ 'data*',
67
+ ['className', '__boltArtifact__', '__boltThought__'],
68
+
69
+ // ['className', '__boltThought__']
70
+ ],
71
  },
72
  strip: [],
73
  };
package.json CHANGED
@@ -33,9 +33,10 @@
33
  "@ai-sdk/amazon-bedrock": "1.0.6",
34
  "@ai-sdk/anthropic": "^0.0.39",
35
  "@ai-sdk/cohere": "^1.0.3",
 
36
  "@ai-sdk/google": "^0.0.52",
37
  "@ai-sdk/mistral": "^0.0.43",
38
- "@ai-sdk/openai": "^0.0.66",
39
  "@codemirror/autocomplete": "^6.18.3",
40
  "@codemirror/commands": "^6.7.1",
41
  "@codemirror/lang-cpp": "^6.0.2",
@@ -75,7 +76,7 @@
75
  "@xterm/addon-fit": "^0.10.0",
76
  "@xterm/addon-web-links": "^0.11.0",
77
  "@xterm/xterm": "^5.5.0",
78
- "ai": "^4.0.13",
79
  "chalk": "^5.4.1",
80
  "date-fns": "^3.6.0",
81
  "diff": "^5.2.0",
@@ -131,7 +132,7 @@
131
  "vite-tsconfig-paths": "^4.3.2",
132
  "vitest": "^2.1.7",
133
  "wrangler": "^3.91.0",
134
- "zod": "^3.23.8"
135
  },
136
  "resolutions": {
137
  "@typescript-eslint/utils": "^8.0.0-alpha.30"
 
33
  "@ai-sdk/amazon-bedrock": "1.0.6",
34
  "@ai-sdk/anthropic": "^0.0.39",
35
  "@ai-sdk/cohere": "^1.0.3",
36
+ "@ai-sdk/deepseek": "^0.1.3",
37
  "@ai-sdk/google": "^0.0.52",
38
  "@ai-sdk/mistral": "^0.0.43",
39
+ "@ai-sdk/openai": "^1.1.2",
40
  "@codemirror/autocomplete": "^6.18.3",
41
  "@codemirror/commands": "^6.7.1",
42
  "@codemirror/lang-cpp": "^6.0.2",
 
76
  "@xterm/addon-fit": "^0.10.0",
77
  "@xterm/addon-web-links": "^0.11.0",
78
  "@xterm/xterm": "^5.5.0",
79
+ "ai": "^4.1.2",
80
  "chalk": "^5.4.1",
81
  "date-fns": "^3.6.0",
82
  "diff": "^5.2.0",
 
132
  "vite-tsconfig-paths": "^4.3.2",
133
  "vitest": "^2.1.7",
134
  "wrangler": "^3.91.0",
135
+ "zod": "^3.24.1"
136
  },
137
  "resolutions": {
138
  "@typescript-eslint/utils": "^8.0.0-alpha.30"
pnpm-lock.yaml CHANGED
@@ -13,22 +13,25 @@ importers:
13
  dependencies:
14
  '@ai-sdk/amazon-bedrock':
15
  specifier: 1.0.6
16
- version: 1.0.6(zod@3.23.8)
17
  '@ai-sdk/anthropic':
18
  specifier: ^0.0.39
19
- version: 0.0.39(zod@3.23.8)
20
  '@ai-sdk/cohere':
21
  specifier: ^1.0.3
22
- version: 1.0.3(zod@3.23.8)
 
 
 
23
  '@ai-sdk/google':
24
  specifier: ^0.0.52
25
- version: 0.0.52(zod@3.23.8)
26
  '@ai-sdk/mistral':
27
  specifier: ^0.0.43
28
- version: 0.0.43(zod@3.23.8)
29
  '@ai-sdk/openai':
30
- specifier: ^0.0.66
31
- version: 0.0.66(zod@3.23.8)
32
  '@codemirror/autocomplete':
33
  specifier: ^6.18.3
34
  version: 6.18.3(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])
@@ -97,7 +100,7 @@ importers:
97
  version: 13.6.2
98
  '@openrouter/ai-sdk-provider':
99
  specifier: ^0.0.5
100
- version: 0.0.5(zod@3.23.8)
101
  '@radix-ui/react-context-menu':
102
  specifier: ^2.2.2
103
@@ -147,8 +150,8 @@ importers:
147
  specifier: ^5.5.0
148
  version: 5.5.0
149
  ai:
150
- specifier: ^4.0.13
151
- version: 4.0.18([email protected])(zod@3.23.8)
152
  chalk:
153
  specifier: ^5.4.1
154
  version: 5.4.1
@@ -193,7 +196,7 @@ importers:
193
  version: 0.10.3
194
  ollama-ai-provider:
195
  specifier: ^0.15.2
196
- version: 0.15.2(zod@3.23.8)
197
  react:
198
  specifier: ^18.3.1
199
  version: 18.3.1
@@ -226,7 +229,7 @@ importers:
226
227
  remix-utils:
228
  specifier: ^7.7.0
229
230
  shiki:
231
  specifier: ^1.24.0
232
  version: 1.24.0
@@ -310,8 +313,8 @@ importers:
310
  specifier: ^3.91.0
311
  version: 3.91.0(@cloudflare/[email protected])
312
  zod:
313
- specifier: ^3.23.8
314
- version: 3.23.8
315
 
316
  packages:
317
 
@@ -333,6 +336,12 @@ packages:
333
  peerDependencies:
334
  zod: ^3.0.0
335
 
 
 
 
 
 
 
336
  '@ai-sdk/[email protected]':
337
  resolution: {integrity: sha512-bfsA/1Ae0SQ6NfLwWKs5SU4MBwlzJjVhK6bTVBicYFjUxg9liK/W76P1Tq/qK9OlrODACz3i1STOIWsFPpIOuQ==}
338
  engines: {node: '>=18'}
@@ -345,8 +354,14 @@ packages:
345
  peerDependencies:
346
  zod: ^3.0.0
347
 
348
- '@ai-sdk/openai@0.0.66':
349
- resolution: {integrity: sha512-V4XeDnlNl5/AY3GB3ozJUjqnBLU5pK3DacKTbCNH3zH8/MggJoH6B8wRGdLUPVFMcsMz60mtvh4DC9JsIVFrKw==}
 
 
 
 
 
 
350
  engines: {node: '>=18'}
351
  peerDependencies:
352
  zod: ^3.0.0
@@ -387,8 +402,8 @@ packages:
387
  zod:
388
  optional: true
389
 
390
- '@ai-sdk/[email protected].4':
391
- resolution: {integrity: sha512-GMhcQCZbwM6RoZCri0MWeEWXRt/T+uCxsmHEsTwNvEH3GDjNzchfX25C8ftry2MeEOOn6KfqCLSKomcgK6RoOg==}
392
  engines: {node: '>=18'}
393
  peerDependencies:
394
  zod: ^3.0.0
@@ -396,8 +411,8 @@ packages:
396
  zod:
397
  optional: true
398
 
399
- '@ai-sdk/provider-utils@2.0.5':
400
- resolution: {integrity: sha512-2M7vLhYN0ThGjNlzow7oO/lsL+DyMxvGMIYmVQvEYaCWhDzxH5dOp78VNjJIVwHzVLMbBDigX3rJuzAs853idw==}
401
  engines: {node: '>=18'}
402
  peerDependencies:
403
  zod: ^3.0.0
@@ -421,16 +436,16 @@ packages:
421
  resolution: {integrity: sha512-mV+3iNDkzUsZ0pR2jG0sVzU6xtQY5DtSCBy3JFycLp6PwjyLw/iodfL3MwdmMCRJWgs3dadcHejRnMvF9nGTBg==}
422
  engines: {node: '>=18'}
423
 
424
- '@ai-sdk/[email protected]':
425
- resolution: {integrity: sha512-YYtP6xWQyaAf5LiWLJ+ycGTOeBLWrED7LUrvc+SQIWhGaneylqbaGsyQL7VouQUeQ4JZ1qKYZuhmi3W56HADPA==}
426
- engines: {node: '>=18'}
427
-
428
  '@ai-sdk/[email protected]':
429
  resolution: {integrity: sha512-WiuJEpHTrltOIzv3x2wx4gwksAHW0h6nK3SoDzjqCOJLu/2OJ1yASESTIX+f07ChFykHElVoP80Ol/fe9dw6tQ==}
430
  engines: {node: '>=18'}
431
 
432
- '@ai-sdk/react@1.0.6':
433
- resolution: {integrity: sha512-8Hkserq0Ge6AEi7N4hlv2FkfglAGbkoAXEZ8YSp255c3PbnZz6+/5fppw+aROmZMOfNwallSRuy1i/iPa2rBpQ==}
 
 
 
 
434
  engines: {node: '>=18'}
435
  peerDependencies:
436
  react: ^18 || ^19 || ^19.0.0-rc
@@ -441,8 +456,8 @@ packages:
441
  zod:
442
  optional: true
443
 
444
- '@ai-sdk/ui-utils@1.0.5':
445
- resolution: {integrity: sha512-DGJSbDf+vJyWmFNexSPUsS1AAy7gtsmFmoSyNbNbJjwl9hRIf2dknfA1V0ahx6pg3NNklNYFm53L8Nphjovfvg==}
446
  engines: {node: '>=18'}
447
  peerDependencies:
448
  zod: ^3.0.0
@@ -2854,8 +2869,8 @@ packages:
2854
  resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}
2855
  engines: {node: '>=8'}
2856
 
2857
- ai@4.0.18:
2858
- resolution: {integrity: sha512-BTWzalLNE1LQphEka5xzJXDs5v4xXy1Uzr7dAVk+C/CnO3WNpuMBgrCymwUv0VrWaWc8xMQuh+OqsT7P7JyekQ==}
2859
  engines: {node: '>=18'}
2860
  peerDependencies:
2861
  react: ^18 || ^19 || ^19.0.0-rc
@@ -6248,112 +6263,125 @@ packages:
6248
6249
  resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==}
6250
 
6251
- zod-to-json-schema@3.23.5:
6252
- resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==}
6253
  peerDependencies:
6254
- zod: ^3.23.3
6255
 
6256
- zod@3.23.8:
6257
- resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==}
6258
 
6259
6260
  resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
6261
 
6262
  snapshots:
6263
 
6264
- '@ai-sdk/[email protected](zod@3.23.8)':
6265
  dependencies:
6266
  '@ai-sdk/provider': 1.0.3
6267
- '@ai-sdk/provider-utils': 2.0.5(zod@3.23.8)
6268
  '@aws-sdk/client-bedrock-runtime': 3.716.0
6269
- zod: 3.23.8
6270
  transitivePeerDependencies:
6271
  - aws-crt
6272
 
6273
- '@ai-sdk/[email protected](zod@3.23.8)':
6274
  dependencies:
6275
  '@ai-sdk/provider': 0.0.17
6276
- '@ai-sdk/provider-utils': 1.0.9(zod@3.23.8)
6277
- zod: 3.23.8
6278
 
6279
- '@ai-sdk/[email protected](zod@3.23.8)':
6280
  dependencies:
6281
  '@ai-sdk/provider': 1.0.1
6282
- '@ai-sdk/provider-utils': 2.0.2(zod@3.23.8)
6283
- zod: 3.23.8
6284
 
6285
- '@ai-sdk/google@0.0.52(zod@3.23.8)':
 
 
 
 
 
 
 
6286
  dependencies:
6287
  '@ai-sdk/provider': 0.0.24
6288
- '@ai-sdk/provider-utils': 1.0.20(zod@3.23.8)
6289
  json-schema: 0.4.0
6290
- zod: 3.23.8
6291
 
6292
- '@ai-sdk/[email protected](zod@3.23.8)':
6293
  dependencies:
6294
  '@ai-sdk/provider': 0.0.24
6295
- '@ai-sdk/provider-utils': 1.0.20(zod@3.23.8)
6296
- zod: 3.23.8
6297
 
6298
- '@ai-sdk/openai@0.0.66(zod@3.23.8)':
6299
  dependencies:
6300
- '@ai-sdk/provider': 0.0.24
6301
- '@ai-sdk/provider-utils': 1.0.20(zod@3.23.8)
6302
- zod: 3.23.8
6303
 
6304
- '@ai-sdk/provider-utils@1.0.2(zod@3.23.8)':
 
 
 
 
 
 
6305
  dependencies:
6306
  '@ai-sdk/provider': 0.0.12
6307
  eventsource-parser: 1.1.2
6308
  nanoid: 3.3.6
6309
  secure-json-parse: 2.7.0
6310
  optionalDependencies:
6311
- zod: 3.23.8
6312
 
6313
- '@ai-sdk/[email protected](zod@3.23.8)':
6314
  dependencies:
6315
  '@ai-sdk/provider': 0.0.24
6316
  eventsource-parser: 1.1.2
6317
  nanoid: 3.3.6
6318
  secure-json-parse: 2.7.0
6319
  optionalDependencies:
6320
- zod: 3.23.8
6321
 
6322
- '@ai-sdk/[email protected](zod@3.23.8)':
6323
  dependencies:
6324
  '@ai-sdk/provider': 0.0.17
6325
  eventsource-parser: 1.1.2
6326
  nanoid: 3.3.6
6327
  secure-json-parse: 2.7.0
6328
  optionalDependencies:
6329
- zod: 3.23.8
6330
 
6331
- '@ai-sdk/[email protected](zod@3.23.8)':
6332
  dependencies:
6333
  '@ai-sdk/provider': 1.0.1
6334
  eventsource-parser: 3.0.0
6335
  nanoid: 3.3.8
6336
  secure-json-parse: 2.7.0
6337
  optionalDependencies:
6338
- zod: 3.23.8
6339
 
6340
- '@ai-sdk/[email protected].4(zod@3.23.8)':
6341
  dependencies:
6342
- '@ai-sdk/provider': 1.0.2
6343
  eventsource-parser: 3.0.0
6344
  nanoid: 3.3.8
6345
  secure-json-parse: 2.7.0
6346
  optionalDependencies:
6347
- zod: 3.23.8
6348
 
6349
- '@ai-sdk/provider-utils@2.0.5(zod@3.23.8)':
6350
  dependencies:
6351
- '@ai-sdk/provider': 1.0.3
6352
  eventsource-parser: 3.0.0
6353
  nanoid: 3.3.8
6354
  secure-json-parse: 2.7.0
6355
  optionalDependencies:
6356
- zod: 3.23.8
6357
 
6358
  '@ai-sdk/[email protected]':
6359
  dependencies:
@@ -6371,31 +6399,31 @@ snapshots:
6371
  dependencies:
6372
  json-schema: 0.4.0
6373
 
6374
- '@ai-sdk/[email protected].2':
6375
  dependencies:
6376
  json-schema: 0.4.0
6377
 
6378
- '@ai-sdk/[email protected].3':
6379
  dependencies:
6380
  json-schema: 0.4.0
6381
 
6382
- '@ai-sdk/react@1.0.6([email protected])(zod@3.23.8)':
6383
  dependencies:
6384
- '@ai-sdk/provider-utils': 2.0.4(zod@3.23.8)
6385
- '@ai-sdk/ui-utils': 1.0.5(zod@3.23.8)
6386
  swr: 2.2.5([email protected])
6387
  throttleit: 2.1.0
6388
  optionalDependencies:
6389
  react: 18.3.1
6390
- zod: 3.23.8
6391
 
6392
- '@ai-sdk/ui-utils@1.0.5(zod@3.23.8)':
6393
  dependencies:
6394
- '@ai-sdk/provider': 1.0.2
6395
- '@ai-sdk/provider-utils': 2.0.4(zod@3.23.8)
6396
- zod-to-json-schema: 3.23.5(zod@3.23.8)
6397
  optionalDependencies:
6398
- zod: 3.23.8
6399
 
6400
  '@ampproject/[email protected]':
6401
  dependencies:
@@ -7060,7 +7088,7 @@ snapshots:
7060
  '@cloudflare/[email protected]':
7061
  dependencies:
7062
  mime: 3.0.0
7063
- zod: 3.23.8
7064
 
7065
  '@cloudflare/[email protected]': {}
7066
 
@@ -7800,11 +7828,11 @@ snapshots:
7800
  dependencies:
7801
  '@octokit/openapi-types': 22.2.0
7802
 
7803
- '@openrouter/[email protected](zod@3.23.8)':
7804
  dependencies:
7805
  '@ai-sdk/provider': 0.0.12
7806
- '@ai-sdk/provider-utils': 1.0.2(zod@3.23.8)
7807
- zod: 3.23.8
7808
 
7809
  '@opentelemetry/[email protected]': {}
7810
 
@@ -9299,18 +9327,17 @@ snapshots:
9299
  clean-stack: 2.2.0
9300
  indent-string: 4.0.0
9301
 
9302
- ai@4.0.18([email protected])(zod@3.23.8):
9303
  dependencies:
9304
- '@ai-sdk/provider': 1.0.2
9305
- '@ai-sdk/provider-utils': 2.0.4(zod@3.23.8)
9306
- '@ai-sdk/react': 1.0.6([email protected])(zod@3.23.8)
9307
- '@ai-sdk/ui-utils': 1.0.5(zod@3.23.8)
9308
  '@opentelemetry/api': 1.9.0
9309
  jsondiffpatch: 0.6.0
9310
- zod-to-json-schema: 3.23.5([email protected])
9311
  optionalDependencies:
9312
  react: 18.3.1
9313
- zod: 3.23.8
9314
 
9315
9316
  dependencies:
@@ -11589,7 +11616,7 @@ snapshots:
11589
  workerd: 1.20241106.1
11590
  ws: 8.18.0
11591
  youch: 3.3.4
11592
- zod: 3.23.8
11593
  transitivePeerDependencies:
11594
  - bufferutil
11595
  - supports-color
@@ -11774,13 +11801,13 @@ snapshots:
11774
 
11775
11776
 
11777
- [email protected](zod@3.23.8):
11778
  dependencies:
11779
  '@ai-sdk/provider': 0.0.24
11780
- '@ai-sdk/provider-utils': 1.0.20(zod@3.23.8)
11781
  partial-json: 0.1.7
11782
  optionalDependencies:
11783
- zod: 3.23.8
11784
 
11785
11786
  dependencies:
@@ -12332,7 +12359,7 @@ snapshots:
12332
  react: 18.3.1
12333
  react-dom: 18.3.1([email protected])
12334
 
12335
12336
  dependencies:
12337
  type-fest: 4.30.0
12338
  optionalDependencies:
@@ -12341,7 +12368,7 @@ snapshots:
12341
12342
  '@remix-run/router': 1.21.0
12343
  react: 18.3.1
12344
- zod: 3.23.8
12345
 
12346
12347
 
@@ -13352,10 +13379,10 @@ snapshots:
13352
  mustache: 4.2.0
13353
  stacktracey: 2.1.8
13354
 
13355
- zod-to-json-schema@3.23.5(zod@3.23.8):
13356
  dependencies:
13357
- zod: 3.23.8
13358
 
13359
- zod@3.23.8: {}
13360
 
13361
 
13
  dependencies:
14
  '@ai-sdk/amazon-bedrock':
15
  specifier: 1.0.6
16
+ version: 1.0.6(zod@3.24.1)
17
  '@ai-sdk/anthropic':
18
  specifier: ^0.0.39
19
+ version: 0.0.39(zod@3.24.1)
20
  '@ai-sdk/cohere':
21
  specifier: ^1.0.3
22
+ version: 1.0.3(zod@3.24.1)
23
+ '@ai-sdk/deepseek':
24
+ specifier: ^0.1.3
25
+ version: 0.1.3([email protected])
26
  '@ai-sdk/google':
27
  specifier: ^0.0.52
28
+ version: 0.0.52(zod@3.24.1)
29
  '@ai-sdk/mistral':
30
  specifier: ^0.0.43
31
+ version: 0.0.43(zod@3.24.1)
32
  '@ai-sdk/openai':
33
+ specifier: ^1.1.2
34
+ version: 1.1.2(zod@3.24.1)
35
  '@codemirror/autocomplete':
36
  specifier: ^6.18.3
37
  version: 6.18.3(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])
 
100
  version: 13.6.2
101
  '@openrouter/ai-sdk-provider':
102
  specifier: ^0.0.5
103
+ version: 0.0.5(zod@3.24.1)
104
  '@radix-ui/react-context-menu':
105
  specifier: ^2.2.2
106
 
150
  specifier: ^5.5.0
151
  version: 5.5.0
152
  ai:
153
+ specifier: ^4.1.2
154
+ version: 4.1.2([email protected])(zod@3.24.1)
155
  chalk:
156
  specifier: ^5.4.1
157
  version: 5.4.1
 
196
  version: 0.10.3
197
  ollama-ai-provider:
198
  specifier: ^0.15.2
199
+ version: 0.15.2(zod@3.24.1)
200
  react:
201
  specifier: ^18.3.1
202
  version: 18.3.1
 
229
230
  remix-utils:
231
  specifier: ^7.7.0
232
233
  shiki:
234
  specifier: ^1.24.0
235
  version: 1.24.0
 
313
  specifier: ^3.91.0
314
  version: 3.91.0(@cloudflare/[email protected])
315
  zod:
316
+ specifier: ^3.24.1
317
+ version: 3.24.1
318
 
319
  packages:
320
 
 
336
  peerDependencies:
337
  zod: ^3.0.0
338
 
339
+ '@ai-sdk/[email protected]':
340
+ resolution: {integrity: sha512-cj0uYgFk0TWWtHKtwB8v17frttquLll9hCpRWtKpiZO69SbiZOwNSjENaoyZvN1sHMLQoQkw+hnbMGtWuU2yOg==}
341
+ engines: {node: '>=18'}
342
+ peerDependencies:
343
+ zod: ^3.0.0
344
+
345
  '@ai-sdk/[email protected]':
346
  resolution: {integrity: sha512-bfsA/1Ae0SQ6NfLwWKs5SU4MBwlzJjVhK6bTVBicYFjUxg9liK/W76P1Tq/qK9OlrODACz3i1STOIWsFPpIOuQ==}
347
  engines: {node: '>=18'}
 
354
  peerDependencies:
355
  zod: ^3.0.0
356
 
357
+ '@ai-sdk/openai-compatible@0.1.3':
358
+ resolution: {integrity: sha512-3dr81jVNTd7Tg4i6JwGKHX47DnQ+jn3zOuxLvu6bM2hFylchtIFn/ut3Et7VfsdMWf4gj9tXp/9rUiQ0JokkrQ==}
359
+ engines: {node: '>=18'}
360
+ peerDependencies:
361
+ zod: ^3.0.0
362
+
363
+ '@ai-sdk/[email protected]':
364
+ resolution: {integrity: sha512-9rfcwjl4g1/Bdr2SmgFQr+aw81r62MvIKE7QDHMC4ulFd/Hej2oClROSMpDFZHXzs7RGeb32VkRyCHUWWgN3RQ==}
365
  engines: {node: '>=18'}
366
  peerDependencies:
367
  zod: ^3.0.0
 
402
  zod:
403
  optional: true
404
 
405
+ '@ai-sdk/[email protected].5':
406
+ resolution: {integrity: sha512-2M7vLhYN0ThGjNlzow7oO/lsL+DyMxvGMIYmVQvEYaCWhDzxH5dOp78VNjJIVwHzVLMbBDigX3rJuzAs853idw==}
407
  engines: {node: '>=18'}
408
  peerDependencies:
409
  zod: ^3.0.0
 
411
  zod:
412
  optional: true
413
 
414
+ '@ai-sdk/provider-utils@2.1.2':
415
+ resolution: {integrity: sha512-ezpQT6kzy/2O4yyn/2YigMqynBYjZIOam3/EMNVzju+Ogj+Z+pf27c/Th78ce0A2ltgrXx6xN14sal/HHZNOOw==}
416
  engines: {node: '>=18'}
417
  peerDependencies:
418
  zod: ^3.0.0
 
436
  resolution: {integrity: sha512-mV+3iNDkzUsZ0pR2jG0sVzU6xtQY5DtSCBy3JFycLp6PwjyLw/iodfL3MwdmMCRJWgs3dadcHejRnMvF9nGTBg==}
437
  engines: {node: '>=18'}
438
 
 
 
 
 
439
  '@ai-sdk/[email protected]':
440
  resolution: {integrity: sha512-WiuJEpHTrltOIzv3x2wx4gwksAHW0h6nK3SoDzjqCOJLu/2OJ1yASESTIX+f07ChFykHElVoP80Ol/fe9dw6tQ==}
441
  engines: {node: '>=18'}
442
 
443
+ '@ai-sdk/provider@1.0.6':
444
+ resolution: {integrity: sha512-hwj/gFNxpDgEfTaYzCYoslmw01IY9kWLKl/wf8xuPvHtQIzlfXWmmUwc8PnCwxyt8cKzIuV0dfUghCf68HQ0SA==}
445
+ engines: {node: '>=18'}
446
+
447
+ '@ai-sdk/[email protected]':
448
+ resolution: {integrity: sha512-bBcRsDaNHzCKSIBbPngMeqbnwZ1RFadXQo9XzHoGrvLANYRwuphGNB8XTXYVLC/eXjoaGVGw2wWf/TYigEnCuA==}
449
  engines: {node: '>=18'}
450
  peerDependencies:
451
  react: ^18 || ^19 || ^19.0.0-rc
 
456
  zod:
457
  optional: true
458
 
459
+ '@ai-sdk/ui-utils@1.1.2':
460
+ resolution: {integrity: sha512-+0kfBF4Y9jmlg1KlbNKIxchmXx9PzuReSpgRNWhpU10vfl1eeer4xK/XL2qHnzAWhsMFe/SVZXJIQObk44zNEQ==}
461
  engines: {node: '>=18'}
462
  peerDependencies:
463
  zod: ^3.0.0
 
2869
  resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}
2870
  engines: {node: '>=8'}
2871
 
2872
+ ai@4.1.2:
2873
+ resolution: {integrity: sha512-11efhPorWFphIpeCgjW6r/jk4wB5RWUGjxayHblBXCq6YEc7o5ki7vlmSnESprsDkMEfmONBWb/xM8pWjR5O2g==}
2874
  engines: {node: '>=18'}
2875
  peerDependencies:
2876
  react: ^18 || ^19 || ^19.0.0-rc
 
6263
6264
  resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==}
6265
 
6266
+ zod-to-json-schema@3.24.1:
6267
+ resolution: {integrity: sha512-3h08nf3Vw3Wl3PK+q3ow/lIil81IT2Oa7YpQyUUDsEWbXveMesdfK1xBd2RhCkynwZndAxixji/7SYJJowr62w==}
6268
  peerDependencies:
6269
+ zod: ^3.24.1
6270
 
6271
+ zod@3.24.1:
6272
+ resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==}
6273
 
6274
6275
  resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
6276
 
6277
  snapshots:
6278
 
6279
+ '@ai-sdk/[email protected](zod@3.24.1)':
6280
  dependencies:
6281
  '@ai-sdk/provider': 1.0.3
6282
+ '@ai-sdk/provider-utils': 2.0.5(zod@3.24.1)
6283
  '@aws-sdk/client-bedrock-runtime': 3.716.0
6284
+ zod: 3.24.1
6285
  transitivePeerDependencies:
6286
  - aws-crt
6287
 
6288
+ '@ai-sdk/[email protected](zod@3.24.1)':
6289
  dependencies:
6290
  '@ai-sdk/provider': 0.0.17
6291
+ '@ai-sdk/provider-utils': 1.0.9(zod@3.24.1)
6292
+ zod: 3.24.1
6293
 
6294
+ '@ai-sdk/[email protected](zod@3.24.1)':
6295
  dependencies:
6296
  '@ai-sdk/provider': 1.0.1
6297
+ '@ai-sdk/provider-utils': 2.0.2(zod@3.24.1)
6298
+ zod: 3.24.1
6299
 
6300
+ '@ai-sdk/deepseek@0.1.3(zod@3.24.1)':
6301
+ dependencies:
6302
+ '@ai-sdk/openai-compatible': 0.1.3([email protected])
6303
+ '@ai-sdk/provider': 1.0.6
6304
+ '@ai-sdk/provider-utils': 2.1.2([email protected])
6305
+ zod: 3.24.1
6306
+
6307
6308
  dependencies:
6309
  '@ai-sdk/provider': 0.0.24
6310
+ '@ai-sdk/provider-utils': 1.0.20(zod@3.24.1)
6311
  json-schema: 0.4.0
6312
+ zod: 3.24.1
6313
 
6314
+ '@ai-sdk/[email protected](zod@3.24.1)':
6315
  dependencies:
6316
  '@ai-sdk/provider': 0.0.24
6317
+ '@ai-sdk/provider-utils': 1.0.20(zod@3.24.1)
6318
+ zod: 3.24.1
6319
 
6320
+ '@ai-sdk/openai-compatible@0.1.3(zod@3.24.1)':
6321
  dependencies:
6322
+ '@ai-sdk/provider': 1.0.6
6323
+ '@ai-sdk/provider-utils': 2.1.2(zod@3.24.1)
6324
+ zod: 3.24.1
6325
 
6326
+ '@ai-sdk/openai@1.1.2(zod@3.24.1)':
6327
+ dependencies:
6328
+ '@ai-sdk/provider': 1.0.6
6329
+ '@ai-sdk/provider-utils': 2.1.2([email protected])
6330
+ zod: 3.24.1
6331
+
6332
6333
  dependencies:
6334
  '@ai-sdk/provider': 0.0.12
6335
  eventsource-parser: 1.1.2
6336
  nanoid: 3.3.6
6337
  secure-json-parse: 2.7.0
6338
  optionalDependencies:
6339
+ zod: 3.24.1
6340
 
6341
+ '@ai-sdk/[email protected](zod@3.24.1)':
6342
  dependencies:
6343
  '@ai-sdk/provider': 0.0.24
6344
  eventsource-parser: 1.1.2
6345
  nanoid: 3.3.6
6346
  secure-json-parse: 2.7.0
6347
  optionalDependencies:
6348
+ zod: 3.24.1
6349
 
6350
+ '@ai-sdk/[email protected](zod@3.24.1)':
6351
  dependencies:
6352
  '@ai-sdk/provider': 0.0.17
6353
  eventsource-parser: 1.1.2
6354
  nanoid: 3.3.6
6355
  secure-json-parse: 2.7.0
6356
  optionalDependencies:
6357
+ zod: 3.24.1
6358
 
6359
+ '@ai-sdk/[email protected](zod@3.24.1)':
6360
  dependencies:
6361
  '@ai-sdk/provider': 1.0.1
6362
  eventsource-parser: 3.0.0
6363
  nanoid: 3.3.8
6364
  secure-json-parse: 2.7.0
6365
  optionalDependencies:
6366
+ zod: 3.24.1
6367
 
6368
+ '@ai-sdk/[email protected].5(zod@3.24.1)':
6369
  dependencies:
6370
+ '@ai-sdk/provider': 1.0.3
6371
  eventsource-parser: 3.0.0
6372
  nanoid: 3.3.8
6373
  secure-json-parse: 2.7.0
6374
  optionalDependencies:
6375
+ zod: 3.24.1
6376
 
6377
+ '@ai-sdk/provider-utils@2.1.2(zod@3.24.1)':
6378
  dependencies:
6379
+ '@ai-sdk/provider': 1.0.6
6380
  eventsource-parser: 3.0.0
6381
  nanoid: 3.3.8
6382
  secure-json-parse: 2.7.0
6383
  optionalDependencies:
6384
+ zod: 3.24.1
6385
 
6386
  '@ai-sdk/[email protected]':
6387
  dependencies:
 
6399
  dependencies:
6400
  json-schema: 0.4.0
6401
 
6402
+ '@ai-sdk/[email protected].3':
6403
  dependencies:
6404
  json-schema: 0.4.0
6405
 
6406
+ '@ai-sdk/[email protected].6':
6407
  dependencies:
6408
  json-schema: 0.4.0
6409
 
6410
+ '@ai-sdk/react@1.1.2([email protected])(zod@3.24.1)':
6411
  dependencies:
6412
+ '@ai-sdk/provider-utils': 2.1.2(zod@3.24.1)
6413
+ '@ai-sdk/ui-utils': 1.1.2(zod@3.24.1)
6414
  swr: 2.2.5([email protected])
6415
  throttleit: 2.1.0
6416
  optionalDependencies:
6417
  react: 18.3.1
6418
+ zod: 3.24.1
6419
 
6420
+ '@ai-sdk/ui-utils@1.1.2(zod@3.24.1)':
6421
  dependencies:
6422
+ '@ai-sdk/provider': 1.0.6
6423
+ '@ai-sdk/provider-utils': 2.1.2(zod@3.24.1)
6424
+ zod-to-json-schema: 3.24.1(zod@3.24.1)
6425
  optionalDependencies:
6426
+ zod: 3.24.1
6427
 
6428
  '@ampproject/[email protected]':
6429
  dependencies:
 
7088
  '@cloudflare/[email protected]':
7089
  dependencies:
7090
  mime: 3.0.0
7091
+ zod: 3.24.1
7092
 
7093
  '@cloudflare/[email protected]': {}
7094
 
 
7828
  dependencies:
7829
  '@octokit/openapi-types': 22.2.0
7830
 
7831
+ '@openrouter/[email protected](zod@3.24.1)':
7832
  dependencies:
7833
  '@ai-sdk/provider': 0.0.12
7834
+ '@ai-sdk/provider-utils': 1.0.2(zod@3.24.1)
7835
+ zod: 3.24.1
7836
 
7837
  '@opentelemetry/[email protected]': {}
7838
 
 
9327
  clean-stack: 2.2.0
9328
  indent-string: 4.0.0
9329
 
9330
+ ai@4.1.2([email protected])(zod@3.24.1):
9331
  dependencies:
9332
+ '@ai-sdk/provider': 1.0.6
9333
+ '@ai-sdk/provider-utils': 2.1.2(zod@3.24.1)
9334
+ '@ai-sdk/react': 1.1.2([email protected])(zod@3.24.1)
9335
+ '@ai-sdk/ui-utils': 1.1.2(zod@3.24.1)
9336
  '@opentelemetry/api': 1.9.0
9337
  jsondiffpatch: 0.6.0
 
9338
  optionalDependencies:
9339
  react: 18.3.1
9340
+ zod: 3.24.1
9341
 
9342
9343
  dependencies:
 
11616
  workerd: 1.20241106.1
11617
  ws: 8.18.0
11618
  youch: 3.3.4
11619
+ zod: 3.24.1
11620
  transitivePeerDependencies:
11621
  - bufferutil
11622
  - supports-color
 
11801
 
11802
11803
 
11804
+ [email protected](zod@3.24.1):
11805
  dependencies:
11806
  '@ai-sdk/provider': 0.0.24
11807
+ '@ai-sdk/provider-utils': 1.0.20(zod@3.24.1)
11808
  partial-json: 0.1.7
11809
  optionalDependencies:
11810
+ zod: 3.24.1
11811
 
11812
11813
  dependencies:
 
12359
  react: 18.3.1
12360
  react-dom: 18.3.1([email protected])
12361
 
12362
12363
  dependencies:
12364
  type-fest: 4.30.0
12365
  optionalDependencies:
 
12368
12369
  '@remix-run/router': 1.21.0
12370
  react: 18.3.1
12371
+ zod: 3.24.1
12372
 
12373
12374
 
 
13379
  mustache: 4.2.0
13380
  stacktracey: 2.1.8
13381
 
13382
+ zod-to-json-schema@3.24.1(zod@3.24.1):
13383
  dependencies:
13384
+ zod: 3.24.1
13385
 
13386
+ zod@3.24.1: {}
13387
 
13388