feat(web): 智能体会话去噪——单一免责、短标题、技术信息折叠(DEAI-2)

- 「未经核查」只在最终汇报左栏标题保留一处,删「仅供参考」与数据来源说明;
  右栏改叫「实际结果」,去掉「运行已完成」「工具成功 N」徽章,计数只列非零项,
  状态值用中文标签,不再显示计划 / 记录短 ID
- 工具卡片只标会改数据的动作和中高风险;能力 ID、scope、幂等、耗时、调用 ID、
  schema 入口收进技术信息;拒绝说明改成一句「要你批准」
- 用量只显示费用与时长,工具调用数、token、模型、会话 ID 进技术信息(超限时照常显示)
- 会话标题 shortGoalTitle:去上下文前缀、UUID、JSON 参数,能力 ID 换中文名,取第一句,40 字截断
- 入口去口号:删「交代目标,边做边汇报」与抽屉里的重复快捷键说明
- 对话组件结构不动

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-29 20:52:48 +08:00
1 parent 260f3ab27f
commit 5a717e414c
11 files changed
+223 -143

No files matched your search

@@ -7,7 +7,7 @@ import { AGENT_LAUNCHER_ATTR } from "~/components/agent/agent-drawer.tsx";
import {
agentShortcutLabel,
isAgentShortcut,
splitContextGoal,
shortGoalTitle,
toggleAgentDrawer,
useAgentDrawer,
} from "~/components/agent/agent-store.ts";
@@ -24,7 +24,7 @@ export function useActiveAgentRuns() {
const latest = active[0];
return {
count: active.length,
summary: latest ? `${RUN_STATUS_LABEL[latest.status]} · ${splitContextGoal(latest.goal).text}` : null,
summary: latest ? `${RUN_STATUS_LABEL[latest.status]} · ${shortGoalTitle(latest.goal)}` : null,
};
}, [runs.data]);
}
@@ -154,7 +154,7 @@ export function AgentLauncher() {
aria-label={label}
aria-keyshortcuts="Control+J Meta+J"
aria-expanded={open}
title={`${open ? "收起" : "打开"} Agent(${shortcut})${summary && !open ? `\n${summary}` : ""}`}
title={`${open ? "收起" : "打开"}智能体(${shortcut})${summary && !open ? `\n${summary}` : ""}`}
style={{ bottom: `calc(${BASE_BOTTOM + lift}px + env(safe-area-inset-bottom))` }}
className={cn(
"pg-float prism-ring group pointer-events-auto fixed right-4 z-40 flex h-14 min-w-14 cursor-pointer items-center justify-center gap-3 rounded-full text-foreground outline-none select-none",
@@ -179,7 +179,7 @@ export function AgentLauncher() {
</kbd>
</span>
<span className="max-w-56 truncate text-meta leading-4 text-muted-foreground">
{open ? "Esc 关闭" : (summary ?? "交代目标,边做边汇报")}
{open ? "Esc 关闭" : (summary ?? "")}
</span>
</span>
</button>,
@@ -196,7 +196,7 @@ export function AgentNavEntry({ collapsed = false, onNavigate }: { collapsed?: b
onNavigate?.();
toggleAgentDrawer(pathname);
};
const title = `Agent(${shortcut})${summary ? `\n${summary}` : ""}`;
const title = `智能体(${shortcut})${summary ? `\n${summary}` : ""}`;
if (collapsed) {
return (
@@ -231,9 +231,7 @@ export function AgentNavEntry({ collapsed = false, onNavigate }: { collapsed?: b
智能体
{count ? <PulseDot /> : null}
</span>
<span className="truncate text-meta text-muted-foreground">
{count ? `${count} 个会话进行中` : "交代目标,边做边汇报"}
</span>
{count ? <span className="truncate text-meta text-muted-foreground">{count} 个会话进行中</span> : null}
</span>
{count ? (
<CountBadge count={count} />
+1 -1
View File
@@ -64,7 +64,7 @@ export const NAV_GROUPS: NavGroup[] = [
to: "/console/agent",
label: "智能体会话",
icon: Bot,
description: "交代目标,智能体在授权内执行并汇报",
description: "给智能体一个目标,看它做了什么",
},
],
},