@deepseek-harness-tui/dsh-tui 0.18.0 → 0.19.0

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 (209) hide show
  1. package/README.md +35 -10
  2. package/bin/dsh-tui.js +46 -3
  3. package/guide/dsh-tui-guide/codex-backend.en.md +2 -2
  4. package/guide/dsh-tui-guide/codex-backend.md +2 -2
  5. package/guide/dsh-tui-guide/configuration.en.md +7 -2
  6. package/guide/dsh-tui-guide/configuration.md +7 -2
  7. package/guide/dsh-tui-guide/getting-started.en.md +168 -4
  8. package/guide/dsh-tui-guide/getting-started.md +121 -14
  9. package/guide/dsh-tui-guide/interaction.en.md +11 -10
  10. package/guide/dsh-tui-guide/interaction.md +5 -4
  11. package/guide/dsh-tui-guide/user-guide.en.md +6 -5
  12. package/guide/dsh-tui-guide/user-guide.md +6 -5
  13. package/lib/settings.json +1 -1
  14. package/lib/types/adapter/ports/channel-ui.d.ts +10 -7
  15. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  16. package/lib/types/adapter/ports/channel-view.d.ts +28 -5
  17. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  18. package/lib/types/agent/events.d.ts +12 -5
  19. package/lib/types/agent/events.d.ts.map +1 -1
  20. package/lib/types/agent/session.d.ts +5 -0
  21. package/lib/types/agent/session.d.ts.map +1 -1
  22. package/lib/types/backends/claude/translate/core.d.ts +2 -2
  23. package/lib/types/backends/claude/translate/core.d.ts.map +1 -1
  24. package/lib/types/backends/claude/translate/core.js +10 -6
  25. package/lib/types/backends/codex/session/commands.d.ts +2 -0
  26. package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
  27. package/lib/types/backends/codex/session/commands.js +8 -4
  28. package/lib/types/backends/codex/session/input.d.ts +11 -7
  29. package/lib/types/backends/codex/session/input.d.ts.map +1 -1
  30. package/lib/types/backends/codex/session/input.js +68 -15
  31. package/lib/types/backends/codex/session/session.d.ts.map +1 -1
  32. package/lib/types/backends/codex/session/session.js +2 -3
  33. package/lib/types/channel/projection.d.ts.map +1 -1
  34. package/lib/types/channel/projection.js +78 -10
  35. package/lib/types/channel/questions.d.ts +19 -3
  36. package/lib/types/channel/questions.d.ts.map +1 -1
  37. package/lib/types/channel/sanitize.d.ts.map +1 -1
  38. package/lib/types/channel/sanitize.js +8 -4
  39. package/lib/types/channel/subagent-failure.d.ts +49 -0
  40. package/lib/types/channel/subagent-failure.d.ts.map +1 -0
  41. package/lib/types/channel/subagent-failure.js +59 -0
  42. package/lib/types/channel/transcript.d.ts +17 -0
  43. package/lib/types/channel/transcript.d.ts.map +1 -1
  44. package/lib/types/channel/transcript.js +35 -0
  45. package/lib/types/commands.js +1 -1
  46. package/lib/types/components/MessageList.d.ts.map +1 -1
  47. package/lib/types/components/MessageList.js +11 -7
  48. package/lib/types/components/PromptInput.d.ts.map +1 -1
  49. package/lib/types/components/PromptInput.js +61 -6
  50. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  51. package/lib/types/components/SubagentDashboard.js +7 -1
  52. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  53. package/lib/types/components/messages/AssistantToolUseMessage.js +5 -2
  54. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -8
  55. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  56. package/lib/types/components/questions/AskUserQuestionPanel.js +7 -4
  57. package/lib/types/components/questions/PlanReviewPanel.d.ts +3 -6
  58. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  59. package/lib/types/components/revealScope.d.ts +15 -0
  60. package/lib/types/components/revealScope.d.ts.map +1 -0
  61. package/lib/types/components/revealScope.js +17 -0
  62. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +34 -1
  63. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
  64. package/lib/types/components/sidePanel/btw/BtwComposer.js +108 -7
  65. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
  66. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +1 -1
  67. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
  68. package/lib/types/components/sidePanel/btw/BtwThreadScene.js +1 -1
  69. package/lib/types/components/smoothReveal.d.ts +36 -6
  70. package/lib/types/components/smoothReveal.d.ts.map +1 -1
  71. package/lib/types/components/smoothReveal.js +92 -21
  72. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +4 -14
  73. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  74. package/lib/types/components/workspaces/HomeWorkspaceRow.js +26 -17
  75. package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
  76. package/lib/types/dsh-adapter/backend/session.js +12 -0
  77. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  78. package/lib/types/dsh-adapter/backend/translate.js +6 -1
  79. package/lib/types/dsh-adapter/channel/attached-context.d.ts +15 -2
  80. package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -1
  81. package/lib/types/dsh-adapter/channel/attached-context.js +26 -3
  82. package/lib/types/dsh-adapter/channel/binding-events.d.ts +3 -0
  83. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  84. package/lib/types/dsh-adapter/channel/binding-events.js +43 -2
  85. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +2 -6
  86. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  87. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +7 -1
  88. package/lib/types/dsh-adapter/channel/core/compose.d.ts +2 -6
  89. package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
  90. package/lib/types/dsh-adapter/channel/core/compose.js +1 -1
  91. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
  92. package/lib/types/dsh-adapter/channel/core/local-actions.js +3 -26
  93. package/lib/types/dsh-adapter/channel/emitter.js +1 -1
  94. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  95. package/lib/types/dsh-adapter/channel/extensions.js +8 -0
  96. package/lib/types/dsh-adapter/channel/input-actions.d.ts +2 -2
  97. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
  98. package/lib/types/dsh-adapter/channel/input-actions.js +34 -10
  99. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +3 -7
  100. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  101. package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
  102. package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
  103. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  104. package/lib/types/dsh-adapter/channel/model-actions.js +26 -9
  105. package/lib/types/dsh-adapter/channel/model-selection.d.ts +27 -2
  106. package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
  107. package/lib/types/dsh-adapter/channel/model-selection.js +81 -37
  108. package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -1
  109. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  110. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  111. package/lib/types/dsh-adapter/channel/session-rewind.js +6 -2
  112. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  113. package/lib/types/dsh-adapter/channel/session-tree-actions.js +8 -4
  114. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  115. package/lib/types/dsh-adapter/channel/settings-host.js +6 -3
  116. package/lib/types/dsh-adapter/channel/transcript.d.ts +3 -2
  117. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
  118. package/lib/types/dsh-adapter/channel/transcript.js +13 -4
  119. package/lib/types/dsh-adapter/channel/types.d.ts +11 -2
  120. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  121. package/lib/types/dsh-adapter/contract.d.ts +26 -3
  122. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  123. package/lib/types/dsh-adapter/contract.js +44 -5
  124. package/lib/types/dsh-adapter/fresh-agent.d.ts +1 -1
  125. package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -1
  126. package/lib/types/dsh-adapter/fresh-agent.js +60 -11
  127. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
  128. package/lib/types/dsh-adapter/host-access.js +60 -11
  129. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  130. package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -1
  131. package/lib/types/dsh-adapter/host-contract.js +4 -2
  132. package/lib/types/dsh-adapter/host-dsh.d.ts +0 -8
  133. package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
  134. package/lib/types/dsh-adapter/host-dsh.js +27 -6
  135. package/lib/types/dsh-adapter/host-entry.js +4 -0
  136. package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
  137. package/lib/types/dsh-adapter/oauth/profiles.js +14 -1
  138. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  139. package/lib/types/dsh-adapter/plugin.js +143 -44
  140. package/lib/types/dsh-adapter/presets.d.ts +38 -11
  141. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  142. package/lib/types/dsh-adapter/presets.js +46 -17
  143. package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
  144. package/lib/types/dsh-adapter/process-exit.js +1 -1
  145. package/lib/types/dsh-adapter/questions.d.ts +3 -4
  146. package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
  147. package/lib/types/dsh-adapter/questions.js +1 -1
  148. package/lib/types/dsh-adapter/session-list-metadata.js +2 -2
  149. package/lib/types/dsh-adapter/subagents.d.ts +5 -0
  150. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  151. package/lib/types/dsh-adapter/subagents.js +22 -1
  152. package/lib/types/dsh-adapter/team-mode.d.ts +17 -10
  153. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  154. package/lib/types/dsh-adapter/team-mode.js +19 -12
  155. package/lib/types/dsh-adapter/tool-scope.d.ts +24 -0
  156. package/lib/types/dsh-adapter/tool-scope.d.ts.map +1 -0
  157. package/lib/types/dsh-adapter/tool-scope.js +127 -0
  158. package/lib/types/dsh-adapter/types.d.ts +2 -1
  159. package/lib/types/dsh-adapter/types.d.ts.map +1 -1
  160. package/lib/types/heldInputs.d.ts +55 -16
  161. package/lib/types/heldInputs.d.ts.map +1 -1
  162. package/lib/types/heldInputs.js +277 -41
  163. package/lib/types/i18n.d.ts +227 -11
  164. package/lib/types/i18n.d.ts.map +1 -1
  165. package/lib/types/i18n.js +60 -5
  166. package/lib/types/ink/components/App.d.ts +2 -0
  167. package/lib/types/ink/components/App.d.ts.map +1 -1
  168. package/lib/types/ink/components/App.js +8 -0
  169. package/lib/types/ink/events/input-event.d.ts.map +1 -1
  170. package/lib/types/ink/events/input-event.js +7 -6
  171. package/lib/types/ink/hit-test.d.ts +2 -0
  172. package/lib/types/ink/hit-test.d.ts.map +1 -1
  173. package/lib/types/ink/hit-test.js +10 -0
  174. package/lib/types/ink/hooks/use-program-status.d.ts +1 -1
  175. package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -1
  176. package/lib/types/ink/hooks/use-program-status.js +3 -2
  177. package/lib/types/ink/ink.d.ts +1 -0
  178. package/lib/types/ink/ink.d.ts.map +1 -1
  179. package/lib/types/ink/ink.js +5 -2
  180. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  181. package/lib/types/ink/parse-keypress.js +25 -0
  182. package/lib/types/ink/terminal.d.ts +13 -2
  183. package/lib/types/ink/terminal.d.ts.map +1 -1
  184. package/lib/types/ink/terminal.js +29 -5
  185. package/lib/types/screens/Chat.d.ts.map +1 -1
  186. package/lib/types/screens/Chat.js +43 -2
  187. package/lib/types/screens/SessionSupervisor.d.ts +3 -6
  188. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  189. package/lib/types/screens/SessionSupervisor.js +5 -8
  190. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +1 -2
  191. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
  192. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +2 -2
  193. package/lib/types/screens/sessionSupervisor/model.d.ts +1 -1
  194. package/lib/types/screens/sessionSupervisor/model.js +1 -1
  195. package/lib/types/sessionMounts.d.ts +12 -5
  196. package/lib/types/sessionMounts.d.ts.map +1 -1
  197. package/lib/types/sessionMounts.js +33 -6
  198. package/lib/types/update.d.ts +412 -20
  199. package/lib/types/update.d.ts.map +1 -1
  200. package/lib/types/update.js +2094 -193
  201. package/lib/types/updateHost.d.ts +198 -0
  202. package/lib/types/updateHost.d.ts.map +1 -0
  203. package/lib/types/updateHost.js +608 -0
  204. package/lib/types/utils/processName.d.ts +16 -0
  205. package/lib/types/utils/processName.d.ts.map +1 -0
  206. package/lib/types/utils/processName.js +27 -0
  207. package/package.json +111 -108
  208. package/tui-profile/feed/README.md +1 -1
  209. package/tui-profile/feed/first-party.json +1 -1
