源文件索引:packages/client(第 4/11 部分)
本页由 study-tools/generate-source-index.mjs 根据官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec 生成,共 923 个代码或界面源文件。每个标题对应一个真实路径;用途和拆分原因是面向初学者的结构化解释,自动索引不等于人工精读。
本页是 packages-client.md 总览的第 4 部分,覆盖:packages/client/ui-conversation(124 条)。
图例
本页所有条目共用以下说明:
- 自动索引只提供定位线索,复杂行为需要回到源码和测试确认。
- 条目中的行数、声明、结构线索和静态 import 数字是文件级定位证据,用来约束“为什么这样设计”的解释范围;它们用于定位,不替代人工源码阅读。
- 源码链接固定到官方提交;如果当前条目与运行版本不同,应先重新生成索引再下结论。
条目按所属包分组:packages/client/connection(28 条)、packages/client/hmr(6 条)、packages/client/locale(20 条)、packages/client/modules(8 条)、packages/client/runtime(70 条)、packages/client/tsdown.client.ts(1 条)、packages/client/ui-agent-preset(25 条)、packages/client/ui-attachment(24 条)、packages/client/ui-brand-official(7 条)、packages/client/ui-commands(17 条)、packages/client/ui-conversation(124 条)、packages/client/ui-deliverables(11 条)、packages/client/ui-directory-picker-browse(10 条)、packages/client/ui-directory-picker-native(6 条)、packages/client/ui-goal(15 条)、packages/client/ui-input-trigger(21 条)、packages/client/ui-jobs(10 条)、packages/client/ui-layout(17 条)、packages/client/ui-message-feedback(14 条)、packages/client/ui-model-selection(13 条)、packages/client/ui-permission-presets(13 条)、packages/client/ui-plan(10 条)、packages/client/ui-primitives(92 条)、packages/client/ui-reference(6 条)、packages/client/ui-renderer(19 条)、packages/client/ui-settings-general(23 条)、packages/client/ui-settings-models(35 条)、packages/client/ui-settings-plugin-inventory(11 条)、packages/client/ui-settings-plugins(27 条)、packages/client/ui-settings(14 条)、packages/client/ui-sidebar(16 条)、packages/client/ui-skill(10 条)、packages/client/ui-slots(9 条)、packages/client/ui-subagent(12 条)、packages/client/ui-theme(26 条)、packages/client/ui-tool(46 条)、packages/client/ui-trajectory(45 条)、packages/client/ui-user-questions(15 条)、packages/client/ui-workflow-run(10 条)、packages/client/ui-workspace(23 条)、packages/client/web(14 条)。
packages/client/ui-conversation
packages/client/ui-conversation/src/client/apply.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Registers the conversation components, shared store, and service callbacks.”;固定提交中扫描到的声明包括
inject、apply、scopedConversation、concreteConversation、selectApproval;本地静态 import 图显示它直接依赖 28 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/ChatView.tsx、packages/client/ui-conversation/src/client/index.ts
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-attachment/tests/plugin.client.spec.ts、packages/client/ui-brand-official/tests/browser-plugin.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/index.ts确认状态如何进入 UI,最后对照packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 458 行;扫描到的声明包括
inject、apply、scopedConversation、concreteConversation、selectApproval;源码顶部原注释(英文,仅作回查线索):Registers the conversation components, shared store, and service callbacks.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/AssistantMarkdown.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
AssistantMarkdown的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
AssistantMarkdown的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Assistant flow body: full-width narration (figma 16/28), block gap 16. IconActions sit below the body with an explicit 16px top margin (figma 43:32997) — separate from the body's internal gap so the footer spacing stays fixed when the body is a single block.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.body、.stopped、.actions;自定义属性 --dsh-table-spare、--dsh-table-lead;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx、packages/client/ui-conversation/tests/reasoning-row.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 58 行;样式结构包含选择器 .root、.body、.stopped、.actions;自定义属性 --dsh-table-spare、--dsh-table-lead;源码顶部原注释(英文,仅作回查线索):Assistant flow body: full-width narration (figma 16/28), block gap 16. IconActions sit below the body with an explicit 16px top margin (figma 43:32997) — separate from the body's internal gap so the footer spacing stays fixed when the body is a single block.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“AssistantMarkdown: renders assistant blocks in order — markdown text body, reasoning as the figma Think summary row (expand = indented gray text), other-block JSON fallback. Tool-call heads are NOT rendered here: the chat view groups them into tool rows thr...”;固定提交中扫描到的声明包括
AssistantMarkdownProps、AssistantMarkdown;本地静态 import 图显示它直接依赖 5 个源文件,并被 6 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.module.css、packages/client/ui-conversation/src/client/chat/ReasoningRow.tsx、packages/client/ui-conversation/src/client/chat/AssistantNodeView.tsx
- 对应测试:packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx、packages/client/ui-conversation/tests/reasoning-row.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/AssistantNodeView.tsx、packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 114 行;扫描到的声明包括
AssistantMarkdownProps、AssistantMarkdown;源码顶部原注释(英文,仅作回查线索):AssistantMarkdown: renders assistant blocks in order — markdown text body, reasoning as the figma Think summary row (expand = indented gray text), other-block JSON fallback. Tool-call heads are NOT rendered here: the chat view groups them into tool rows thr...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/AssistantNodeView.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
AssistantNodeView;本地静态 import 图显示它直接依赖 2 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/chat/register-node-renderers.ts、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 对应测试:packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/register-node-renderers.ts、packages/client/ui-conversation/tests/chat-view.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 33 行;扫描到的声明包括
AssistantNodeView。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ChatNodeSeat.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
ChatNodeSeat;本地静态 import 图显示它直接依赖 4 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/ChatView.module.css、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/chat/ChatView.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ChatView.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 63 行;扫描到的声明包括
ChatNodeSeat。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ChatView.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
ChatView的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
ChatView的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Chat flow: one 16px rhythm everywhere through the column gap. Input padding cap rides the skeleton. Under data-conversation-scroll the column host owns overflow and this view is ordinary flow (see ConversationRoot active-phase rules).”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.scroll、.column、.flowItem、.callRow、.turnStatus;本地静态 import 图显示它直接依赖 0 个源文件,并被 3 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/ChatNodeSeat.tsx、packages/client/ui-conversation/src/client/chat/ChatView.tsx、packages/client/ui-conversation/src/client/chat/CommandNodeView.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ChatNodeSeat.tsx、packages/client/ui-conversation/src/client/chat/ChatView.tsx、packages/client/ui-conversation/src/client/chat/CommandNodeView.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 202 行;样式结构包含选择器 .root、.scroll、.column、.flowItem、.callRow、.turnStatus;源码顶部原注释(英文,仅作回查线索):Chat flow: one 16px rhythm everywhere through the column gap. Input padding cap rides the skeleton. Under data-conversation-scroll the column host owns overflow and this view is ordinary flow (see ConversationRoot active-phase rules).。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ChatView.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“ChatView: the default conversation view — one stable keyed parent list over final business Nodes, plus paging, pending steering and bottom-follow. Each row dispatches through 'conversation.chat.node'; ui-tool owns the tool-call renderer and its recursive ro...”;固定提交中扫描到的声明包括
ChatView、scrollerOf、anchorElement、flowTop、pagingAnchor;本地静态 import 图显示它直接依赖 7 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/ChatNodeSeat.tsx、packages/client/ui-conversation/src/client/chat/ChatView.module.css、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/chat-view.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 520 行;扫描到的声明包括
ChatView、scrollerOf、anchorElement、flowTop、pagingAnchor、scrollPosition、openFailureMessage、isFolderOpenPath;源码顶部原注释(英文,仅作回查线索):ChatView: the default conversation view — one stable keyed parent list over final business Nodes, plus paging, pending steering and bottom-follow. Each row dispatches through 'conversation.chat.node'; ui-tool owns the tool-call renderer and its recursive ro...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/CommandNodeView.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
CommandNodeView、ManualCompactionNodeView;本地静态 import 图显示它直接依赖 5 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/ChatView.module.css、packages/client/ui-conversation/src/client/chat/CompactionCommandCard.tsx、packages/client/ui-conversation/src/client/chat/GenericCommandCard.tsx、packages/client/ui-conversation/src/client/chat/register-node-renderers.ts
- 对应测试:packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/register-node-renderers.ts、packages/client/ui-conversation/tests/chat-view.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 40 行;扫描到的声明包括
CommandNodeView、ManualCompactionNodeView。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/CompactionCommandCard.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“CompactionCommandCard: the /compact command's running row and its successful checkpoint disclosure. Outcomes without a checkpoint keep the generic command card so no-history, cancellation, and failures retain their complete handler-authored text.”;固定提交中扫描到的声明包括
CompactionCommandCard;本地静态 import 图显示它直接依赖 3 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/CompactionItem.tsx、packages/client/ui-conversation/src/client/chat/GenericCommandCard.tsx、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/chat/CommandNodeView.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/CommandNodeView.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 28 行;扫描到的声明包括
CompactionCommandCard;源码顶部原注释(英文,仅作回查线索):CompactionCommandCard: the /compact command's running row and its successful checkpoint disclosure. Outcomes without a checkpoint keep the generic command card so no-history, cancellation, and failures retain their complete handler-authored text.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/CompactionItem.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“CompactionItem: the one row a landed compaction contributes to the flow. The conversation it shadowed on the model surface stays above it, so this marker reports where the model stopped seeing that history — it never replaces it. The framed checkpoint paylo...”;固定提交中扫描到的声明包括
CompactionItem;本地静态 import 图显示它直接依赖 4 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/MessageItem.module.css、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/chat/CompactionCommandCard.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/CompactionCommandCard.tsx、packages/client/ui-conversation/src/client/chat/MessageItem.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 79 行;扫描到的声明包括
CompactionItem;源码顶部原注释(英文,仅作回查线索):CompactionItem: the one row a landed compaction contributes to the flow. The conversation it shadowed on the model surface stays above it, so this marker reports where the model stopped seeing that history — it never replaces it. The framed checkpoint paylo...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ContextBody.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
ContextBody的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
ContextBody的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Expanded context bodies: one code-block surface shared by every form, so the disclosure keeps the Figma 10:2482 geometry whichever form renders inside.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .text、.fields、.field、.fieldKey、.fieldValue、.files;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/ContextBody.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ContextBody.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 161 行;样式结构包含选择器 .text、.fields、.field、.fieldKey、.fieldValue、.files;源码顶部原注释(英文,仅作回查线索):Expanded context bodies: one code-block surface shared by every form, so the disclosure keeps the Figma 10:2482 geometry whichever form renders inside.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ContextBody.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Expanded bodies for the context disclosure, one per durable context form. The producer declares the form; this module only chooses a presentation for it. Every form falls back to OpaqueBody, which is the documented default for an absent, unknown, or malform...”;固定提交中扫描到的声明包括
OpaqueBody、InstructionsBody、CatalogBody、SnapshotBody、NoticeBody;本地静态 import 图显示它直接依赖 4 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/ContextBody.module.css、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/chat/ContextInjectionRow.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ContextInjectionRow.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 591 行;扫描到的声明包括
OpaqueBody、InstructionsBody、CatalogBody、SnapshotBody、NoticeBody、RelayBody、RecallBody、contextBody;源码顶部原注释(英文,仅作回查线索):Expanded bodies for the context disclosure, one per durable context form. The producer declares the form; this module only chooses a presentation for it. Every form falls back to OpaqueBody, which is the documented default for an absent, unknown, or malform...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ContextInjectionRow.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
ContextInjectionRow的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
ContextInjectionRow的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Figma 10:2482: 24px Tool calls header, 4px gap, 141px code block cap.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.chevron、.sep、.source、.summary、.body;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/ContextInjectionRow.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ContextInjectionRow.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 62 行;样式结构包含选择器 .root、.chevron、.sep、.source、.summary、.body;源码顶部原注释(英文,仅作回查线索):Figma 10:2482: 24px Tool calls header, 4px gap, 141px code block cap.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ContextInjectionRow.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
ContextInjectionRowProps、ContextInjectionRow;本地静态 import 图显示它直接依赖 6 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/ContextBody.tsx、packages/client/ui-conversation/src/client/chat/ContextInjectionRow.module.css、packages/client/ui-conversation/src/client/chat/MessageItem.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/MessageItem.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 72 行;扫描到的声明包括
ContextInjectionRowProps、ContextInjectionRow。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/GenericCommandCard.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
GenericCommandCard的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
GenericCommandCard的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.row、.leading、.chevron、.title、.separator;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/GenericCommandCard.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/GenericCommandCard.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 86 行;样式结构包含选择器 .root、.row、.leading、.chevron、.title、.separator。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/GenericCommandCard.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“GenericCommandCard: the default command row — a stripped-down GenericToolCard rendering the command name and its settlement text. Supplied by the chat view as the keyed commandview slot's render-site fallback (an unregistered command name lands here); regis...”;固定提交中扫描到的声明包括
GenericCommandCardProps、GenericCommandCard、stateOf、leadingFor;本地静态 import 图显示它直接依赖 4 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/GenericCommandCard.module.css、packages/client/ui-conversation/src/client/chat/accessibility.module.css、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/chat/CommandNodeView.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/CommandNodeView.tsx、packages/client/ui-conversation/src/client/chat/CompactionCommandCard.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 73 行;扫描到的声明包括
GenericCommandCardProps、GenericCommandCard、stateOf、leadingFor;源码顶部原注释(英文,仅作回查线索):GenericCommandCard: the default command row — a stripped-down GenericToolCard rendering the command name and its settlement text. Supplied by the chat view as the keyed commandview slot's render-site fallback (an unregistered command name lands here); regis...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/MessageIconActions.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
MessageIconActions的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
MessageIconActions的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Shared message IconActions row (user + assistant). Parent modules own layout offsets via the composed className. Icons stay visible when mounted; the time label is hover-revealed inside a data-time-hover-root scope.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .actions、.timeStart、.timeEnd、.runTimeDot、.action、.visuallyHidden;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 86 行;样式结构包含选择器 .actions、.timeStart、.timeEnd、.runTimeDot、.action、.visuallyHidden;源码顶部原注释(英文,仅作回查线索):Shared message IconActions row (user + assistant). Parent modules own layout offsets via the composed className. Icons stay visible when mounted; the time label is hover-revealed inside a data-time-hover-root scope.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Shared IconActions chrome for user and assistant messages: copy live, optional branch wiring, and an optional date-aware clock.”;固定提交中扫描到的声明包括
MessageIconActionsProps、MessageIconActions;本地静态 import 图显示它直接依赖 5 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/MessageIconActions.module.css、packages/client/ui-conversation/src/client/chat/message-chrome.ts、packages/client/ui-conversation/src/client/chat/use-calendar-day.ts、packages/client/ui-conversation/src/client/chat/MessageItem.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/MessageItem.tsx、packages/client/ui-conversation/src/client/chat/TurnTailNodeView.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 141 行;扫描到的声明包括
MessageIconActionsProps、MessageIconActions;源码顶部原注释(英文,仅作回查线索):Shared IconActions chrome for user and assistant messages: copy live, optional branch wiring, and an optional date-aware clock.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/MessageItem.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
MessageItem的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
MessageItem的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“User bubble: right-aligned column (bubble + IconActions). Figma User_Bubble/message_container 659:38813 — r22 fill, actions gap 6 below.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .userRow、.userStack、.bubble、.referenceSummary、.contextRow、.compactionRow;本地静态 import 图显示它直接依赖 0 个源文件,并被 2 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/CompactionItem.tsx、packages/client/ui-conversation/src/client/chat/MessageItem.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/CompactionItem.tsx、packages/client/ui-conversation/src/client/chat/MessageItem.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 291 行;样式结构包含选择器 .userRow、.userStack、.bubble、.referenceSummary、.contextRow、.compactionRow;源码顶部原注释(英文,仅作回查线索):User bubble: right-aligned column (bubble + IconActions). Figma User_Bubble/message_container 659:38813 — r22 fill, actions gap 6 below.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/MessageItem.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“MessageItem: simple chat nodes — user and consumed-steering bubbles (right-aligned, with clock + copy IconActions; branch lives only under assistant answers), pending steering (copy only), context injection, compaction marker, retry disclosure, and unknown-...”;固定提交中扫描到的声明包括
PendingSteeringBubble、UserMessageNodeView、ContextMessageNodeView、CompactionNodeView、RetryNodeView;本地静态 import 图显示它直接依赖 8 个源文件,并被 4 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/CompactionItem.tsx、packages/client/ui-conversation/src/client/chat/ContextInjectionRow.tsx、packages/client/ui-conversation/src/client/chat/ChatView.tsx
- 对应测试:packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ChatView.tsx、packages/client/ui-conversation/src/client/chat/register-node-renderers.ts、packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 351 行;扫描到的声明包括
PendingSteeringBubble、UserMessageNodeView、ContextMessageNodeView、CompactionNodeView、RetryNodeView、TurnErrorNodeView、TurnMaxTokensNodeView、UnknownNodeView;源码顶部原注释(英文,仅作回查线索):MessageItem: simple chat nodes — user and consumed-steering bubbles (right-aligned, with clock + copy IconActions; branch lives only under assistant answers), pending steering (copy only), context injection, compaction marker, retry disclosure, and unknown-...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ReasoningRow.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
ReasoningRow的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
ReasoningRow的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.row、.leading、.chevron、.title、.separator;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/ReasoningRow.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx、packages/client/ui-conversation/tests/reasoning-row.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ReasoningRow.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 81 行;样式结构包含选择器 .root、.row、.leading、.chevron、.title、.separator。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/ReasoningRow.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Assistant reasoning disclosure, independent of Tool-call presentation.”;固定提交中扫描到的声明包括
ReasoningRow、firstLine、latestLine;本地静态 import 图显示它直接依赖 5 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/ReasoningRow.module.css、packages/client/ui-conversation/src/client/chat/accessibility.module.css、packages/client/ui-conversation/src/client/chat/use-throttled-visual-update.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx、packages/client/ui-conversation/tests/reasoning-row.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 65 行;扫描到的声明包括
ReasoningRow、firstLine、latestLine;源码顶部原注释(英文,仅作回查线索):Assistant reasoning disclosure, independent of Tool-call presentation.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/StatsLine.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
StatsLine的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
StatsLine的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Session stats row: 12/20 tertiary text under the flow, aligned to the shared message column axis (--dsh-chat-content-width).”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.sep;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/StatsLine.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/StatsLine.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 25 行;样式结构包含选择器 .root、.sep;源码顶部原注释(英文,仅作回查线索):Session stats row: 12/20 tertiary text under the flow, aligned to the shared message column axis (--dsh-chat-content-width).。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/StatsLine.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Settled-node identity prevents stream-delta updates from rerendering this row. Mounted on 'conversation.composer.dock' so it sticks with the composer in the active conversation scrollport (see ConversationRoot data-conversation-scroll).”;固定提交中扫描到的声明包括
deriveStats、formatTokens、formatDuration、cacheHitPercent、billedInputTokens;本地静态 import 图显示它直接依赖 9 个源文件,并被 5 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/StatsLine.module.css、packages/client/ui-conversation/src/client/chat/message-chrome.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-stats.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/skeleton/ContextMeter.tsx、packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-stats.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 282 行;扫描到的声明包括
deriveStats、formatTokens、formatDuration、cacheHitPercent、billedInputTokens、contextOccupancy、StatsLineProps、StatsLine;源码顶部原注释(英文,仅作回查线索):Settled-node identity prevents stream-delta updates from rerendering this row. Mounted on 'conversation.composer.dock' so it sticks with the composer in the active conversation scrollport (see ConversationRoot data-conversation-scroll).。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/TurnTailNodeView.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
TurnTailNodeView的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
TurnTailNodeView的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.actions;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/TurnTailNodeView.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/TurnTailNodeView.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 9 行;样式结构包含选择器 .root、.actions。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/TurnTailNodeView.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
TurnTailNodeView;本地静态 import 图显示它直接依赖 5 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx、packages/client/ui-conversation/src/client/chat/TurnTailNodeView.module.css、packages/client/ui-conversation/src/client/chat/turn-assistant.ts、packages/client/ui-conversation/src/client/chat/register-node-renderers.ts
- 对应测试:packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/register-node-renderers.ts、packages/client/ui-conversation/tests/chat-view.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 53 行;扫描到的声明包括
TurnTailNodeView。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/accessibility.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面无障碍样式
- 这个文件有什么用:它提供
.visuallyHidden样式:元素仍留在可访问性树中,但从视觉布局中移开,供屏幕阅读器读取隐藏的辅助文本。 - 为什么这样设计:无障碍辅助文本需要从布局中移开但不能使用
display: none或visibility: hidden;把这条视觉隐藏规则独立成 CSS module,可以让组件复用同一套可访问样式而不把屏幕阅读器语义散落在 JSX 中。 - 文件级设计证据:固定提交中扫描到的结构线索是:样式结构包含选择器 .visuallyHidden;本地静态 import 图显示它直接依赖 0 个源文件,并被 2 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/GenericCommandCard.tsx、packages/client/ui-conversation/src/client/chat/ReasoningRow.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx、packages/client/ui-conversation/tests/reasoning-row.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/GenericCommandCard.tsx、packages/client/ui-conversation/src/client/chat/ReasoningRow.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 8 行;样式结构包含选择器 .visuallyHidden。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/message-chrome.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:消息模型
- 这个文件有什么用:它定义浏览器端、用户界面、对话的消息或内容块结构,使模型、日志、工具和界面使用同一份消息语义。
- 为什么这样设计:消息是模型、日志、工具和 UI 的共同语言,集中定义可以避免每一层都做一套不兼容的内容判断。
- 文件级设计证据:源码顶部注释把它定位为“Shared time-label helpers for user/assistant IconActions rows.”;固定提交中扫描到的声明包括
ClockTranslate、RunDurationTranslate、startOfLocalDay、msUntilNextLocalMidnight、formatRunDuration;本地静态 import 图显示它直接依赖 1 个源文件,并被 7 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-slots/src/index.ts、packages/client/ui-conversation/src/client/chat/ChatView.tsx、packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx、packages/client/ui-conversation/src/client/chat/StatsLine.tsx
- 对应测试:packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/turn-metrics.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读
packages/client/ui-conversation/README.md、入口和消费者,再读当前契约,沿着packages/client/ui-conversation/src/client/chat/ChatView.tsx、packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx、packages/client/ui-conversation/src/client/chat/StatsLine.tsx看它怎样约束运行时,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/turn-metrics.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 96 行;扫描到的声明包括
ClockTranslate、RunDurationTranslate、startOfLocalDay、msUntilNextLocalMidnight、formatRunDuration、formatLatencySeconds、formatTokensPerSecond、formatMessageClock;源码顶部原注释(英文,仅作回查线索):Shared time-label helpers for user/assistant IconActions rows.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/register-node-renderers.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
registerChatNodeRenderers;本地静态 import 图显示它直接依赖 6 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/AssistantNodeView.tsx、packages/client/ui-conversation/src/client/chat/CommandNodeView.tsx、packages/client/ui-conversation/src/client/chat/MessageItem.tsx、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-attachment/tests/plugin.client.spec.ts、packages/client/ui-brand-official/tests/browser-plugin.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts确认状态如何进入 UI,最后对照packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 51 行;扫描到的声明包括
registerChatNodeRenderers。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/tool-node-reader.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
rootToolCall、findToolCall、toolNode;本地静态 import 图显示它直接依赖 2 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/skeleton/ApprovalPanel.tsx、packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/ApprovalPanel.tsx、packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 46 行;扫描到的声明包括
rootToolCall、findToolCall、toolNode。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/turn-assistant.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
assistantText;本地静态 import 图显示它直接依赖 1 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/TurnTailNodeView.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/TurnTailNodeView.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 10 行;扫描到的声明包括
assistantText。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/turn-metrics.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Latency/throughput folds shared by the settled turn footer and StatsLine.”;固定提交中扫描到的声明包括
TurnMetrics、StepReading、assistantStepReading、deriveTurnMetrics、usageOutputTokens;本地静态 import 图显示它直接依赖 1 个源文件,并被 4 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/StatsLine.tsx、packages/client/ui-conversation/src/client/conversation-nodes/turn-tail.ts、packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 对应测试:packages/client/ui-conversation/tests/turn-metrics.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/StatsLine.tsx、packages/client/ui-conversation/src/client/conversation-nodes/turn-tail.ts、packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/turn-metrics.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 97 行;扫描到的声明包括
TurnMetrics、StepReading、assistantStepReading、deriveTurnMetrics、usageOutputTokens;源码顶部原注释(英文,仅作回查线索):Latency/throughput folds shared by the settled turn footer and StatsLine.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/use-calendar-day.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Component-local calendar-day tick: memoized message rows keep stable props across midnight, so the IconActions clock needs a local day seat that re-fires at the next local midnight without reaching for framework hooks.”;固定提交中扫描到的声明包括
useCalendarDay;本地静态 import 图显示它直接依赖 1 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/message-chrome.ts、packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 25 行;扫描到的声明包括
useCalendarDay;源码顶部原注释(英文,仅作回查线索):Component-local calendar-day tick: memoized message rows keep stable props across midnight, so the IconActions clock needs a local day seat that re-fires at the next local midnight without reaching for framework hooks.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/chat/use-throttled-visual-update.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Frame-throttled scheduling for non-essential visual alignment.”;固定提交中扫描到的声明包括
useThrottledVisualUpdate;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/chat/ReasoningRow.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx、packages/client/ui-conversation/tests/reasoning-row.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ReasoningRow.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 40 行;扫描到的声明包括
useThrottledVisualUpdate;源码顶部原注释(英文,仅作回查线索):Frame-throttled scheduling for non-essential visual alignment.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/contract/chat-nodes.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
ChatNodeDataMap、ChatNodeKind、ChatNode、AssistantChatData、FinalAssistantChatData;本地静态 import 图显示它直接依赖 1 个源文件,并被 12 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/ChatNodeSeat.tsx、packages/client/ui-conversation/src/client/chat/tool-node-reader.ts、packages/client/ui-conversation/src/client/contract/slots.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ChatNodeSeat.tsx、packages/client/ui-conversation/src/client/chat/tool-node-reader.ts、packages/client/ui-conversation/src/client/contract/slots.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 82 行;扫描到的声明包括
ChatNodeDataMap、ChatNodeKind、ChatNode、AssistantChatData、FinalAssistantChatData、ToolChatData、ManualCompactionChatData、RetryChatData。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/contract/composer-submission.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Composer submission vocabulary shared by the input and settings domains.”;固定提交中扫描到的声明包括
InputSubmitMode、ComposerSubmitGesture;本地静态 import 图显示它直接依赖 1 个源文件,并被 8 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/submission-settings.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/input/facade.ts
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-attachment/tests/plugin.client.spec.ts、packages/client/ui-brand-official/tests/browser-plugin.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/input/facade.ts确认状态如何进入 UI,最后对照packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 11 行;扫描到的声明包括
InputSubmitMode、ComposerSubmitGesture;源码顶部原注释(英文,仅作回查线索):Composer submission vocabulary shared by the input and settings domains.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/contract/queue.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:队列状态
- 这个文件有什么用:它维护浏览器端、用户界面、对话中尚未处理的项目,集中定义入队、出队、顺序和取消规则。
- 为什么这样设计:等待中的项目需要稳定顺序、取消和重试语义,单独的队列边界可以避免这些规则散落在生产者和消费者之间。
- 文件级设计证据:源码顶部注释把它定位为“Queue contracts derived from the runtime session face and snapshot.”;固定提交中扫描到的声明包括
QueueItemId、QueueAction、QueueRow;本地静态 import 图显示它直接依赖 1 个源文件,并被 4 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/queue/QueueDock.tsx、packages/client/ui-conversation/src/client/service.ts
- 对应测试:packages/client/ui-conversation/tests/queue-dock.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读相关类型和事件,再读当前状态或存储实现,沿着
packages/client/runtime/src/client/index.ts和packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/queue/QueueDock.tsx、packages/client/ui-conversation/src/client/service.ts理解状态变化,最后对照packages/client/ui-conversation/tests/queue-dock.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 13 行;扫描到的声明包括
QueueItemId、QueueAction、QueueRow;源码顶部原注释(英文,仅作回查线索):Queue contracts derived from the runtime session face and snapshot.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/contract/slots.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:扩展槽位契约
- 这个文件有什么用:它为浏览器端、用户界面、对话定义可插入的槽位和输入契约,让插件或界面扩展可以在不复制主流程的情况下接入。
- 为什么这样设计:把扩展点先定义成窄契约,可以让提供方和消费方独立演进;插件不需要复制宿主流程,也更容易在测试中替换。
- 文件级设计证据:源码顶部注释把它定位为“Conversation slot declarations and their composed component props.”;固定提交中扫描到的声明包括
ComposerAttachment、ComposerAttachmentsOwnerProps、MessageImagesOwnerProps、RenderMessageImages、HeroAgentPresetOwnerProps;本地静态 import 图显示它直接依赖 12 个源文件,并被 32 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/attachment/attachment/src/index.ts、packages/client/connection/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx、packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/skeleton.client.spec.tsx、packages/client/ui-conversation/tests/views-type-chain.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读
packages/client/ui-conversation/README.md、入口和消费者,再读当前契约,沿着packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx、packages/client/ui-conversation/src/client/chat/AssistantNodeView.tsx看它怎样约束运行时,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx、packages/client/ui-conversation/tests/input-bar.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 821 行;扫描到的声明包括
ComposerAttachment、ComposerAttachmentsOwnerProps、MessageImagesOwnerProps、RenderMessageImages、HeroAgentPresetOwnerProps、ConversationSessionOwnerProps、ConversationHeaderActionOwnerProps、ConversationHeaderLineageOwnerProps;源码顶部原注释(英文,仅作回查线索):Conversation slot declarations and their composed component props.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/contract/views.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Shared conversation view, selection, and store-state contracts.”;固定提交中扫描到的声明包括
CallId、SelectionTarget、ViewTab、ChatStoreState;本地静态 import 图显示它直接依赖 0 个源文件,并被 6 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/index.ts
- 对应测试:packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/index.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/skeleton.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 32 行;扫描到的声明包括
CallId、SelectionTarget、ViewTab、ChatStoreState;源码顶部原注释(英文,仅作回查线索):Shared conversation view, selection, and store-state contracts.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/assistant.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
assistantDefinition、registerAssistantConversationNode、initialState、compactBlocks、hasVisibleContent;本地静态 import 图显示它直接依赖 5 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 318 行;扫描到的声明包括
assistantDefinition、registerAssistantConversationNode、initialState、compactBlocks、hasVisibleContent、hasInterruptionEvidence、resetForRetry、updateChunk。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/chat-snapshot-builder.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
ChatSnapshotBuilder、chatViewDefinition、registerChatConversationView、sameReferences、MutableChatNodeStore;本地静态 import 图显示它直接依赖 3 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、vendor/cordis/src/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts、packages/client/ui-goal/tests/goal-command-input.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts、packages/client/ui-goal/tests/goal-command-input.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts、packages/client/ui-goal/tests/goal-command-input.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 557 行;扫描到的声明包括
ChatSnapshotBuilder、chatViewDefinition、registerChatConversationView、sameReferences、MutableChatNodeStore、MutableChatLocationIndex、updateIndex、stepKey。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/command.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
updateCompactionState、commandDefinition、registerCommandConversationNode、commandFromRun、commandFromDone;本地静态 import 图显示它直接依赖 7 个源文件,并被 5 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、packages/client/ui-conversation/src/client/conversation-nodes/compaction.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts、packages/client/ui-goal/tests/goal-command-input.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/compaction.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts、packages/client/ui-goal/tests/goal-command-input.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 229 行;扫描到的声明包括
updateCompactionState、commandDefinition、registerCommandConversationNode、commandFromRun、commandFromDone、compactSource、compactSummary、fallbackState。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/common.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
CHAT_SYNTHETIC_SEQ_OFFSETS、contextLocation、chatNode、coordinate;本地静态 import 图显示它直接依赖 2 个源文件,并被 10 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/conversation-nodes/assistant.ts、packages/client/ui-conversation/src/client/conversation-nodes/command.ts
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-attachment/tests/plugin.client.spec.ts、packages/client/ui-brand-official/tests/browser-plugin.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/assistant.ts、packages/client/ui-conversation/src/client/conversation-nodes/command.ts、packages/client/ui-conversation/src/client/conversation-nodes/compaction.ts确认状态如何进入 UI,最后对照packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 68 行;扫描到的声明包括
CHAT_SYNTHETIC_SEQ_OFFSETS、contextLocation、chatNode、coordinate。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/compaction.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
compactionDefinition、registerCompactionConversationNode、fallbackState;本地静态 import 图显示它直接依赖 5 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/command.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 65 行;扫描到的声明包括
compactionDefinition、registerCompactionConversationNode、fallbackState。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/fallback.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
unknownFallbackDefinition、registerUnknownConversationFallback;本地静态 import 图显示它直接依赖 3 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、vendor/cordis/src/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 41 行;扫描到的声明包括
unknownFallbackDefinition、registerUnknownConversationFallback。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/inbox.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:队列状态
- 这个文件有什么用:它维护浏览器端、用户界面、对话中尚未处理的项目,集中定义入队、出队、顺序和取消规则。
- 为什么这样设计:等待中的项目需要稳定顺序、取消和重试语义,单独的队列边界可以避免这些规则散落在生产者和消费者之间。
- 文件级设计证据:固定提交中扫描到的声明包括
InboxState、nextTurnInboxDefinition、nextStepInboxDefinition、registerInboxConversationNodes、applySplice;本地静态 import 图显示它直接依赖 3 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/core/agent/src/types.ts、vendor/cordis/src/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/message.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读相关类型和事件,再读当前状态或存储实现,沿着
packages/client/runtime/src/client/index.ts、packages/core/agent/src/types.ts、vendor/cordis/src/index.ts和packages/client/ui-conversation/src/client/conversation-nodes/message.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts理解状态变化,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 69 行;扫描到的声明包括
InboxState、nextTurnInboxDefinition、nextStepInboxDefinition、registerInboxConversationNodes、applySplice、inboxDefinition。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/message.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:消息模型
- 这个文件有什么用:它定义浏览器端、用户界面、对话的消息或内容块结构,使模型、日志、工具和界面使用同一份消息语义。
- 为什么这样设计:消息是模型、日志、工具和 UI 的共同语言,集中定义可以避免每一层都做一套不兼容的内容判断。
- 文件级设计证据:固定提交中扫描到的声明包括
messageDefinition、registerMessageConversationNode、isCompactionCheckpoint;本地静态 import 图显示它直接依赖 4 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、packages/client/ui-conversation/src/client/conversation-nodes/inbox.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读
packages/client/ui-conversation/README.md、入口和消费者,再读当前契约,沿着packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts看它怎样约束运行时,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 94 行;扫描到的声明包括
messageDefinition、registerMessageConversationNode、isCompactionCheckpoint。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
registerConversationNodes;本地静态 import 图显示它直接依赖 13 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/conversation-nodes/assistant.ts、packages/client/ui-conversation/src/client/conversation-nodes/chat-snapshot-builder.ts、packages/client/ui-conversation/src/client/conversation-nodes/command.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-attachment/tests/plugin.client.spec.ts、packages/client/ui-brand-official/tests/browser-plugin.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts确认状态如何进入 UI,最后对照packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 32 行;扫描到的声明包括
registerConversationNodes。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/retry.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
RetryState、retryDefinition、registerRetryConversationNode、scheduledNode、isClosed;本地静态 import 图显示它直接依赖 5 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 97 行;扫描到的声明包括
RetryState、retryDefinition、registerRetryConversationNode、scheduledNode、isClosed。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/tool.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
toolDefinition、registerToolConversationNode、jsonArguments、rootCall、rootResult;本地静态 import 图显示它直接依赖 5 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 277 行;扫描到的声明包括
toolDefinition、registerToolConversationNode、jsonArguments、rootCall、rootResult、childCall、childResult、locationTurn。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/turn-error.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
turnErrorDefinition、registerTurnErrorConversationNode、lastStep、failureFrom、fallbackState;本地静态 import 图显示它直接依赖 3 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、vendor/cordis/src/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 96 行;扫描到的声明包括
turnErrorDefinition、registerTurnErrorConversationNode、lastStep、failureFrom、fallbackState。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/turn-max-tokens.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
turnMaxTokensDefinition、registerTurnMaxTokensConversationNode、lastStep、noticeAnchor、stateFrom;本地静态 import 图显示它直接依赖 3 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/common.ts、vendor/cordis/src/index.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 82 行;扫描到的声明包括
turnMaxTokensDefinition、registerTurnMaxTokensConversationNode、lastStep、noticeAnchor、stateFrom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/conversation-nodes/turn-tail.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
turnTailDefinition、registerTurnTailConversationNode、hasTextAssistant、chunkHasText、turnCoordinates;本地静态 import 图显示它直接依赖 6 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/turn-metrics.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/conversation-nodes/register.ts
- 对应测试:packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/conversation-nodes/register.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 196 行;扫描到的声明包括
turnTailDefinition、registerTurnTailConversationNode、hasTextAssistant、chunkHasText、turnCoordinates、closingAnchor、turnLocation、hasText。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/image-labels.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Attachment error and limit copy owned by the conversation input flow.”;固定提交中扫描到的声明包括
imageSizeText、attachmentErrorText;本地静态 import 图显示它直接依赖 3 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/attachment/attachment/src/index.ts、packages/client/ui-conversation/src/client/locales.ts、packages/client/ui-slots/src/index.ts、packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
- 对应测试:packages/client/ui-conversation/tests/image-labels.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/InputBar.tsx、packages/client/ui-conversation/tests/image-labels.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/image-labels.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 56 行;扫描到的声明包括
imageSizeText、attachmentErrorText;源码顶部原注释(英文,仅作回查线索):Attachment error and limit copy owned by the conversation input flow.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/index.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:模块入口
- 这个文件有什么用:它把浏览器端、用户界面、对话相关的公开能力集中导出,并决定调用者可以依赖哪些边界;调用者因此不必记住所有内部文件。
- 为什么这样设计:入口文件把公开边界固定下来,内部文件可以继续拆分或替换;其他包只依赖入口暴露的 API,依赖方向更稳定。
- 文件级设计证据:源码顶部注释把它定位为“Browser conversation plugin. contract/ is the shared type boundary between the independently implemented skeleton and chat domains; apply.ts owns their slot assembly.”;本地静态 import 图显示它直接依赖 17 个源文件,并被 48 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-agent-preset/src/client/AgentPresetLabel.tsx
- 对应测试:packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读
packages/client/ui-conversation/README.md、入口和消费者,再读当前契约,沿着packages/client/ui-agent-preset/src/client/AgentPresetLabel.tsx、packages/client/ui-agent-preset/src/client/AgentPresetSeat.tsx、packages/client/ui-attachment/src/client/ComposerAttachments.tsx看它怎样约束运行时,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 46 行;源码顶部原注释(英文,仅作回查线索):Browser conversation plugin. contract/ is the shared type boundary between the independently implemented skeleton and chat domains; apply.ts owns their slot assembly.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/input/blocks.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Composer blocks: the one way another plugin stops a session's input. The composer cannot read the plugins that would know — the dependency runs ui-model-selection → ui-conversation, never back — so a blocker pushes here and the bar reads its own session's s...”;固定提交中扫描到的声明包括
ComposerBlock、ComposerBlocks、ComposerBlockRegistry;本地静态 import 图显示它直接依赖 1 个源文件,并被 4 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/service.ts
- 对应测试:packages/client/ui-conversation/tests/service-orchestration.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/service.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/service-orchestration.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 77 行;扫描到的声明包括
ComposerBlock、ComposerBlocks、ComposerBlockRegistry;源码顶部原注释(英文,仅作回查线索):Composer blocks: the one way another plugin stops a session's input. The composer cannot read the plugins that would know — the dependency runs ui-model-selection → ui-conversation, never back — so a blocker pushes here and the bar reads its own session's s...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/input/contract.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:共享测试契约
- 这个文件有什么用:它为浏览器端、用户界面、对话定义多种实现都必须通过的共同测试规则,避免 JSONL、SQLite 或不同宿主各自测试出不同标准。
- 为什么这样设计:多个实现共享同一组契约测试,才能比较它们是否遵守相同的外部行为;契约与具体实现分开也能减少复制断言。
- 文件级设计证据:源码顶部注释把它定位为“Frozen input-machine contract. Types only. Three-tier visibility: business packages see InputState via the InputZone currency; the scoped input events carry the mutation verbs; the conversation wiring layer alone sees the full SessionInput. InputMachine (ma...”;固定提交中扫描到的声明包括
DraftAttachmentId、InputTarget、SessionInput、SessionInputResolver、InputActions;本地静态 import 图显示它直接依赖 5 个源文件,并被 16 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/contract/queue.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-machine.client.spec.ts、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx、packages/client/ui-conversation/tests/input-reference-submit.client.spec.ts、packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx、packages/client/ui-conversation/tests/queue-dock.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/runtime/tests/fake-api.client.ts
- 阅读顺序:先读
packages/client/ui-conversation/README.md和入口,再读当前实现,沿着packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/contract/queue.ts和packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/index.ts确认输入输出,最后对照packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-machine.client.spec.ts、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 291 行;扫描到的声明包括
DraftAttachmentId、InputTarget、SessionInput、SessionInputResolver、InputActions、InputNotice、ComposerKeyboard、QueuedMessage;源码顶部原注释(英文,仅作回查线索):Frozen input-machine contract. Types only. Three-tier visibility: business packages see InputState via the InputZone currency; the scoped input events carry the mutation verbs; the conversation wiring layer alone sees the full SessionInput. InputMachine (ma...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/input/decorations.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Draft decoration pure core (references render from occurrence ranges; the claim token renders as a mirror-layer highlight, the claim hint as ghost text). Zero React — the skeleton renders the instructions; tests drive this directly.”;固定提交中扫描到的声明包括
TokenRange、ChipRender、TextRefRange、DraftDecorations、scanTextRefs;本地静态 import 图显示它直接依赖 1 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/skeleton/InputBar.tsx、packages/client/ui-conversation/tests/input-machine.client.spec.ts
- 对应测试:packages/client/ui-conversation/tests/input-machine.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/InputBar.tsx、packages/client/ui-conversation/tests/input-machine.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/input-machine.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 131 行;扫描到的声明包括
TokenRange、ChipRender、TextRefRange、DraftDecorations、scanTextRefs、deriveDecorations;源码顶部原注释(英文,仅作回查线索):Draft decoration pure core (references render from occurrence ranges; the claim token renders as a mirror-layer highlight, the claim hint as ghost text). Zero React — the skeleton renders the instructions; tests drive this directly.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/input/facade.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“SessionInput shell over the pure input machine: the sole machine caller and effect executor. Owns the InputState store (machine state + the queue overlay), the notice channel, and the submit transaction plumbing (adjudicate via the session's InputTriggerCon...”;固定提交中扫描到的声明包括
PopupDismissFace、SessionInputDeps、SessionInputShell、guardOf;本地静态 import 图显示它直接依赖 5 个源文件,并被 6 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/input/hub.ts
- 对应测试:packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx、packages/client/ui-conversation/tests/input-reference-submit.client.spec.ts、packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx、packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/runtime/tests/fake-api.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/input/hub.ts、packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx、packages/client/ui-conversation/tests/input-reference-submit.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 605 行;扫描到的声明包括
PopupDismissFace、SessionInputDeps、SessionInputShell、guardOf;源码顶部原注释(英文,仅作回查线索):SessionInput shell over the pure input machine: the sole machine caller and effect executor. Owns the InputState store (machine state + the queue overlay), the notice channel, and the submit transaction plumbing (adjudicate via the session's InputTriggerCon...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/input/hub.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“InputHub: the SessionInputResolver implementation (ctx.conversation.input) — one SessionInputShell per session, created inside the sessions provide materialization (the 'input' standard-kit entry IS the creation trigger) and torn down by the scope disposer ...”;固定提交中扫描到的声明包括
InputHub;本地静态 import 图显示它直接依赖 7 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/service-orchestration.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/service-orchestration.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/service-orchestration.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 221 行;扫描到的声明包括
InputHub;源码顶部原注释(英文,仅作回查线索):InputHub: the SessionInputResolver implementation (ctx.conversation.input) — one SessionInputShell per session, created inside the sessions provide materialization (the 'input' standard-kit entry IS the creation trigger) and torn down by the scope disposer ...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/input/machine.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“InputMachine: the pure per-session input state machine. Events in, effects out; zero React / DOM / cordis / ambient clock. Package-private — the SessionInput shell is the only caller and the sole executor of the returned effects. Draft truth: the draft stri...”;固定提交中扫描到的声明包括
PLACEHOLDER、referenceDraftText、projectClipboard、InputMachine、unreachable;本地静态 import 图显示它直接依赖 3 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-input-trigger/src/client/index.ts、packages/client/ui-conversation/src/client/input/facade.ts
- 对应测试:packages/client/ui-conversation/tests/input-machine.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/input/facade.ts、packages/client/ui-conversation/tests/input-machine.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/input-machine.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 604 行;扫描到的声明包括
PLACEHOLDER、referenceDraftText、projectClipboard、InputMachine、unreachable、argsAfter、diffEdit;源码顶部原注释(英文,仅作回查线索):InputMachine: the pure per-session input state machine. Events in, effects out; zero React / DOM / cordis / ambient clock. Package-private — the SessionInput shell is the only caller and the sole executor of the returned effects. Draft truth: the draft stri...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/input/submission-policy.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:策略与权限边界
- 这个文件有什么用:它集中判断浏览器端、用户界面、对话是否允许以及需要哪种授权,让调用方不必各自复制权限规则。
- 为什么这样设计:权限判断集中后,所有调用路径可以共享同一条拒绝规则;策略变化也不会要求每个工具、路由和界面分别修补。
- 文件级设计证据:源码顶部注释把它定位为“Composer submission policy. It owns the live busy-Enter preference and resolves keyboard gestures into queue/steer delivery modes; Host and Agent keep the actual delivery-window authority.”;固定提交中扫描到的声明包括
ComposerSubmissionPolicy;本地静态 import 图显示它直接依赖 3 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/submission-settings.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx、packages/client/ui-conversation/tests/submission-policy.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读
packages/client/ui-conversation/README.md和入口,再读当前实现,沿着packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/submission-settings.ts和packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx、packages/client/ui-conversation/tests/submission-policy.client.spec.ts确认输入输出,最后对照packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx、packages/client/ui-conversation/tests/submission-policy.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 79 行;扫描到的声明包括
ComposerSubmissionPolicy;源码顶部原注释(英文,仅作回查线索):Composer submission policy. It owns the live busy-Enter preference and resolves keyboard gestures into queue/steer delivery modes; Host and Agent keep the actual delivery-window authority.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/locales.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:本地化资源
- 这个文件有什么用:它为浏览器端、用户界面、对话提供语言文本、键名或本地化格式,让界面切换语言时不必改动业务流程。
- 为什么这样设计:文本资源与业务流程分开,新增语言或修改措辞时不必改动状态机和领域逻辑;键名也能成为组件与翻译文件之间的稳定契约。
- 文件级设计证据:源码顶部注释把它定位为“conversation namespace dictionaries.”;固定提交中扫描到的声明包括
NS、zh、ConversationKey、en;本地静态 import 图显示它直接依赖 0 个源文件,并被 34 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/chat/register-node-renderers.ts、packages/client/ui-conversation/src/client/image-labels.ts
- 对应测试:packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-stats.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/context-meter.client.spec.tsx、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/chat/register-node-renderers.ts、packages/client/ui-conversation/src/client/image-labels.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-stats.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 360 行;扫描到的声明包括
NS、zh、ConversationKey、en;源码顶部原注释(英文,仅作回查线索):conversation namespace dictionaries.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/queue/QueueDock.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
QueueDock的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
QueueDock的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Figma .FileContainerText 1:791: the wrapper uses the shared dock inset inside the composer card around the inset panel.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .dock、.panel、.header、.lead、.count、.chevron;自定义属性 --dsh-scrollbar-thumb、--dsh-scrollbar-thumb-hover;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/queue/QueueDock.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/queue/QueueDock.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 189 行;样式结构包含选择器 .dock、.panel、.header、.lead、.count、.chevron;自定义属性 --dsh-scrollbar-thumb、--dsh-scrollbar-thumb-hover;源码顶部原注释(英文,仅作回查线索):Figma .FileContainerText 1:791: the wrapper uses the shared dock inset inside the composer card around the inset panel.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/queue/QueueDock.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Queue dock entry: renders the authoritative transient inbox snapshot and addresses per-row mutations through the session-scoped conversation face. The 'conversation.input.dock' SlotMap declaration lives in ../contract/slots.ts beside the other input-region ...”;固定提交中扫描到的声明包括
QueueDockInjected、QueueDockProps、QueueDock、queueDockEntry;本地静态 import 图显示它直接依赖 7 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/queue.ts、packages/client/ui-conversation/src/client/locales.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/queue-dock.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/queue-dock.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/queue-dock.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 244 行;扫描到的声明包括
QueueDockInjected、QueueDockProps、QueueDock、queueDockEntry;源码顶部原注释(英文,仅作回查线索):Queue dock entry: renders the authoritative transient inbox snapshot and addresses per-row mutations through the session-scoped conversation face. The 'conversation.input.dock' SlotMap declaration lives in ../contract/slots.ts beside the other input-region ...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/queue/store.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:状态存储
- 这个文件有什么用:它维护浏览器端、用户界面、对话的状态、快照或队列,并集中处理更新、读取和清理规则。
- 为什么这样设计:状态更新集中在一个边界,调用者不需要维护多份副本;未来替换观察、缓存或持久化方式时,消费方依赖仍然稳定。
- 文件级设计证据:源码顶部注释把它定位为“Queue read face for the InputState.queue projection (frozen contract in ../input/contract.ts): a uSES-compatible observable over one session's transient inbox rows. The Session snapshot already keeps the queue array reference-stable across unrelated snapsho...”;固定提交中扫描到的声明包括
queueReadFaceOf;本地静态 import 图显示它直接依赖 2 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/input/hub.ts
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读相关类型和事件,再读当前状态或存储实现,沿着
packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/contract.ts和packages/client/ui-conversation/src/client/input/hub.ts理解状态变化,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 24 行;扫描到的声明包括
queueReadFaceOf;源码顶部原注释(英文,仅作回查线索):Queue read face for the InputState.queue projection (frozen contract in ../input/contract.ts): a uSES-compatible observable over one session's transient inbox rows. The Session snapshot already keeps the queue array reference-stable across unrelated snapsho...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/reference/ReferenceIcon.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
ReferenceIconKind、ReferenceIconProps、ReferenceIcon;本地静态 import 图显示它直接依赖 1 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-primitives/src/index.ts、packages/client/ui-conversation/src/client/chat/ContextInjectionRow.tsx、packages/client/ui-conversation/src/client/chat/MessageItem.tsx、packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/chat/ContextInjectionRow.tsx、packages/client/ui-conversation/src/client/chat/MessageItem.tsx、packages/client/ui-conversation/src/client/skeleton/InputBar.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 35 行;扫描到的声明包括
ReferenceIconKind、ReferenceIconProps、ReferenceIcon。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/service.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:服务或提供方
- 这个文件有什么用:它定义或提供浏览器端、用户界面、对话的可取得服务,负责注册、查找或具体实现;接口和实现分开后,同一能力可以换成本地、远程或测试版本。
- 为什么这样设计:把“接口是什么”和“这一版怎样实现”分开,替换实现或写测试替身时不必改动使用者。
- 文件级设计证据:源码顶部注释把它定位为“Scope-addressed conversation send, cancel, and history orchestration. Scope addressing rides the cordis Service tracker: property access through ctx.conversation rebinds this.ctx to the caller's context, so methods read the session tag with scopeOf. Mutable...”;固定提交中扫描到的声明包括
IConversation、UnsupportedImageMediaTypeError、ConversationController、browserDraftAttachment、imageMediaType;本地静态 import 图显示它直接依赖 9 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/attachment/attachment/src/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/service-orchestration.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读
packages/client/ui-conversation/README.md和入口,再读当前实现,沿着packages/attachment/attachment/src/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts和packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/index.ts、packages/client/ui-conversation/tests/service-orchestration.client.spec.ts确认输入输出,最后对照packages/client/ui-conversation/tests/service-orchestration.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 373 行;扫描到的声明包括
IConversation、UnsupportedImageMediaTypeError、ConversationController、browserDraftAttachment、imageMediaType、bytesToBase64、revokePreview;源码顶部原注释(英文,仅作回查线索):Scope-addressed conversation send, cancel, and history orchestration. Scope addressing rides the cordis Service tracker: property access through ctx.conversation rebinds this.ctx to the caller's context, so methods read the session tag with scopeOf. Mutable...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/settings/EnterBehaviorRow.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
EnterBehaviorRow的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
EnterBehaviorRow的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Composer Enter preference row: title/description plus selector pill.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .row、.rowText、.title、.desc、.selector、.chevron;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/settings/EnterBehaviorRow.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/settings/EnterBehaviorRow.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 56 行;样式结构包含选择器 .row、.rowText、.title、.desc、.selector、.chevron;源码顶部原注释(英文,仅作回查线索):Composer Enter preference row: title/description plus selector pill.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/settings/EnterBehaviorRow.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“General Settings row for the Composer's busy-state Enter preference.”;固定提交中扫描到的声明包括
EnterBehaviorRowInjected、EnterBehaviorRowProps、EnterBehaviorRow;本地静态 import 图显示它直接依赖 6 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/locales.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 76 行;扫描到的声明包括
EnterBehaviorRowInjected、EnterBehaviorRowProps、EnterBehaviorRow;源码顶部原注释(英文,仅作回查线索):General Settings row for the Composer's busy-state Enter preference.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/ApprovalPanel.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
ApprovalPanel的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
ApprovalPanel的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Composer-takeover approval panel (draft approval.png): the same floating capsule footprint as the InputBar card, with an amber header band, the justification headline, a muted command line, and right-aligned actions. Warn semantics ride the alias state toke...”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.card、.strip、.dot、.body、.headline;自定义属性 --dsh-scrollbar-thumb、--dsh-scrollbar-thumb-hover;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/ApprovalPanel.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/ApprovalPanel.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 103 行;样式结构包含选择器 .root、.card、.strip、.dot、.body、.headline;自定义属性 --dsh-scrollbar-thumb、--dsh-scrollbar-thumb-hover;源码顶部原注释(英文,仅作回查线索):Composer-takeover approval panel (draft approval.png): the same floating capsule footprint as the InputBar card, with an amber header band, the justification headline, a muted command line, and right-aligned actions. Warn semantics ride the alias state toke...。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/ApprovalPanel.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“ApprovalPanel: the composer-takeover approval prompt (designer draft approval.png), registered as a selector-routed entry of the conversation-declared composer chain. While an approval question is pending, this panel occupies the composer slot in place of t...”;固定提交中扫描到的声明包括
commandOf、ApprovalPanel、ApprovalFlow;本地静态 import 图显示它直接依赖 5 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/tool-node-reader.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-attachment/tests/plugin.client.spec.ts、packages/client/ui-brand-official/tests/browser-plugin.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts确认状态如何进入 UI,最后对照packages/client/ui-agent-preset/tests/apply.client.spec.ts、packages/client/ui-agent-preset/tests/components.client.spec.tsx、packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 87 行;扫描到的声明包括
commandOf、ApprovalPanel、ApprovalFlow;源码顶部原注释(英文,仅作回查线索):ApprovalPanel: the composer-takeover approval prompt (designer draft approval.png), registered as a selector-routed entry of the conversation-declared composer chain. While an approval question is pending, this panel occupies the composer slot in place of t...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
ContextMeter的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
ContextMeter的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Context-occupancy ring beside the send button plus its click-open breakdown panel (menu surface: r12, inverted hairline, shadow-lv3).”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.trigger、.track、.fill、.panel、.header;自定义属性 --meter-tint;本地静态 import 图显示它直接依赖 0 个源文件,并被 2 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/ContextMeter.tsx、packages/client/ui-conversation/tests/context-meter.client.spec.tsx
- 对应测试:packages/client/ui-conversation/tests/context-meter.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/ContextMeter.tsx、packages/client/ui-conversation/tests/context-meter.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/context-meter.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 147 行;样式结构包含选择器 .root、.trigger、.track、.fill、.panel、.header;自定义属性 --meter-tint;源码顶部原注释(英文,仅作回查线索):Context-occupancy ring beside the send button plus its click-open breakdown panel (menu surface: r12, inverted hairline, shadow-lv3).。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/ContextMeter.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Composer context-occupancy meter: a ring beside the send button fed by the contextPressure projection, with a click-open panel of the heuristic contextBreakdown composition (system prompt, tools, conversation). Renders nothing until a provider reports both ...”;固定提交中扫描到的声明包括
ContextMeterProps、ContextMeter;本地静态 import 图显示它直接依赖 6 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/StatsLine.tsx、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
- 对应测试:packages/client/ui-conversation/tests/context-meter.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/InputBar.tsx、packages/client/ui-conversation/tests/context-meter.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/context-meter.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 153 行;扫描到的声明包括
ContextMeterProps、ContextMeter;源码顶部原注释(英文,仅作回查线索):Composer context-occupancy meter: a ring beside the send button fed by the contextPressure projection, with a click-open panel of the heuristic contextBreakdown composition (system prompt, tools, conversation). Renders nothing until a provider reports both ...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/ConversationRoot.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话列布局样式
- 这个文件有什么用:它定义 ConversationRoot 的列布局、标题、标签、滚动区、composer seat、hero 阶段和窄屏宽度变量,让会话正文与输入区在不同视图状态下共享同一条几何规则。
- 为什么这样设计:ConversationRoot 同时承载 header、transcript、view overlay 和 composer seat;把共享宽度、滚动条预留、sticky/absolute seat 以及 hero/active/settling 状态放在根样式中,兄弟子树才能使用同一几何约束而不各自计算输入区位置。
- 文件级设计证据:源码顶部注释把它定位为“Conversation column skeleton: header (breadcrumb row only for subagents not fork + tabs) over the view area, composer InputBar at the bottom. Column width/squeeze is layout's; this fills its cell. Figma: Header 39:27730 (83px two-row), tabs 13px with a 2px ...”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.header、.headerHidden、.titleRow、.titleCluster、.crumbs;自定义属性 --dsh-chat-content-width、--dsh-composer-card-max-width、--dsh-composer-side-clearance、--dsh-composer-dock-inset、--dsh-composer-stack-gap、--dsh-composer-text-max-height;本地静态 import 图显示它直接依赖 0 个源文件,并被 2 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/ConversationRoot.tsx、packages/client/ui-conversation/src/client/skeleton/ConversationSession.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读
packages/client/ui-conversation/README.md和入口,再读当前实现,沿着相关类型、协议或实现和packages/client/ui-conversation/src/client/skeleton/ConversationRoot.tsx、packages/client/ui-conversation/src/client/skeleton/ConversationSession.tsx确认输入输出,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 370 行;样式结构包含选择器 .root、.header、.headerHidden、.titleRow、.titleCluster、.crumbs;自定义属性 --dsh-chat-content-width、--dsh-composer-card-max-width、--dsh-composer-side-clearance、--dsh-composer-dock-inset、--dsh-composer-stack-gap、--dsh-composer-text-max-height;源码顶部原注释(英文,仅作回查线索):Conversation column skeleton: header (breadcrumb row only for subagents not fork + tabs) over the view area, composer InputBar at the bottom. Column width/squeeze is layout's; this fills its cell. Figma: Header 39:27730 (83px two-row), tabs 13px with a 2px ...。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/ConversationRoot.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Resident conversation skeleton. Hero chrome, composer positioning, the chain, AND the composer bar (session-maybe slot) stay mounted across no-session/session transitions — the bar renders inert via owner props.”;固定提交中扫描到的声明包括
ConversationRootProps、ConversationRoot;本地静态 import 图显示它直接依赖 4 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/skeleton/ConversationRoot.module.css、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/skeleton.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/skeleton.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 195 行;扫描到的声明包括
ConversationRootProps、ConversationRoot;源码顶部原注释(英文,仅作回查线索):Resident conversation skeleton. Hero chrome, composer positioning, the chain, AND the composer bar (session-maybe slot) stay mounted across no-session/session transitions — the bar renders inert via owner props.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/ConversationSession.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Strict per-session header/body content inserted into the resident conversation layout.”;固定提交中扫描到的声明包括
ConversationSessionProps、ConversationSessionHeaderProps、ConversationSessionHeader、ConversationSession、resolveActiveView;本地静态 import 图显示它直接依赖 4 个源文件,并被 3 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/contract/views.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/skeleton.client.spec.tsx、packages/client/ui-trajectory/tests/views.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/skeleton.client.spec.tsx、packages/client/ui-trajectory/tests/views.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/skeleton.client.spec.tsx、packages/client/ui-trajectory/tests/views.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 209 行;扫描到的声明包括
ConversationSessionProps、ConversationSessionHeaderProps、ConversationSessionHeader、ConversationSession、resolveActiveView、deriveAncestry、equalBreadcrumbs;源码顶部原注释(英文,仅作回查线索):Strict per-session header/body content inserted into the resident conversation layout.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/DetailsPanel.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
DetailsPanel的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
DetailsPanel的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Details third column, minimal fill: header (name + close) over a scrolling body of Input/Output code sections. Panel width/squeeze belongs to layout; this fills whatever the column gives.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.header、.title、.close、.body、.empty;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 94 行;样式结构包含选择器 .root、.header、.title、.close、.body、.empty;源码顶部原注释(英文,仅作回查线索):Details third column, minimal fill: header (name + close) over a scrolling body of Input/Output code sections. Panel width/squeeze belongs to layout; this fills whatever the column gives.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/DetailsPanel.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“DetailsPanel: close button + the selected call's args and result — args as JSON, the result raw except for a terminal-card call, whose Output section is the command's terminal card. Reads the selection from the shared chat store (conversation writes, this p...”;固定提交中扫描到的声明包括
DetailsPanelProps、DetailsPanel、settledMaterial、runningMaterial、materialFor;本地静态 import 图显示它直接依赖 5 个源文件,并被 7 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/tool-node-reader.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-tool/tests/diff-card.client.spec.tsx、packages/client/ui-tool/tests/read-card.client.spec.tsx、packages/client/ui-tool/tests/search-card.client.spec.tsx、packages/client/ui-tool/tests/terminal-card.client.spec.tsx、packages/client/ui-tool/tests/web-card.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts、packages/client/ui-tool/tests/tool-details-render.client.tsx
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-tool/tests/diff-card.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-tool/tests/diff-card.client.spec.tsx、packages/client/ui-tool/tests/read-card.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 129 行;扫描到的声明包括
DetailsPanelProps、DetailsPanel、settledMaterial、runningMaterial、materialFor、pretty、rawResultText;源码顶部原注释(英文,仅作回查线索):DetailsPanel: close button + the selected call's args and result — args as JSON, the result raw except for a terminal-card call, whose Output section is the command's terminal card. Reads the selection from the shared chat store (conversation writes, this p...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/EmptyHero.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Hero chrome for the blank-draft phase of ConversationRoot: fish headline, glow backdrop, and the workspace row. Pure presentation — the resident composer is NOT rendered here (it keeps its own stable tree position in ConversationRoot so the textarea survive...”;固定提交中扫描到的声明包括
workspaceLabel、WorkspaceChip、HeroGlow、HeroShellProps、HeroShell;本地静态 import 图显示它直接依赖 4 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/skeleton/HeroShell.module.css、packages/client/ui-conversation/src/client/skeleton/ConversationRoot.tsx
- 对应测试:packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/ConversationRoot.tsx、packages/client/ui-conversation/tests/skeleton.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/skeleton.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 141 行;扫描到的声明包括
workspaceLabel、WorkspaceChip、HeroGlow、HeroShellProps、HeroShell;源码顶部原注释(英文,仅作回查线索):Hero chrome for the blank-draft phase of ConversationRoot: fish headline, glow backdrop, and the workspace row. Pure presentation — the resident composer is NOT rendered here (it keeps its own stable tree position in ConversationRoot so the textarea survive...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/HeroShell.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
HeroShell的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
HeroShell的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“NEW SESSION hero (figma Input_Bottom 75:8208): fish + title, workspace chip above the shared InputBar card. The input itself is InputBar — only stack geometry and the chip live here.”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.stack、.headline、.headlineText、.previewBadge、.fishHitbox;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/EmptyHero.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/EmptyHero.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/skeleton.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 207 行;样式结构包含选择器 .root、.stack、.headline、.headlineText、.previewBadge、.fishHitbox;源码顶部原注释(英文,仅作回查线索):NEW SESSION hero (figma Input_Bottom 75:8208): fish + title, workspace chip above the shared InputBar card. The input itself is InputBar — only stack geometry and the chip live here.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/InputBar.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
InputBar的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
InputBar的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Floating capsule input (figma Input_Bottom 75:8208): card floats above the viewport bottom inside the centered message column; textarea on top, action row below, primary action controls bottom-right. Input width rides the column (--dsh-composer-card-max-wid...”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.hero、.notice、.card、.cardWorkspaceTrigger、.accessory;自定义属性 --dsh-scrollbar-thumb、--dsh-scrollbar-thumb-hover;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/InputBar.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 473 行;样式结构包含选择器 .root、.hero、.notice、.card、.cardWorkspaceTrigger、.accessory;自定义属性 --dsh-scrollbar-thumb、--dsh-scrollbar-thumb-hover;源码顶部原注释(英文,仅作回查线索):Floating capsule input (figma Input_Bottom 75:8208): card floats above the viewport bottom inside the centered message column; textarea on top, action row below, primary action controls bottom-right. Input width rides the column (--dsh-composer-card-max-wid...。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“The default composer body: the 'conversation.composer.bar' slot entry. Machine state arrives through the standard provide channel (useInput + inputActions); the keyboard/DOM command face and stop arrive through this entry's own inject, whose hooks compartme...”;固定提交中扫描到的声明包括
InputBarProps、InputBar、editRangeOf;本地静态 import 图显示它直接依赖 13 个源文件,并被 5 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/image-labels.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx、packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx、packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/runtime/tests/fake-api.client.ts
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx、packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 838 行;扫描到的声明包括
InputBarProps、InputBar、editRangeOf;源码顶部原注释(英文,仅作回查线索):The default composer body: the 'conversation.composer.bar' slot entry. Machine state arrives through the standard provide channel (useInput + inputActions); the keyboard/DOM command face and stop arrive through this entry's own inject, whose hooks compartme...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/PermissionSelect.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
PermissionSelect的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
PermissionSelect的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:固定提交中扫描到的结构线索是:样式结构包含选择器 .trigger、.triggerIcon、.triggerLabel、.chevron、.chevronOpen;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/PermissionSelect.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx、packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx、packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/PermissionSelect.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/input-bar.client.spec.tsx、packages/client/ui-conversation/tests/input-matrix.client.spec.tsx、packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 76 行;样式结构包含选择器 .trigger、.triggerIcon、.triggerLabel、.chevron、.chevronOpen。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/PermissionSelect.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:固定提交中扫描到的声明包括
PermissionSelectProps、PermissionSelect、permissionGlyph、displayName、optionLabel;本地静态 import 图显示它直接依赖 4 个源文件,并被 1 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/src/client/skeleton/PermissionSelect.module.css、packages/client/ui-primitives/src/index.ts、packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/InputBar.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 172 行;扫描到的声明包括
PermissionSelectProps、PermissionSelect、permissionGlyph、displayName、optionLabel。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/TodoPanel.module.css
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:界面样式
- 这个文件有什么用:它定义
TodoPanel的网页外观、布局和状态样式,让界面逻辑与视觉规则可以分别修改。 - 为什么这样设计:把
TodoPanel的样式与业务流程分开,浏览器端可以调整外观而不改变服务端或 agent 的行为;组件只通过 class 和状态选择器使用它。 - 文件级设计证据:源码顶部注释把它定位为“Todo strip in the composer context stack (Figma 1236:32276): tip surface, status icons + secondary item labels. Its visible card aligns with the GoalBar and the Queue panel inside their shared dock column: 12px radius, 36px collapsed row, 12px side padding,...”;固定提交中扫描到的结构线索是:样式结构包含选择器 .root、.body、.header、.lead、.title、.progress;自定义属性 --dsh-scrollbar-thumb、--dsh-scrollbar-thumb-hover;本地静态 import 图显示它直接依赖 0 个源文件,并被 1 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/TodoPanel.tsx
- 对应测试:间接测试线索(通过本地 import 链,非直接覆盖):packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx、packages/client/ui-conversation/tests/chat-apply.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 传递引用;这些测试通过包入口或中间模块到达本文件,不等于本文件被直接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/TodoPanel.tsx确认状态如何进入 UI,最后对照packages/client/ui-attachment/tests/composer-attachments.client.spec.tsx、packages/client/ui-attachment/tests/message-image.client.spec.tsx、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 146 行;样式结构包含选择器 .root、.body、.header、.lead、.title、.progress;自定义属性 --dsh-scrollbar-thumb、--dsh-scrollbar-thumb-hover;源码顶部原注释(英文,仅作回查线索):Todo strip in the composer context stack (Figma 1236:32276): tip surface, status icons + secondary item labels. Its visible card aligns with the GoalBar and the Queue panel inside their shared dock column: 12px radius, 36px collapsed row, 12px side padding,...。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/TodoPanel.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“TodoPanel: plan strip above the composer (the web counterpart of the TUI plan panel). Renders the standing todo/write whole-list snapshot (cleared on the next turn/start) — no data of its own, hidden while the list is empty. Mounted through the 'conversatio...”;固定提交中扫描到的声明包括
TodoPanelProps、TodoPanel、TodoDockProps、TodoDock、todoDockEntry;本地静态 import 图显示它直接依赖 6 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/locales.ts、packages/client/ui-conversation/src/client/skeleton/TodoPanel.module.css、packages/client/ui-primitives/src/index.ts、packages/client/ui-conversation/src/client/apply.ts
- 对应测试:packages/client/ui-conversation/tests/todo-panel.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/tests/todo-panel.client.spec.tsx确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/todo-panel.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 154 行;扫描到的声明包括
TodoPanelProps、TodoPanel、TodoDockProps、TodoDock、todoDockEntry、assertNever、CompletedGlyph、ProgressGlyph;源码顶部原注释(英文,仅作回查线索):TodoPanel: plan strip above the composer (the web counterpart of the TUI plan panel). Renders the standing todo/write whole-list snapshot (cleared on the next turn/start) — no data of its own, hidden while the list is empty. Mounted through the 'conversatio...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/skeleton/safari.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Safari-specific textarea layout recovery for the conversation composer.”;固定提交中扫描到的声明包括
BrowserIdentity、isSafariBrowser、repairSafariTextareaLayout;本地静态 import 图显示它直接依赖 0 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/InputBar.tsx、packages/client/ui-conversation/tests/safari.client.spec.ts
- 对应测试:packages/client/ui-conversation/tests/safari.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/skeleton/InputBar.tsx、packages/client/ui-conversation/tests/safari.client.spec.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/safari.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 42 行;扫描到的声明包括
BrowserIdentity、isSafariBrowser、repairSafariTextareaLayout;源码顶部原注释(英文,仅作回查线索):Safari-specific textarea layout recovery for the conversation composer.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/client/stores.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:状态存储
- 这个文件有什么用:它维护浏览器端、用户界面、对话的状态、快照或队列,并集中处理更新、读取和清理规则。
- 为什么这样设计:状态更新集中在一个边界,调用者不需要维护多份副本;未来替换观察、缓存或持久化方式时,消费方依赖仍然稳定。
- 文件级设计证据:源码顶部注释把它定位为“Per-session chat store shared by conversation and details registrations. The plugin creates its handle at apply time so identity follows the fiber.”;固定提交中扫描到的声明包括
createChatStore;本地静态 import 图显示它直接依赖 2 个源文件,并被 14 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/views.ts、packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/slots.ts
- 对应测试:packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/chat-store.client.spec.ts、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/selection-survival.client.spec.tsx、packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先读相关类型和事件,再读当前状态或存储实现,沿着
packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/views.ts和packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/slots.ts、packages/client/ui-conversation/tests/apply-inject.client.spec.tsx理解状态变化,最后对照packages/client/ui-conversation/tests/apply-inject.client.spec.tsx、packages/client/ui-conversation/tests/chat-store.client.spec.ts、packages/client/ui-conversation/tests/chat-view.client.spec.tsx。 - 代码证据:固定提交归档实际读取结果:约 34 行;扫描到的声明包括
createChatStore;源码顶部原注释(英文,仅作回查线索):Per-session chat store shared by conversation and details registrations. The plugin creates its handle at apply time so identity follows the fiber.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/css-modules.d.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:本次固定提交归档没有扫描到顶部注释、顶层声明或专门的结构线索;本地静态 import 图显示它直接依赖 0 个源文件,并被 0 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md
- 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
- 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着所在包的入口或服务确认状态如何进入 UI,最后对照同包中与它同名或覆盖相近场景的测试。
- 代码证据:固定提交归档实际读取结果:约 6 行。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/index.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:模块入口
- 这个文件有什么用:它把浏览器端、用户界面、对话相关的公开能力集中导出,并决定调用者可以依赖哪些边界;调用者因此不必记住所有内部文件。
- 为什么这样设计:入口文件把公开边界固定下来,内部文件可以继续拆分或替换;其他包只依赖入口暴露的 API,依赖方向更稳定。
- 文件级设计证据:源码顶部注释把它定位为“Host registration for browser conversation preferences.”;固定提交中扫描到的声明包括
apply;本地静态 import 图显示它直接依赖 3 个源文件,并被 2 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/submission-settings.ts、packages/settings/settings/src/index.ts、vendor/cordis/src/index.ts、packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx
- 对应测试:packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/host.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读
packages/client/ui-conversation/README.md、入口和消费者,再读当前契约,沿着packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/host.client.spec.ts看它怎样约束运行时,最后对照packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx、packages/client/ui-conversation/tests/host.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 23 行;扫描到的声明包括
apply;源码顶部原注释(英文,仅作回查线索):Host registration for browser conversation preferences.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/invariant.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:运行时不变量
- 这个文件有什么用:它检查浏览器端、用户界面、对话必须始终成立的条件,在错误刚出现时报告,而不是等到更深层才出现难以解释的结果。
- 为什么这样设计:把不变量集中在一个位置,调用者和测试就能用同一条规则检查状态;错误在边界处报告,比在后续 UI 或网络请求中才暴露更容易修复。
- 文件级设计证据:源码顶部注释把它定位为“Package-owned invariant companion for @deepseek-ai/dsh-client-ui-conversation. @module @deepseek-ai/dsh-client-ui-conversation/invariant”;固定提交中扫描到的声明包括
name、inject、apply;本地静态 import 图显示它直接依赖 2 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/runtime-diagnostics/invariants/src/index.ts、vendor/cordis/src/index.ts
- 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
- 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
- 阅读顺序:先读相关类型和事件,再读当前状态或存储实现,沿着
packages/runtime-diagnostics/invariants/src/index.ts、vendor/cordis/src/index.ts和所在包的入口或服务理解状态变化,最后对照同包中与它同名或覆盖相近场景的测试。 - 代码证据:固定提交归档实际读取结果:约 32 行;扫描到的声明包括
name、inject、apply;源码顶部原注释(英文,仅作回查线索):Package-owned invariant companion for @deepseek-ai/dsh-client-ui-conversation. @module @deepseek-ai/dsh-client-ui-conversation/invariant。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/src/submission-settings.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:对话界面逻辑
- 这个文件有什么用:这个文件实现对话界面中的一个节点、输入或显示边界,把会话模型转换为用户可以操作和阅读的 UI。
- 为什么这样设计:把用户操作和视图状态放在界面包内,能让 Web 组件复用同一套交互契约,也让服务端和领域逻辑不被浏览器细节污染。
- 文件级设计证据:源码顶部注释把它定位为“Busy-Enter preference stored in the Host user-settings document.”;固定提交中扫描到的声明包括
CONVERSATION_SETTINGS_NAMESPACE、BUSY_ENTER_FIELD、BUSY_ENTER_BEHAVIORS、BusyEnterBehavior、DEFAULT_BUSY_ENTER_BEHAVIOR;本地静态 import 图显示它直接依赖 1 个源文件,并被 5 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、vendor/schemastery/src/index.ts、packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/input/submission-policy.ts
- 对应测试:packages/client/ui-conversation/tests/submission-policy.client.spec.ts
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
- 阅读顺序:先读客户端运行时契约或呈现模型,再读当前界面文件,沿着
packages/client/ui-conversation/src/client/apply.ts、packages/client/ui-conversation/src/client/contract/composer-submission.ts、packages/client/ui-conversation/src/client/input/submission-policy.ts确认状态如何进入 UI,最后对照packages/client/ui-conversation/tests/submission-policy.client.spec.ts。 - 代码证据:固定提交归档实际读取结果:约 29 行;扫描到的声明包括
CONVERSATION_SETTINGS_NAMESPACE、BUSY_ENTER_FIELD、BUSY_ENTER_BEHAVIORS、BusyEnterBehavior、DEFAULT_BUSY_ENTER_BEHAVIOR、ConversationSettings、ConversationSettingsSchema;源码顶部原注释(英文,仅作回查线索):Busy-Enter preference stored in the Host user-settings document.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/apply-inject.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“conversation slot inject API”、“assembles the thin API side-effect-free”、“the provide-channel input face submits through the machine sink: trim, transactional cl...”、“inject fails loud when the session resolves no binding or the scope lacks the service”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“conversation slot inject API”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom apply inject factories exercised end to end against the terminal thin API: the strict session API (views triple, draft mirror), the provide-channel input face (machine-sink submit choreography incl. transactional clear + failure re...”;固定提交中扫描到的声明包括
sessionFakeFor、bench;本地静态 import 图显示它直接依赖 5 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 363 行;扫描到的声明包括
sessionFakeFor、bench;扫描到的测试主题包括 “conversation slot inject API”、“assembles the thin API side-effect-free”、“the provide-channel input face submits through the machine sink: trim, transactional clear, failure retains the draft”、“inject fails loud when the session resolves no binding or the scope lacks the service”、“openDetails (chat view face) writes the selection through the store actions and opens the panel”、“openFile (chat view face) resolves against session cwd and calls workspaces.openPath”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom apply inject factories exercised end to end against the terminal thin API: the strict session API (views triple, draft mirror), the provide-channel input face (machine-sink submit choreography incl. transactional clear + failure re...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/assembly-surfaces.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“resident composer”、“renders the locked view state while no session exists at all”、“keeps the complete Hero tree mounted when the first Workspace session appears”、“the textarea survives the blank→active conversion as the same DOM node”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“resident composer”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
ResizeObserverStub、AppRoot、WorkspaceProbe、bench;本地静态 import 图显示它直接依赖 5 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 234 行;扫描到的声明包括
ResizeObserverStub、AppRoot、WorkspaceProbe、bench;扫描到的测试主题包括 “resident composer”、“renders the locked view state while no session exists at all”、“keeps the complete Hero tree mounted when the first Workspace session appears”、“the textarea survives the blank→active conversion as the same DOM node”、“prompt rejection through the assembled composer”、“renders the promptError alert strip and keeps the draft in the machine”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/chat-apply.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“apply wiring”、“provides the conversation service”、“registers the chat view and its keyed business-node seat”、“occupies the slots + the ring; session entries share one store handle”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“apply wiring”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom apply wiring: the conversation service provided, the chat view registered as the first 'conversation.view' ring entry declaring the whole-Tool seat, the slot registrations land against a root entry's children declarations (the AppF...”;固定提交中扫描到的声明包括
bench、renderEntryOf;本地静态 import 图显示它直接依赖 5 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/client/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 129 行;扫描到的声明包括
bench、renderEntryOf;扫描到的测试主题包括 “apply wiring”、“provides the conversation service”、“registers the chat view and its keyed business-node seat”、“occupies the slots + the ring; session entries share one store handle”、“leaves per-Tool rows to the ui-tool plugin”、“plugin fiber disposal collects every registration (unload cascade, ring and hole included)”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom apply wiring: the conversation service provided, the chat view registered as the first 'conversation.view' ring entry declaring the whole-Tool seat, the slot registrations land against a root entry's children declarations (the AppF...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“MessageItem arms”、“renders an adjacent session mention as a chip even without trailing whitespace”、“renders the complete metadata-confirmed multi-word session label”、“renders no-extension paths as files and leaves sentence punctuation outside the reference”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“MessageItem arms”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom Remaining chat branch tails: MessageItem context/unknown arms, user IconActions, StatsLine no-cache join, AssistantMarkdown single-line reasoning. (Tool-row dispatch tails live with the keyed-slot machinery specs since the tool rin...”;固定提交中扫描到的声明包括
ResizeObserverStub、MessageItem;本地静态 import 图显示它直接依赖 10 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 1044 行;扫描到的声明包括
ResizeObserverStub、MessageItem;扫描到的测试主题包括 “MessageItem arms”、“renders an adjacent session mention as a chip even without trailing whitespace”、“renders the complete metadata-confirmed multi-word session label”、“renders no-extension paths as files and leaves sentence punctuation outside the reference”、“user bubbles expose clock / copy and neither branch nor edit; copy writes the text”、“user copy falls back to execCommand when clipboard.writeText is unavailable”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom Remaining chat branch tails: MessageItem context/unknown arms, user IconActions, StatsLine no-cache join, AssistantMarkdown single-line reasoning. (Tool-row dispatch tails live with the keyed-slot machinery specs since the tool rin...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试支持
- 这个文件有什么用:它为“chat-snapshot-fixture.client”相关测试提供共享准备或环境支持;真正的行为断言由导入它的测试用例完成。
- 为什么这样设计:测试材料和被测实现分开,测试可以反复使用同一个受控输入;它不应该被误认为线上入口或生产服务。
- 文件级设计证据:固定提交中扫描到的声明包括
chatSnapshotFixture、sameValues、nodeSource、FixtureNodeStore、FixtureLocationIndex;本地静态 import 图显示它直接依赖 2 个源文件,并被 4 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/turn-metrics.ts、packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-stats.client.spec.tsx
- 对应测试:packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-stats.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx、packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx
- 测试关联依据:固定提交源码中的本地静态 import 直接引用;这些测试用例实际使用了本支持文件。
- 阅读顺序:先看它提供的固定输入或环境,再跳到实际使用它的测试
packages/client/ui-conversation/tests/chat-branch-tails.client.spec.tsx、packages/client/ui-conversation/tests/chat-stats.client.spec.tsx、packages/client/ui-conversation/tests/chat-view.client.spec.tsx,最后回看被测实现和清理路径。 - 代码证据:固定提交归档实际读取结果:约 298 行;扫描到的声明包括
chatSnapshotFixture、sameValues、nodeSource、FixtureNodeStore、FixtureLocationIndex、FixtureTurnDataStore、assistantData、settledNode。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/chat-stats.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“deriveStats”、“counts turns and steps and never folds node usage into accounting”、“ignores tool results with no call time”、“sums LLM wall time from assistant timing and tool wall time from call/result pairs”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“deriveStats”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom StatsLine (composer.dock entry): totals derivation + the RFC hard acceptance — zero renders during streaming.”;固定提交中扫描到的声明包括
ResizeObserverStub、snapshotBase、makeSource、sessionStats、projections;本地静态 import 图显示它直接依赖 7 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/en.ts、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/en.ts、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 422 行;扫描到的声明包括
ResizeObserverStub、snapshotBase、makeSource、sessionStats、projections、props、tokenUsage、Counting;扫描到的测试主题包括 “deriveStats”、“counts turns and steps and never folds node usage into accounting”、“ignores tool results with no call time”、“sums LLM wall time from assistant timing and tool wall time from call/result pairs”、“sums ttft per recorded step and decode throughput inputs per usage-carrying step”、“formatters”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom StatsLine (composer.dock entry): totals derivation + the RFC hard acceptance — zero renders during streaming.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/chat-store.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“createChatStore”、“init shape: empty selection/draft/view”、“actions cover the declared write set”、“persists per scope key and rehydrates a fresh instance”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“createChatStore”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/stores.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/ui-conversation/src/client/stores.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 81 行;扫描到的测试主题包括 “createChatStore”、“init shape: empty selection/draft/view”、“actions cover the declared write set”、“persists per scope key and rehydrates a fresh instance”、“clearPersisted removes the scope entry (session-death cleanup hook)”、“every create() is an independent instance; the factory holds no singleton”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/chat-view.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“Chat node rendering”、“threads the injected file-mention vocabulary into the closing prose only”、“formatRunDuration localizes units and floors partial seconds”、“ChatView”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“Chat node rendering”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom ChatView behavior: flow derivation, streaming isolation (Profiler counts), Tool seat ownership and selection handoff — driven through a scripted ObservableSnapshot fake, no wire or Tool presentation plugin.”;固定提交中扫描到的声明包括
snapshotBase、makeSource、emptySessions、emptyWorkspaces、makeHarness;本地静态 import 图显示它直接依赖 14 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/connection/src/client/index.ts、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先看它直接导入的被测实现
packages/client/connection/src/client/index.ts、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 1460 行;扫描到的声明包括
snapshotBase、makeSource、emptySessions、emptyWorkspaces、makeHarness、readerScroll、installScrollMetrics、StatefulToolNode;扫描到的测试主题包括 “Chat node rendering”、“threads the injected file-mention vocabulary into the closing prose only”、“formatRunDuration localizes units and floors partial seconds”、“ChatView”、“hands a windowless tool result to the Tool seat with an empty tool name”、“prepend keeps the reader\”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom ChatView behavior: flow derivation, streaming isolation (Profiler counts), Tool seat ownership and selection handoff — driven through a scripted ObservableSnapshot fake, no wire or Tool presentation plugin.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/context-meter.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“ContextMeter”、“renders nothing until both pressure and capacity are known”、“shows the occupancy ring and opens the breakdown panel on click”、“lets each locale own the headline word order around the reading”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“ContextMeter”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom ContextMeter (composer trailing control): occupancy ring gating, the click-open breakdown panel, and its close gestures.”;固定提交中扫描到的声明包括
projections、meter;本地静态 import 图显示它直接依赖 5 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/index.ts、packages/client/ui-conversation/src/client/locales.ts、packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/index.ts、packages/client/ui-conversation/src/client/locales.ts、packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 158 行;扫描到的声明包括
projections、meter;扫描到的测试主题包括 “ContextMeter”、“renders nothing until both pressure and capacity are known”、“shows the occupancy ring and opens the breakdown panel on click”、“lets each locale own the headline word order around the reading”、“draws no bar segment at zero occupancy”、“reads the ring from the projected figure so a compaction shows at once”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom ContextMeter (composer trailing control): occupancy ring gating, the click-open breakdown panel, and its close gestures.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/conversation-node-definitions.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“built-in conversation node Definitions”、“keeps one keyed Assistant node while streaming settles and materializes interruption fr...”、“keeps one keyed Tool node from running through settlement and replays nested dispatch a...”、“prepends an older turn without replacing already materialized nodes”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“built-in conversation node Definitions”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:固定提交中扫描到的声明包括
TestEventDefinitions、TestViewDefinitions、at、assembler、snapshot;本地静态 import 图显示它直接依赖 14 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/conversation-nodes/assistant.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/chat-nodes.ts、packages/client/ui-conversation/src/client/conversation-nodes/assistant.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 1058 行;扫描到的声明包括
TestEventDefinitions、TestViewDefinitions、at、assembler、snapshot、node、textMessage、assistantMessage;扫描到的测试主题包括 “built-in conversation node Definitions”、“keeps one keyed Assistant node while streaming settles and materializes interruption from Location”、“keeps one keyed Tool node from running through settlement and replays nested dispatch after prepend”、“prepends an older turn without replacing already materialized nodes”、“appends a later turn without replacing nodes from the completed turn”、“keeps branching unavailable when a tool result follows the closing Assistant”。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/coverage-tails.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“tails”、“node-half apply tolerates a Host without settings”、“AssistantMarkdown renders reasoning as a Think row and unknown blocks as JSON fallback”、“AssistantMarkdown skips the root shell when only tool-call heads remain”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“tails”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom Branch tails the acceptance specs do not reach: the node-half apply without a settings service and AssistantMarkdown reasoning/unknown block arms.”;本地静态 import 图显示它直接依赖 6 个源文件,并被 0 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx、packages/client/ui-conversation/src/client/locales.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx、packages/client/ui-conversation/src/client/locales.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 71 行;扫描到的测试主题包括 “tails”、“node-half apply tolerates a Host without settings”、“AssistantMarkdown renders reasoning as a Think row and unknown blocks as JSON fallback”、“AssistantMarkdown skips the root shell when only tool-call heads remain”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom Branch tails the acceptance specs do not reach: the node-half apply without a settings service and AssistantMarkdown reasoning/unknown block arms.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“EnterBehaviorRow”、“explains the busy-only scope and shows Queue by default”、“selects Steer, follows later preference changes, and closes outside”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“EnterBehaviorRow”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
emptySessions、emptyWorkspaces、mount;本地静态 import 图显示它直接依赖 5 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/submission-policy.ts、packages/client/ui-conversation/src/client/locales.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/submission-policy.ts、packages/client/ui-conversation/src/client/locales.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 67 行;扫描到的声明包括
emptySessions、emptyWorkspaces、mount;扫描到的测试主题包括 “EnterBehaviorRow”、“explains the busy-only scope and shows Queue by default”、“selects Steer, follows later preference changes, and closes outside”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/gate-branch-tails.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“render branch tails”、“AssistantMarkdown reasoning row is ok-state when not the streaming tail”、“StatsLine falls back to window-node counts and drops every token group without projections”、“AssistantMarkdown reasoning as the streaming tail renders the running ring”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“render branch tails”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
ResizeObserverStub、renderToolDetailsProbe、snapshotBase;本地静态 import 图显示它直接依赖 11 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 测试支持:packages/client/ui-conversation/tests/chat-snapshot-fixture.client.ts
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 217 行;扫描到的声明包括
ResizeObserverStub、renderToolDetailsProbe、snapshotBase;扫描到的测试主题包括 “render branch tails”、“AssistantMarkdown reasoning row is ok-state when not the streaming tail”、“StatsLine falls back to window-node counts and drops every token group without projections”、“AssistantMarkdown reasoning as the streaming tail renders the running ring”、“DetailsPanel title falls to 详情 when the selection has no toolName and no material”、“DetailsPanel resolves a nested run_code leaf to its full logged args and output”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/host.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“ui-conversation host”、“registers, validates, and disposes the durable busy-Enter preference”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“ui-conversation host”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:固定提交中扫描到的声明包括
MemorySettings;本地静态 import 图显示它直接依赖 3 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/index.ts、packages/settings/settings/src/index.ts、vendor/cordis/src/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/ui-conversation/src/index.ts、packages/settings/settings/src/index.ts、vendor/cordis/src/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 30 行;扫描到的声明包括
MemorySettings;扫描到的测试主题包括 “ui-conversation host”、“registers, validates, and disposes the durable busy-Enter preference”。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/image-labels.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“attachment rejection copy”、“renders megabytes without a trailing fraction unless one exists”、“maps user-solvable reasons to limit-naming copy”、“folds unknown reasons and limit reasons without projected limits into the send-failed line”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“attachment rejection copy”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom Conversation-owned attachment errors and the message-image slot handoff.”;固定提交中扫描到的声明包括
imageRenderer;本地静态 import 图显示它直接依赖 7 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/attachment/attachment/src/index.ts、packages/client/locale/src/locales/zh.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/attachment/attachment/src/index.ts、packages/client/locale/src/locales/zh.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 137 行;扫描到的声明包括
imageRenderer;扫描到的测试主题包括 “attachment rejection copy”、“renders megabytes without a trailing fraction unless one exists”、“maps user-solvable reasons to limit-naming copy”、“folds unknown reasons and limit reasons without projected limits into the send-failed line”、“assistant image slot handoff”、“passes one image group and its message alignment to the renderer”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom Conversation-owned attachment errors and the message-image slot handoff.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/input-bar.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“image draft rail”、“collects clipboard files while preserving text from a mixed paste”、“pre-checks projected limits at intake: whole-batch refusal with product copy, none added”、“announces the format problem before any limit when the batch holds a non-image”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“image draft rail”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom InputBar behavior over the machine wiring: Enter-send semantics (IME guard, Shift newline, busy Enter policy, Ctrl/Meta steering, repeat suppression), running semantics (input stays free; continuable children keep Send beside Stop)...”;固定提交中扫描到的声明包括
snapshotOf、row、bench、beforeInput、attachmentOwner;本地静态 import 图显示它直接依赖 9 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/slots.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/slots.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 1645 行;扫描到的声明包括
snapshotOf、row、bench、beforeInput、attachmentOwner;扫描到的测试主题包括 “image draft rail”、“collects clipboard files while preserving text from a mixed paste”、“pre-checks projected limits at intake: whole-batch refusal with product copy, none added”、“announces the format problem before any limit when the batch holds a non-image”、“projects display-ready limits into the attachment slot”、“announces server attachment rejections as product copy, other codes as developer text”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom InputBar behavior over the machine wiring: Enter-send semantics (IME guard, Shift newline, busy Enter policy, Ctrl/Meta steering, repeat suppression), running semantics (input stays free; continuable children keep Send beside Stop)...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/input-machine.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“input-machine: plain × enter”、“empty and whitespace-only drafts produce nothing”、“non-command text falls to the default sink”、“retains an explicit steer mode on the default sink effect”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“input-machine: plain × enter”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“InputMachine unit account: the submit plane (adjudication, span CAS, drift guard, anti-backwash), plus the occurrence table (shift / whole-chip deletion / same-name independence), the self-managed undo log (typing coalescing, paste two-stage undo, redo chai...”;固定提交中扫描到的声明包括
claimOf、refOf、spanOf、effectAt、enterAdjudicating;本地静态 import 图显示它直接依赖 4 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/input/decorations.ts、packages/client/ui-conversation/src/client/input/machine.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/input/decorations.ts、packages/client/ui-conversation/src/client/input/machine.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 927 行;扫描到的声明包括
claimOf、refOf、spanOf、effectAt、enterAdjudicating、enterSubmitting、staleAttempt、withChip;扫描到的测试主题包括 “input-machine: plain × enter”、“empty and whitespace-only drafts produce nothing”、“non-command text falls to the default sink”、“retains an explicit steer mode on the default sink effect”、“leading”、“leading is judged after trim including newlines”;源码顶部原注释(英文,仅作回查线索):InputMachine unit account: the submit plane (adjudication, span CAS, drift guard, anti-backwash), plus the occurrence table (shift / whole-chip deletion / same-name independence), the self-managed undo log (typing coalescing, paste two-stage undo, redo chai...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/input-matrix.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“matrix row: plain”、“enter falls to the default sink; no claim on the currency; edits free”、“matrix row: claimed”、“publishes the claim currency, colors the token, hints while args are blank, and edits s...”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“matrix row: plain”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
mountBar、bench;本地静态 import 图显示它直接依赖 8 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/contract.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/contract.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 319 行;扫描到的声明包括
mountBar、bench;扫描到的测试主题包括 “matrix row: plain”、“enter falls to the default sink; no claim on the currency; edits free”、“matrix row: claimed”、“publishes the claim currency, colors the token, hints while args are blank, and edits stay free”、“enter routes to claim.submit (command lane, never the queue sink)”、“backspacing the token auto-releases to plain and the visuals vanish (scenario H)”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/input-reference-submit.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“reference submission”、“mirrors canonical reference text so a persisted draft remains resolvable after remount”、“retains the chip on Host failure and clears it only after a later accepted retry”、“blocks submission and retains the chip when its owner cannot serialize it”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“reference submission”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“Reference-submit transaction coverage: chips serialize through their owner, stay resident through Host rejection, and clear only after an accepted prompt.”;固定提交中扫描到的声明包括
chip;本地静态 import 图显示它直接依赖 4 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/input/facade.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/contract.ts、packages/client/ui-conversation/src/client/input/facade.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 240 行;扫描到的声明包括
chip;扫描到的测试主题包括 “reference submission”、“mirrors canonical reference text so a persisted draft remains resolvable after remount”、“retains the chip on Host failure and clears it only after a later accepted retry”、“blocks submission and retains the chip when its owner cannot serialize it”、“aborts Host-side preparation when the input shell is disposed”、“retains a rejected default message without duplicating its prompt error notice”;源码顶部原注释(英文,仅作回查线索):Reference-submit transaction coverage: chips serialize through their owner, stay resident through Host rejection, and clear only after an accepted prompt.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“scenario A: menu-pick /goal, type args, enter submits”、“runs the whole claim chain through the real pipeline”、“scenario C: pasted /goal xxx + enter (menu never opened)”、“adjudicates on enter, claims and submits in one stroke”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“scenario A: menu-pick /goal, type args, enter submits”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
commandSource、scopedBench、bench;本地静态 import 图显示它直接依赖 10 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/runtime/tests/fake-api.client.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 测试支持:packages/client/runtime/tests/fake-api.client.ts
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/contract.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 368 行;扫描到的声明包括
commandSource、scopedBench、bench;扫描到的测试主题包括 “scenario A: menu-pick /goal, type args, enter submits”、“runs the whole claim chain through the real pipeline”、“scenario C: pasted /goal xxx + enter (menu never opened)”、“adjudicates on enter, claims and submits in one stroke”、“scenario D: execute-kind /compact”、“menu pick executes immediately without touching the draft machine phase”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/queue-dock.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“QueueDock”、“renders null while the queue is empty”、“leaves pending steering to the conversation flow”、“renders one row directly and defaults multiple rows to a collapsible count header”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“QueueDock”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
row、snapshotWith、liveSession、kitFor;本地静态 import 图显示它直接依赖 8 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/queue.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/queue.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 396 行;扫描到的声明包括
row、snapshotWith、liveSession、kitFor;扫描到的测试主题包括 “QueueDock”、“renders null while the queue is empty”、“leaves pending steering to the conversation flow”、“renders one row directly and defaults multiple rows to a collapsible count header”、“keeps an active single-row editor visible when another item arrives”、“keeps an in-flight row action visible when another item arrives”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/reasoning-row.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“ReasoningRow”、“follows the latest streaming line, scrolls to its end, then restores the settled first ...”、“expands from either Think or the reasoning summary”、“expanded Think drops the inline summary and renders plain prose, no IN card”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“ReasoningRow”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
flushAnimationFrames;本地静态 import 图显示它直接依赖 4 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx、packages/client/ui-conversation/src/client/locales.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/ui-conversation/src/client/chat/AssistantMarkdown.tsx、packages/client/ui-conversation/src/client/locales.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 123 行;扫描到的声明包括
flushAnimationFrames;扫描到的测试主题包括 “ReasoningRow”、“follows the latest streaming line, scrolls to its end, then restores the settled first line”、“expands from either Think or the reasoning summary”、“expanded Think drops the inline summary and renders plain prose, no IN card”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/safari.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“Safari browser detection”、“Safari textarea layout recovery”、“does nothing while the textarea owns no scrollable overflow”、“invalidates a stale native layout and restores the owned height”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“Safari browser detection”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/skeleton/safari.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/ui-conversation/src/client/skeleton/safari.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 131 行;扫描到的测试主题包括 “Safari browser detection”、“Safari textarea layout recovery”、“does nothing while the textarea owns no scrollable overflow”、“invalidates a stale native layout and restores the owned height”、“does nothing outside the composer scrollport”、“accepts an absent textarea during teardown”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/selection-survival.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“selection survives on the store seat”、“one session, two slots: conversation writes, details reads the SAME instance”、“sessions are isolated: s2 selection never bleeds into s1”、“a list-projection update keeps instance identity and the selection value”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“selection survives on the store seat”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
bench、storeFor;本地静态 import 图显示它直接依赖 3 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/stores.ts、packages/test-support/client-runtime/src/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/stores.ts、packages/test-support/client-runtime/src/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 110 行;扫描到的声明包括
bench、storeFor;扫描到的测试主题包括 “selection survives on the store seat”、“one session, two slots: conversation writes, details reads the SAME instance”、“sessions are isolated: s2 selection never bleeds into s1”、“a list-projection update keeps instance identity and the selection value”、“session death buries the instance and its persisted draft”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/service-orchestration.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“ConversationController”、“routes operations through the public Session binding”、“folds Session business failures into callback rejections”、“treats strict-steer races as converged Queue delivery”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“ConversationController”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom ConversationController scope addressing over the runtime's real scope tag: TestSessions mints tagged scopes through the production createScope, so the service's scopeOf/binding path runs against production resolution (no local tag ...”;固定提交中扫描到的声明包括
bench;本地静态 import 图显示它直接依赖 8 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/attachment/attachment/src/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/blocks.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/attachment/attachment/src/index.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/input/blocks.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 225 行;扫描到的声明包括
bench;扫描到的测试主题包括 “ConversationController”、“routes operations through the public Session binding”、“folds Session business failures into callback rejections”、“treats strict-steer races as converged Queue delivery”、“releases draft previews when their session scope is disposed”、“validates every MIME type before allocating previews”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom ConversationController scope addressing over the runtime's real scope tag: TestSessions mints tagged scopes through the production createScope, so the service's scopeOf/binding path runs against production resolution (no local tag ...。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/skeleton.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“Hero chrome”、“renders the English preview badge through the hero locale seat”、“ConversationRoot resident composer”、“renders the composer inert with the blocker\u2019s own reason”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“Hero chrome”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom ConversationRoot skeleton behavior: the ONE resident composer across the hero (blank session) and active phases — same textarea DOM node, machine- owned draft, and the hero workspace picker (switching = retargetWorkspace).”;固定提交中扫描到的声明包括
fakeWiring、ResizeObserverStub、workspace、conversationSnapshot、mount;本地静态 import 图显示它直接依赖 13 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/en.ts、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/en.ts、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 545 行;扫描到的声明包括
fakeWiring、ResizeObserverStub、workspace、conversationSnapshot、mount;扫描到的测试主题包括 “Hero chrome”、“renders the English preview badge through the hero locale seat”、“ConversationRoot resident composer”、“renders the composer inert with the blocker\u2019s own reason”、“lets the no-workspace posture win over a block”、“keeps composer text in the machine, mirrors to the chat store, and submits through the sink”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom ConversationRoot skeleton behavior: the ONE resident composer across the hero (blank session) and active phases — same textarea DOM node, machine- owned draft, and the hero workspace picker (switching = retargetWorkspace).。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/submission-policy.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“ComposerSubmissionPolicy”、“defaults to Queue and only applies the preference while running”、“writes an explicit change through the scope after publishing it locally”、“adopts a Host preference without writing it back and leaves an identical write untouched”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“ComposerSubmissionPolicy”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;本地静态 import 图显示它直接依赖 3 个源文件,并被 0 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/ui-conversation/src/client/input/submission-policy.ts、packages/client/ui-conversation/src/submission-settings.ts、packages/test-support/client-runtime/src/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/ui-conversation/src/client/input/submission-policy.ts、packages/client/ui-conversation/src/submission-settings.ts、packages/test-support/client-runtime/src/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 66 行;扫描到的测试主题包括 “ComposerSubmissionPolicy”、“defaults to Queue and only applies the preference while running”、“writes an explicit change through the scope after publishing it locally”、“adopts a Host preference without writing it back and leaves an identical write untouched”、“adopts a section already standing at construction”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/todo-panel.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“TodoPanel”、“renders nothing while the list is empty”、“starts collapsed with the per-status count summary visible”、“omits the completed segment while nothing is done yet”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“TodoPanel”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“@vitest-environment jsdom”;固定提交中扫描到的声明包括
dockProps;本地静态 import 图显示它直接依赖 5 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/locales.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/locale/src/locales/zh.ts、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/locales.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 136 行;扫描到的声明包括
dockProps;扫描到的测试主题包括 “TodoPanel”、“renders nothing while the list is empty”、“starts collapsed with the per-status count summary visible”、“omits the completed segment while nothing is done yet”、“expands to show one row per item with its status glyph”、“collapse hides an expanded list; expand restores; header keeps the count summary”;源码顶部原注释(英文,仅作回查线索):@vitest-environment jsdom。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/turn-metrics.client.spec.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“assistantStepReading”、“derives ttft, decode time, and output tokens from a fully recorded step”、“returns nulls when timing is absent”、“needs both boundaries for ttft and clamps negative spans to zero”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“assistantStepReading”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“Per-turn latency/throughput fold and the footer figure formatters.”;本地静态 import 图显示它直接依赖 3 个源文件,并被 0 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/message-chrome.ts、packages/client/ui-conversation/src/client/chat/turn-metrics.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/chat/message-chrome.ts、packages/client/ui-conversation/src/client/chat/turn-metrics.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 154 行;扫描到的测试主题包括 “assistantStepReading”、“derives ttft, decode time, and output tokens from a fully recorded step”、“returns nulls when timing is absent”、“needs both boundaries for ttft and clamps negative spans to zero”、“rejects non-object, missing, and non-finite usage token counts”、“deriveTurnMetrics”;源码顶部原注释(英文,仅作回查线索):Per-turn latency/throughput fold and the footer figure formatters.。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tests/views-type-chain.client.spec.tsx
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:测试用例
- 这个文件有什么用:它用自动化测试检查浏览器端、用户界面、对话的具体场景,包括“view-ring type negatives (compile-time; body never runs)”、“holds the negative samples as expect-error sites”、“view-ring runtime dual (real ledger)”、“registers, orders, projects tabs, and disposes through the slot ledger”;这些断言把“应该发生什么”变成可以重复运行的证据。
- 为什么这样设计:把测试主题“view-ring type negatives (compile-time; body never runs)”写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
- 文件级设计证据:源码顶部注释把它定位为“View-ring type-chain samples. This spec pins the conversation-owned SlotMap row, list-kind registration shape, composed view props, and the runtime ledger projection consumed by ConversationRoot.”;固定提交中扫描到的声明包括
bench;本地静态 import 图显示它直接依赖 3 个源文件,并被 0 个源文件直接引用。 - 直接协作者:packages/client/ui-conversation/README.md、packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/slots.ts、vendor/cordis/src/index.ts
- 对应测试:本文件本身就是测试用例。
- 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
- 阅读顺序:先看它直接导入的被测实现
packages/client/runtime/src/client/index.ts、packages/client/ui-conversation/src/client/contract/slots.ts、vendor/cordis/src/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。 - 代码证据:固定提交归档实际读取结果:约 95 行;扫描到的声明包括
bench;扫描到的测试主题包括 “view-ring type negatives (compile-time; body never runs)”、“holds the negative samples as expect-error sites”、“view-ring runtime dual (real ledger)”、“registers, orders, projects tabs, and disposes through the slot ledger”;源码顶部原注释(英文,仅作回查线索):View-ring type-chain samples. This spec pins the conversation-owned SlotMap row, list-kind registration shape, composed view props, and the runtime ledger projection consumed by ConversationRoot.。 - 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。
packages/client/ui-conversation/tsdown.config.ts
- 所属层:packages/client:可复用的 Harness 功能包
- 文件角色:构建或测试配置
- 这个文件有什么用:它告诉工具链怎样处理浏览器端、用户界面、对话:从哪里开始、使用哪个环境、解析哪些依赖以及输出什么产物;这些规则集中后,构建和测试才可重复。
- 为什么这样设计:工具链配置独立于业务实现,构建、测试和发布可以复用同一套入口规则;改配置时也能单独看出运行环境变化。
- 文件级设计证据:本次固定提交归档没有扫描到顶部注释、顶层声明或专门的结构线索;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
- 直接协作者:packages/client/ui-conversation/README.md、packages/client/tsdown.client.ts
- 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
- 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
- 阅读顺序:先读
packages/client/ui-conversation/README.md,再读本配置/脚本,沿着所在包的入口或服务确认它如何影响入口和产物,最后对照对应 gate 或快照测试。 - 代码证据:固定提交归档实际读取结果:约 3 行。
- 固定版本:源码链接固定到官方提交
aa6c361a972c8369148dea7380bb5c21c24e07ec。