wip: snapshot

This commit is contained in:
Dax Raad
2025-07-14 14:44:47 -04:00
parent ba676e7ae0
commit b4e4c3f662
8 changed files with 145 additions and 47 deletions

View File

@@ -79,6 +79,11 @@ export namespace MessageV2 {
messageID: z.string(),
})
export const SnapshotPart = PartBase.extend({
type: z.literal("snapshot"),
snapshot: z.string(),
})
export const TextPart = PartBase.extend({
type: z.literal("text"),
text: z.string(),
@@ -154,7 +159,7 @@ export namespace MessageV2 {
export type User = z.infer<typeof User>
export const Part = z
.discriminatedUnion("type", [TextPart, FilePart, ToolPart, StepStartPart, StepFinishPart])
.discriminatedUnion("type", [TextPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart])
.openapi({
ref: "Part",
})