fix(reasoning): persist canonical history for DeepSeek and web chat

This commit is contained in:
lc6464
2026-04-24 21:45:41 +08:00
parent ccd19a48ce
commit bb0f983708
17 changed files with 1016 additions and 43 deletions
+1
View File
@@ -14,6 +14,7 @@ export interface SessionDetail {
messages: {
role: "user" | "assistant"
content: string
kind?: "normal" | "thought"
media?: string[]
attachments?: {
type?: "image" | "audio" | "video" | "file"
+2 -1
View File
@@ -45,7 +45,8 @@ export async function loadSessionMessages(
id: `hist-${index}-${Date.now()}`,
role: message.role,
content: message.content,
kind: message.role === "assistant" ? "normal" : undefined,
kind:
message.role === "assistant" ? (message.kind ?? "normal") : undefined,
attachments: toChatAttachments({
media: message.media,
attachments: message.attachments,