mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
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:
@@ -14,6 +14,7 @@ export interface SessionDetail {
|
||||
messages: {
|
||||
role: "user" | "assistant"
|
||||
content: string
|
||||
kind?: "normal" | "thought"
|
||||
media?: string[]
|
||||
attachments?: {
|
||||
type?: "image" | "audio" | "video" | "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,
|
||||
|
||||
Reference in New Issue
Block a user