feat(home-chat): 四项人与 Agent 对话能力增强(G1 Sub-Agent 可视化 + G2 搜索 + G3 审批接入 + G4 Session 预览) - #487
Merged
Merged
Conversation
G1 Sub-Agent Transfer 可视化:transfer_to_agent 渲染为嵌套委派卡片 (父→子 Agent 名称 + 状态指示灯 + 可展开响应摘要),取代扁平工具行。 新增 SubAgentTransferDisplaySegment 类型 + SubAgentTransferCard 组件。 G2 对话内搜索:Cmd/Ctrl+F 触发客户端消息搜索,实时高亮匹配节点, Enter/Shift+Enter 导航,Escape 关闭。搜索范围覆盖文本/工具/推理内容。 新增 useConversationSearch hook + ConversationSearchBar 组件。 G3 Approval Gate 工具接入:ingest_paper 入口集成审批检查(RFC 0002 §4.4), 复用 approval.py 已有 should_request_approval + polling 机制, per_tool 策略下论文入库前弹审批 modal。 G4 Session Summary Preview:SessionList 会话条目下方显示最后活动时间 ("刚刚"/"3 分钟前"/"昨天"/"M/D"),辅助用户辨识历史会话。 新增 formatRelativeTime 工具函数 + SessionRecord.timeLabel 字段。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
G1 Sub-Agent Transfer: - chat-display: streaming 计算覆盖 subagent-transfer kind - chat-display: 根级 tool-call transfer 节点正确分流 - SubAgentTransferCard: 移除 expanded 死代码,error 状态红色边框 G2 对话搜索: - useConversationSearch: 150ms debounce + 最小查询长度 2 - useConversationSearch: isOpen 去掉 matchCount 防关闭后重开 - ChatStream: CSS.escape 防注入 G3 审批闭环: - 后端 sessions_api: 新增 POST approval_response 端点写入 state - 前端 BFF: 新增 approval_response route 代理 - home-body: 接入 ApprovalDialog + ApprovalPolicySelector - home-body: forwardedProps 透传 approval_policy - paper.py: fail-close + 日志 + ApprovalPolicy 盲解包防护 G4 SessionList: 添加 aria-label 保证 E2E 可访问性 测试修复: - test_paper_tools: _FakeToolContext 默认 approval_policy=never - test_paper_kg_pipeline: _Ctx.state 同步设置 approval_policy 🤖 Generated with [Claude Code](https://github.com/claude-code), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
- chat-essentials: §12 补充审批闭环完整链路说明 - rfc 0002: §4.4 更新 G3 前端闭环接入状态 - conversation-foundation: G3/G4 状态标注更新 🤖 Generated with [Claude Code](https://github.com/claude-code), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
fetch 只在网络层异常时 throw,HTTP 非法状态码(500、404)不会抛异常, 导致用户审批决策被静默丢弃。增加 response.ok 检查,失败时抛出异常 让 ApprovalDialog 的 try/catch 向用户展示错误信息。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ThreeFish-AI
added a commit
that referenced
this pull request
Jul 5, 2026
…-2026-4372 处置) (#1057) * fix(deps): ts-deepmerge 补丁地板至 8.0.0 修复 GHSA-87mf-gv2c-c62c (#481); 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * fix(negentropy): pydantic-settings 升 2.14.2 + joserfc>=1.6.7 补丁地板修复 #482/#488; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * fix(cognizes): joserfc/msgpack/python-socketio/python-engineio 补丁地板修复 #483/#486/#487/#490/#491; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * docs(perceives): ISSUE-092 增补 CVE-2026-4372 威胁模型;transformers 钉 4.x + dismiss #492(marker 5.x 不兼容实测); 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
基于
origin/feature/1.x.x@7e8ec4ce,在「Home / 人与 Agent 对话」模块实现 4 项高/中优先级特性增强,聚焦论文采集场景下的多轮对话体验提升。G1: Sub-Agent Transfer 可视化(RFC 0002 §4.2)
transfer_to_agent渲染为嵌套委派卡片(父→子 Agent + 状态指示灯 + 可展开响应摘要)SubAgentTransferDisplaySegment类型 +SubAgentTransferCard组件chat-display.ts检测transfer_to_agent并生成独立 segmentG2: 对话内搜索 (Cmd/Ctrl+F)
useConversationSearchhook +ConversationSearchBar组件ChatStream支持highlightedNodeIds高亮 +scrollToNodeId滚动G3: Approval Gate 工具接入(RFC 0002 §4.4)
ingest_paper入口集成审批检查,复用approval.py已有 polling 机制per_tool策略下论文入库前弹审批 modalG4: Session Summary Preview
formatRelativeTime+SessionRecord.timeLabel字段Test plan
tsc --noEmit)vitest run)NE_AUTH_TOKEN_SECRET配置后手动执行 10 步检查表)🤖 Generated with Claude Code