@deepseek-ai/dsh-client-ui-chat 0.2.3-alpha.2 → 0.2.3-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.i18n.yaml +12 -12
  2. package/README.md +11 -9
  3. package/README.zh.md +11 -9
  4. package/lib/client.js +9 -9
  5. package/lib/client.js.map +1 -1
  6. package/lib/types/client/apply.d.ts.map +1 -1
  7. package/lib/types/client/apply.js.map +1 -1
  8. package/lib/types/client/chat/ApprovalCommand.d.ts +1 -1
  9. package/lib/types/client/chat/ApprovalCommand.d.ts.map +1 -1
  10. package/lib/types/client/chat/AssistantMarkdown.d.ts +2 -2
  11. package/lib/types/client/chat/AssistantMarkdown.d.ts.map +1 -1
  12. package/lib/types/client/chat/AssistantMarkdown.js.map +1 -1
  13. package/lib/types/client/chat/AssistantNodeView.d.ts +3 -3
  14. package/lib/types/client/chat/AssistantNodeView.d.ts.map +1 -1
  15. package/lib/types/client/chat/ChatAside.d.ts +1 -1
  16. package/lib/types/client/chat/ChatAside.d.ts.map +1 -1
  17. package/lib/types/client/chat/ChatFlow.d.ts +1 -1
  18. package/lib/types/client/chat/ChatFlow.d.ts.map +1 -1
  19. package/lib/types/client/chat/ChatFlow.js.map +1 -1
  20. package/lib/types/client/chat/ChatGroupSeat.d.ts.map +1 -1
  21. package/lib/types/client/chat/ChatGroupSeat.js.map +1 -1
  22. package/lib/types/client/chat/ChatNodeSeat.d.ts +1 -1
  23. package/lib/types/client/chat/ChatNodeSeat.d.ts.map +1 -1
  24. package/lib/types/client/chat/ChatNodeSeat.js.map +1 -1
  25. package/lib/types/client/chat/ChatView.d.ts +1 -1
  26. package/lib/types/client/chat/ChatView.d.ts.map +1 -1
  27. package/lib/types/client/chat/ChatView.js.map +1 -1
  28. package/lib/types/client/chat/CommandNodeView.d.ts +1 -1
  29. package/lib/types/client/chat/CommandNodeView.d.ts.map +1 -1
  30. package/lib/types/client/chat/CommandStatusRow.js.map +1 -1
  31. package/lib/types/client/chat/CompactionItem.js.map +1 -1
  32. package/lib/types/client/chat/ContextBody.d.ts +11 -1
  33. package/lib/types/client/chat/ContextBody.d.ts.map +1 -1
  34. package/lib/types/client/chat/ContextBody.js.map +1 -1
  35. package/lib/types/client/chat/ContextInjectionRow.d.ts.map +1 -1
  36. package/lib/types/client/chat/ContextInjectionRow.js.map +1 -1
  37. package/lib/types/client/chat/MessageIconActions.js.map +1 -1
  38. package/lib/types/client/chat/MessageItem.d.ts +5 -3
  39. package/lib/types/client/chat/MessageItem.d.ts.map +1 -1
  40. package/lib/types/client/chat/MessageItem.js.map +1 -1
  41. package/lib/types/client/chat/QuotaNoticeHost.js.map +1 -1
  42. package/lib/types/client/chat/ReasoningContent.d.ts +1 -1
  43. package/lib/types/client/chat/ReasoningContent.d.ts.map +1 -1
  44. package/lib/types/client/chat/ReasoningContent.js.map +1 -1
  45. package/lib/types/client/chat/ReasoningRow.d.ts +1 -1
  46. package/lib/types/client/chat/ReasoningRow.d.ts.map +1 -1
  47. package/lib/types/client/chat/ReasoningRow.js.map +1 -1
  48. package/lib/types/client/chat/RunningStatus.js.map +1 -1
  49. package/lib/types/client/chat/StatsPills.d.ts +1 -1
  50. package/lib/types/client/chat/StatsPills.d.ts.map +1 -1
  51. package/lib/types/client/chat/StatsPills.js.map +1 -1
  52. package/lib/types/client/chat/SystemPromptRow.d.ts +7 -3
  53. package/lib/types/client/chat/SystemPromptRow.d.ts.map +1 -1
  54. package/lib/types/client/chat/SystemPromptRow.js.map +1 -1
  55. package/lib/types/client/chat/TurnNavigator.d.ts +1 -1
  56. package/lib/types/client/chat/TurnNavigator.d.ts.map +1 -1
  57. package/lib/types/client/chat/TurnProcessNodeView.js.map +1 -1
  58. package/lib/types/client/chat/TurnTailNodeView.d.ts +1 -1
  59. package/lib/types/client/chat/TurnTailNodeView.d.ts.map +1 -1
  60. package/lib/types/client/chat/TurnTailNodeView.js.map +1 -1
  61. package/lib/types/client/chat/TurnTriggerNodeView.js.map +1 -1
  62. package/lib/types/client/chat/TurnUsagePanel.js.map +1 -1
  63. package/lib/types/client/chat/UserContent.d.ts +1 -1
  64. package/lib/types/client/chat/UserContent.d.ts.map +1 -1
  65. package/lib/types/client/chat/UserContent.js.map +1 -1
  66. package/lib/types/client/chat/flow-motion.d.ts +1 -1
  67. package/lib/types/client/chat/flow-motion.d.ts.map +1 -1
  68. package/lib/types/client/chat/flow-motion.js.map +1 -1
  69. package/lib/types/client/chat/message-chrome.d.ts +1 -1
  70. package/lib/types/client/chat/message-chrome.d.ts.map +1 -1
  71. package/lib/types/client/chat/register-node-renderers.d.ts +1 -5
  72. package/lib/types/client/chat/register-node-renderers.d.ts.map +1 -1
  73. package/lib/types/client/chat/register-node-renderers.js.map +1 -1
  74. package/lib/types/client/chat/searchable-hidden.d.ts +1 -1
  75. package/lib/types/client/chat/searchable-hidden.d.ts.map +1 -1
  76. package/lib/types/client/chat/stat-dialog.d.ts +3 -3
  77. package/lib/types/client/chat/stat-dialog.d.ts.map +1 -1
  78. package/lib/types/client/chat/stat-dialog.js.map +1 -1
  79. package/lib/types/client/chat/step-process.d.ts +18 -1
  80. package/lib/types/client/chat/step-process.d.ts.map +1 -1
  81. package/lib/types/client/chat/step-process.js.map +1 -1
  82. package/lib/types/client/chat/text-interaction.d.ts +1 -1
  83. package/lib/types/client/chat/text-interaction.d.ts.map +1 -1
  84. package/lib/types/client/chat/text-interaction.js.map +1 -1
  85. package/lib/types/client/chat/text-selection.d.ts +1 -0
  86. package/lib/types/client/chat/text-selection.d.ts.map +1 -1
  87. package/lib/types/client/chat/text-selection.js.map +1 -1
  88. package/lib/types/client/chat/use-chat-scroll.d.ts +2 -2
  89. package/lib/types/client/chat/use-chat-scroll.d.ts.map +1 -1
  90. package/lib/types/client/chat/use-chat-viewport.d.ts +2 -2
  91. package/lib/types/client/chat/use-chat-viewport.d.ts.map +1 -1
  92. package/lib/types/client/chat/use-chat-viewport.js.map +1 -1
  93. package/lib/types/client/chat/use-process-scroll.d.ts +1 -1
  94. package/lib/types/client/chat/use-process-scroll.d.ts.map +1 -1
  95. package/lib/types/client/chat/use-process-scroll.js.map +1 -1
  96. package/lib/types/client/contract/chat-nodes.d.ts +4 -0
  97. package/lib/types/client/contract/chat-nodes.d.ts.map +1 -1
  98. package/lib/types/client/contract/chat-nodes.js.map +1 -1
  99. package/lib/types/client/contract/chat-visibility.d.ts +2 -2
  100. package/lib/types/client/contract/chat-visibility.js.map +1 -1
  101. package/lib/types/client/contract/slots.d.ts +33 -12
  102. package/lib/types/client/contract/slots.d.ts.map +1 -1
  103. package/lib/types/client/conversation-nodes/command.js.map +1 -1
  104. package/lib/types/client/conversation-nodes/fallback.js.map +1 -1
  105. package/lib/types/client/conversation-nodes/message.js.map +1 -1
  106. package/lib/types/client/conversation-nodes/request-prompt.d.ts +8 -3
  107. package/lib/types/client/conversation-nodes/request-prompt.d.ts.map +1 -1
  108. package/lib/types/client/conversation-nodes/request-prompt.js.map +1 -1
  109. package/lib/types/client/conversation-nodes/retry.d.ts.map +1 -1
  110. package/lib/types/client/conversation-nodes/retry.js.map +1 -1
  111. package/lib/types/client/conversation-nodes/tool.d.ts +18 -3
  112. package/lib/types/client/conversation-nodes/tool.d.ts.map +1 -1
  113. package/lib/types/client/conversation-nodes/tool.js.map +1 -1
  114. package/lib/types/client/fence/FenceLayers.d.ts +1 -1
  115. package/lib/types/client/fence/FenceLayers.d.ts.map +1 -1
  116. package/lib/types/client/fence/FenceLayers.js.map +1 -1
  117. package/lib/types/client/index.d.ts +1 -1
  118. package/lib/types/client/index.d.ts.map +1 -1
  119. package/lib/types/client/locale.d.ts +96 -0
  120. package/lib/types/client/locale.d.ts.map +1 -1
  121. package/lib/types/client/locale.js.map +1 -1
  122. package/lib/types/client/markdown-labels.d.ts +1 -1
  123. package/lib/types/client/markdown-labels.d.ts.map +1 -1
  124. package/lib/types/client/presentation-policy.d.ts +2 -0
  125. package/lib/types/client/presentation-policy.d.ts.map +1 -1
  126. package/lib/types/client/presentation-policy.js.map +1 -1
  127. package/lib/types/client/settings/LinkOpeningRow.d.ts +2 -3
  128. package/lib/types/client/settings/LinkOpeningRow.d.ts.map +1 -1
  129. package/lib/types/client/settings/LinkOpeningRow.js.map +1 -1
  130. package/lib/types/client/settings/PerformanceUsageRow.d.ts +2 -2
  131. package/lib/types/client/settings/PerformanceUsageRow.d.ts.map +1 -1
  132. package/lib/types/client/settings/PerformanceUsageRow.js.map +1 -1
  133. package/lib/types/client/settings/PreferenceRow.js.map +1 -1
  134. package/lib/types/client/settings/TranscriptViewRow.d.ts +2 -2
  135. package/lib/types/client/settings/TranscriptViewRow.d.ts.map +1 -1
  136. package/lib/types/client/settings/TranscriptViewRow.js.map +1 -1
  137. package/package.json +46 -46
  138. package/src/client/apply.ts +11 -10
  139. package/src/client/chat/ApprovalCommand.tsx +1 -1
  140. package/src/client/chat/AssistantMarkdown.module.css +10 -16
  141. package/src/client/chat/AssistantMarkdown.tsx +6 -5
  142. package/src/client/chat/AssistantNodeView.tsx +3 -3
  143. package/src/client/chat/ChatAside.tsx +1 -1
  144. package/src/client/chat/ChatFlow.tsx +2 -2
  145. package/src/client/chat/ChatGroupSeat.module.css +4 -2
  146. package/src/client/chat/ChatGroupSeat.tsx +10 -6
  147. package/src/client/chat/ChatNodeSeat.tsx +16 -6
  148. package/src/client/chat/ChatView.module.css +67 -14
  149. package/src/client/chat/ChatView.tsx +18 -10
  150. package/src/client/chat/CommandNodeView.tsx +1 -1
  151. package/src/client/chat/CommandStatusRow.tsx +1 -1
  152. package/src/client/chat/CompactionItem.tsx +1 -1
  153. package/src/client/chat/ContextBody.module.css +8 -0
  154. package/src/client/chat/ContextBody.tsx +37 -4
  155. package/src/client/chat/ContextInjectionRow.tsx +4 -3
  156. package/src/client/chat/MessageIconActions.module.css +7 -0
  157. package/src/client/chat/MessageIconActions.tsx +1 -1
  158. package/src/client/chat/MessageItem.module.css +40 -48
  159. package/src/client/chat/MessageItem.tsx +97 -54
  160. package/src/client/chat/QuotaNoticeHost.tsx +1 -1
  161. package/src/client/chat/ReasoningContent.tsx +2 -2
  162. package/src/client/chat/ReasoningRow.tsx +2 -2
  163. package/src/client/chat/RunningStatus.tsx +1 -1
  164. package/src/client/chat/StatsPills.tsx +2 -2
  165. package/src/client/chat/SystemPromptRow.tsx +26 -9
  166. package/src/client/chat/TurnNavigator.module.css +10 -1
  167. package/src/client/chat/TurnProcessNodeView.tsx +1 -1
  168. package/src/client/chat/TurnTailNodeView.tsx +4 -3
  169. package/src/client/chat/TurnTriggerNodeView.tsx +1 -1
  170. package/src/client/chat/TurnUsagePanel.tsx +1 -1
  171. package/src/client/chat/UserContent.tsx +4 -4
  172. package/src/client/chat/flow-motion.ts +3 -1
  173. package/src/client/chat/message-chrome.ts +1 -1
  174. package/src/client/chat/register-node-renderers.ts +5 -8
  175. package/src/client/chat/searchable-hidden.ts +1 -1
  176. package/src/client/chat/stat-dialog.module.css +8 -6
  177. package/src/client/chat/stat-dialog.ts +5 -5
  178. package/src/client/chat/step-process.ts +33 -1
  179. package/src/client/chat/text-interaction.ts +7 -8
  180. package/src/client/chat/text-selection.ts +33 -14
  181. package/src/client/chat/use-chat-scroll.ts +2 -2
  182. package/src/client/chat/use-chat-viewport.ts +12 -11
  183. package/src/client/chat/use-process-scroll.ts +1 -1
  184. package/src/client/contract/chat-nodes.ts +4 -0
  185. package/src/client/contract/chat-visibility.ts +3 -3
  186. package/src/client/contract/slots.ts +30 -13
  187. package/src/client/conversation-nodes/README.i18n.yaml +4 -4
  188. package/src/client/conversation-nodes/README.md +5 -4
  189. package/src/client/conversation-nodes/README.zh.md +5 -4
  190. package/src/client/conversation-nodes/command.ts +1 -1
  191. package/src/client/conversation-nodes/fallback.ts +1 -1
  192. package/src/client/conversation-nodes/message.ts +1 -1
  193. package/src/client/conversation-nodes/request-prompt.ts +16 -6
  194. package/src/client/conversation-nodes/retry.ts +19 -1
  195. package/src/client/conversation-nodes/tool.ts +50 -29
  196. package/src/client/conversation-nodes/turn-process.ts +1 -1
  197. package/src/client/fence/FenceLayers.tsx +2 -2
  198. package/src/client/index.ts +2 -2
  199. package/src/client/locale.ts +96 -0
  200. package/src/client/markdown-labels.ts +1 -1
  201. package/src/client/model/tool-call-tree.ts +1 -1
  202. package/src/client/presentation-policy.ts +6 -0
  203. package/src/client/settings/LinkOpeningRow.tsx +5 -3
  204. package/src/client/settings/PerformanceUsageRow.tsx +6 -3
  205. package/src/client/settings/PreferenceRow.tsx +5 -5
  206. package/src/client/settings/TranscriptViewRow.tsx +12 -5
