Skip to content

Commit abdf4e4

Browse files
committed
drop files from public-facing MessageDoc
1 parent 4f39100 commit abdf4e4

File tree

8 files changed

+14
-31
lines changed

8 files changed

+14
-31
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
- Add `rawRequestResponseHandler` to the Agent definition, so you can log
1818
the raw request and response from the LLM.
1919

20+
### Breaking
21+
22+
- The `steps` table is now gone. It will still be around in your backend, where
23+
you can inspect or clear it if you want, but it will not be written to, and
24+
the low-level APIs around saving steps alongside messages are gone.
25+
To get debug information, you can use the `rawRequestResponseHandler` and
26+
dump the request and response to your own debug table. Maybe conditional on
27+
some environment variable so you can turn it on/off for debugging.
28+
- The `files` field is deprecated in favor of `fileIds` in the message metadata.
29+
This wasn't really used before but it was possible folks discovered how to
30+
set it.
31+
2032
## 0.1.6
2133

2234
- Fix pagination for the Agent messages when loading more

example/convex/_generated/api.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ export declare const components: {
342342
embeddingId?: string;
343343
error?: string;
344344
fileIds?: Array<string>;
345-
files?: Array<any>;
346345
finishReason?:
347346
| "stop"
348347
| "length"
@@ -520,7 +519,6 @@ export declare const components: {
520519
embeddingId?: string;
521520
error?: string;
522521
fileIds?: Array<string>;
523-
files?: Array<any>;
524522
finishReason?:
525523
| "stop"
526524
| "length"
@@ -666,7 +664,6 @@ export declare const components: {
666664
embeddingId?: string;
667665
error?: string;
668666
fileIds?: Array<string>;
669-
files?: Array<any>;
670667
finishReason?:
671668
| "stop"
672669
| "length"
@@ -858,7 +855,6 @@ export declare const components: {
858855
embeddingId?: string;
859856
error?: string;
860857
fileIds?: Array<string>;
861-
files?: Array<any>;
862858
finishReason?:
863859
| "stop"
864860
| "length"
@@ -1048,7 +1044,6 @@ export declare const components: {
10481044
embeddingId?: string;
10491045
error?: string;
10501046
fileIds?: Array<string>;
1051-
files?: Array<any>;
10521047
finishReason?:
10531048
| "stop"
10541049
| "length"
@@ -1197,7 +1192,6 @@ export declare const components: {
11971192
embeddingId?: string;
11981193
error?: string;
11991194
fileIds?: Array<string>;
1200-
files?: Array<any>;
12011195
finishReason?:
12021196
| "stop"
12031197
| "length"

examples/chat-basic/convex/_generated/api.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ export declare const components: {
328328
embeddingId?: string;
329329
error?: string;
330330
fileIds?: Array<string>;
331-
files?: Array<any>;
332331
finishReason?:
333332
| "stop"
334333
| "length"
@@ -506,7 +505,6 @@ export declare const components: {
506505
embeddingId?: string;
507506
error?: string;
508507
fileIds?: Array<string>;
509-
files?: Array<any>;
510508
finishReason?:
511509
| "stop"
512510
| "length"
@@ -652,7 +650,6 @@ export declare const components: {
652650
embeddingId?: string;
653651
error?: string;
654652
fileIds?: Array<string>;
655-
files?: Array<any>;
656653
finishReason?:
657654
| "stop"
658655
| "length"
@@ -844,7 +841,6 @@ export declare const components: {
844841
embeddingId?: string;
845842
error?: string;
846843
fileIds?: Array<string>;
847-
files?: Array<any>;
848844
finishReason?:
849845
| "stop"
850846
| "length"
@@ -1034,7 +1030,6 @@ export declare const components: {
10341030
embeddingId?: string;
10351031
error?: string;
10361032
fileIds?: Array<string>;
1037-
files?: Array<any>;
10381033
finishReason?:
10391034
| "stop"
10401035
| "length"
@@ -1183,7 +1178,6 @@ export declare const components: {
11831178
embeddingId?: string;
11841179
error?: string;
11851180
fileIds?: Array<string>;
1186-
files?: Array<any>;
11871181
finishReason?:
11881182
| "stop"
11891183
| "length"

examples/chat-streaming/convex/_generated/api.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ export declare const components: {
328328
embeddingId?: string;
329329
error?: string;
330330
fileIds?: Array<string>;
331-
files?: Array<any>;
332331
finishReason?:
333332
| "stop"
334333
| "length"
@@ -506,7 +505,6 @@ export declare const components: {
506505
embeddingId?: string;
507506
error?: string;
508507
fileIds?: Array<string>;
509-
files?: Array<any>;
510508
finishReason?:
511509
| "stop"
512510
| "length"
@@ -652,7 +650,6 @@ export declare const components: {
652650
embeddingId?: string;
653651
error?: string;
654652
fileIds?: Array<string>;
655-
files?: Array<any>;
656653
finishReason?:
657654
| "stop"
658655
| "length"
@@ -844,7 +841,6 @@ export declare const components: {
844841
embeddingId?: string;
845842
error?: string;
846843
fileIds?: Array<string>;
847-
files?: Array<any>;
848844
finishReason?:
849845
| "stop"
850846
| "length"
@@ -1034,7 +1030,6 @@ export declare const components: {
10341030
embeddingId?: string;
10351031
error?: string;
10361032
fileIds?: Array<string>;
1037-
files?: Array<any>;
10381033
finishReason?:
10391034
| "stop"
10401035
| "length"
@@ -1183,7 +1178,6 @@ export declare const components: {
11831178
embeddingId?: string;
11841179
error?: string;
11851180
fileIds?: Array<string>;
1186-
files?: Array<any>;
11871181
finishReason?:
11881182
| "stop"
11891183
| "length"

examples/files-images/convex/_generated/api.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ export declare const components: {
330330
embeddingId?: string;
331331
error?: string;
332332
fileIds?: Array<string>;
333-
files?: Array<any>;
334333
finishReason?:
335334
| "stop"
336335
| "length"
@@ -508,7 +507,6 @@ export declare const components: {
508507
embeddingId?: string;
509508
error?: string;
510509
fileIds?: Array<string>;
511-
files?: Array<any>;
512510
finishReason?:
513511
| "stop"
514512
| "length"
@@ -654,7 +652,6 @@ export declare const components: {
654652
embeddingId?: string;
655653
error?: string;
656654
fileIds?: Array<string>;
657-
files?: Array<any>;
658655
finishReason?:
659656
| "stop"
660657
| "length"
@@ -846,7 +843,6 @@ export declare const components: {
846843
embeddingId?: string;
847844
error?: string;
848845
fileIds?: Array<string>;
849-
files?: Array<any>;
850846
finishReason?:
851847
| "stop"
852848
| "length"
@@ -1036,7 +1032,6 @@ export declare const components: {
10361032
embeddingId?: string;
10371033
error?: string;
10381034
fileIds?: Array<string>;
1039-
files?: Array<any>;
10401035
finishReason?:
10411036
| "stop"
10421037
| "length"
@@ -1185,7 +1180,6 @@ export declare const components: {
11851180
embeddingId?: string;
11861181
error?: string;
11871182
fileIds?: Array<string>;
1188-
files?: Array<any>;
11891183
finishReason?:
11901184
| "stop"
11911185
| "length"

src/component/_generated/api.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ export type Mounts = {
280280
embeddingId?: string;
281281
error?: string;
282282
fileIds?: Array<string>;
283-
files?: Array<any>;
284283
finishReason?:
285284
| "stop"
286285
| "length"
@@ -430,7 +429,6 @@ export type Mounts = {
430429
embeddingId?: string;
431430
error?: string;
432431
fileIds?: Array<string>;
433-
files?: Array<any>;
434432
finishReason?:
435433
| "stop"
436434
| "length"
@@ -576,7 +574,6 @@ export type Mounts = {
576574
embeddingId?: string;
577575
error?: string;
578576
fileIds?: Array<string>;
579-
files?: Array<any>;
580577
finishReason?:
581578
| "stop"
582579
| "length"
@@ -740,7 +737,6 @@ export type Mounts = {
740737
embeddingId?: string;
741738
error?: string;
742739
fileIds?: Array<string>;
743-
files?: Array<any>;
744740
finishReason?:
745741
| "stop"
746742
| "length"
@@ -902,7 +898,6 @@ export type Mounts = {
902898
embeddingId?: string;
903899
error?: string;
904900
fileIds?: Array<string>;
905-
files?: Array<any>;
906901
finishReason?:
907902
| "stop"
908903
| "length"
@@ -1051,7 +1046,6 @@ export type Mounts = {
10511046
embeddingId?: string;
10521047
error?: string;
10531048
fileIds?: Array<string>;
1054-
files?: Array<any>;
10551049
finishReason?:
10561050
| "stop"
10571051
| "length"

src/component/messages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const getThread = _getThread;
5050
export const updateThread = _updateThread;
5151

5252
function publicMessage(message: Doc<"messages">): MessageDoc {
53-
return omit(message, ["parentMessageId", "stepId"]);
53+
return omit(message, ["parentMessageId", "stepId", "files"]);
5454
}
5555

5656
export async function deleteMessage(

src/component/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ export const vMessageDoc = v.object({
181181
...omit(schema.tables.messages.validator.fields, [
182182
"parentMessageId",
183183
"stepId",
184+
"files",
184185
]),
185186
// Overwrite all the types that have a v.id validator
186187
// Outside of the component, they are strings

0 commit comments

Comments
 (0)