@@ -48,6 +48,27 @@ export function appendAttachedContextBlocks(blocks, contexts) {
48
48
  }
49
49
  return contexts.length;
50
50
  }
51
+ /** NUL cannot appear in either part, so the join is unambiguous. */
52
+ const keyOf = (sourceId, title) => `${sourceId}\u0000${title}`;
53
+ /**
54
+ * Snapshot-first merge: a dock re-send keeps the contexts its row saved and
55
+ * still carries anything staged while the row sat in the dock. The live chips
56
+ * were already taken by `captureOrigin()`, so dropping them here would lose
57
+ * them for good. A duplicate key is the same panel staged again: the newer
58
+ * staged snapshot replaces the saved one (the user just edited it).
59
+ */
60
+ export function mergeAttachedContexts(saved, staged) {
61
+ if (staged.length === 0)
62
+ return saved;
63
+ // A duplicate key is the same panel staged again: the newer snapshot wins,
64
+ // or the model gets the text the user just replaced. `saved` keeps its
65
+ // order; only its stale copies are swapped out.
66
+ const byKey = new Map(staged.map(context => [keyOf(context.sourceId, context.title), context]));
67
+ const merged = saved.map(context => byKey.get(keyOf(context.sourceId, context.title)) ?? context);
68
+ const savedKeys = new Set(saved.map(context => keyOf(context.sourceId, context.title)));
69
+ const extra = staged.filter(context => !savedKeys.has(keyOf(context.sourceId, context.title)));
70
+ return extra.length === 0 && merged.every((context, index) => context === saved[index]) ? saved : [...merged, ...extra];
71
+ }
51
72
  /**
52
73
  * Registry behind `ChannelUi.attachedContexts` / `attachContext` /
53
74
  * `detachContext`. It owns no state of its own: every entry lives in the
@@ -62,11 +83,13 @@ export function appendAttachedContextBlocks(blocks, contexts) {
62
83
  */
