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
@@ -1,10 +1,12 @@
|
||||
import { useConsole } from "../context";
|
||||
import TracePanel from "./detail/TracePanel";
|
||||
import ContinuePanel from "./detail/ContinuePanel";
|
||||
|
||||
// Dashboard conversation section: trace timeline above, continue input
|
||||
// below. Dispatch lives in its own section above on the same page, so
|
||||
// it is NOT duplicated here when no task is selected — only the hint.
|
||||
// Dashboard conversation section: ONE ChatGPT-style conversation column
|
||||
// (ContinuePanel). It used to render TracePanel above it, which showed
|
||||
// the same user + assistant pair a second time, because chat-history
|
||||
// already merges every trace kind into the conversation. Dispatch
|
||||
// lives in its own section above on the same page, so it is NOT
|
||||
// duplicated here when no task is selected — only the hint.
|
||||
export default function ConversationSection() {
|
||||
const ctx = useConsole();
|
||||
if (!ctx.currentTask) {
|
||||
@@ -16,8 +18,6 @@ export default function ConversationSection() {
|
||||
}
|
||||
return (
|
||||
<div className="conversation">
|
||||
<TracePanel />
|
||||
<div className="conv-divider" />
|
||||
<ContinuePanel />
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user