console: 对话只保留一处实时单列(ChatGPT 式)
根因:ConversationSection 同时渲染 TracePanel(prompt + 全部链路条目)和 ContinuePanel(GET /chat-history, 服务端已把 prompt + 继续 + 后续 + 全部链路种类按时间 合并、并去掉了后续消息回声),简单任务的两份名单 显示同一组用户 + 助手卡片,看起来就是对话重复。 改法:删 TracePanel 名单,只留 ContinuePanel 这一列; TracePanel 唯一不重复的控件(链路类型筛选、下载完整 链路)移到这一列顶部,筛选只过滤链路消息、用户消息 恒保留;实时性不丢:基础是 10 秒轮询的 chat-history, SSE 新链路条目按 id 去重合并进来,轮询拿到后不再 重复;无 chat-history 的旧服务端回退路径也改成渲染 全部链路种类(不再只渲染 message),并跳过 fu- 回声。
This commit is contained in:
1 parent
b306b56517
commit
c192c5dec8
6 files changed
+95
-92
No files matched your search
@@ -33,7 +33,7 @@ export interface Followup { mode?: string; status?: string; sender_task_id?: str
|
||||
// timestamp order (see server _task_chat_history). ts_ms is null for
|
||||
// trace entries that carried no ts; the server order is authoritative,
|
||||
// the client must not re-sort.
|
||||
export interface ChatHistoryMessage { id: string; role: "user" | "assistant" | "tool" | "status"; source?: string; label?: string; text: string; ts_ms?: number | null }
|
||||
export interface ChatHistoryMessage { id: string; role: "user" | "assistant" | "tool" | "status"; source?: string; kind?: string; label?: string; text: string; ts_ms?: number | null }
|
||||
export interface ChatHistory { task_id?: string; status?: string; messages: ChatHistoryMessage[]; continue_messages_stored?: number; legacy_continue_count?: number | null; trace_note?: string }
|
||||
export interface PeerMessage { task_id?: string; mode?: string; status?: string; body?: string }
|
||||
export interface Automation { id: string; name?: string; status?: string; due?: boolean; interval_seconds?: number; next_run_at?: number }
|
||||
|
||||
Reference in new issue
Block a user