63
84
  export function createAttachedContextRegistry(holder, emit) {
64
85
  let sequence = 0;
65
- /** NUL cannot appear in either part, so the join is unambiguous. */
66
- const keyOf = (sourceId, title) => `${sourceId}\u0000${title}`;
67
86
  return {
68
87
  attach(input) {
69
- const capped = capContent(input.content);
88
+ // A snapshot that is already capped knows whether it was cut; re-deriving
89
+ // the flag from its body would read a cut body as a full one.
90
+ const capped = input.truncated === true
91
+ ? { content: input.content.slice(0, MENTION_MAX_FILE_CHARS), truncated: true }
92
+ : capContent(input.content);
70
93
  const list = holder().attachedContexts;
71
94
  const key = keyOf(input.sourceId, input.title);
72
95
  const index = list.findIndex(item => keyOf(item.sourceId, item.title) === key);
@@ -33,10 +33,13 @@ export declare function createBindingEvents(ctx: Context, deps: {
33
33
  * request reports usage. */
34
34
  seedContextOccupancy?(session: unknown): void;
35
35
  seedTeam?(session: unknown): void;
36
+ /** Re-apply per-agent registry state (the preset's tool carve-out). */
37
+ onBind?(agent: Agent): void;
36
38
  inputConvergence: InputConvergence;
37
39
  modelSelection: ReturnType<typeof createModelSelection>;
38
40
  modelActions: {
39
41
  applyPreferredEffort(preserveSessionEffort?: boolean): Promise<void>;
42
+ dropModelNodeCache?(): void;
40
43
  };
41
44
  modeActions: {
42
45
  refreshMode(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"binding-events.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/binding-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,o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K,GAAG,IAAI,CAAA;KAC5B,CAAA;IACD;6EACyE;IACzE,IAAI,CAAC,EAAE;QAAE,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,CAAA;IAC/C,SAAS,EAAE;QAAE,QAAQ,IAAI,IAAI,CAAA;KAAE,CAAA;IAC/B,eAAe,CAAC,EAAE;QAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,CAAA;IACrE;;;uCAGmC;IACnC,iBAAiB,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAA;IACtD;;;sCAGkC;IAClC,gBAAgB,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1C;;+DAE2D;IAC3D,wBAAwB,CAAC,IAAI,IAAI,CAAA;CAClC;;;;wBAsEmB,IAAI;+CAImB,YAAY,GAAG,IAAI;;EA6G7D;AAED,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -98,10 +98,11 @@ export function createBindingEvents(ctx, deps) {
98
98
  installSubagents();
99
99
  },
100
100
  onBind({ capture, current, register }) {
101
+ deps.onBind?.(deps.binding.agent);
101
102
  deps.seedActivity?.(deps.binding.agent.session);
102
103
  deps.seedContextOccupancy?.(deps.binding.agent.session);
103
104
  deps.seedTeam?.(deps.binding.agent.session);
104
- deps.modelSelection.bind(deps.binding.agent, { provider: deps.state.provider, model: deps.state.model });
105
+ const durableSelection = deps.modelSelection.bind(deps.binding.agent, { provider: deps.state.provider, model: deps.state.model });
105
106
  const selected = deps.modelSelection.selection.current;
106
107
  // A parked turn may not have logged its first selected request yet.
107
108
  if (selected !== undefined) {
@@ -111,7 +112,7 @@ export function createBindingEvents(ctx, deps) {
111
112
  const recorded = deps.binding.agent.session.requestHeader?.()?.config;
112
113
  // Reattachment keeps a live pin; an adopted header also owns the
113
114
  // absence of a pin. A child on a different route still seeds normally.
114
- const preserveSessionEffort = selected?.reasoningEffort !== undefined ||
115
+ const preserveSessionEffort = durableSelection || selected?.reasoningEffort !== undefined ||
115
116
  (recorded?.provider === deps.state.provider && recorded?.model === deps.state.model);
116
117
  if (preserveSessionEffort)
117
118
  deps.state.reasoningEffort = selected === undefined ? recorded?.reasoningEffort : selected.reasoningEffort;
@@ -140,6 +141,46 @@ export function createBindingEvents(ctx, deps) {
140
141
  deps.messageObserver?.publish(native.agent.session, event);
141
142
  deps.modeActions.onSessionEvent(native.agent.session, event);
142
143
  deps.jobs?.onSessionEvent(event);
144
+ if (event.type === 'model/selection') {
145
+ // The API/Web/plugin may select on this same live Agent. The seam is
146
+ // authoritative; an effort-only action must never resurrect UI cache.
147
+ const selected = deps.modelSelection.selection.current;
148
+ if (selected !== undefined) {
149
+ const routeChanged = selected.provider !== deps.state.provider || selected.model !== deps.state.model;
150
+ deps.state.provider = selected.provider;
151
+ deps.state.model = selected.model;
152
+ deps.state.reasoningEffort = selected.reasoningEffort;
153
+ if (routeChanged) {
154
+ deps.state.contextWindow = undefined;
155
+ deps.state.effortLevels = undefined;
156
+ deps.modelActions.dropModelNodeCache?.();
157
+ void deps.modelActions.applyPreferredEffort(true);
158
+ deps.seedUpstreamRetry?.(selected.provider);
159
+ }
160
+ deps.state.emit();
161
+ }
162
+ }
163
+ if (event.type === 'request/header' && typeof native.agent.model?.current === 'function') {
164
+ // The projector paints the completed request's effort below. That
165
+ // request may have fixed A/high before a pending B/low was selected.
166
+ // Reconcile after projection, keeping adapter-default readouts only
167
+ // when that header still describes the next selected route.
168
+ queueMicrotask(() => {
169
+ if (!current())
170
+ return;
171
+ const selected = deps.modelSelection.selection.current;
172
+ if (selected === undefined)
173
+ return;
174
+ const header = native.agent.session.requestHeader();
175
+ const adapterDefault = header?.adapterDefaults?.reasoningEffort === true;
176
+ const effort = selected.reasoningEffort ?? (adapterDefault && header?.config.provider === selected.provider && header.config.model === selected.model
177
+ ? header.config.reasoningEffort : undefined);
178
+ if (deps.state.reasoningEffort !== effort) {
179
+ deps.state.reasoningEffort = effort;
180
+ deps.state.emit();
181
+ }
182
+ });
183
+ }
143
184
  if (event.type === 'working-directory/change') {
144
185
  // The projector folds this event later in the same dispatch; only a
145
186
  // move to a different directory refreshes.
@@ -1,5 +1,5 @@
1
1
  import type { ContextOccupancy } from '../../adapter/ports/channel-view.js';
2
- import type { ComposerImageRef, PendingMessage } from './types.js';
2
+ import type { PendingMessage, PendingTrackInput } from './types.js';
3
3
  /** Small mutable cells for Channel-local warning and pending-message state. */
4
4
  export declare function createContextBookkeeping(state: () => {
5
5
  /** The channel's single occupancy reading (projection first, sample
@@ -16,11 +16,7 @@ export declare function createContextBookkeeping(state: () => {
16
16
  };
17
17
  resetContextWarning: () => void;
18
18
  checkContextWarning: () => void;
19
- trackPending: (message: {
20
- id: string;
21
- text: string;
22
- images?: readonly ComposerImageRef[];
23
- }, placement: PendingMessage["placement"]) => void;
19
+ trackPending: (message: PendingTrackInput, placement: PendingMessage["placement"]) => void;
24
20
  untrackPending: (messageId: string, hold?: boolean) => void;
25
21
  };
26
22
  //# sourceMappingURL=context-bookkeeping.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-bookkeeping.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/context-bookkeeping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAElE,+EAA+E;AAC/E,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM;IACX;wEACoE;IACpE,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,IAAI,IAAI,IAAI,CAAA;CACb,EACD,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,EACnF,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,EAC3C,mBAAmB,EAAE,MAAM;;;;+BAiCK,IAAI;+BA9BJ,IAAI;4BAeL;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;KAAE,aAAa,cAAc,CAAC,WAAW,CAAC,KAAG,IAAI;gCAO7G,MAAM,qBAAiB,IAAI;EAU/D"}
1
+ {"version":3,"file":"context-bookkeeping.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/context-bookkeeping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnE,+EAA+E;AAC/E,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM;IACX;wEACoE;IACpE,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,IAAI,IAAI,IAAI,CAAA;CACb,EACD,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,EACnF,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,EAC3C,mBAAmB,EAAE,MAAM;;;;+BAuCK,IAAI;+BApCJ,IAAI;4BAeL,iBAAiB,aAAa,cAAc,CAAC,WAAW,CAAC,KAAG,IAAI;gCAa5D,MAAM,qBAAiB,IAAI;EAU/D"}
@@ -21,7 +21,13 @@ export function createContextBookkeeping(state, notify, lowContextText, warningB
21
21
  };
22
22
  const trackPending = (message, placement) => {
23
23
  const channel = state();
24
- channel.pending = [...channel.pending, { id: message.id, text: message.text, images: message.images ?? [], placement }];
24
+ channel.pending = [...channel.pending, {
25
+ id: message.id,
26
+ text: message.text,
27
+ images: message.images ?? [],
28
+ placement,
29
+ ...(message.contexts === undefined || message.contexts.length === 0 ? {} : { contexts: message.contexts }),
30
+ }];
25
31
  channel.emit();
26
32
  };
27
33
  /** Drop the preview of a message the backend never took; `hold` keeps it
@@ -110,16 +110,12 @@ export declare function createCoreChannel(ctx: ChannelHost, initialSession: Agen
110
110
  };
111
111
  resetContextWarning: () => void;
112
112
  checkContextWarning: () => void;
113
- trackPending: (message: {
114
- id: string;
115
- text: string;
116
- images?: readonly import("../types.js").ComposerImageRef[];
117
- }, placement: import("../types.js").PendingMessage["placement"]) => void;
113
+ trackPending: (message: import("../types.js").PendingTrackInput, placement: import("../types.js").PendingMessage["placement"]) => void;
118
114
  untrackPending: (messageId: string, hold?: boolean) => void;
119
115
  };
120
116
  composer: import("../composer-images.js").ComposerImages;
121
117
  input: {
122
- dispatchUserText: (text: string, placement: import("../types.js").PendingMessage["placement"], images?: readonly import("../types.js").ComposerImageRef[], attach?: import("@deepseek-ai/dsh-llm").UserMessage) => void;
118
+ dispatchUserText: (text: string, placement: import("../types.js").PendingMessage["placement"], images?: readonly import("../types.js").ComposerImageRef[], attach?: import("@deepseek-ai/dsh-llm").UserMessage, contexts?: readonly import("../types.js").AttachedContext[]) => void;
123
119
  activity: () => {
124
120
  readonly dispatched: number;
125
121
  readonly unsettled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../../../../src/dsh-adapter/channel/core/compose.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAGvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAW7D,OAAO,EAA4D,KA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E;aACvD,YAAY;EA4BxB"}
@@ -365,7 +365,7 @@ export function createCoreChannel(ctx, initialSession, options, owner) {
365
365
  };
366
366
  };
367
367
  const state = {
368
- ...createInputActions(() => state, () => binding.session, owner, inputConvergence, composer, (text, placement, images) => dispatchUserText(text, placement, images), (command, includeInContext) => getReadyActions().runLocalCommand(command, includeInContext), sessionId => { extension.touchSession?.(sessionId); }),
368
+ ...createInputActions(() => state, () => binding.session, owner, inputConvergence, composer, (text, placement, images, attach, contexts) => dispatchUserText(text, placement, images, attach, contexts), (command, includeInContext) => getReadyActions().runLocalCommand(command, includeInContext), sessionId => { extension.touchSession?.(sessionId); }),
369
369
  subscribe: emitter.subscribe,
370
370
  emit: emitter.emit,
371
371
  emitStream: emitter.emitStream,
@@ -1 +1 @@
1
- {"version":3,"file":"local-actions.d.ts","sourceRoot":"","sources":["../../../../../src/dsh-adapter/channel/core/local-actions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAOvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEzC,+DAA+D;AAC/D,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,MAAM,CAAC,EACpD,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,EAC9B,IAAI,EAAE,MAAM,GACX,OAAO,CAYT;AAcD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE;IAC/D,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE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CAAC,CAAA"}
@@ -4,7 +4,7 @@ import { writeActivityFrames } from '../../../activityPrefs.js';
4
4
  import { isPresetName, normalizeActivityPreset } from '../../../components/activityFrames.js';
5
5
  import { t } from '../../../i18n.js';
6
6
  import { runForegroundShell } from '../../compat/shell.js';
7
- import { LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview } from '../transcript.js';
7
+ import { LOCAL_OUTPUT_LIMIT, preview, previewIndented, trimLocalRows } from '../transcript.js';
8
8
  import { sessionWorkingDirectory } from '../../../channel/working-directory.js';
9
9
  /** `/activity frames <name>`: validate, persist, re-render. */
10
10
  export function setActivityFrames(state, notify, name) {
@@ -29,18 +29,6 @@ export function setActivityFrames(state, notify, name) {
29
29
  notify(t('activity-indicator-switched', { name: preset }));
30
30
  return true;
31
31
  }
32
- /**
33
- * One report line that keeps its shape: blank rows stay blank and leading
34
- * indentation survives; a stray newline still cannot become a second row.
35
- */
36
- function previewIndented(text, limit) {
37
- const line = text.replace(/[\r\n]+/gu, ' ').replace(/\s+$/u, '');
38
- // A truly empty Text node measures as zero height; one no-break space keeps
39
- // the blank row the report asked for without painting anything.
40
- if (line === '')
41
- return '\u00a0';
42
- return line.length <= limit ? line : `${line.slice(0, limit)}…`;
43
- }
44
32
  export function createCoreLocalActions(ctx, deps) {
45
33
  const { owner, binding, state, rowIds, notify } = deps;
46
34
  return {
@@ -71,19 +59,8 @@ export function createCoreLocalActions(ctx, deps) {
71
59
  const render = options?.preserveWhitespace ? previewIndented : preview;
72
60
  // Local reports cannot be restored from backend history. Retain whole
73
61
  // recent blocks within the existing row budget, without folding facts.
74
- let count = state.rows.reduce((sum, row) => sum + Number(row.kind === 'local' || row.kind === 'local-output'), lines.length + 1);
75
- for (let i = 0; count > MAX_ROWS && i < state.rows.length;) {
76
- if (state.rows[i].kind !== 'local' && state.rows[i].kind !== 'local-output') {
77
- i++;
78
- continue;
79
- }
80
- let end = i + 1;
81
- while (state.rows[end]?.kind === 'local-output')
82
- end++;
83
- count -= end - i;
84
- state.rows.splice(i, end - i);
85
- markChannelReadDirty(state.rows);
86
- }
62
+ trimLocalRows(state.rows, lines.length + 1);
63
+ markChannelReadDirty(state.rows);
87
64
  state.rows.push({ id: rowIds.value++, kind: 'local', text: title });
88
65
  for (const line of lines)
89
66
  state.rows.push({ id: rowIds.value++, kind: 'local-output', text: render(line, limit) });
@@ -7,7 +7,7 @@ beforeStream, options = {}) {
7
7
  const foldOption = options.fold;
8
8
  const fold = typeof foldOption === 'function' ? foldOption : foldOption === false ? () => false : () => true;
9
9
  const listeners = new Set();
10
- const foldCursor = { rows: undefined, index: 0, head: undefined };
10
+ const foldCursor = { rows: undefined, index: 0, head: undefined, boundary: undefined };
11
11
  let timer;
12
12
  let disposed = false;
13
13
  const wake = (source) => {
@@ -1 +1 @@
1
- {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/extensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAKlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAyB5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AA4BpD,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAsBzE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,OAAO,EACZ,aAAa,EAAE,SAAS,EACxB,OAAO,EAAE,oBAAoB,GAC5B,IAAI,CAmxBN"}
1
+ {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/extensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAKlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAyB5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AA6BpD,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAsBzE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,OAAO,EACZ,aAAa,EAAE,SAAS,EACxB,OAAO,EAAE,oBAAoB,GAC5B,IAAI,CA2xBN"}
@@ -27,6 +27,7 @@ import { createLoadedContextRefresher } from './loaded-context.js';
27
27
  import { createLocalActions } from './local-actions.js';
28
28
  import { mentionAttachments } from './mentions.js';
29
29
  import { createModelSelection } from './model-selection.js';
30
+ import { createToolScope } from '../tool-scope.js';
30
31
  import { createModelActions } from './model-actions.js';
31
32
  import { createModelSwitchAction } from './model-switch.js';
32
33
  import { autoPresetConfirmed, createPermissionModeActions } from './mode-permission-actions.js';
@@ -480,6 +481,11 @@ export function attachDshExtensions(core, ctx, initialNative, options) {
480
481
  state.cancelPending = false;
481
482
  state.status = binding.agent.status;
482
483
  state.emit();
484
+ // Track all existing and newly published agent scopes, not only the screen's
485
+ // binding: background dispatch and subagents may run without being attached.
486
+ // Older hosts retain the final-assembly filters in the plugin instead.
487
+ // Created after the agent view so construction rollback still owns its listeners.
488
+ const toolScope = createToolScope(ctx, dispose => owner.own(dispose), () => binding.agent);
483
489
  const modelActions = createModelActions(ctx, state, {
484
490
  owner,
485
491
  binding,
@@ -488,6 +494,7 @@ export function attachDshExtensions(core, ctx, initialNative, options) {
488
494
  agent: () => binding.agent,
489
495
  notify,
490
496
  checkContextWarning: core.bookkeeping.checkContextWarning,
497
+ onPresetChanged: agent => toolScope.apply(agent),
491
498
  });
492
499
  // The first bind (start) and every adoption tail bind through the core
493
500
  // feed, which runs the DSH binding-events hooks below.
@@ -538,6 +545,7 @@ export function attachDshExtensions(core, ctx, initialNative, options) {
538
545
  seedActivity: options.seedActivity,
539
546
  seedContextOccupancy: options.seedContextOccupancy,
540
547
  seedTeam: options.seedTeam,
548
+ onBind: agent => toolScope.apply(agent),
541
549
  inputConvergence: core.inputConvergence,
542
550
  modelSelection,
543
551
  modelActions,
@@ -1,5 +1,5 @@
1
1
  import type { AgentSession } from '../../agent/session.js';
2
- import type { ChannelState, ComposerImageRef } from './types.js';
2
+ import type { AttachedContext, ChannelState, ComposerImageRef } from './types.js';
3
3
  export interface InputConvergence {
4
4
  cancelInFlight: boolean;
5
5
  interruptSeq: number;
@@ -29,7 +29,7 @@ export declare function createInputActions(getState: () => Pick<ChannelState, 'a
29
29
  assertActive(): void;
30
30
  }, input: InputConvergence, composer: {
31
31
  includeLegacyImageRefs(text: string, images: readonly ComposerImageRef[]): readonly ComposerImageRef[];
32
- }, dispatchUserText: (text: string, placement: 'steer' | 'followup', images?: readonly ComposerImageRef[]) => void, runLocalCommand: (command: string, includeInContext: boolean) => Promise<void>,
32
+ }, dispatchUserText: (text: string, placement: 'steer' | 'followup', images?: readonly ComposerImageRef[], attach?: never, contexts?: readonly AttachedContext[]) => void, runLocalCommand: (command: string, includeInContext: boolean) => Promise<void>,
33
33
  /** Move the used session to the front of the `/resume` MRU (DSH session
34
34
  * history); a backend whose sessions that list cannot open passes a no-op. */
35
35
  touch?: (sessionId: string) => void): Pick<ChannelState, 'submit' | 'steer' | 'removePending' | 'cancel' | 'interruptAndDeliver' | 'interruptAndDock' | 'deliverDocked' | 'swapDockedForDraft' | 'holdInputs'>;
@@ -1 +1 @@
1
- {"version":3,"file":"input-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/input-actions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,wBAAwB,CAAA;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAsC,MAAM,YAAY,CAAA;AAEpG,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,OAAO,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB;;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AM,KAAK,IAAmB,GAChD,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,OAAO,GAAG,eAAe,GAAG,QAAQ,GAAG,qBAAqB,GAAG,kBAAkB,GAAG,eAAe,GAAG,oBAAoB,GAAG,YAAY,CAAC,CAiY1K"}
@@ -267,7 +267,7 @@ touch = touchSession) {
267
267
  state.emit();
268
268
  for (const entry of ready) {
269
269
  touch(state.agentId);
270
- dispatchUserText(entry.text, 'followup', entry.images);
270
+ dispatchUserText(entry.text, 'followup', entry.images, undefined, entry.contexts);
271
271
  }
272
272
  return ready.length;
273
273
  },
@@ -297,6 +297,10 @@ touch = touchSession) {
297
297
  // when that row was (its own session ended), so `/new` keeps it too.
298
298
  const orphaned = state.pending[index].orphaned === true;
299
299
  // A docked retract is purely local on every backend (see removePending).
300
+ // The swap row carries the DRAFT's text, so it must not inherit the
301
+ // retracted row's contexts: the caller re-stages those into the composer
302
+ // (PromptInput's restageContexts), and keeping a copy here would send the
303
+ // same panel body with this draft's later dock delivery.
300
304
  state.pending = [
301
305
  ...state.pending.filter(item => item.id !== id),
302
306
  {
@@ -311,19 +315,36 @@ touch = touchSession) {
311
315
  state.emit();
312
316
  return true;
313
317
  },
314
- holdInputs(texts) {
318
+ holdInputs(inputs) {
315
319
  owner.assertActive();
316
320
  const state = getState();
317
321
  // Local ids like the swap's: no backend copy exists, so no inbox event
318
322
  // can match these rows and no interrupt receipt covers them.
319
- const held = texts.filter(text => text.trim() !== '').map((text) => ({
320
- id: `dock-held-${randomUUID()}`, text, images: [], placement: 'followup', docked: true, orphaned: true,
323
+ const held = inputs
324
+ .map(input => typeof input === 'string' ? { text: input } : input)
325
+ .filter(input => input.text.trim() !== '')
326
+ .map((input) => ({
327
+ id: `dock-held-${randomUUID()}`,
328
+ text: input.text,
329
+ images: [...(input.images ?? [])],
330
+ ...(input.contexts === undefined || input.contexts.length === 0 ? {} : { contexts: [...input.contexts] }),
331
+ placement: 'followup',
332
+ docked: true,
333
+ orphaned: true,
321
334
  }));
322
335
  if (held.length === 0)
323
336
  return 0;
324
337
  state.pending = [...state.pending, ...held];
325
- state.emit();
326
- state.notify(t('input-orphans-held', { count: held.length }), { color: 'warning', timeoutMs: 8000 });
338
+ // The rows are on the pending list now: a listener throwing out of the
339
+ // emit (or a disposed owner in notify) must not read as "nothing was
340
+ // held", or the caller releases the claim and another pass holds the
341
+ // same inputs a second time.
342
+ try {
343
+ state.emit();
344
+ state.notify(t('input-orphans-held', { count: held.length }), { color: 'warning', timeoutMs: 8000 });
345
+ }
346
+ catch {
347
+ }
327
348
  return held.length;
328
349
  },
329
350
  interruptAndDeliver(inputs) {
@@ -332,8 +353,8 @@ touch = touchSession) {
332
353
  const session = getSession();
333
354
  const queued = inputs
334
355
  .map(input => typeof input === 'string'
335
- ? { text: input.trim(), images: [] }
336
- : { text: input.text.trim(), images: [...(input.images ?? [])] })
356
+ ? { text: input.trim(), images: [], contexts: undefined }
357
+ : { text: input.text.trim(), images: [...(input.images ?? [])], contexts: undefined })
337
358
  .filter(input => input.text !== '');
338
359
  if (queued.length === 0)
339
360
  return 0;
@@ -374,8 +395,11 @@ touch = touchSession) {
374
395
  touch(state.agentId);
375
396
  // Same tui/input decision pass as a typed submit: Ctrl+Enter must
376
397
  // not bypass a plugin's cancel/transform policy, and re-queued
377
- // texts keep submission order through the one FIFO chain.
378
- dispatchUserText(entry.text, 'followup', entry.images);
398
+ // texts keep submission order through the one FIFO chain. A docked
399
+ // row carries the "send to Chat" contexts its original submission
400
+ // did, and their chips are gone: forward them or the model loses
401
+ // that context.
402
+ dispatchUserText(entry.text, 'followup', entry.images, undefined, entry.contexts);
379
403
  }
380
404
  };
381
405
  // Let cancel finish its synchronous inbox bookkeeping before waking.
@@ -5,7 +5,7 @@ import type { ChannelHost } from './channel-host.js';
5
5
  import type { LocalImageStore } from './core/local-images.js';
6
6
  import type { ChannelOwner } from './owner.js';
7
7
  import type { AttachedContext, ChannelSelection, SelectionAttachment } from '../../adapter/ports/channel-view.js';
8
- import type { ChannelImageBlock, ChannelState, ComposerImageRef, MentionAttachments, MentionFs, PendingMessage, StagedImageInput } from './types.js';
8
+ import type { ChannelImageBlock, ChannelState, ComposerImageRef, MentionAttachments, MentionFs, PendingMessage, PendingTrackInput, StagedImageInput } from './types.js';
9
9
  /** One submission's enqueue-time world: the session it was typed in, the
10
10
  * services that resolve its references, and the capabilities live then. */
11
11
  export interface UserTextOrigin {
@@ -34,11 +34,7 @@ export interface UserTextOrigin {
34
34
  /** Input FIFO, staged attachments and decision notice timers share one lifetime. */
35
35
  export declare function createInputDelivery(ctx: ChannelHost, owner: ChannelOwner, binding: {
36
36
  readonly session: AgentSession;
37
- }, state: () => Pick<ChannelState, 'cwd' | 'workingDirectory' | 'agentId' | 'agentBindingGeneration'>, notify: ChannelState['notify'], trackPending: (message: {
38
- id: string;
39
- text: string;
40
- images?: readonly ComposerImageRef[];
41
- }, placement: PendingMessage['placement']) => void, untrackPending: (id: string, hold?: boolean) => void, composer: ComposerImages, selection: () => ChannelSelection | undefined, rememberSelection: (messageId: string, info: SelectionAttachment) => void,
37
+ }, state: () => Pick<ChannelState, 'cwd' | 'workingDirectory' | 'agentId' | 'agentBindingGeneration'>, notify: ChannelState['notify'], trackPending: (message: PendingTrackInput, placement: PendingMessage['placement']) => void, untrackPending: (id: string, hold?: boolean) => void, composer: ComposerImages, selection: () => ChannelSelection | undefined, rememberSelection: (messageId: string, info: SelectionAttachment) => void,
42
38
  /** The fs surface to use when the host mounts no `fs` service (a non-DSH
43
39
  * composition reads the local disk); absent = no fallback. */
44
40
  fallbackFs?: () => MentionFs | undefined,
@@ -52,7 +48,7 @@ localImages?: () => LocalImageStore | undefined,
52
48
  * simply carries no contexts.
53
49
  */
54
50
  consumeAttachedContexts?: () => readonly AttachedContext[]): {
55
- dispatchUserText: (text: string, placement: PendingMessage["placement"], images?: readonly ComposerImageRef[], attach?: UserMessage) => void;
51
+ dispatchUserText: (text: string, placement: PendingMessage["placement"], images?: readonly ComposerImageRef[], attach?: UserMessage, contexts?: readonly AttachedContext[]) => void;
56
52
  /** Inputs dispatched so far, and whether any is still in the FIFO (a
57
53
  * parked decision, an `@` read, an IDE-selection read). */
58
54
  activity: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"input-delivery.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/input-delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG1D,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAA;AAM7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACjH,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,gBAAgB,EACjB,MAAM,YAAY,CAAA;AAEnB;4EAC4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB;uEACmE;IACnE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,EAAE,EAAE,SAAS,GAAG,SAAS,CAAA;IAClC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACpD;iEAC6D;IAC7D,QAAQ,CAAC,WAAW,CAAC,EAAE,eA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AAE,OAAO,KAAK,IAAI,EACpD,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,MAAM,gBAAgB,GAAG,SAAS,EAC7C,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,KAAK,IAAI;AACzE;+DAC+D;AAC/D,UAAU,CAAC,EAAE,MAAM,SAAS,GAAG,SAAS;AACxC;8EAC8E;AAC9E,WAAW,CAAC,EAAE,MAAM,eAAe,GAAG,SAAS;AAC/C;;;;;GAKG;AACH,uBAAuB,CAAC,EAAE,MAAM,SAAS,eAAe,EAAE;6BAiVjD,MAAM,aACD,cAAc,CAAC,WAAW,CAAC,WAC9B,SAAS,gBAAgB,EAAE,WAC1B,WAAW,aACT,SAAS,eAAe,EAAE,KACpC,IAAI;IA0CL;gEAC4D;oBAC9C;QAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;4BAlB9F,MAAM,aACD,cAAc,CAAC,WAAW,CAAC,WAC9B,SAAS,gBAAgB,EAAE,WAC1B,WAAW,KACnB,IAAI;iCAxV6B,SAAS,WAAW,EAAE,KAAG,WAAW,EAAE;kCAarC,MAAM,KAAG,IAAI;0BAgMrB,CAAC,QAAQ,MAAM,WAAW,OAAO,CAAC,CAAC,CAAC,WAAW,cAAc,KAAG,OAAO,CAAC,CAAC,CAAC;6BA+IzE,IAAI;wBAoBZ,gBAAgB,KAAG,OAAO,CAAC,MAAM,CAAC;wBACpC,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;;EAGzE"}
@@ -3,7 +3,7 @@ import { t } from '../../i18n.js';
3
3
  import { logForDebugging } from '../../utils/debug.js';
4
4
  import { firstStaleComposerToken, formatMissingReference, orderedComposerImages, } from './composer-images.js';
5
5
  import { expandComposerMentions } from './composer-mentions.js';
6
- import { appendAttachedContextBlocks } from './attached-context.js';
6
+ import { appendAttachedContextBlocks, mergeAttachedContexts } from './attached-context.js';
7
7
  import { normalizeInputDecision } from './decisions.js';
8
8
  import { attachIdeSelection } from './ide-selection.js';
9
9
  import { mentionAttachments, mentionFs } from './mentions.js';
@@ -163,7 +163,7 @@ consumeAttachedContexts) {
163
163
  // Track BEFORE the submit: a synchronous throw inside it rolls the
164
164
  // preview back; otherwise the backend's pending changes retire it once
165
165
  // the message is claimed or discarded.
166
- trackPending({ id: message.id, text, images }, placement);
166
+ trackPending({ id: message.id, text, images, contexts: origin.attachedContexts }, placement);
167
167
  try {
168
168
  // The message id IS the clientMessageId every ledger above keys on; the
169
169
  // DSH session delivers this exact message (steer/followup).
@@ -184,7 +184,9 @@ consumeAttachedContexts) {
184
184
  if (!result.accepted) {
185
185
  if (attach !== undefined)
186
186
  attachedByMessageId.delete(message.id);
187
- const hold = origin.session.status === 'disposed';
187
+ // A backend that is certain it never ran the input asks for it back
188
+ // (`dropped`), like an ended session: keep the text as a dock row.
189
+ const hold = result.dropped === true || origin.session.status === 'disposed';
188
190
  untrackPending(message.id, hold);
189
191
  // A refusal with no reason is still a refusal: say so, or the send
190
192
  // looks successful while nothing was queued.
@@ -355,8 +357,15 @@ consumeAttachedContexts) {
355
357
  notify(t('send-failed', { err: message }), { color: 'error' });
356
358
  }
357
359
  };
358
- const dispatchUserText = (text, placement, images = [], attach) => {
359
- const origin = captureOrigin();
360
+ const dispatchUserText = (text, placement, images = [], attach, contexts) => {
361
+ const captured = captureOrigin();
362
+ // A dock re-send carries the contexts the row saved: the live chips were
363
+ // consumed by the submission that was refused (#1651). `captureOrigin`
364
+ // already took whatever the user staged since, so merge — never replace —
365
+ // or those chips would be neither sent nor kept.
366
+ const origin = contexts === undefined || contexts.length === 0
367
+ ? captured
368
+ : { ...captured, attachedContexts: mergeAttachedContexts(contexts, captured.attachedContexts) };
360
369
  const capturedImages = composer.captureDraftImages(text, images);
361
370
  dispatched += 1;
362
371
  inFlight.push(text);
@@ -1,7 +1,8 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import { type LlmModelInfo } from '@deepseek-ai/dsh-llm';
3
- import type { Agent, ModelSelectionRef } from '@deepseek-ai/dsh-agent';
3
+ import type { Agent } from '@deepseek-ai/dsh-agent';
4
4
  import { type CommandCompletionNode } from '../../commands.js';
5
+ import type { ModelSelectionRef } from './model-selection.js';
5
6
  import type { DshChannelBinding } from './binding.js';
6
7
  import type { ChannelOwner } from './owner.js';
7
8
  import type { ChannelState, EffortOption, PresetOption } from './types.js';
@@ -21,6 +22,8 @@ export declare function createModelActions(ctx: Context, state: Pick<ChannelStat
21
22
  /** Re-check the context-low warning after a refreshed route metadata
22
23
  * answer carries a newer contextWindow than the session started with. */
23
24
  checkContextWarning(): void;
25
+ /** Re-apply the preset's tool carve-out after an in-place recomposition. */
26
+ onPresetChanged?(agent: Agent): void;
24
27
  }): {
25
28
  selection: ModelSelectionRef;
26
29
  applyPreferredEffort: (preserveSessionEffort?: boolean) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"model-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/model-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAOpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE1E,KAAK,OAAO,GAAG,iBAAiB,CAAA;AAEhC;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