package/README.i18n.yaml CHANGED
@@ -15,20 +15,20 @@
15
15
  en: 5ee429751fcbeb4f
16
16
  zh: 981a37018b6cae3a
17
17
  /deepseek-ai-dsh-client-ui-chat/reference-previews:
18
- en: 0501fb835108d448
19
- zh: e402464e08fadf3c
18
+ en: f5962452f4f3c633
19
+ zh: f022bca0411a375a
20
20
  /deepseek-ai-dsh-client-ui-chat/hidden-chat-rows:
21
- en: 8ca277dc7fed699f
22
- zh: 167478dba50f3904
21
+ en: 9f31cb0c3cf9ab1e
22
+ zh: d2379babf8db788e
23
23
  /deepseek-ai-dsh-client-ui-chat/command-and-failure-rows:
24
24
  en: 46d7500962a8bb8b
25
25
  zh: 709f29cae742d604
26
26
  /deepseek-ai-dsh-client-ui-chat/inherited-history-divider:
27
- en: a191f90e9a64f6fe
28
- zh: 8e91b8660f9baa18
27
+ en: c46ffb5dce84c081
28
+ zh: 2e4b9022c28b8812
29
29
  /deepseek-ai-dsh-client-ui-chat/turn-token-usage:
30
- en: d363057b5c0b2571
31
- zh: 0f6fe864d9673576
30
+ en: b36906686f3aefa7
31
+ zh: 087741aa57c8988a
32
32
  /deepseek-ai-dsh-client-ui-chat/completed-turn-footer:
