Merge pull request #2657 from lc6464/fix-deepseek-v4-thinking-history

fix(reasoning): persist canonical history for DeepSeek and web chat
This commit is contained in:
美電球
2026-04-25 15:08:48 +08:00
committed by GitHub
17 changed files with 1172 additions and 73 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,