@convex-dev/agent 0.1.15 → 0.1.16-alpha.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/README.md +31 -28
- package/dist/client/index.d.ts +34 -31
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +23 -11
- package/dist/client/index.js.map +1 -1
- package/dist/client/search.d.ts +3 -3
- package/dist/client/types.d.ts +0 -17
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/_generated/api.d.ts +0 -149
- package/dist/component/messages.d.ts +33 -92
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/messages.js +8 -24
- package/dist/component/messages.js.map +1 -1
- package/dist/component/schema.d.ts +4 -4
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +1 -1
- package/dist/component/schema.js.map +1 -1
- package/dist/component/streams.d.ts +1 -1
- package/dist/component/threads.d.ts +18 -18
- package/dist/component/users.d.ts +3 -3
- package/dist/component/vector/tables.d.ts +3 -3
- package/dist/component/vector/tables.d.ts.map +1 -1
- package/dist/react/toUIMessages.js +2 -2
- package/dist/react/toUIMessages.js.map +1 -1
- package/dist/validators.d.ts +217 -265
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +1 -7
- package/dist/validators.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +24 -17
- package/src/client/types.ts +0 -17
- package/src/component/_generated/api.d.ts +0 -149
- package/src/component/messages.ts +13 -30
- package/src/component/schema.ts +1 -1
- package/src/component/vector/tables.ts +5 -5
- package/src/react/toUIMessages.ts +2 -2
- package/src/validators.ts +1 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,4BAA4B,EAC5B,6BAA6B,E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{
|
|
|
578
578
|
>;
|
|
579
579
|
}>
|
|
580
580
|
>;
|
|
581
|
-
getThreadMessages: FunctionReference<
|
|
582
|
-
"query",
|
|
583
|
-
"public",
|
|
584
|
-
{ deprecated: "Use listMessagesByThreadId instead" },
|
|
585
|
-
{
|
|
586
|
-
continueCursor: string;
|
|
587
|
-
isDone: boolean;
|
|
588
|
-
page: Array<{
|
|
589
|
-
_creationTime: number;
|
|
590
|
-
_id: string;
|
|
591
|
-
agentName?: string;
|
|
592
|
-
embeddingId?: string;
|
|
593
|
-
error?: string;
|
|
594
|
-
fileIds?: Array<string>;
|
|
595
|
-
finishReason?:
|
|
596
|
-
| "stop"
|
|
597
|
-
| "length"
|
|
598
|
-
| "content-filter"
|
|
599
|
-
| "tool-calls"
|
|
600
|
-
| "error"
|
|
601
|
-
| "other"
|
|
602
|
-
| "unknown";
|
|
603
|
-
id?: string;
|
|
604
|
-
message?:
|
|
605
|
-
| {
|
|
606
|
-
content:
|
|
607
|
-
| string
|
|
608
|
-
| Array<
|
|
609
|
-
| {
|
|
610
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
611
|
-
text: string;
|
|
612
|
-
type: "text";
|
|
613
|
-
}
|
|
614
|
-
| {
|
|
615
|
-
image: string | ArrayBuffer;
|
|
616
|
-
mimeType?: string;
|
|
617
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
618
|
-
type: "image";
|
|
619
|
-
}
|
|
620
|
-
| {
|
|
621
|
-
data: string | ArrayBuffer;
|
|
622
|
-
filename?: string;
|
|
623
|
-
mimeType: string;
|
|
624
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
625
|
-
type: "file";
|
|
626
|
-
}
|
|
627
|
-
>;
|
|
628
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
629
|
-
role: "user";
|
|
630
|
-
}
|
|
631
|
-
| {
|
|
632
|
-
content:
|
|
633
|
-
| string
|
|
634
|
-
| Array<
|
|
635
|
-
| {
|
|
636
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
637
|
-
text: string;
|
|
638
|
-
type: "text";
|
|
639
|
-
}
|
|
640
|
-
| {
|
|
641
|
-
data: string | ArrayBuffer;
|
|
642
|
-
filename?: string;
|
|
643
|
-
mimeType: string;
|
|
644
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
645
|
-
type: "file";
|
|
646
|
-
}
|
|
647
|
-
| {
|
|
648
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
649
|
-
signature?: string;
|
|
650
|
-
text: string;
|
|
651
|
-
type: "reasoning";
|
|
652
|
-
}
|
|
653
|
-
| {
|
|
654
|
-
data: string;
|
|
655
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
656
|
-
type: "redacted-reasoning";
|
|
657
|
-
}
|
|
658
|
-
| {
|
|
659
|
-
args: any;
|
|
660
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
661
|
-
toolCallId: string;
|
|
662
|
-
toolName: string;
|
|
663
|
-
type: "tool-call";
|
|
664
|
-
}
|
|
665
|
-
>;
|
|
666
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
667
|
-
role: "assistant";
|
|
668
|
-
}
|
|
669
|
-
| {
|
|
670
|
-
content: Array<{
|
|
671
|
-
args?: any;
|
|
672
|
-
experimental_content?: Array<
|
|
673
|
-
| { text: string; type: "text" }
|
|
674
|
-
| { data: string; mimeType?: string; type: "image" }
|
|
675
|
-
>;
|
|
676
|
-
isError?: boolean;
|
|
677
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
678
|
-
result: any;
|
|
679
|
-
toolCallId: string;
|
|
680
|
-
toolName: string;
|
|
681
|
-
type: "tool-result";
|
|
682
|
-
}>;
|
|
683
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
684
|
-
role: "tool";
|
|
685
|
-
}
|
|
686
|
-
| {
|
|
687
|
-
content: string;
|
|
688
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
689
|
-
role: "system";
|
|
690
|
-
};
|
|
691
|
-
model?: string;
|
|
692
|
-
order: number;
|
|
693
|
-
provider?: string;
|
|
694
|
-
providerMetadata?: Record<string, Record<string, any>>;
|
|
695
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
696
|
-
reasoning?: string;
|
|
697
|
-
reasoningDetails?: Array<
|
|
698
|
-
| { signature?: string; text: string; type: "text" }
|
|
699
|
-
| { data: string; type: "redacted" }
|
|
700
|
-
>;
|
|
701
|
-
sources?: Array<{
|
|
702
|
-
id: string;
|
|
703
|
-
providerOptions?: Record<string, Record<string, any>>;
|
|
704
|
-
sourceType: "url";
|
|
705
|
-
title?: string;
|
|
706
|
-
url: string;
|
|
707
|
-
}>;
|
|
708
|
-
status: "pending" | "success" | "failed";
|
|
709
|
-
stepOrder: number;
|
|
710
|
-
text?: string;
|
|
711
|
-
threadId: string;
|
|
712
|
-
tool: boolean;
|
|
713
|
-
usage?: {
|
|
714
|
-
completionTokens: number;
|
|
715
|
-
promptTokens: number;
|
|
716
|
-
totalTokens: number;
|
|
717
|
-
};
|
|
718
|
-
userId?: string;
|
|
719
|
-
warnings?: Array<
|
|
720
|
-
| { details?: string; setting: string; type: "unsupported-setting" }
|
|
721
|
-
| { details?: string; tool: any; type: "unsupported-tool" }
|
|
722
|
-
| { message: string; type: "other" }
|
|
723
|
-
>;
|
|
724
|
-
}>;
|
|
725
|
-
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
726
|
-
splitCursor?: string | null;
|
|
727
|
-
}
|
|
728
|
-
>;
|
|
729
581
|
listMessagesByThreadId: FunctionReference<
|
|
730
582
|
"query",
|
|
731
583
|
"public",
|
|
732
584
|
{
|
|
733
585
|
excludeToolMessages?: boolean;
|
|
734
|
-
isTool?: "use excludeToolMessages instead of this";
|
|
735
586
|
order: "asc" | "desc";
|
|
736
587
|
paginationOpts?: {
|
|
737
588
|
cursor: string | null;
|
|
@@ -1,67 +1,13 @@
|
|
|
1
1
|
import type { Doc, Id } from "./_generated/dataModel.js";
|
|
2
2
|
import { type MutationCtx, type QueryCtx } from "./_generated/server.js";
|
|
3
|
-
/** @deprecated Use *.threads.listMessagesByThreadId instead. */
|
|
4
|
-
export declare const listThreadsByUserId: import("convex/server").RegisteredQuery<"public", {
|
|
5
|
-
userId?: string | undefined;
|
|
6
|
-
order?: "asc" | "desc" | undefined;
|
|
7
|
-
paginationOpts?: {
|
|
8
|
-
id?: number | undefined;
|
|
9
|
-
endCursor?: string | null | undefined;
|
|
10
|
-
maximumRowsRead?: number | undefined;
|
|
11
|
-
maximumBytesRead?: number | undefined;
|
|
12
|
-
numItems: number;
|
|
13
|
-
cursor: string | null;
|
|
14
|
-
} | undefined;
|
|
15
|
-
}, Promise<{
|
|
16
|
-
page: {
|
|
17
|
-
userId?: string | undefined;
|
|
18
|
-
title?: string | undefined;
|
|
19
|
-
summary?: string | undefined;
|
|
20
|
-
status: "active" | "archived";
|
|
21
|
-
_creationTime: number;
|
|
22
|
-
_id: string;
|
|
23
|
-
}[];
|
|
24
|
-
isDone: boolean;
|
|
25
|
-
continueCursor: import("convex/server").Cursor;
|
|
26
|
-
splitCursor?: import("convex/server").Cursor | null;
|
|
27
|
-
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
28
|
-
}>>;
|
|
29
|
-
/** @deprecated Use *.threads.getThread */
|
|
30
|
-
export declare const getThread: import("convex/server").RegisteredQuery<"public", {
|
|
31
|
-
threadId: import("convex/values").GenericId<"threads">;
|
|
32
|
-
}, Promise<{
|
|
33
|
-
userId?: string | undefined;
|
|
34
|
-
title?: string | undefined;
|
|
35
|
-
summary?: string | undefined;
|
|
36
|
-
status: "active" | "archived";
|
|
37
|
-
_creationTime: number;
|
|
38
|
-
_id: string;
|
|
39
|
-
} | null>>;
|
|
40
|
-
/** @deprecated Use *.threads.updateThread instead */
|
|
41
|
-
export declare const updateThread: import("convex/server").RegisteredMutation<"public", {
|
|
42
|
-
threadId: import("convex/values").GenericId<"threads">;
|
|
43
|
-
patch: {
|
|
44
|
-
status?: "active" | "archived" | undefined;
|
|
45
|
-
userId?: string | undefined;
|
|
46
|
-
title?: string | undefined;
|
|
47
|
-
summary?: string | undefined;
|
|
48
|
-
};
|
|
49
|
-
}, Promise<{
|
|
50
|
-
userId?: string | undefined;
|
|
51
|
-
title?: string | undefined;
|
|
52
|
-
summary?: string | undefined;
|
|
53
|
-
status: "active" | "archived";
|
|
54
|
-
_creationTime: number;
|
|
55
|
-
_id: string;
|
|
56
|
-
}>>;
|
|
57
3
|
export declare function deleteMessage(ctx: MutationCtx, messageDoc: Doc<"messages">): Promise<void>;
|
|
58
4
|
export declare const deleteByIds: import("convex/server").RegisteredMutation<"public", {
|
|
59
5
|
messageIds: import("convex/values").GenericId<"messages">[];
|
|
60
6
|
}, Promise<import("convex/values").GenericId<"messages">[]>>;
|
|
61
7
|
export declare const messageStatuses: ("pending" | "success" | "failed")[];
|
|
62
8
|
export declare const deleteByOrder: import("convex/server").RegisteredMutation<"public", {
|
|
63
|
-
startStepOrder?: number | undefined;
|
|
64
9
|
endStepOrder?: number | undefined;
|
|
10
|
+
startStepOrder?: number | undefined;
|
|
65
11
|
threadId: import("convex/values").GenericId<"threads">;
|
|
66
12
|
startOrder: number;
|
|
67
13
|
endOrder: number;
|
|
@@ -75,12 +21,12 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
75
21
|
pending?: boolean | undefined;
|
|
76
22
|
agentName?: string | undefined;
|
|
77
23
|
promptMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
24
|
+
failPendingSteps?: boolean | undefined;
|
|
78
25
|
embeddings?: {
|
|
79
26
|
model: string;
|
|
80
27
|
dimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
|
|
81
28
|
vectors: (number[] | null)[];
|
|
82
29
|
} | undefined;
|
|
83
|
-
failPendingSteps?: boolean | undefined;
|
|
84
30
|
threadId: import("convex/values").GenericId<"threads">;
|
|
85
31
|
messages: {
|
|
86
32
|
id?: string | undefined;
|
|
@@ -123,7 +69,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
123
69
|
type: "other";
|
|
124
70
|
message: string;
|
|
125
71
|
})[] | undefined;
|
|
126
|
-
finishReason?: "
|
|
72
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
127
73
|
message: {
|
|
128
74
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
129
75
|
role: "user";
|
|
@@ -317,14 +263,14 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
|
|
|
317
263
|
type: "other";
|
|
318
264
|
message: string;
|
|
319
265
|
})[] | undefined;
|
|
320
|
-
finishReason?: "
|
|
266
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
267
|
+
_id: string;
|
|
268
|
+
_creationTime: number;
|
|
321
269
|
status: "pending" | "success" | "failed";
|
|
322
270
|
order: number;
|
|
323
|
-
_creationTime: number;
|
|
324
271
|
threadId: string;
|
|
325
272
|
stepOrder: number;
|
|
326
273
|
tool: boolean;
|
|
327
|
-
_id: string;
|
|
328
274
|
}[];
|
|
329
275
|
}>>;
|
|
330
276
|
export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, order?: number): Promise<{
|
|
@@ -448,7 +394,7 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
|
|
|
448
394
|
type: "other";
|
|
449
395
|
message: string;
|
|
450
396
|
})[] | undefined;
|
|
451
|
-
finishReason?: "
|
|
397
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
452
398
|
parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
453
399
|
stepId?: string | undefined;
|
|
454
400
|
status: "pending" | "success" | "failed";
|
|
@@ -662,16 +608,17 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
|
|
|
662
608
|
type: "other";
|
|
663
609
|
message: string;
|
|
664
610
|
})[] | undefined;
|
|
665
|
-
finishReason?: "
|
|
611
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
612
|
+
_id: string;
|
|
613
|
+
_creationTime: number;
|
|
666
614
|
status: "pending" | "success" | "failed";
|
|
667
615
|
order: number;
|
|
668
|
-
_creationTime: number;
|
|
669
616
|
threadId: string;
|
|
670
617
|
stepOrder: number;
|
|
671
618
|
tool: boolean;
|
|
672
|
-
_id: string;
|
|
673
619
|
}>>;
|
|
674
620
|
export declare const listMessagesByThreadId: import("convex/server").RegisteredQuery<"public", {
|
|
621
|
+
excludeToolMessages?: boolean | undefined;
|
|
675
622
|
paginationOpts?: {
|
|
676
623
|
id?: number | undefined;
|
|
677
624
|
endCursor?: string | null | undefined;
|
|
@@ -680,8 +627,6 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
680
627
|
numItems: number;
|
|
681
628
|
cursor: string | null;
|
|
682
629
|
} | undefined;
|
|
683
|
-
excludeToolMessages?: boolean | undefined;
|
|
684
|
-
isTool?: "use excludeToolMessages instead of this" | undefined;
|
|
685
630
|
statuses?: ("pending" | "success" | "failed")[] | undefined;
|
|
686
631
|
upToAndIncludingMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
687
632
|
order: "asc" | "desc";
|
|
@@ -805,14 +750,14 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
|
|
|
805
750
|
type: "other";
|
|
806
751
|
message: string;
|
|
807
752
|
})[] | undefined;
|
|
808
|
-
finishReason?: "
|
|
753
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
754
|
+
_id: string;
|
|
755
|
+
_creationTime: number;
|
|
809
756
|
status: "pending" | "success" | "failed";
|
|
810
757
|
order: number;
|
|
811
|
-
_creationTime: number;
|
|
812
758
|
threadId: string;
|
|
813
759
|
stepOrder: number;
|
|
814
760
|
tool: boolean;
|
|
815
|
-
_id: string;
|
|
816
761
|
}[];
|
|
817
762
|
isDone: boolean;
|
|
818
763
|
continueCursor: import("convex/server").Cursor;
|
|
@@ -942,7 +887,7 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
942
887
|
type: "other";
|
|
943
888
|
message: string;
|
|
944
889
|
})[] | undefined;
|
|
945
|
-
finishReason?: "
|
|
890
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
946
891
|
parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
947
892
|
stepId?: string | undefined;
|
|
948
893
|
status: "pending" | "success" | "failed";
|
|
@@ -951,22 +896,18 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
|
|
|
951
896
|
stepOrder: number;
|
|
952
897
|
tool: boolean;
|
|
953
898
|
} | null)[]>>;
|
|
954
|
-
/** @deprecated Use listMessagesByThreadId instead. */
|
|
955
|
-
export declare const getThreadMessages: import("convex/server").RegisteredQuery<"public", {
|
|
956
|
-
deprecated: "Use listMessagesByThreadId instead";
|
|
957
|
-
}, Promise<never>>;
|
|
958
899
|
export declare const searchMessages: import("convex/server").RegisteredAction<"public", {
|
|
959
900
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
960
901
|
text?: string | undefined;
|
|
961
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
962
|
-
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
963
|
-
embedding?: number[] | undefined;
|
|
964
|
-
embeddingModel?: string | undefined;
|
|
965
902
|
vectorScoreThreshold?: number | undefined;
|
|
966
903
|
messageRange?: {
|
|
967
904
|
before: number;
|
|
968
905
|
after: number;
|
|
969
906
|
} | undefined;
|
|
907
|
+
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
908
|
+
embedding?: number[] | undefined;
|
|
909
|
+
embeddingModel?: string | undefined;
|
|
910
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
970
911
|
limit: number;
|
|
971
912
|
}, Promise<{
|
|
972
913
|
id?: string | undefined;
|
|
@@ -1086,19 +1027,19 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
|
|
|
1086
1027
|
type: "other";
|
|
1087
1028
|
message: string;
|
|
1088
1029
|
})[] | undefined;
|
|
1089
|
-
finishReason?: "
|
|
1030
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1031
|
+
_id: string;
|
|
1032
|
+
_creationTime: number;
|
|
1090
1033
|
status: "pending" | "success" | "failed";
|
|
1091
1034
|
order: number;
|
|
1092
|
-
_creationTime: number;
|
|
1093
1035
|
threadId: string;
|
|
1094
1036
|
stepOrder: number;
|
|
1095
1037
|
tool: boolean;
|
|
1096
|
-
_id: string;
|
|
1097
1038
|
}[]>>;
|
|
1098
1039
|
export declare const _fetchSearchMessages: import("convex/server").RegisteredQuery<"internal", {
|
|
1099
1040
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
1100
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
1101
1041
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1042
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
1102
1043
|
textSearchMessages?: {
|
|
1103
1044
|
id?: string | undefined;
|
|
1104
1045
|
userId?: string | undefined;
|
|
@@ -1217,14 +1158,14 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1217
1158
|
type: "other";
|
|
1218
1159
|
message: string;
|
|
1219
1160
|
})[] | undefined;
|
|
1220
|
-
finishReason?: "
|
|
1161
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1162
|
+
_id: string;
|
|
1163
|
+
_creationTime: number;
|
|
1221
1164
|
status: "pending" | "success" | "failed";
|
|
1222
1165
|
order: number;
|
|
1223
|
-
_creationTime: number;
|
|
1224
1166
|
threadId: string;
|
|
1225
1167
|
stepOrder: number;
|
|
1226
1168
|
tool: boolean;
|
|
1227
|
-
_id: string;
|
|
1228
1169
|
}[] | undefined;
|
|
1229
1170
|
limit: number;
|
|
1230
1171
|
messageRange: {
|
|
@@ -1350,19 +1291,19 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
|
|
|
1350
1291
|
type: "other";
|
|
1351
1292
|
message: string;
|
|
1352
1293
|
})[] | undefined;
|
|
1353
|
-
finishReason?: "
|
|
1294
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1295
|
+
_id: string;
|
|
1296
|
+
_creationTime: number;
|
|
1354
1297
|
status: "pending" | "success" | "failed";
|
|
1355
1298
|
order: number;
|
|
1356
|
-
_creationTime: number;
|
|
1357
1299
|
threadId: string;
|
|
1358
1300
|
stepOrder: number;
|
|
1359
1301
|
tool: boolean;
|
|
1360
|
-
_id: string;
|
|
1361
1302
|
}[]>>;
|
|
1362
1303
|
export declare const textSearch: import("convex/server").RegisteredQuery<"public", {
|
|
1363
1304
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
1364
|
-
searchAllMessagesForUserId?: string | undefined;
|
|
1365
1305
|
beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
|
|
1306
|
+
searchAllMessagesForUserId?: string | undefined;
|
|
1366
1307
|
text: string;
|
|
1367
1308
|
limit: number;
|
|
1368
1309
|
}, Promise<{
|
|
@@ -1483,13 +1424,13 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
|
|
|
1483
1424
|
type: "other";
|
|
1484
1425
|
message: string;
|
|
1485
1426
|
})[] | undefined;
|
|
1486
|
-
finishReason?: "
|
|
1427
|
+
finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1428
|
+
_id: string;
|
|
1429
|
+
_creationTime: number;
|
|
1487
1430
|
status: "pending" | "success" | "failed";
|
|
1488
1431
|
order: number;
|
|
1489
|
-
_creationTime: number;
|
|
1490
1432
|
threadId: string;
|
|
1491
1433
|
stepOrder: number;
|
|
1492
1434
|
tool: boolean;
|
|
1493
|
-
_id: string;
|
|
1494
1435
|
}[]>>;
|
|
1495
1436
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/component/messages.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAIL,KAAK,WAAW,EAEhB,KAAK,QAAQ,EACd,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/component/messages.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAIL,KAAK,WAAW,EAEhB,KAAK,QAAQ,EACd,MAAM,wBAAwB,CAAC;AAqBhC,wBAAsB,aAAa,CACjC,GAAG,EAAE,WAAW,EAChB,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,iBAS5B;AAED,eAAO,MAAM,WAAW;;4DAkBtB,CAAC;AAEH,eAAO,MAAM,eAAe,sCAE3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;GAsCxB,CAAC;AAYH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAMtB,CAAC;AAsGH,wBAAsB,aAAa,CACjC,GAAG,EAAE,QAAQ,EACb,Q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4EzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiH/B,CAAC;AAIH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6CrB,CAAC"}
|
|
@@ -10,12 +10,6 @@ import { getThread as _getThread, listThreadsByUserId as _listThreadsByUserId, u
|
|
|
10
10
|
import { insertVector, searchVectors } from "./vector/index.js";
|
|
11
11
|
import { VectorDimensions, vVectorId, } from "./vector/tables.js";
|
|
12
12
|
import { changeRefcount } from "./files.js";
|
|
13
|
-
/** @deprecated Use *.threads.listMessagesByThreadId instead. */
|
|
14
|
-
export const listThreadsByUserId = _listThreadsByUserId;
|
|
15
|
-
/** @deprecated Use *.threads.getThread */
|
|
16
|
-
export const getThread = _getThread;
|
|
17
|
-
/** @deprecated Use *.threads.updateThread instead */
|
|
18
|
-
export const updateThread = _updateThread;
|
|
19
13
|
function publicMessage(message) {
|
|
20
14
|
return omit(message, ["parentMessageId", "stepId", "files"]);
|
|
21
15
|
}
|
|
@@ -273,8 +267,6 @@ export const listMessagesByThreadId = query({
|
|
|
273
267
|
args: {
|
|
274
268
|
threadId: v.id("threads"),
|
|
275
269
|
excludeToolMessages: v.optional(v.boolean()),
|
|
276
|
-
/** @deprecated Use excludeToolMessages instead. */
|
|
277
|
-
isTool: v.optional(v.literal("use excludeToolMessages instead of this")),
|
|
278
270
|
/** What order to sort the messages in. To get the latest, use "desc". */
|
|
279
271
|
order: v.union(v.literal("asc"), v.literal("desc")),
|
|
280
272
|
paginationOpts: v.optional(paginationOptsValidator),
|
|
@@ -301,9 +293,9 @@ export const listMessagesByThreadId = query({
|
|
|
301
293
|
return qq;
|
|
302
294
|
})
|
|
303
295
|
.order(order)
|
|
304
|
-
.filterWith(
|
|
305
|
-
|
|
306
|
-
|
|
296
|
+
.filterWith(
|
|
297
|
+
// We allow all messages on the same order.
|
|
298
|
+
async (m) => !last || m.order < last.order || m.order === last.order)));
|
|
307
299
|
const messages = await mergedStream(streams, [
|
|
308
300
|
"order",
|
|
309
301
|
"stepOrder",
|
|
@@ -324,14 +316,6 @@ export const getMessagesByIds = query({
|
|
|
324
316
|
},
|
|
325
317
|
returns: v.array(v.union(v.null(), vMessageDoc)),
|
|
326
318
|
});
|
|
327
|
-
/** @deprecated Use listMessagesByThreadId instead. */
|
|
328
|
-
export const getThreadMessages = query({
|
|
329
|
-
args: { deprecated: v.literal("Use listMessagesByThreadId instead") },
|
|
330
|
-
handler: async () => {
|
|
331
|
-
throw new Error("Use listMessagesByThreadId instead of getThreadMessages");
|
|
332
|
-
},
|
|
333
|
-
returns: vPaginationResult(vMessageDoc),
|
|
334
|
-
});
|
|
335
319
|
export const searchMessages = action({
|
|
336
320
|
args: {
|
|
337
321
|
threadId: v.optional(v.id("threads")),
|
|
@@ -413,12 +397,12 @@ export const _fetchSearchMessages = internalQuery({
|
|
|
413
397
|
assert(searchAllMessagesForUserId || threadId, "Specify searchAllMessagesForUserId or threadId to search");
|
|
414
398
|
let messages = (await Promise.all(args.vectorIds.map((embeddingId) => ctx.db
|
|
415
399
|
.query("messages")
|
|
416
|
-
.withIndex("
|
|
417
|
-
.
|
|
400
|
+
.withIndex("embeddingId_threadId", (q) => searchAllMessagesForUserId
|
|
401
|
+
? q.eq("embeddingId", embeddingId)
|
|
402
|
+
: q.eq("embeddingId", embeddingId).eq("threadId", threadId))
|
|
403
|
+
.filter((q) => q.and(q.eq(q.field("status"), "success"), searchAllMessagesForUserId
|
|
418
404
|
? q.eq(q.field("userId"), searchAllMessagesForUserId)
|
|
419
|
-
: q.eq(q.field("threadId"), threadId))
|
|
420
|
-
// Don't include pending. Failed messages hopefully are deleted but may as well be safe.
|
|
421
|
-
.filter((q) => q.eq(q.field("status"), "success"))
|
|
405
|
+
: q.eq(q.field("threadId"), threadId)))
|
|
422
406
|
.first())))
|
|
423
407
|
.filter((m) => m !== undefined &&
|
|
424
408
|
m !== null &&
|