fix: unify chat process and reply presentation

This commit is contained in:
2026-10-29 17:54:34 +08:00
parent 7621bf0f86
commit 9474788db6
46 changed files with 3160 additions and 500 deletions
+3
View File
@@ -11,6 +11,7 @@ const payloadSchema = z
.object({
version: z.literal(ANSWER_UI_VERSION),
block_id: key,
phase: z.enum(["process", "final"]).optional(),
fallback_text: z.string().min(1).max(4000),
spec: specSchema
})
@@ -20,6 +21,7 @@ const payloadSchema = z
export const storedAnswerUiBlockSchema = z.object({
version: z.string(),
block_id: key,
phase: z.enum(["process", "final"]).optional(),
fallback_text: z.string().min(1).max(4000),
spec: z.unknown()
});
@@ -32,6 +34,7 @@ export type StoredReportUiBlock = z.infer<typeof reportUiBlocksSchema>[number];
export type AnswerUiBlock = {
version: typeof ANSWER_UI_VERSION;
block_id: string;
phase?: "process" | "final";
fallback_text: string;
spec: Spec;
};