fix: deduplicate terminal notices and distinguish cancellation

Keep cancellation and failure details in message status while preserving existing replies. Render cancellation neutrally, restore terminal metadata from history, and offer Edit again only when input can be restored.

Release note: Cancelled and failed requests show a single notice; cancellation no longer appears as an error, and Edit again accurately describes the recovery action.
This commit is contained in:
mesalogo
2026-09-28 18:10:10 +08:00
parent 8650907b75
commit 58e6808f1f
17 changed files with 382 additions and 53 deletions
+1
View File
@@ -395,6 +395,7 @@ export const conversationMessageSchema = z
displayCaptureTruncated: z.boolean().optional(),
createdAt: z.number().int().nonnegative(),
state: z.enum(['streaming', 'complete', 'error']),
terminalStatus: z.enum(['failed', 'cancelled']).optional(),
status: z.string().max(4_000).optional(),
contextCompression:
conversationContextCompressionMarkerSchema.optional(),