@convex-dev/agent 0.1.18 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/createTool.d.ts +30 -11
- package/dist/client/createTool.d.ts.map +1 -1
- package/dist/client/createTool.js +24 -10
- package/dist/client/createTool.js.map +1 -1
- package/dist/client/defaultComponent.d.ts +11 -0
- package/dist/client/defaultComponent.d.ts.map +1 -0
- package/dist/client/defaultComponent.js +7 -0
- package/dist/client/defaultComponent.js.map +1 -0
- package/dist/client/definePlaygroundAPI.d.ts +68 -23
- package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
- package/dist/client/definePlaygroundAPI.js +7 -20
- package/dist/client/definePlaygroundAPI.js.map +1 -1
- package/dist/client/files.d.ts +14 -4
- package/dist/client/files.d.ts.map +1 -1
- package/dist/client/files.js +66 -11
- package/dist/client/files.js.map +1 -1
- package/dist/client/index.d.ts +323 -780
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +445 -543
- package/dist/client/index.js.map +1 -1
- package/dist/client/messages.d.ts +256 -0
- package/dist/client/messages.d.ts.map +1 -0
- package/dist/client/messages.js +97 -0
- package/dist/client/messages.js.map +1 -0
- package/dist/client/search.d.ts +35 -12
- package/dist/client/search.d.ts.map +1 -1
- package/dist/client/search.js +21 -4
- package/dist/client/search.js.map +1 -1
- package/dist/client/streaming.d.ts +21 -21
- package/dist/client/streaming.d.ts.map +1 -1
- package/dist/client/streaming.js +35 -40
- package/dist/client/streaming.js.map +1 -1
- package/dist/client/threads.d.ts +46 -0
- package/dist/client/threads.d.ts.map +1 -0
- package/dist/client/threads.js +49 -0
- package/dist/client/threads.js.map +1 -0
- package/dist/client/types.d.ts +159 -75
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/_generated/api.d.ts +261 -209
- package/dist/component/messages.d.ts +314 -105
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/messages.js +141 -83
- package/dist/component/messages.js.map +1 -1
- package/dist/component/schema.d.ts +631 -870
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +11 -16
- package/dist/component/schema.js.map +1 -1
- package/dist/component/streams.d.ts +29 -149
- package/dist/component/streams.d.ts.map +1 -1
- package/dist/component/streams.js +104 -60
- package/dist/component/streams.js.map +1 -1
- package/dist/component/threads.d.ts +4 -4
- package/dist/component/users.d.ts +3 -3
- package/dist/mapping.d.ts +15 -16
- package/dist/mapping.d.ts.map +1 -1
- package/dist/mapping.js +208 -62
- package/dist/mapping.js.map +1 -1
- package/dist/parts.d.ts +3 -0
- package/dist/parts.d.ts.map +1 -0
- package/dist/parts.js +34 -0
- package/dist/parts.js.map +1 -0
- package/dist/react/SmoothText.d.ts +5 -0
- package/dist/react/SmoothText.d.ts.map +1 -0
- package/dist/react/SmoothText.js +6 -0
- package/dist/react/SmoothText.js.map +1 -0
- package/dist/react/deltas.d.ts +3 -5
- package/dist/react/deltas.d.ts.map +1 -1
- package/dist/react/deltas.js +89 -53
- package/dist/react/deltas.js.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +31 -11
- package/dist/react/index.js.map +1 -1
- package/dist/react/optimisticallySendMessage.d.ts.map +1 -1
- package/dist/react/optimisticallySendMessage.js +2 -8
- package/dist/react/optimisticallySendMessage.js.map +1 -1
- package/dist/react/toUIMessages.d.ts +5 -4
- package/dist/react/toUIMessages.d.ts.map +1 -1
- package/dist/react/toUIMessages.js +103 -40
- package/dist/react/toUIMessages.js.map +1 -1
- package/dist/react/useSmoothText.d.ts +13 -12
- package/dist/react/useSmoothText.d.ts.map +1 -1
- package/dist/react/useSmoothText.js +1 -1
- package/dist/react/useSmoothText.js.map +1 -1
- package/dist/validators.d.ts +751 -1464
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +39 -80
- package/dist/validators.js.map +1 -1
- package/package.json +34 -30
- package/src/client/createTool.ts +66 -40
- package/src/client/defaultComponent.ts +17 -0
- package/src/client/definePlaygroundAPI.ts +17 -31
- package/src/client/files.ts +94 -17
- package/src/client/index.test.ts +28 -38
- package/src/client/index.ts +785 -977
- package/src/client/messages.ts +205 -0
- package/src/client/search.ts +37 -10
- package/src/client/streaming.ts +53 -56
- package/src/client/threads.ts +78 -0
- package/src/client/types.ts +239 -131
- package/src/component/_generated/api.d.ts +261 -209
- package/src/component/messages.test.ts +182 -40
- package/src/component/messages.ts +165 -108
- package/src/component/schema.ts +11 -17
- package/src/component/streams.ts +180 -69
- package/src/mapping.ts +253 -96
- package/src/parts.ts +39 -0
- package/src/react/SmoothText.tsx +9 -0
- package/src/react/deltas.test.ts +38 -42
- package/src/react/deltas.ts +116 -65
- package/src/react/index.ts +35 -13
- package/src/react/optimisticallySendMessage.ts +2 -8
- package/src/react/toUIMessages.test.ts +154 -36
- package/src/react/toUIMessages.ts +136 -57
- package/src/react/useSmoothText.ts +14 -15
- package/src/validators.test.ts +1 -117
- package/src/validators.ts +57 -107
- package/dist/client/listMessages.d.ts +0 -22
- package/dist/client/listMessages.d.ts.map +0 -1
- package/dist/client/listMessages.js +0 -25
- package/dist/client/listMessages.js.map +0 -1
- package/src/client/listMessages.ts +0 -38
|
@@ -6,30 +6,30 @@ export declare const deleteByIds: import("convex/server").RegisteredMutation<"pu
|
|
|
6
6
|
}, Promise<import("convex/values").GenericId<"messages">[]>>;
|
|
7
7
|
export declare const messageStatuses: ("pending" | "success" | "failed")[];
|
|
8
8
|
export declare const deleteByOrder: import("convex/server").RegisteredMutation<"public", {
|
|
9
|
-
endStepOrder?: number | undefined;
|
|
10
9
|
startStepOrder?: number | undefined;
|
|
10
|
+
endStepOrder?: number | undefined;
|
|
11
11
|
threadId: import("convex/values").GenericId<"threads">;
|
|
12
12
|
startOrder: number;
|
|
13
13
|
endOrder: number;
|
|
14
14
|
}, Promise<{
|
|
15
15
|
isDone: boolean;
|
|
16
|
-
lastOrder: number;
|
|
17
|
-
lastStepOrder: number;
|
|
16
|
+
lastOrder: number | undefined;
|
|
17
|
+
lastStepOrder: number | undefined;
|
|
18
18
|
}>>;
|
|
19
19
|
export declare const addMessages: import("convex/server").RegisteredMutation<"public", {
|
|
20
20
|
userId?: string | undefined;
|
|
21
|
-
pending?: boolean | undefined;
|
|
22
21
|
agentName?: string | undefined;
|
|
23
22
|
promptMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
24
|
-
failPendingSteps?: boolean | undefined;
|
|
25
23
|
embeddings?: {
|
|
26
24
|
model: string;
|
|
27
25
|
dimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
|
|
28
26
|
vectors: (number[] | null)[];
|
|
29
27
|
} | undefined;
|
|
28
|
+
failPendingSteps?: boolean | undefined;
|
|
29
|
+
pendingMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
30
30
|
threadId: import("convex/values").GenericId<"threads">;
|
|
31
31
|
messages: {
|
|
32
|
-
|
|
32
|
+
status?: "pending" | "success" | "failed" | undefined;
|
|
33
33
|
fileIds?: import("convex/values").GenericId<"files">[] | undefined;
|
|
34
34
|
error?: string | undefined;
|
|
35
35
|
model?: string | undefined;
|
|
@@ -37,25 +37,28 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
37
37
|
text?: string | undefined;
|
|
38
38
|
reasoning?: string | undefined;
|
|
39
39
|
usage?: {
|
|
40
|
+
reasoningTokens?: number | undefined;
|
|
41
|
+
cachedInputTokens?: number | undefined;
|
|
40
42
|
promptTokens: number;
|
|
41
43
|
completionTokens: number;
|
|
42
44
|
totalTokens: number;
|
|
43
45
|
} | undefined;
|
|
44
46
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
45
|
-
sources?: {
|
|
47
|
+
sources?: ({
|
|
46
48
|
title?: string | undefined;
|
|
49
|
+
type?: "source" | undefined;
|
|
47
50
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
48
51
|
id: string;
|
|
49
52
|
sourceType: "url";
|
|
50
53
|
url: string;
|
|
51
|
-
}[] | undefined;
|
|
52
|
-
reasoningDetails?: ({
|
|
53
|
-
signature?: string | undefined;
|
|
54
|
-
type: "text";
|
|
55
|
-
text: string;
|
|
56
54
|
} | {
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
filename?: string | undefined;
|
|
56
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
57
|
+
id: string;
|
|
58
|
+
title: string;
|
|
59
|
+
type: "source";
|
|
60
|
+
sourceType: "document";
|
|
61
|
+
mediaType: string;
|
|
59
62
|
})[] | undefined;
|
|
60
63
|
warnings?: ({
|
|
61
64
|
details?: string | undefined;
|
|
@@ -70,6 +73,20 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
70
73
|
message: string;
|
|
71
74
|
})[] | undefined;
|
|
72
75
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
76
|
+
reasoningDetails?: ({
|
|
77
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
78
|
+
signature?: string | undefined;
|
|
79
|
+
state?: "streaming" | "done" | undefined;
|
|
80
|
+
type: "reasoning";
|
|
81
|
+
text: string;
|
|
82
|
+
} | {
|
|
83
|
+
signature?: string | undefined;
|
|
84
|
+
type: "text";
|
|
85
|
+
text: string;
|
|
86
|
+
} | {
|
|
87
|
+
type: "redacted";
|
|
88
|
+
data: string;
|
|
89
|
+
})[] | undefined;
|
|
73
90
|
message: {
|
|
74
91
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
75
92
|
role: "user";
|
|
@@ -105,6 +122,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
105
122
|
} | {
|
|
106
123
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
107
124
|
signature?: string | undefined;
|
|
125
|
+
state?: "streaming" | "done" | undefined;
|
|
108
126
|
type: "reasoning";
|
|
109
127
|
text: string;
|
|
110
128
|
} | {
|
|
@@ -113,6 +131,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
113
131
|
data: string;
|
|
114
132
|
} | {
|
|
115
133
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
134
|
+
providerExecuted?: boolean | undefined;
|
|
116
135
|
type: "tool-call";
|
|
117
136
|
toolCallId: string;
|
|
118
137
|
toolName: string;
|
|
@@ -124,6 +143,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
124
143
|
content: {
|
|
125
144
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
126
145
|
args?: any;
|
|
146
|
+
providerExecuted?: boolean | undefined;
|
|
147
|
+
isError?: boolean | undefined;
|
|
127
148
|
experimental_content?: ({
|
|
128
149
|
type: "text";
|
|
129
150
|
text: string;
|
|
@@ -132,7 +153,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
132
153
|
type: "image";
|
|
133
154
|
data: string;
|
|
134
155
|
})[] | undefined;
|
|
135
|
-
isError?: boolean | undefined;
|
|
136
156
|
type: "tool-result";
|
|
137
157
|
toolCallId: string;
|
|
138
158
|
toolName: string;
|
|
@@ -190,6 +210,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
190
210
|
} | {
|
|
191
211
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
192
212
|
signature?: string | undefined;
|
|
213
|
+
state?: "streaming" | "done" | undefined;
|
|
193
214
|
type: "reasoning";
|
|
194
215
|
text: string;
|
|
195
216
|
} | {
|
|
@@ -198,6 +219,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
198
219
|
data: string;
|
|
199
220
|
} | {
|
|
200
221
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
222
|
+
providerExecuted?: boolean | undefined;
|
|
201
223
|
type: "tool-call";
|
|
202
224
|
toolCallId: string;
|
|
203
225
|
toolName: string;
|
|
@@ -209,6 +231,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
209
231
|
content: {
|
|
210
232
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
211
233
|
args?: any;
|
|
234
|
+
providerExecuted?: boolean | undefined;
|
|
235
|
+
isError?: boolean | undefined;
|
|
212
236
|
experimental_content?: ({
|
|
213
237
|
type: "text";
|
|
214
238
|
text: string;
|
|
@@ -217,7 +241,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
217
241
|
type: "image";
|
|
218
242
|
data: string;
|
|
219
243
|
})[] | undefined;
|
|
220
|
-
isError?: boolean | undefined;
|
|
221
244
|
type: "tool-result";
|
|
222
245
|
toolCallId: string;
|
|
223
246
|
toolName: string;
|
|
@@ -231,25 +254,28 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
231
254
|
text?: string | undefined;
|
|
232
255
|
reasoning?: string | undefined;
|
|
233
256
|
usage?: {
|
|
257
|
+
reasoningTokens?: number | undefined;
|
|
258
|
+
cachedInputTokens?: number | undefined;
|
|
234
259
|
promptTokens: number;
|
|
235
260
|
completionTokens: number;
|
|
236
261
|
totalTokens: number;
|
|
237
262
|
} | undefined;
|
|
238
263
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
239
|
-
sources?: {
|
|
264
|
+
sources?: ({
|
|
240
265
|
title?: string | undefined;
|
|
266
|
+
type?: "source" | undefined;
|
|
241
267
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
242
268
|
id: string;
|
|
243
269
|
sourceType: "url";
|
|
244
270
|
url: string;
|
|
245
|
-
}[] | undefined;
|
|
246
|
-
reasoningDetails?: ({
|
|
247
|
-
signature?: string | undefined;
|
|
248
|
-
type: "text";
|
|
249
|
-
text: string;
|
|
250
271
|
} | {
|
|
251
|
-
|
|
252
|
-
|
|
272
|
+
filename?: string | undefined;
|
|
273
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
274
|
+
id: string;
|
|
275
|
+
title: string;
|
|
276
|
+
type: "source";
|
|
277
|
+
sourceType: "document";
|
|
278
|
+
mediaType: string;
|
|
253
279
|
})[] | undefined;
|
|
254
280
|
warnings?: ({
|
|
255
281
|
details?: string | undefined;
|
|
@@ -264,6 +290,20 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
264
290
|
message: string;
|
|
265
291
|
})[] | undefined;
|
|
266
292
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
293
|
+
reasoningDetails?: ({
|
|
294
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
295
|
+
signature?: string | undefined;
|
|
296
|
+
state?: "streaming" | "done" | undefined;
|
|
297
|
+
type: "reasoning";
|
|
298
|
+
text: string;
|
|
299
|
+
} | {
|
|
300
|
+
signature?: string | undefined;
|
|
301
|
+
type: "text";
|
|
302
|
+
text: string;
|
|
303
|
+
} | {
|
|
304
|
+
type: "redacted";
|
|
305
|
+
data: string;
|
|
306
|
+
})[] | undefined;
|
|
267
307
|
_id: string;
|
|
268
308
|
_creationTime: number;
|
|
269
309
|
status: "pending" | "success" | "failed";
|
|
@@ -321,6 +361,7 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
321
361
|
} | {
|
|
322
362
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
323
363
|
signature?: string | undefined;
|
|
364
|
+
state?: "streaming" | "done" | undefined;
|
|
324
365
|
type: "reasoning";
|
|
325
366
|
text: string;
|
|
326
367
|
} | {
|
|
@@ -329,6 +370,7 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
329
370
|
data: string;
|
|
330
371
|
} | {
|
|
331
372
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
373
|
+
providerExecuted?: boolean | undefined;
|
|
332
374
|
type: "tool-call";
|
|
333
375
|
toolCallId: string;
|
|
334
376
|
toolName: string;
|
|
@@ -340,6 +382,8 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
340
382
|
content: {
|
|
341
383
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
342
384
|
args?: any;
|
|
385
|
+
providerExecuted?: boolean | undefined;
|
|
386
|
+
isError?: boolean | undefined;
|
|
343
387
|
experimental_content?: ({
|
|
344
388
|
type: "text";
|
|
345
389
|
text: string;
|
|
@@ -348,7 +392,6 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
348
392
|
type: "image";
|
|
349
393
|
data: string;
|
|
350
394
|
})[] | undefined;
|
|
351
|
-
isError?: boolean | undefined;
|
|
352
395
|
type: "tool-result";
|
|
353
396
|
toolCallId: string;
|
|
354
397
|
toolName: string;
|
|
@@ -362,25 +405,28 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
362
405
|
text?: string | undefined;
|
|
363
406
|
reasoning?: string | undefined;
|
|
364
407
|
usage?: {
|
|
408
|
+
reasoningTokens?: number | undefined;
|
|
409
|
+
cachedInputTokens?: number | undefined;
|
|
365
410
|
promptTokens: number;
|
|
366
411
|
completionTokens: number;
|
|
367
412
|
totalTokens: number;
|
|
368
413
|
} | undefined;
|
|
369
414
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
370
|
-
sources?: {
|
|
415
|
+
sources?: ({
|
|
371
416
|
title?: string | undefined;
|
|
417
|
+
type?: "source" | undefined;
|
|
372
418
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
373
419
|
id: string;
|
|
374
420
|
sourceType: "url";
|
|
375
421
|
url: string;
|
|
376
|
-
}[] | undefined;
|
|
377
|
-
reasoningDetails?: ({
|
|
378
|
-
signature?: string | undefined;
|
|
379
|
-
type: "text";
|
|
380
|
-
text: string;
|
|
381
422
|
} | {
|
|
382
|
-
|
|
383
|
-
|
|
423
|
+
filename?: string | undefined;
|
|
424
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
425
|
+
id: string;
|
|
426
|
+
title: string;
|
|
427
|
+
type: "source";
|
|
428
|
+
sourceType: "document";
|
|
429
|
+
mediaType: string;
|
|
384
430
|
})[] | undefined;
|
|
385
431
|
warnings?: ({
|
|
386
432
|
details?: string | undefined;
|
|
@@ -395,6 +441,20 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
395
441
|
message: string;
|
|
396
442
|
})[] | undefined;
|
|
397
443
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
444
|
+
reasoningDetails?: ({
|
|
445
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
446
|
+
signature?: string | undefined;
|
|
447
|
+
state?: "streaming" | "done" | undefined;
|
|
448
|
+
type: "reasoning";
|
|
449
|
+
text: string;
|
|
450
|
+
} | {
|
|
451
|
+
signature?: string | undefined;
|
|
452
|
+
type: "text";
|
|
453
|
+
text: string;
|
|
454
|
+
} | {
|
|
455
|
+
type: "redacted";
|
|
456
|
+
data: string;
|
|
457
|
+
})[] | undefined;
|
|
398
458
|
parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
399
459
|
stepId?: string | undefined;
|
|
400
460
|
status: "pending" | "success" | "failed";
|
|
@@ -403,19 +463,24 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
403
463
|
stepOrder: number;
|
|
404
464
|
tool: boolean;
|
|
405
465
|
} | null>;
|
|
406
|
-
export declare const
|
|
407
|
-
|
|
466
|
+
export declare const finalizeMessage: import("convex/server").RegisteredMutation<"public", {
|
|
467
|
+
result: {
|
|
468
|
+
status: "success";
|
|
469
|
+
} | {
|
|
470
|
+
status: "failed";
|
|
471
|
+
error: string;
|
|
472
|
+
};
|
|
408
473
|
messageId: import("convex/values").GenericId<"messages">;
|
|
409
474
|
}, Promise<void>>;
|
|
410
|
-
export declare const commitMessage: import("convex/server").RegisteredMutation<"public", {
|
|
411
|
-
messageId: Id<"messages">;
|
|
412
|
-
}, Promise<void>>;
|
|
413
475
|
export declare const updateMessage: import("convex/server").RegisteredMutation<"public", {
|
|
414
476
|
messageId: import("convex/values").GenericId<"messages">;
|
|
415
477
|
patch: {
|
|
416
478
|
status?: "pending" | "success" | "failed" | undefined;
|
|
417
479
|
fileIds?: import("convex/values").GenericId<"files">[] | undefined;
|
|
418
480
|
error?: string | undefined;
|
|
481
|
+
model?: string | undefined;
|
|
482
|
+
provider?: string | undefined;
|
|
483
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
419
484
|
message?: {
|
|
420
485
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
421
486
|
role: "user";
|
|
@@ -451,6 +516,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
451
516
|
} | {
|
|
452
517
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
453
518
|
signature?: string | undefined;
|
|
519
|
+
state?: "streaming" | "done" | undefined;
|
|
454
520
|
type: "reasoning";
|
|
455
521
|
text: string;
|
|
456
522
|
} | {
|
|
@@ -459,6 +525,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
459
525
|
data: string;
|
|
460
526
|
} | {
|
|
461
527
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
528
|
+
providerExecuted?: boolean | undefined;
|
|
462
529
|
type: "tool-call";
|
|
463
530
|
toolCallId: string;
|
|
464
531
|
toolName: string;
|
|
@@ -470,6 +537,8 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
470
537
|
content: {
|
|
471
538
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
472
539
|
args?: any;
|
|
540
|
+
providerExecuted?: boolean | undefined;
|
|
541
|
+
isError?: boolean | undefined;
|
|
473
542
|
experimental_content?: ({
|
|
474
543
|
type: "text";
|
|
475
544
|
text: string;
|
|
@@ -478,7 +547,6 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
478
547
|
type: "image";
|
|
479
548
|
data: string;
|
|
480
549
|
})[] | undefined;
|
|
481
|
-
isError?: boolean | undefined;
|
|
482
550
|
type: "tool-result";
|
|
483
551
|
toolCallId: string;
|
|
484
552
|
toolName: string;
|
|
@@ -489,6 +557,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
489
557
|
role: "system";
|
|
490
558
|
content: string;
|
|
491
559
|
} | undefined;
|
|
560
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
492
561
|
};
|
|
493
562
|
}, Promise<{
|
|
494
563
|
id?: string | undefined;
|
|
@@ -535,6 +604,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
535
604
|
} | {
|
|
536
605
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
537
606
|
signature?: string | undefined;
|
|
607
|
+
state?: "streaming" | "done" | undefined;
|
|
538
608
|
type: "reasoning";
|
|
539
609
|
text: string;
|
|
540
610
|
} | {
|
|
@@ -543,6 +613,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
543
613
|
data: string;
|
|
544
614
|
} | {
|
|
545
615
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
616
|
+
providerExecuted?: boolean | undefined;
|
|
546
617
|
type: "tool-call";
|
|
547
618
|
toolCallId: string;
|
|
548
619
|
toolName: string;
|
|
@@ -554,6 +625,8 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
554
625
|
content: {
|
|
555
626
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
556
627
|
args?: any;
|
|
628
|
+
providerExecuted?: boolean | undefined;
|
|
629
|
+
isError?: boolean | undefined;
|
|
557
630
|
experimental_content?: ({
|
|
558
631
|
type: "text";
|
|
559
632
|
text: string;
|
|
@@ -562,7 +635,6 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
562
635
|
type: "image";
|
|
563
636
|
data: string;
|
|
564
637
|
})[] | undefined;
|
|
565
|
-
isError?: boolean | undefined;
|
|
566
638
|
type: "tool-result";
|
|
567
639
|
toolCallId: string;
|
|
568
640
|
toolName: string;
|
|
@@ -576,25 +648,28 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
576
648
|
text?: string | undefined;
|
|
577
649
|
reasoning?: string | undefined;
|
|
578
650
|
usage?: {
|
|
651
|
+
reasoningTokens?: number | undefined;
|
|
652
|
+
cachedInputTokens?: number | undefined;
|
|
579
653
|
promptTokens: number;
|
|
580
654
|
completionTokens: number;
|
|
581
655
|
totalTokens: number;
|
|
582
656
|
} | undefined;
|
|
583
657
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
584
|
-
sources?: {
|
|
658
|
+
sources?: ({
|
|
585
659
|
title?: string | undefined;
|
|
660
|
+
type?: "source" | undefined;
|
|
586
661
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
587
662
|
id: string;
|
|
588
663
|
sourceType: "url";
|
|
589
664
|
url: string;
|
|
590
|
-
}[] | undefined;
|
|
591
|
-
reasoningDetails?: ({
|
|
592
|
-
signature?: string | undefined;
|
|
593
|
-
type: "text";
|
|
594
|
-
text: string;
|
|
595
665
|
} | {
|
|
596
|
-
|
|
597
|
-
|
|
666
|
+
filename?: string | undefined;
|
|
667
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
668
|
+
id: string;
|
|
669
|
+
title: string;
|
|
670
|
+
type: "source";
|
|
671
|
+
sourceType: "document";
|
|
672
|
+
mediaType: string;
|
|
598
673
|
})[] | undefined;
|
|
599
674
|
warnings?: ({
|
|
600
675
|
details?: string | undefined;
|
|
@@ -609,6 +684,20 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
609
684
|
message: string;
|
|
610
685
|
})[] | undefined;
|
|
611
686
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
687
|
+
reasoningDetails?: ({
|
|
688
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
689
|
+
signature?: string | undefined;
|
|
690
|
+
state?: "streaming" | "done" | undefined;
|
|
691
|
+
type: "reasoning";
|
|
692
|
+
text: string;
|
|
693
|
+
} | {
|
|
694
|
+
signature?: string | undefined;
|
|
695
|
+
type: "text";
|
|
696
|
+
text: string;
|
|
697
|
+
} | {
|
|
698
|
+
type: "redacted";
|
|
699
|
+
data: string;
|
|
700
|
+
})[] | undefined;
|
|
612
701
|
_id: string;
|
|
613
702
|
_creationTime: number;
|
|
614
703
|
status: "pending" | "success" | "failed";
|
|
@@ -677,6 +766,7 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
677
766
|
} | {
|
|
678
767
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
679
768
|
signature?: string | undefined;
|
|
769
|
+
state?: "streaming" | "done" | undefined;
|
|
680
770
|
type: "reasoning";
|
|
681
771
|
text: string;
|
|
682
772
|
} | {
|
|
@@ -685,6 +775,7 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
685
775
|
data: string;
|
|
686
776
|
} | {
|
|
687
777
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
778
|
+
providerExecuted?: boolean | undefined;
|
|
688
779
|
type: "tool-call";
|
|
689
780
|
toolCallId: string;
|
|
690
781
|
toolName: string;
|
|
@@ -696,6 +787,8 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
696
787
|
content: {
|
|
697
788
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
698
789
|
args?: any;
|
|
790
|
+
providerExecuted?: boolean | undefined;
|
|
791
|
+
isError?: boolean | undefined;
|
|
699
792
|
experimental_content?: ({
|
|
700
793
|
type: "text";
|
|
701
794
|
text: string;
|
|
@@ -704,7 +797,6 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
704
797
|
type: "image";
|
|
705
798
|
data: string;
|
|
706
799
|
})[] | undefined;
|
|
707
|
-
isError?: boolean | undefined;
|
|
708
800
|
type: "tool-result";
|
|
709
801
|
toolCallId: string;
|
|
710
802
|
toolName: string;
|
|
@@ -718,25 +810,28 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
718
810
|
text?: string | undefined;
|
|
719
811
|
reasoning?: string | undefined;
|
|
720
812
|
usage?: {
|
|
813
|
+
reasoningTokens?: number | undefined;
|
|
814
|
+
cachedInputTokens?: number | undefined;
|
|
721
815
|
promptTokens: number;
|
|
722
816
|
completionTokens: number;
|
|
723
817
|
totalTokens: number;
|
|
724
818
|
} | undefined;
|
|
725
819
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
726
|
-
sources?: {
|
|
820
|
+
sources?: ({
|
|
727
821
|
title?: string | undefined;
|
|
822
|
+
type?: "source" | undefined;
|
|
728
823
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
729
824
|
id: string;
|
|
730
825
|
sourceType: "url";
|
|
731
826
|
url: string;
|
|
732
|
-
}[] | undefined;
|
|
733
|
-
reasoningDetails?: ({
|
|
734
|
-
signature?: string | undefined;
|
|
735
|
-
type: "text";
|
|
736
|
-
text: string;
|
|
737
827
|
} | {
|
|
738
|
-
|
|
739
|
-
|
|
828
|
+
filename?: string | undefined;
|
|
829
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
830
|
+
id: string;
|
|
831
|
+
title: string;
|
|
832
|
+
type: "source";
|
|
833
|
+
sourceType: "document";
|
|
834
|
+
mediaType: string;
|
|
740
835
|
})[] | undefined;
|
|
741
836
|
warnings?: ({
|
|
742
837
|
details?: string | undefined;
|
|
@@ -751,6 +846,20 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
751
846
|
message: string;
|
|
752
847
|
})[] | undefined;
|
|
753
848
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
849
|
+
reasoningDetails?: ({
|
|
850
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
851
|
+
signature?: string | undefined;
|
|
852
|
+
state?: "streaming" | "done" | undefined;
|
|
853
|
+
type: "reasoning";
|
|
854
|
+
text: string;
|
|
855
|
+
} | {
|
|
856
|
+
signature?: string | undefined;
|
|
857
|
+
type: "text";
|
|
858
|
+
text: string;
|
|
859
|
+
} | {
|
|
860
|
+
type: "redacted";
|
|
861
|
+
data: string;
|
|
862
|
+
})[] | undefined;
|
|
754
863
|
_id: string;
|
|
755
864
|
_creationTime: number;
|
|
756
865
|
status: "pending" | "success" | "failed";
|
|
@@ -811,6 +920,7 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
811
920
|
} | {
|
|
812
921
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
813
922
|
signature?: string | undefined;
|
|
923
|
+
state?: "streaming" | "done" | undefined;
|
|
814
924
|
type: "reasoning";
|
|
815
925
|
text: string;
|
|
816
926
|
} | {
|
|
@@ -819,6 +929,7 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
819
929
|
data: string;
|
|
820
930
|
} | {
|
|
821
931
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
932
|
+
providerExecuted?: boolean | undefined;
|
|
822
933
|
type: "tool-call";
|
|
823
934
|
toolCallId: string;
|
|
824
935
|
toolName: string;
|
|
@@ -830,6 +941,8 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
830
941
|
content: {
|
|
831
942
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
832
943
|
args?: any;
|
|
944
|
+
providerExecuted?: boolean | undefined;
|
|
945
|
+
isError?: boolean | undefined;
|
|
833
946
|
experimental_content?: ({
|
|
834
947
|
type: "text";
|
|
835
948
|
text: string;
|
|
@@ -838,7 +951,6 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
838
951
|
type: "image";
|
|
839
952
|
data: string;
|
|
840
953
|
})[] | undefined;
|
|
841
|
-
isError?: boolean | undefined;
|
|
842
954
|
type: "tool-result";
|
|
843
955
|
toolCallId: string;
|
|
844
956
|
toolName: string;
|
|
@@ -852,25 +964,28 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
852
964
|
text?: string | undefined;
|
|
853
965
|
reasoning?: string | undefined;
|
|
854
966
|
usage?: {
|
|
967
|
+
reasoningTokens?: number | undefined;
|
|
968
|
+
cachedInputTokens?: number | undefined;
|
|
855
969
|
promptTokens: number;
|
|
856
970
|
completionTokens: number;
|
|
857
971
|
totalTokens: number;
|
|
858
972
|
} | undefined;
|
|
859
973
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
860
|
-
sources?: {
|
|
974
|
+
sources?: ({
|
|
861
975
|
title?: string | undefined;
|
|
976
|
+
type?: "source" | undefined;
|
|
862
977
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
863
978
|
id: string;
|
|
864
979
|
sourceType: "url";
|
|
865
980
|
url: string;
|
|
866
|
-
}[] | undefined;
|
|
867
|
-
reasoningDetails?: ({
|
|
868
|
-
signature?: string | undefined;
|
|
869
|
-
type: "text";
|
|
870
|
-
text: string;
|
|
871
981
|
} | {
|
|
872
|
-
|
|
873
|
-
|
|
982
|
+
filename?: string | undefined;
|
|
983
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
984
|
+
id: string;
|
|
985
|
+
title: string;
|
|
986
|
+
type: "source";
|
|
987
|
+
sourceType: "document";
|
|
988
|
+
mediaType: string;
|
|
874
989
|
})[] | undefined;
|
|
875
990
|
warnings?: ({
|
|
876
991
|
details?: string | undefined;
|
|
@@ -885,6 +1000,20 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
885
1000
|
message: string;
|
|
886
1001
|
})[] | undefined;
|
|
887
1002
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1003
|
+
reasoningDetails?: ({
|
|
1004
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1005
|
+
signature?: string | undefined;
|
|
1006
|
+
state?: "streaming" | "done" | undefined;
|
|
1007
|
+
type: "reasoning";
|
|
1008
|
+
text: string;
|
|
1009
|
+
} | {
|
|
1010
|
+
signature?: string | undefined;
|
|
1011
|
+
type: "text";
|
|
1012
|
+
text: string;
|
|
1013
|
+
} | {
|
|
1014
|
+
type: "redacted";
|
|
1015
|
+
data: string;
|
|
1016
|
+
})[] | undefined;
|
|
888
1017
|
_id: string;
|
|
889
1018
|
_creationTime: number;
|
|
890
1019
|
status: "pending" | "success" | "failed";
|
|
@@ -901,10 +1030,10 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
901
1030
|
before: number;
|
|
902
1031
|
after: number;
|
|
903
1032
|
} | undefined;
|
|
1033
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
904
1034
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
905
1035
|
embedding?: number[] | undefined;
|
|
906
1036
|
embeddingModel?: string | undefined;
|
|
907
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
908
1037
|
limit: number;
|
|
909
1038
|
}, Promise<{
|
|
910
1039
|
id?: string | undefined;
|
|
@@ -951,6 +1080,7 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
951
1080
|
} | {
|
|
952
1081
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
953
1082
|
signature?: string | undefined;
|
|
1083
|
+
state?: "streaming" | "done" | undefined;
|
|
954
1084
|
type: "reasoning";
|
|
955
1085
|
text: string;
|
|
956
1086
|
} | {
|
|
@@ -959,6 +1089,7 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
959
1089
|
data: string;
|
|
960
1090
|
} | {
|
|
961
1091
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1092
|
+
providerExecuted?: boolean | undefined;
|
|
962
1093
|
type: "tool-call";
|
|
963
1094
|
toolCallId: string;
|
|
964
1095
|
toolName: string;
|
|
@@ -970,6 +1101,8 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
970
1101
|
content: {
|
|
971
1102
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
972
1103
|
args?: any;
|
|
1104
|
+
providerExecuted?: boolean | undefined;
|
|
1105
|
+
isError?: boolean | undefined;
|
|
973
1106
|
experimental_content?: ({
|
|
974
1107
|
type: "text";
|
|
975
1108
|
text: string;
|
|
@@ -978,7 +1111,6 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
978
1111
|
type: "image";
|
|
979
1112
|
data: string;
|
|
980
1113
|
})[] | undefined;
|
|
981
|
-
isError?: boolean | undefined;
|
|
982
1114
|
type: "tool-result";
|
|
983
1115
|
toolCallId: string;
|
|
984
1116
|
toolName: string;
|
|
@@ -992,25 +1124,28 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
992
1124
|
text?: string | undefined;
|
|
993
1125
|
reasoning?: string | undefined;
|
|
994
1126
|
usage?: {
|
|
1127
|
+
reasoningTokens?: number | undefined;
|
|
1128
|
+
cachedInputTokens?: number | undefined;
|
|
995
1129
|
promptTokens: number;
|
|
996
1130
|
completionTokens: number;
|
|
997
1131
|
totalTokens: number;
|
|
998
1132
|
} | undefined;
|
|
999
1133
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1000
|
-
sources?: {
|
|
1134
|
+
sources?: ({
|
|
1001
1135
|
title?: string | undefined;
|
|
1136
|
+
type?: "source" | undefined;
|
|
1002
1137
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1003
1138
|
id: string;
|
|
1004
1139
|
sourceType: "url";
|
|
1005
1140
|
url: string;
|
|
1006
|
-
}[] | undefined;
|
|
1007
|
-
reasoningDetails?: ({
|
|
1008
|
-
signature?: string | undefined;
|
|
1009
|
-
type: "text";
|
|
1010
|
-
text: string;
|
|
1011
1141
|
} | {
|
|
1012
|
-
|
|
1013
|
-
|
|
1142
|
+
filename?: string | undefined;
|
|
1143
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1144
|
+
id: string;
|
|
1145
|
+
title: string;
|
|
1146
|
+
type: "source";
|
|
1147
|
+
sourceType: "document";
|
|
1148
|
+
mediaType: string;
|
|
1014
1149
|
})[] | undefined;
|
|
1015
1150
|
warnings?: ({
|
|
1016
1151
|
details?: string | undefined;
|
|
@@ -1025,6 +1160,20 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1025
1160
|
message: string;
|
|
1026
1161
|
})[] | undefined;
|
|
1027
1162
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1163
|
+
reasoningDetails?: ({
|
|
1164
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1165
|
+
signature?: string | undefined;
|
|
1166
|
+
state?: "streaming" | "done" | undefined;
|
|
1167
|
+
type: "reasoning";
|
|
1168
|
+
text: string;
|
|
1169
|
+
} | {
|
|
1170
|
+
signature?: string | undefined;
|
|
1171
|
+
type: "text";
|
|
1172
|
+
text: string;
|
|
1173
|
+
} | {
|
|
1174
|
+
type: "redacted";
|
|
1175
|
+
data: string;
|
|
1176
|
+
})[] | undefined;
|
|
1028
1177
|
_id: string;
|
|
1029
1178
|
_creationTime: number;
|
|
1030
1179
|
status: "pending" | "success" | "failed";
|
|
@@ -1035,8 +1184,8 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1035
1184
|
}[]>>;
|
|
1036
1185
|
export declare const _fetchSearchMessages: import("convex/server").RegisteredQuery<"internal", {
|
|
1037
1186
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
1038
|
-
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1039
1187
|
searchAllMessagesForUserId?: string | undefined;
|
|
1188
|
+
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1040
1189
|
textSearchMessages?: {
|
|
1041
1190
|
id?: string | undefined;
|
|
1042
1191
|
userId?: string | undefined;
|
|
@@ -1082,6 +1231,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1082
1231
|
} | {
|
|
1083
1232
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1084
1233
|
signature?: string | undefined;
|
|
1234
|
+
state?: "streaming" | "done" | undefined;
|
|
1085
1235
|
type: "reasoning";
|
|
1086
1236
|
text: string;
|
|
1087
1237
|
} | {
|
|
@@ -1090,6 +1240,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1090
1240
|
data: string;
|
|
1091
1241
|
} | {
|
|
1092
1242
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1243
|
+
providerExecuted?: boolean | undefined;
|
|
1093
1244
|
type: "tool-call";
|
|
1094
1245
|
toolCallId: string;
|
|
1095
1246
|
toolName: string;
|
|
@@ -1101,6 +1252,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1101
1252
|
content: {
|
|
1102
1253
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1103
1254
|
args?: any;
|
|
1255
|
+
providerExecuted?: boolean | undefined;
|
|
1256
|
+
isError?: boolean | undefined;
|
|
1104
1257
|
experimental_content?: ({
|
|
1105
1258
|
type: "text";
|
|
1106
1259
|
text: string;
|
|
@@ -1109,7 +1262,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1109
1262
|
type: "image";
|
|
1110
1263
|
data: string;
|
|
1111
1264
|
})[] | undefined;
|
|
1112
|
-
isError?: boolean | undefined;
|
|
1113
1265
|
type: "tool-result";
|
|
1114
1266
|
toolCallId: string;
|
|
1115
1267
|
toolName: string;
|
|
@@ -1123,25 +1275,28 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1123
1275
|
text?: string | undefined;
|
|
1124
1276
|
reasoning?: string | undefined;
|
|
1125
1277
|
usage?: {
|
|
1278
|
+
reasoningTokens?: number | undefined;
|
|
1279
|
+
cachedInputTokens?: number | undefined;
|
|
1126
1280
|
promptTokens: number;
|
|
1127
1281
|
completionTokens: number;
|
|
1128
1282
|
totalTokens: number;
|
|
1129
1283
|
} | undefined;
|
|
1130
1284
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1131
|
-
sources?: {
|
|
1285
|
+
sources?: ({
|
|
1132
1286
|
title?: string | undefined;
|
|
1287
|
+
type?: "source" | undefined;
|
|
1133
1288
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1134
1289
|
id: string;
|
|
1135
1290
|
sourceType: "url";
|
|
1136
1291
|
url: string;
|
|
1137
|
-
}[] | undefined;
|
|
1138
|
-
reasoningDetails?: ({
|
|
1139
|
-
signature?: string | undefined;
|
|
1140
|
-
type: "text";
|
|
1141
|
-
text: string;
|
|
1142
1292
|
} | {
|
|
1143
|
-
|
|
1144
|
-
|
|
1293
|
+
filename?: string | undefined;
|
|
1294
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1295
|
+
id: string;
|
|
1296
|
+
title: string;
|
|
1297
|
+
type: "source";
|
|
1298
|
+
sourceType: "document";
|
|
1299
|
+
mediaType: string;
|
|
1145
1300
|
})[] | undefined;
|
|
1146
1301
|
warnings?: ({
|
|
1147
1302
|
details?: string | undefined;
|
|
@@ -1156,6 +1311,20 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1156
1311
|
message: string;
|
|
1157
1312
|
})[] | undefined;
|
|
1158
1313
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1314
|
+
reasoningDetails?: ({
|
|
1315
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1316
|
+
signature?: string | undefined;
|
|
1317
|
+
state?: "streaming" | "done" | undefined;
|
|
1318
|
+
type: "reasoning";
|
|
1319
|
+
text: string;
|
|
1320
|
+
} | {
|
|
1321
|
+
signature?: string | undefined;
|
|
1322
|
+
type: "text";
|
|
1323
|
+
text: string;
|
|
1324
|
+
} | {
|
|
1325
|
+
type: "redacted";
|
|
1326
|
+
data: string;
|
|
1327
|
+
})[] | undefined;
|
|
1159
1328
|
_id: string;
|
|
1160
1329
|
_creationTime: number;
|
|
1161
1330
|
status: "pending" | "success" | "failed";
|
|
@@ -1215,6 +1384,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1215
1384
|
} | {
|
|
1216
1385
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1217
1386
|
signature?: string | undefined;
|
|
1387
|
+
state?: "streaming" | "done" | undefined;
|
|
1218
1388
|
type: "reasoning";
|
|
1219
1389
|
text: string;
|
|
1220
1390
|
} | {
|
|
@@ -1223,6 +1393,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1223
1393
|
data: string;
|
|
1224
1394
|
} | {
|
|
1225
1395
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1396
|
+
providerExecuted?: boolean | undefined;
|
|
1226
1397
|
type: "tool-call";
|
|
1227
1398
|
toolCallId: string;
|
|
1228
1399
|
toolName: string;
|
|
@@ -1234,6 +1405,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1234
1405
|
content: {
|
|
1235
1406
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1236
1407
|
args?: any;
|
|
1408
|
+
providerExecuted?: boolean | undefined;
|
|
1409
|
+
isError?: boolean | undefined;
|
|
1237
1410
|
experimental_content?: ({
|
|
1238
1411
|
type: "text";
|
|
1239
1412
|
text: string;
|
|
@@ -1242,7 +1415,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1242
1415
|
type: "image";
|
|
1243
1416
|
data: string;
|
|
1244
1417
|
})[] | undefined;
|
|
1245
|
-
isError?: boolean | undefined;
|
|
1246
1418
|
type: "tool-result";
|
|
1247
1419
|
toolCallId: string;
|
|
1248
1420
|
toolName: string;
|
|
@@ -1256,25 +1428,28 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1256
1428
|
text?: string | undefined;
|
|
1257
1429
|
reasoning?: string | undefined;
|
|
1258
1430
|
usage?: {
|
|
1431
|
+
reasoningTokens?: number | undefined;
|
|
1432
|
+
cachedInputTokens?: number | undefined;
|
|
1259
1433
|
promptTokens: number;
|
|
1260
1434
|
completionTokens: number;
|
|
1261
1435
|
totalTokens: number;
|
|
1262
1436
|
} | undefined;
|
|
1263
1437
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1264
|
-
sources?: {
|
|
1438
|
+
sources?: ({
|
|
1265
1439
|
title?: string | undefined;
|
|
1440
|
+
type?: "source" | undefined;
|
|
1266
1441
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1267
1442
|
id: string;
|
|
1268
1443
|
sourceType: "url";
|
|
1269
1444
|
url: string;
|
|
1270
|
-
}[] | undefined;
|
|
1271
|
-
reasoningDetails?: ({
|
|
1272
|
-
signature?: string | undefined;
|
|
1273
|
-
type: "text";
|
|
1274
|
-
text: string;
|
|
1275
1445
|
} | {
|
|
1276
|
-
|
|
1277
|
-
|
|
1446
|
+
filename?: string | undefined;
|
|
1447
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1448
|
+
id: string;
|
|
1449
|
+
title: string;
|
|
1450
|
+
type: "source";
|
|
1451
|
+
sourceType: "document";
|
|
1452
|
+
mediaType: string;
|
|
1278
1453
|
})[] | undefined;
|
|
1279
1454
|
warnings?: ({
|
|
1280
1455
|
details?: string | undefined;
|
|
@@ -1289,6 +1464,20 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1289
1464
|
message: string;
|
|
1290
1465
|
})[] | undefined;
|
|
1291
1466
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1467
|
+
reasoningDetails?: ({
|
|
1468
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1469
|
+
signature?: string | undefined;
|
|
1470
|
+
state?: "streaming" | "done" | undefined;
|
|
1471
|
+
type: "reasoning";
|
|
1472
|
+
text: string;
|
|
1473
|
+
} | {
|
|
1474
|
+
signature?: string | undefined;
|
|
1475
|
+
type: "text";
|
|
1476
|
+
text: string;
|
|
1477
|
+
} | {
|
|
1478
|
+
type: "redacted";
|
|
1479
|
+
data: string;
|
|
1480
|
+
})[] | undefined;
|
|
1292
1481
|
_id: string;
|
|
1293
1482
|
_creationTime: number;
|
|
1294
1483
|
status: "pending" | "success" | "failed";
|
|
@@ -1299,8 +1488,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1299
1488
|
}[]>>;
|
|
1300
1489
|
export declare const textSearch: import("convex/server").RegisteredQuery<"public", {
|
|
1301
1490
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
1302
|
-
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1303
1491
|
searchAllMessagesForUserId?: string | undefined;
|
|
1492
|
+
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1304
1493
|
text: string;
|
|
1305
1494
|
limit: number;
|
|
1306
1495
|
}, Promise<{
|
|
@@ -1348,6 +1537,7 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1348
1537
|
} | {
|
|
1349
1538
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1350
1539
|
signature?: string | undefined;
|
|
1540
|
+
state?: "streaming" | "done" | undefined;
|
|
1351
1541
|
type: "reasoning";
|
|
1352
1542
|
text: string;
|
|
1353
1543
|
} | {
|
|
@@ -1356,6 +1546,7 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1356
1546
|
data: string;
|
|
1357
1547
|
} | {
|
|
1358
1548
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1549
|
+
providerExecuted?: boolean | undefined;
|
|
1359
1550
|
type: "tool-call";
|
|
1360
1551
|
toolCallId: string;
|
|
1361
1552
|
toolName: string;
|
|
@@ -1367,6 +1558,8 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1367
1558
|
content: {
|
|
1368
1559
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1369
1560
|
args?: any;
|
|
1561
|
+
providerExecuted?: boolean | undefined;
|
|
1562
|
+
isError?: boolean | undefined;
|
|
1370
1563
|
experimental_content?: ({
|
|
1371
1564
|
type: "text";
|
|
1372
1565
|
text: string;
|
|
@@ -1375,7 +1568,6 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1375
1568
|
type: "image";
|
|
1376
1569
|
data: string;
|
|
1377
1570
|
})[] | undefined;
|
|
1378
|
-
isError?: boolean | undefined;
|
|
1379
1571
|
type: "tool-result";
|
|
1380
1572
|
toolCallId: string;
|
|
1381
1573
|
toolName: string;
|
|
@@ -1389,25 +1581,28 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1389
1581
|
text?: string | undefined;
|
|
1390
1582
|
reasoning?: string | undefined;
|
|
1391
1583
|
usage?: {
|
|
1584
|
+
reasoningTokens?: number | undefined;
|
|
1585
|
+
cachedInputTokens?: number | undefined;
|
|
1392
1586
|
promptTokens: number;
|
|
1393
1587
|
completionTokens: number;
|
|
1394
1588
|
totalTokens: number;
|
|
1395
1589
|
} | undefined;
|
|
1396
1590
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1397
|
-
sources?: {
|
|
1591
|
+
sources?: ({
|
|
1398
1592
|
title?: string | undefined;
|
|
1593
|
+
type?: "source" | undefined;
|
|
1399
1594
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1400
1595
|
id: string;
|
|
1401
1596
|
sourceType: "url";
|
|
1402
1597
|
url: string;
|
|
1403
|
-
}[] | undefined;
|
|
1404
|
-
reasoningDetails?: ({
|
|
1405
|
-
signature?: string | undefined;
|
|
1406
|
-
type: "text";
|
|
1407
|
-
text: string;
|
|
1408
1598
|
} | {
|
|
1409
|
-
|
|
1410
|
-
|
|
1599
|
+
filename?: string | undefined;
|
|
1600
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1601
|
+
id: string;
|
|
1602
|
+
title: string;
|
|
1603
|
+
type: "source";
|
|
1604
|
+
sourceType: "document";
|
|
1605
|
+
mediaType: string;
|
|
1411
1606
|
})[] | undefined;
|
|
1412
1607
|
warnings?: ({
|
|
1413
1608
|
details?: string | undefined;
|
|
@@ -1422,6 +1617,20 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1422
1617
|
message: string;
|
|
1423
1618
|
})[] | undefined;
|
|
1424
1619
|
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1620
|
+
reasoningDetails?: ({
|
|
1621
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1622
|
+
signature?: string | undefined;
|
|
1623
|
+
state?: "streaming" | "done" | undefined;
|
|
1624
|
+
type: "reasoning";
|
|
1625
|
+
text: string;
|
|
1626
|
+
} | {
|
|
1627
|
+
signature?: string | undefined;
|
|
1628
|
+
type: "text";
|
|
1629
|
+
text: string;
|
|
1630
|
+
} | {
|
|
1631
|
+
type: "redacted";
|
|
1632
|
+
data: string;
|
|
1633
|
+
})[] | undefined;
|
|
1425
1634
|
_id: string;
|
|
1426
1635
|
_creationTime: number;
|
|
1427
1636
|
status: "pending" | "success" | "failed";
|