33
33
  en: 382821ca3ffa60dd
34
34
  zh: 9840ffa07c13082a
@@ -36,11 +36,11 @@
36
36
  en: 7cc6692b879aa500
37
37
  zh: e924733c88b526c9
38
38
  /deepseek-ai-dsh-client-ui-chat/grouped-rendering:
39
- en: 535345a2de07109e
40
- zh: 39580c340f5ae558
39
+ en: 69dbaf34ddfaaee7
40
+ zh: cfe4e13d84d71f9b
41
41
  /deepseek-ai-dsh-client-ui-chat/scroll-ownership:
42
- en: 8788af5842549072
43
- zh: 85febf8508a28c4e
42
+ en: 1ffd972d8f95942d
43
+ zh: 5a0764e8a3a4f3be
44
44
  /deepseek-ai-dsh-client-ui-chat/model-experience:
45
45
  en: c17b4dd43a61c569
46
46
  zh: f7414309810c3a08
package/README.md CHANGED
@@ -50,19 +50,21 @@ The session-scoped `conversation.chat.user.content` Factory renders only the use
50
50
 
51
51
  `UserStyleBubble` and the [source-specific wrappers](<src/client/chat/MessageItem.tsx#L164-L340>) retain the user row, keys, pending/echo markers, timestamps, copy controls, and other message actions. The content Factory reads neither source-specific models nor private Context, and is not a global user-content override entry point.
52
52
 
53
- The official user and steering renderer declares the session-scoped `conversation.chat.user.before` chain slot at its `user` registration and renders it directly above the bubble with `renderSlotChain`; the `steering` registration shares the renderer without owning the seat. Owner props carry the durable message `source` and row `kind`; each entry’s `select` matches its own sources, and the first non-null result reaches the elected component as `matched`. No match displays no content. Entries own their markup and copy; Chat does not interpret message sources.
53
+ The official user and steering renderer declares the session-scoped `conversation.chat.user.before` chain slot at its `user` registration and renders it directly above the bubble with `renderSlotChain`; the `steering` registration shares the renderer without owning the seat. Owner props carry the durable message `source` and row `kind`; each entry’s `select` matches its own sources, and the first non-null result reaches the elected component as `matched`. No match displays no content. Entries own their markup and copy; Chat does not interpret message sources. The same `user` registration declares the session-scoped `conversation.chat.user-actions` list slot and renders it in the message's action row, after copy, for a durable user message; a steering message or a synthetic projection without a `messageId` renders none. Owner props carry the message id, so an entry acts on the message by identity.
54
54
 
55
55
  Standalone Markdown images show contained previews and open the shared image lightbox; after settlement, an absolute local path loads as written and a relative one resolves against the Session’s current working directory, as a relative file link does. Image file links keep their sidebar activation and show a thumbnail after hover dwell or keyboard focus. Escape dismisses the thumbnail. Failed images retain a localized status and their description; no duplicate-image filtering is applied.
56
56
 
57
- Settings → General → Open chat links in selects the destination for ordinary clicks on Chat HTTP(S) links: In-App Sidebar (default) opens a new right-Sidebar Browser tab, while Default Browser opens an external tab. The setting follows Keyboard shortcuts and is shown only while the Sidebar Browser is available. If the Sidebar Browser is not registered, both choices use the external browser; modified clicks retain native behavior. The `ui-chat.linkOpening` preference persists on the Host for authenticated browsers and stays process-local when settings cannot persist writes. Sent file references and skills confirmed by the message’s logged invocation also open in the right Sidebar. File paths use the viewed Session; skill names resolve through its current input-trigger source. Both use the prose file-link dotted underline on hover or focus. Sessions, directories, and command labels remain non-navigating references.
57
+ Settings → General → Open chat links in selects the destination for ordinary clicks on Chat HTTP(S) links: In-App Sidebar (default) opens a new right-Sidebar Browser tab, while Default Browser opens an external tab. The setting precedes Keyboard shortcuts and is shown only while the Sidebar Browser is available. If the Sidebar Browser is not registered, both choices use the external browser; modified clicks retain native behavior. The `ui-chat.linkOpening` preference persists on the Host for authenticated browsers and stays process-local when settings cannot persist writes. Sent file references and skills confirmed by the message’s logged invocation also open in the right Sidebar. File paths use the viewed Session; skill names resolve through its current input-trigger source. Both use the prose file-link dotted underline on hover or focus. Sessions, directories, and command labels remain non-navigating references.
58
58
 
59
59
  <a id="system-prompt-row"></a>
60
60
  ## Hidden Chat rows
61
61
 
62
- Chat omits system-prompt and `permission` command rows in every work-details mode. It also hides pending and successful `/team on` and `/team off` receipts, identified by their recorded name and trimmed arguments; failures and commands with missing or unrecognized arguments remain visible. Context injections remain visible as collapsed rows that use the tool-call disclosure row; within a Turn they join its process group like tool calls. The filter changes neither recorded Session events nor Trajectory inspection and excludes hidden receipts from flow spacing and process summaries. Non-human Turn triggers remain independent, bordered notices with a contrasting neutral background; other command rows remain in Chat.
62
+ Chat omits complete system-prompt rows and `permission` command rows in every work-details mode. An incremental system message that carries section metadata remains visible at its own position as a collapsed row: the row names the sources it changes, and its body lists each source with its change, attached notices, and text. It also hides pending and successful `/team on` and `/team off` receipts, identified by their recorded name and trimmed arguments; failures and commands with missing or unrecognized arguments remain visible. Context injections remain visible as collapsed rows that use the tool-call disclosure row; within a Turn they join its process group like tool calls. The filter changes neither recorded Session events nor Trajectory inspection and excludes hidden receipts from flow spacing and process summaries. Non-human Turn triggers remain independent, bordered notices with a contrasting neutral background; other command rows remain in Chat.
63
63
 
64
64
  When an Assistant attempt retires without a visible message, Chat hides its already-published Node instead of removing its key. A retry in the same Step reuses that key when visible content returns. This also applies when the loaded window lacks the Step start.
65
65
 
66
+ The model-retry chain renders as one shared [DisclosureRow](../ui-primitives/README.md#component-catalog) in the process flow: the Wi-Fi glyph, the localized retry state with the attempt count in parentheses as the title, the delay as the summary after the separator dot, and the recorded delay and failure reason under it. The glyph carries the chain's outcome — the plain Wi-Fi arcs while the chain waits or has retried, the arcs crossed by a slash once the owning Turn ended with an error after its last retry started, and the warning glyph when the retried failure was an empty model answer. The row reads as retrying from the delay until its retried request settles, so the label does not flip between attempts. Its text size follows its neighbours: the step-row size while the Turn shows its step runs flat (an open Turn, or the latest one in Detailed), and the group-header size once they are grouped (Compact, Standard, and older Turns in Detailed). The Chat Node seat passes that state to every renderer as `stepRunsGrouped`. While a Trajectory View is visible, the expanded row offers the same Inspect action as a tool row and opens that request's record.
67
+
66
68
  Text and reasoning contribute to Assistant visibility only when they contain a non-whitespace character. Streaming appends reuse each block's visibility; block replacement and finalized messages recalculate it while preserving the original text.
67
69
 
68
70
  <a id="command-and-failure-rows"></a>
@@ -81,7 +83,7 @@ Chat adapts Markdown targets at `MarkdownDelegateProvider.getTriggerProps`. The
81
83
  <a id="inherited-history-divider"></a>
82
84
  ## Inherited history divider
83
85
 
84
- A forked Session, such as a fork subagent or a branched conversation, shows a divider labelled “Inherited history above” at its latest inherited `session/end-seed` marker, between the copied history and the Session's own messages. The caption starts with the branch glyph that the branch action uses. A cut inside a Turn keeps the divider outside that Turn's process folding. The divider appears once the history page that holds the marker is loaded, so a long inherited history may show it only after scrolling up. Sessions without inherited history show no divider.
86
+ A forked Session, such as a fork subagent or a branched conversation, shows a divider labelled “Inherited history above” at its latest inherited `session/end-seed` marker, between the copied history and the Session's own messages. The caption starts with the branch glyph that the branch action uses. A cut inside a Turn keeps the divider outside that Turn's process folding. The divider appears once the history page that holds the marker is loaded, so a long inherited history may show it only after scrolling up. Sessions without inherited history show no divider. While the Conversation [keeps inherited history folded](../ui-conversation/README.md#inherited-history-fold), the Chat starts at the divider, hides its **Load earlier** control, requests no older pages, and leaves the whole-log outline out of the turn rail.
85
87
 
86
88
  -----
87
89
 
@@ -90,7 +92,7 @@ A forked Session, such as a fork subagent or a branched conversation, shows a di
90
92
 
91
93
  A completed Turn shows an expandable usage row only when the loaded window includes `turn/start` and every started model attempt reports safe, exact usage. The row omits unavailable optional buckets. Incomplete or contradictory accounting hides the complete disclosure instead of presenting a partial total.
92
94
 
93
- Settings → General → Performance & usage appears after Send behavior while busy and before Session Log upload, and stores `ui-chat.performanceUsage` as `detailed` (default) or `compact`. Compact shows only available output speed and cache-hit percentage beneath the composer, without interactive statistic dialogs or per-Turn usage. Detailed exposes session statistics and per-Turn token usage. Neither mode shows elapsed time in the completed-turn footer. The preference changes presentation only; accounting and Session events remain intact.
95
+ Settings → General → Chat experience → Performance & usage appears after Show coding view, and stores `ui-chat.performanceUsage` as `detailed` (default) or `compact`. Compact shows only available output speed and cache-hit percentage beneath the composer, without interactive statistic dialogs or per-Turn usage. Detailed exposes session statistics and per-Turn token usage. Neither mode shows elapsed time in the completed-turn footer. The preference changes presentation only; accounting and Session events remain intact.
94
96
 
95
97
  The composer statistics are two `conversation.composer.dock` list entries: `activity` (order 0, turn and step counts and output speed, with LLM time, tool time, and TTFT) and `usage` (order 1, token total and cache hit). The controls follow the shared [statistics-control radius](../../../docs/ui-radius.md#radius-scale). Another plugin replaces one control by registering the same id and the same `order`; the dock orders rows by `order`, while a lower `priority` picks the replacement: a dynamic plugin receives one automatically, and a statically composed plugin passes it explicitly. A new id adds a control. Each control carries its id in `data-composer-stat`. An open statistics dialog closes on Escape or on a pointerdown or click outside it, so activating another control by pointer or keyboard swaps dialogs instead of stacking them. When an ellipsis cuts off a reading, a tooltip shows the full reading. A dialog control shows it on hover or keyboard focus, but not while its dialog is open; a reading without a dialog shows it on hover, click, or tap. The session statistics dialog heads its rows with the turn and step counts. Statistics dialogs use CSS anchors and layout-viewport size limits; browser zoom and panning move them with the page, so they may extend beyond the visual viewport. Taller dialog content scrolls internally.
96
98
 
@@ -137,7 +139,7 @@ Live tool deltas share reasoning's frame-batched publication; durable calls and
137
139
 
138
140
  The process group uses a stable `div` layout box, a scroll body, and an uncapped content box that reports growth inside the body. Business styles must adapt spacing within and across groups, including hidden or empty members and the answer-spacing exception. The `conversation.chat.flow` slot adds a `display: contents` DOM anchor; row selectors match that anchor directly, without repeating its column ancestry. The running status shares the rows' parent, so its divider uses the same visible-sibling rules. The anchor contributes no spacing of its own. The earlier-history control directly precedes the flow anchor; their sibling relationship supplies the leading gap. CSS variables do not belong in the Group Definition.
139
141
 
140
- Running group titles, reasoning previews, tool and command rows, the active retry line, and the bottom running status use the shared [TextShimmer](../ui-primitives/README.md#component-catalog). Each row’s text shares one left-to-right highlight, including collapsed group titles; icons and hover chevrons retain their base appearance. Ordinary flow rows sit 4px apart, including adjacent reasoning rows of one Assistant message. An expanded group title has 8px before its content, Assistant responses have 12px from adjacent process rows, and completed-Turn duration/status controls have 16px from their input and from a directly following visible row. A reply that follows the control after folded rows keeps the 12px reply gap, so folding never changes its spacing. Hidden and empty rows, including retained empty slot anchors, add no gap. The running “Deep diving” text retains its blue base while its theme-specific highlight sweeps across it.
142
+ Running group titles, reasoning previews, tool and command rows, the active retry line, and the bottom running status use the shared [TextShimmer](../ui-primitives/README.md#component-catalog). Each row’s text shares one left-to-right highlight, including collapsed group titles; icons and hover chevrons retain their base appearance. Ordinary flow rows sit 4px apart, including adjacent reasoning rows of one Assistant message. An expanded group title has 8px before its content, Assistant responses have 12px from adjacent process rows, and completed-Turn duration/status controls have 16px from their input and from a directly following visible row. A message bubble directly below a process row also has 12px; below a message's actions row, a following question reply or response has 4px, also across a folded group. A reply that follows the control after folded rows keeps the 12px reply gap, so folding never changes its spacing. Hidden and empty rows, including retained empty slot anchors, add no gap. The running “Deep diving” text retains its blue base while its theme-specific highlight sweeps across it.
141
143
 
142
144
  Closing assistant messages use 16px SVG boxes for copy and branch actions at the default content font size, with fixed 1px strokes and 28px click targets. SVG boxes do not shrink in the flex row; their size and targets follow the content font-size delta.
143
145
 
@@ -160,11 +162,11 @@ Process rows share one text and icon color in every Work details mode: tertiary
160
162
 
161
163
  Chat waits for initial history before automatic content, scroll, or size updates initialize reading state. Running Sessions restore their initial visibility and position before fold animations become eligible.
162
164
 
163
- Chat restores semantic anchors across history prepend and renderer remounts, with browser scroll anchoring disabled on its scrollport only while following the tail. Pinned scroll deliveries without reader movement, and reader input that reaches the floor within subpixel rounding, update follow ownership immediately, before subsequent layout changes can invalidate their floor. Other reader movement remains pending until the sampling interval or `scrollend`, even inside the follow threshold, so layout growth cannot erase small scroll gestures. Under completion-time folding, submitting transcript input or steering immediately restores tail following and clears an older pending reader sample. Under next-message folding, transcript input that no fold batch carries lands on one native animation; steering lands at once under either timing, because the running Turn keeps streaming above its echo. While the reader is pinned to the floor, `ResizeObserver` follows the new floor and selects the latest loaded Turn without reading row geometry. Once the reader moves away, flow-height changes preserve the top position and the reading-line geometry selects the active Turn. Turn-rail previews paint above sticky Markdown code-block banners, while the rail frame remains inside the transcript band above the composer.
165
+ Chat restores semantic anchors across history prepend and renderer remounts, with browser scroll anchoring disabled on its scrollport only while following the tail. Inside a Conversation scrollport, Chat requests that and the scrollport's disabled vertical overscroll with the [scrollport marks](../ui-conversation/README.md#scrollport-marks) on its root. Pinned scroll deliveries without reader movement, and reader input that reaches the floor within subpixel rounding, update follow ownership immediately, before subsequent layout changes can invalidate their floor. Other reader movement remains pending until the sampling interval or `scrollend`, even inside the follow threshold, so layout growth cannot erase small scroll gestures. Under completion-time folding, submitting transcript input or steering immediately restores tail following and clears an older pending reader sample. Under next-message folding, transcript input that no fold batch carries lands on one native animation; steering lands at once under either timing, because the running Turn keeps streaming above its echo. While the reader is pinned to the floor, `ResizeObserver` follows the new floor and selects the latest loaded Turn without reading row geometry. Once the reader moves away, flow-height changes preserve the top position and the reading-line geometry selects the active Turn. Turn-rail previews paint above sticky Markdown code-block banners, while the rail frame remains inside the transcript band above the composer.
164
166
 
165
167
  The turn rail and back-to-bottom button sit outside the clipped transcript. The 34px back-to-bottom button centers a 16px chevron with a fixed 1px stroke. They use the shared conversation scrollport for sticky positioning, or the Chat frame for absolute positioning when Chat owns its scrollport. The rail sits at the scrollport's start edge, which leaves the end gutter to the [Session panel](../ui-session-panel/README.md), and its previews open toward the transcript. The rail hides when the transcript's available width, excluding its horizontal padding, is at most 900px; the browser viewport width is not the criterion.
166
168
 
167
- The `conversation.chat.aside` slot holds one Session-level occupant beside the transcript, such as the [Session panel](../ui-session-panel/README.md). Every Chat View occurrence, main or embedded, renders it in a zero-height layer at the top of the Chat frame, positioned like the turn rail, so it stays in place while the transcript scrolls and inherits `--dsh-composer-height` and `--dsh-conversation-viewport-height` from the shared scrollport. The layer stacks above the turn rail and the back-to-bottom button and passes pointer events through. The layer measures nothing: its stylesheet publishes the end gutter, the inline space between the transcript column and the frame's end edge, as the `--dsh-chat-aside-gutter` custom property. With the transcript centered that is `max(0px, (100% - var(--dsh-chat-content-width)) / 2)`. While the Conversation body keeps an [end reserve](../ui-conversation/README.md#end-reserve), the frame is narrower than the scrollport by `--dsh-chat-end-inset`; the layer reaches back across that inset to the scrollport's end edge, and the gutter counts it. The layer's margin follows the body's `--dsh-chat-end-reserve-transition`, so its end edge stays at the scrollport's while the inset animates. The percentage resolves against the layer in the inline sizes of an element whose containing block is the layer, so an occupant sizes and places itself in CSS, and the Chat View neither re-renders nor observes sizes for it.
169
+ The `conversation.chat.aside` slot holds one Session-level occupant beside the transcript, such as the [Session panel](../ui-session-panel/README.md). Every Chat View occurrence, main or embedded, renders it in a zero-height layer at the top of the Chat frame, positioned like the turn rail, so it stays in place while the transcript scrolls and inherits `--dsh-composer-height` and `--dsh-conversation-viewport-height` from the shared scrollport. The layer stacks above the turn rail and the back-to-bottom button and passes pointer events through. The layer measures nothing: its stylesheet publishes the end gutter, the inline space between the transcript column and the frame's end edge, as the `--dsh-chat-aside-gutter` custom property. With the transcript centered that is `max(0px, (100% - var(--dsh-chat-content-width)) / 2)`. While the Conversation body keeps an [end reserve](../ui-conversation/README.md#end-reserve), the frame is narrower than the scrollport by `--dsh-chat-end-inset`; the layer reaches back across that inset to the scrollport's end edge, and the gutter counts it. While the Session panel's entrance or exit plays, the layer's own stylesheet declares a margin transition over the same time and curve as the scrollport's padding, so its end edge stays at the scrollport's while the inset animates. The layer is also the inline-size query container of the dock probe inside it: its width is the frame's content width plus the inset the negative end margin reaches across, which is the scrollport's `clientWidth` before DOM rounds it to a whole pixel, at rest and throughout that transition (its padding box less the vertical scrollbar). The Session panel's probe reads it as `100cqw`. The percentage resolves against the layer in the inline sizes of an element whose containing block is the layer, so an occupant sizes and places itself in CSS, and the Chat View neither re-renders nor observes sizes for it.
168
170
 
169
171
  The transcript root uses `overflow-x: visible; overflow-y: clip`: vertical overflow is clipped without creating a scroll container. Sticky Markdown code banners therefore retain the actual conversation scrollport as their reference when no nearer scrolling ancestor exists. Capped process groups and terminal sections keep their own scrollports.
170
172
 
@@ -208,7 +210,7 @@ Active-Turn highlighting is approximate: `readVisibleTurn` binary-searches the f
208
210
 
209
211
  -----
210
212
 
211
- The Chat view detects selection and context-menu gestures on business nodes marked with `data-text-interaction-source`. Both selection endpoints must resolve to the same source container. Displayed user content and settled Assistant text or reasoning participate; tools, injected context, streaming or interrupted Assistant text, and Markdown controls do not.
213
+ The Chat view detects selection and context-menu gestures on business nodes marked with `data-text-interaction-source`. Both selection endpoints must resolve to the same source container. A selection that ends after its container, with only whitespace text in between, as triple-clicking the last paragraph produces, ends at the container instead. Displayed user content and settled Assistant text or reasoning participate; tools, injected context, streaming or interrupted Assistant text, and Markdown controls do not.
212
214
 
213
215
  `ctx.uiConversation.interactions` dispatches eligible gestures to plugin registrations and supplies their component to the Chat view. The action surface is absolutely positioned inside the existing Chat column, above the composer seat and its dock. Its wrapper preserves the component's outer stroke and shadow; components own internal scrolling. Scrolling the selection outside that visible region temporarily hides the surface; returning restores it. Chat owns viewport visibility, placement, outside pointer presses, Escape, new selections, source invalidation, and disposal; explicit dismissal preserves browser selection and layout changes do not reopen the surface. [Message quotes](../../session/message-quotes/README.md) owns quotation eligibility and insertion.
214
216
 
package/README.zh.md CHANGED
@@ -50,19 +50,21 @@ Session 作用域的 `conversation.chat.user.content` Factory 只渲染用户内
50
50
 
51
51
  `UserStyleBubble` 和[各来源包装层](<src/client/chat/MessageItem.tsx#L164-L340>) 保留用户行、key、pending/echo 标记、时间、复制控件及其他消息操作。内容 Factory 不读取来源专属模型或私有 Context,也不是全局用户内容替换入口。
52
52
 
53
- 官方 user 与 steering 共用的渲染器在 `user` 注册项上声明 session-scoped `conversation.chat.user.before` chain slot,并在气泡上方直接通过 `renderSlotChain` 渲染;`steering` 注册项复用该渲染器但不拥有该槽位。owner props 携带 Session 记录的持久化消息 `source` 与行 `kind`;各条目的 `select` 匹配自己负责的来源,首个非 null 结果作为 `matched` 交给获选组件。无匹配时不显示内容。条目自行拥有标记和文案;Chat 不解析消息来源。
53
+ 官方 user 与 steering 共用的渲染器在 `user` 注册项上声明 session-scoped `conversation.chat.user.before` chain slot,并在气泡上方直接通过 `renderSlotChain` 渲染;`steering` 注册项复用该渲染器但不拥有该槽位。owner props 携带 Session 记录的持久化消息 `source` 与行 `kind`;各条目的 `select` 匹配自己负责的来源,首个非 null 结果作为 `matched` 交给获选组件。无匹配时不显示内容。条目自行拥有标记和文案;Chat 不解析消息来源。同一个 `user` 注册项还声明 session-scoped 的 `conversation.chat.user-actions` list slot,并在消息操作行里、复制之后渲染它,对象是持久化的用户消息;steering 消息或没有 `messageId` 的合成投影不渲染。owner props 携带消息 id,因此条目按身份对该消息进行操作。
54
54
 
55
55
  独立的 Markdown 图片以内嵌预览显示,点击打开共享图片浮层;消息落定后,绝对本地路径按原样加载,相对路径与相对文件链接一样按 Session 的当前工作目录解析。图片文件链接保持点击打开侧栏,鼠标停留或键盘聚焦时显示缩略图,Esc 关闭缩略图。图片加载失败时保留本地化状态与图片说明;不执行重复图片过滤。
56
56
 
57
- 设置 → 通用设置 → 网页链接默认打开方式控制普通点击 Chat HTTP(S) 链接时的目标:「应用内侧边栏」(默认)打开新的右侧 Sidebar Browser tab,「默认浏览器」打开外部标签页。该设置项位于快捷键之后,仅在 Sidebar Browser 可用时显示。若 Sidebar Browser 未注册,两种选择均使用外部浏览器;带修饰键的点击保留原生行为。已认证浏览器的 `ui-chat.linkOpening` 偏好在 Host 上持久化,设置无法持久化写入时仅在当前进程内生效。已发送的文件引用及消息日志确认调用的 skill 也可在右侧栏打开预览。文件路径使用当前查看的 Session;skill 名称由该 Session 当前的输入触发源解析。两者悬停或聚焦时均使用正文文件链接的虚线下划线。会话、目录和命令标签仍只作为引用展示。
57
+ 设置 → 通用设置 → 网页链接默认打开方式控制普通点击 Chat HTTP(S) 链接时的目标:「应用内侧边栏」(默认)打开新的右侧 Sidebar Browser tab,「默认浏览器」打开外部标签页。该设置项位于快捷键之前,仅在 Sidebar Browser 可用时显示。若 Sidebar Browser 未注册,两种选择均使用外部浏览器;带修饰键的点击保留原生行为。已认证浏览器的 `ui-chat.linkOpening` 偏好在 Host 上持久化,设置无法持久化写入时仅在当前进程内生效。已发送的文件引用及消息日志确认调用的 skill 也可在右侧栏打开预览。文件路径使用当前查看的 Session;skill 名称由该 Session 当前的输入触发源解析。两者悬停或聚焦时均使用正文文件链接的虚线下划线。会话、目录和命令标签仍只作为引用展示。
58
58
 
59
59
  <a id="system-prompt-row"></a>
60
60
  ## Chat 隐藏的行
61
61
 
62
- Chat 在所有工作步骤展示模式下都不显示系统提示词行和 `permission` 命令行。记录中的命令名和去除首尾空白后的参数确定为 `/team on` 或 `/team off` 时,也隐藏执行中与成功回执;失败以及参数缺失或无法识别的命令仍然可见。上下文注入以默认收起、与工具调用相同的展开行显示;在 Turn 内与工具调用一样加入过程组。该过滤不改变已记录的 Session 事件或 Trajectory 查看能力,隐藏回执也不计入行间距和过程摘要。非人工轮次触发仍作为独立通知显示,其他命令行仍保留在 Chat 中。
62
+ Chat 在所有工作步骤展示模式下都不显示完整的系统提示词行和 `permission` 命令行。带章节元数据的增量系统消息在其所在位置显示为默认收起的行:行内列出它变更的来源,展开后逐个来源显示变更类型、关联通知和文本。记录中的命令名和去除首尾空白后的参数确定为 `/team on` 或 `/team off` 时,也隐藏执行中与成功回执;失败以及参数缺失或无法识别的命令仍然可见。上下文注入以默认收起、与工具调用相同的展开行显示;在 Turn 内与工具调用一样加入过程组。该过滤不改变已记录的 Session 事件或 Trajectory 查看能力,隐藏回执也不计入行间距和过程摘要。非人工轮次触发仍作为独立通知显示,其他命令行仍保留在 Chat 中。
63
63
 
64
64
  Assistant 尝试结束且没有可见消息时,Chat 隐藏已发布的 Node,不移除其 key。同一 Step 的重试再次产生可见内容时,复用该 key。已加载窗口缺少 Step 起点时也遵循此规则。
65
65
 
66
+ 模型重试链在流程中以共享的 [DisclosureRow](../ui-primitives/README.zh.md#component-catalog) 呈现:Wi-Fi 图标、作为标题的本地化重试状态及括号中的重试次数、分隔点之后作为摘要的延迟,以及展开后的重试延迟与失败原因。图标表达该链的结局——等待或已重试时是普通 Wi-Fi 弧线,最后一次重试已开始而所属轮次以错误结束时,改为被斜线划过的弧线;被重试的失败是模型返回空内容时,改用警告图标。从等待延迟到被重试的请求结束,这一行都保持「正在重试」,不会在两次尝试之间切换文案。文字大小跟随相邻的行:轮次以平铺方式显示步骤时(运行中的轮次,或详细模式下最近的轮次)用步骤行字号,步骤分组后(精简、标准模式,以及详细模式下较早的轮次)用分组标题字号。Chat Node seat 以 `stepRunsGrouped` 把这一状态传给每个渲染器。存在可见的 Trajectory View 时,展开的行提供与工具行相同的 Inspect 操作,打开该次请求的记录。
67
+
66
68
  只有包含非空白字符的文本和推理块才计入 Assistant 的可见内容。流式追加复用每个块的可见状态;块替换和最终消息重新计算可见性,同时保留原始文本。
67
69
 
68
70
  <a id="command-and-failure-rows"></a>
@@ -81,7 +83,7 @@ Chat 在 `MarkdownDelegateProvider.getTriggerProps` 接入处适配 Markdown 目
81
83
  <a id="inherited-history-divider"></a>
82
84
  ## 继承历史分隔线
83
85
 
84
- 分叉产生的会话(例如 fork 子智能体或分支出的对话)在最后一个继承的 `session/end-seed` 标记处显示一条标注“以上为继承的历史消息”的分隔线,把复制来的历史与该会话自己的消息分开。标注以“在新对话中分支”操作所用的分支图标开头。切点位于某个 Turn 内部时,分隔线留在该 Turn 的过程折叠之外。分隔线在包含标记的历史页加载后才出现,因此继承历史较长时,可能要向上滚动才能看到。没有继承历史的会话不显示分隔线。
86
+ 分叉产生的会话(例如 fork 子智能体或分支出的对话)在最后一个继承的 `session/end-seed` 标记处显示一条标注“以上为继承的历史消息”的分隔线,把复制来的历史与该会话自己的消息分开。标注以“在新对话中分支”操作所用的分支图标开头。切点位于某个 Turn 内部时,分隔线留在该 Turn 的过程折叠之外。分隔线在包含标记的历史页加载后才出现,因此继承历史较长时,可能要向上滚动才能看到。没有继承历史的会话不显示分隔线。当 Conversation [折叠继承历史](../ui-conversation/README.zh.md#inherited-history-fold)时,Chat 从分隔线开始显示,隐藏**加载更早**控件,不请求更早的页,轮次导航也不合并整段日志的大纲。
85
87
 
86
88
  -----
87
89
 
@@ -90,7 +92,7 @@ Chat 在 `MarkdownDelegateProvider.getTriggerProps` 接入处适配 Markdown 目
90
92
 
91
93
  只有当已加载窗口包含 `turn/start`,且每次已启动的模型尝试都报告安全、精确的用量时,已完成轮次才显示可展开的用量行。该行会省略不可用的可选用量桶。记账不完整或相互矛盾时,整个详情都不显示,避免把部分总量冒充完整结果。
92
94
 
93
- 设置 → 通用设置 → 性能与用量位于繁忙时的发送行为之后、Session Log 上传之前,将 `ui-chat.performanceUsage` 保存为 `detailed`(默认)或 `compact`。简洁模式仅在输入框下方显示可用的输出速度和缓存命中率,不显示统计交互卡片或每轮用量。详细模式提供会话统计和每轮 token 用量。两种模式的已完成轮次页脚均不显示耗时。该偏好仅影响展示,记账和 Session 事件保持完整。
95
+ 设置 → 通用设置 → 会话偏好 → 性能与用量位于显示代码工作视图之后,将 `ui-chat.performanceUsage` 保存为 `detailed`(默认)或 `compact`。简洁模式仅在输入框下方显示可用的输出速度和缓存命中率,不显示统计交互卡片或每轮用量。详细模式提供会话统计和每轮 token 用量。两种模式的已完成轮次页脚均不显示耗时。该偏好仅影响展示,记账和 Session 事件保持完整。
94
96
 
95
97
  输入框统计信息由两个 `conversation.composer.dock` 列表条目组成:`activity`(order 0,轮次数、步骤数与输出速度,以及 LLM 耗时、工具耗时与 TTFT)和 `usage`(order 1,token 总量与缓存命中)。这些控件遵循公共的[统计控件圆角规则](../../../docs/ui-radius.zh.md#radius-scale)。其他插件以相同的 id 和相同的 `order` 注册即可替换某个控件;dock 按 `order` 排列各行,更低的 `priority` 决定由替换者渲染:动态插件会自动获得,静态组合的插件需显式传入。以新 id 注册则新增控件。每个控件在 `data-composer-stat` 中携带其 id。按下 Escape,或在已打开的对话框之外发生 pointerdown 或点击时,该对话框会关闭,因此用指针或键盘激活另一个控件会切换对话框,而不会叠加两个。读数被省略号截断时,提示气泡会显示完整读数。带对话框的控件在悬停或键盘聚焦时显示,对话框打开期间不显示;没有对话框的读数在悬停、点击或轻触时显示。会话统计对话框的标题行显示轮次数与步骤数。统计对话框通过 CSS 锚点定位,并按布局视口限制尺寸;浏览器缩放和平移时随页面移动,因此可以超出视觉视口。较高的对话框内容可在内部滚动。
96
98
 
@@ -137,7 +139,7 @@ Chat Builder 按节点发布 `bottomSource`:节点可见且属于已加载的
137
139
 
138
140
  过程组使用稳定的 `div` 布局盒子、滚动正文及不限高的内容盒子,后者报告正文内部的内容增长。业务样式必须适配组内及组边界间距,处理隐藏或空成员以及回答前的间距特例。`conversation.chat.flow` 插槽添加一个 `display: contents` DOM 锚点;行选择器直接匹配该锚点,不重复匹配其正文容器祖先。运行状态与各行共享父级,使分隔线使用同一套可见兄弟节点规则。锚点自身不产生间距。更早历史控件紧邻流锚点之前,两者的兄弟关系决定首行间距。CSS 变量不属于 Group Definition。
139
141
 
140
- 运行中的分组标题、思考预览、工具与命令行、当前重试行以及底部运行状态使用共享的 [TextShimmer](../ui-primitives/README.zh.md#component-catalog)。每行的文字共用一道从左到右的高光,包括折叠的分组标题;图标和悬停箭头保留底色。普通流程行之间相隔 4px,同一条 Assistant 消息里相邻的推理行也是如此;展开的分组标题与内容之间相隔 8px;Assistant 回复与相邻过程行之间相隔 12px;每轮完成/耗时控件与其输入、以及紧随其后的可见行之间保留 16px。控件与回复之间隔着已收起的行时,回复保持 12px 回复间距,因此折叠不会改变它的间距。隐藏行与空行(包括保留的空 slot 锚点)不产生间距。“深度求索”运行文字保留蓝色底色,并使用主题专用高光扫过文字。
142
+ 运行中的分组标题、思考预览、工具与命令行、当前重试行以及底部运行状态使用共享的 [TextShimmer](../ui-primitives/README.zh.md#component-catalog)。每行的文字共用一道从左到右的高光,包括折叠的分组标题;图标和悬停箭头保留底色。普通流程行之间相隔 4px,同一条 Assistant 消息里相邻的推理行也是如此;展开的分组标题与内容之间相隔 8px;Assistant 回复与相邻过程行之间相隔 12px;每轮完成/耗时控件与其输入、以及紧随其后的可见行之间保留 16px。紧跟在过程行下方的消息气泡同样相隔 12px;消息操作行下方紧随的问答回复或 Assistant 回复相隔 4px,中间隔着已收起的分组时也是如此。控件与回复之间隔着已收起的行时,回复保持 12px 回复间距,因此折叠不会改变它的间距。隐藏行与空行(包括保留的空 slot 锚点)不产生间距。“深度求索”运行文字保留蓝色底色,并使用主题专用高光扫过文字。
141
143
 
142
144
  助手收尾消息的复制与分支操作在默认内容字号下使用 16px SVG 框、固定 1px 描边与 28px 点击区域。SVG 框不会在 flex 行中收缩;图标与点击区域尺寸均跟随内容字号增量。
143
145
 
@@ -160,11 +162,11 @@ Chat 节点 slot 为推理与工具注入绑定重置来源的 `useDisclosure`
160
162
 
161
163
  Chat 等待初始历史就绪后,才允许自动内容、滚动或尺寸更新初始化阅读状态。进行中的 Session 先恢复初始显隐和位置,再允许折叠动画。
162
164
 
163
- Chat 会在历史前插与 renderer 重新挂载时恢复语义锚点,并且只在跟随底部时禁用自己滚动区域的浏览器自动锚定。没有读者移动的贴底滚动事件,以及到达底部(容许小于 1px 的取整误差)的读者输入,会立即更新跟随归属,避免后续布局变化使其底部位置失效。其他读者移动即使位于跟随阈值内,也保持待处理直到采样周期或 `scrollend`,防止布局增长抵消小幅滚动操作。采用完成时收起时,提交正文输入或 steering 会立即恢复跟随底部,并清除先前待处理的读者滚动采样。采用下次消息时收起时,没有折叠批次承载的正文输入用一次原生动画落到底部;steering 在两种时机下都立即落到底部,因为运行中的 Turn 仍在其回显上方持续输出。读者跟随底部时,`ResizeObserver` 追随新的底部,并且无需读取行几何就选中最后一个已加载轮次;读者离开底部后,高度变化会保持顶部位置,再由阅读线几何选择活跃轮次。轮次导航预览位于 Markdown 代码块粘性头栏上方,而导航外框始终处于 composer 上方的 transcript 区域内。
165
+ Chat 会在历史前插与 renderer 重新挂载时恢复语义锚点,并且只在跟随底部时禁用自己滚动区域的浏览器自动锚定。位于 Conversation 滚动区域内时,Chat 通过根元素上的[滚动区域标记](../ui-conversation/README.zh.md#scrollport-marks)请求这一点,并请求关闭该滚动区域的纵向过度滚动。没有读者移动的贴底滚动事件,以及到达底部(容许小于 1px 的取整误差)的读者输入,会立即更新跟随归属,避免后续布局变化使其底部位置失效。其他读者移动即使位于跟随阈值内,也保持待处理直到采样周期或 `scrollend`,防止布局增长抵消小幅滚动操作。采用完成时收起时,提交正文输入或 steering 会立即恢复跟随底部,并清除先前待处理的读者滚动采样。采用下次消息时收起时,没有折叠批次承载的正文输入用一次原生动画落到底部;steering 在两种时机下都立即落到底部,因为运行中的 Turn 仍在其回显上方持续输出。读者跟随底部时,`ResizeObserver` 追随新的底部,并且无需读取行几何就选中最后一个已加载轮次;读者离开底部后,高度变化会保持顶部位置,再由阅读线几何选择活跃轮次。轮次导航预览位于 Markdown 代码块粘性头栏上方,而导航外框始终处于 composer 上方的 transcript 区域内。
164
166
 
165
167
  轮次轨道与回到底部按钮位于正文裁剪层外。34px 的回到底部按钮居中容纳 16px 箭头,描边固定为 1px。它们相对共享会话滚动容器做 sticky 定位;Chat 自己持有滚动容器时,则相对 Chat 外框做 absolute 定位。轮次轨道贴在滚动容器的起始边,把末端留白让给[会话面板](../ui-session-panel/README.zh.md),预览朝正文方向弹出。正文扣除水平内边距后的可用宽度不超过 900px 时,隐藏轮次轨道;判断依据不是浏览器视口宽度。
166
168
 
167
- `conversation.chat.aside` slot 放一个位于正文旁边、面向整个会话的组件,例如[会话面板](../ui-session-panel/README.zh.md)。每个 Chat 视图实例(主正文区或嵌入的)都会渲染它:它位于 Chat 外框顶部的零高度图层中,定位方式与轮次轨道相同,因此不随正文滚动,并从共享滚动容器继承 `--dsh-composer-height` 与 `--dsh-conversation-viewport-height`。该图层叠在轮次轨道与回到底部按钮之上,自身不拦截指针事件。图层不做任何测量:它的样式表把末端留白(正文列到外框末端边缘之间的行向空间)发布为自定义属性 `--dsh-chat-aside-gutter`。正文居中时,它的值为 `max(0px, (100% - var(--dsh-chat-content-width)) / 2)`。Conversation 主体保留[末端预留](../ui-conversation/README.zh.md#end-reserve)时,外框比滚动容器窄 `--dsh-chat-end-inset`;图层越过这段内边距延伸到滚动容器的末端边缘,留白也把它计算在内。图层的外边距跟随主体的 `--dsh-chat-end-reserve-transition`,因此内边距过渡期间图层的末端边缘始终贴着滚动容器的末端边缘。其中的百分比在以该图层为包含块的元素的行向尺寸里按图层宽度解析,因此占位组件用 CSS 决定自身的尺寸与位置,Chat 视图既不为它重新渲染,也不为它观察尺寸。
169
+ `conversation.chat.aside` slot 放一个位于正文旁边、面向整个会话的组件,例如[会话面板](../ui-session-panel/README.zh.md)。每个 Chat 视图实例(主正文区或嵌入的)都会渲染它:它位于 Chat 外框顶部的零高度图层中,定位方式与轮次轨道相同,因此不随正文滚动,并从共享滚动容器继承 `--dsh-composer-height` 与 `--dsh-conversation-viewport-height`。该图层叠在轮次轨道与回到底部按钮之上,自身不拦截指针事件。图层不做任何测量:它的样式表把末端留白(正文列到外框末端边缘之间的行向空间)发布为自定义属性 `--dsh-chat-aside-gutter`。正文居中时,它的值为 `max(0px, (100% - var(--dsh-chat-content-width)) / 2)`。Conversation 主体保留[末端预留](../ui-conversation/README.zh.md#end-reserve)时,外框比滚动容器窄 `--dsh-chat-end-inset`;图层越过这段内边距延伸到滚动容器的末端边缘,留白也把它计算在内。会话面板播放进入或退出期间,图层自己的样式表以与滚动容器内边距相同的时长和曲线声明外边距过渡,因此内边距变化期间图层的末端边缘始终贴着滚动容器的末端边缘。该图层也是其中停靠探针的 inline-size 查询容器:它的宽度是外框内容宽加上负末端外边距所伸过的内缩量,无论在静止时还是整个过渡期间,这都是滚动容器经 DOM 取整为整像素之前的 `clientWidth`(padding box 减去竖向滚动条),会话面板的探针以 `100cqw` 读取它。其中的百分比在以该图层为包含块的元素的行向尺寸里按图层宽度解析,因此占位组件用 CSS 决定自身的尺寸与位置,Chat 视图既不为它重新渲染,也不为它观察尺寸。
168
170
 
169
171
  正文根节点使用 `overflow-x: visible; overflow-y: clip`:裁剪纵向溢出,但不创建滚动容器。因此,在没有更近的滚动祖先时,Markdown 代码块的 sticky 头栏仍以实际会话滚动容器为参照。限高过程组和终端区域保留各自的滚动容器。
170
172
 
@@ -208,7 +210,7 @@ Chat 会在历史前插与 renderer 重新挂载时恢复语义锚点,并且
208
210
 
209
211
  -----
210
212
 
211
- Chat view 在标记了 `data-text-interaction-source` 的业务节点上检测选区和右键手势。选区两端必须定位到同一个来源容器。已展示的用户内容和已完成的 Assistant 文本或 reasoning 参与交互;Tool、注入上下文、流式或中断的 Assistant 文本以及 Markdown 控件不参与。
213
+ Chat view 在标记了 `data-text-interaction-source` 的业务节点上检测选区和右键手势。选区两端必须定位到同一个来源容器。终点落在容器之后、且两者之间只有空白文本的选区(例如三击最后一段)按终点在容器末尾处理。已展示的用户内容和已完成的 Assistant 文本或 reasoning 参与交互;Tool、注入上下文、流式或中断的 Assistant 文本以及 Markdown 控件不参与。
212
214
 
213
215
  `ctx.uiConversation.interactions` 将有效手势分发给插件注册项,并把对应组件交给 Chat view。操作展示位置在已有 Chat 列内绝对定位,限制在 composer seat 及其 dock 上方。外层容器保留组件的外描边与阴影,内部滚动由组件负责。选区滚出该可见范围时暂时隐藏操作,滚回后恢复。Chat 负责视口可见性、定位、外部指针按下、Escape、新选区、来源失效与卸载清理;主动关闭保留浏览器选区,布局变化不会重新打开操作。[Message quotes](../../session/message-quotes/README.zh.md) 负责引用的接管条件和插入。
214
216