@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.
- package/README.md +35 -10
- package/bin/dsh-tui.js +46 -3
- package/guide/dsh-tui-guide/codex-backend.en.md +2 -2
- package/guide/dsh-tui-guide/codex-backend.md +2 -2
- package/guide/dsh-tui-guide/configuration.en.md +7 -2
- package/guide/dsh-tui-guide/configuration.md +7 -2
- package/guide/dsh-tui-guide/getting-started.en.md +168 -4
- package/guide/dsh-tui-guide/getting-started.md +121 -14
- package/guide/dsh-tui-guide/interaction.en.md +11 -10
- package/guide/dsh-tui-guide/interaction.md +5 -4
- package/guide/dsh-tui-guide/user-guide.en.md +6 -5
- package/guide/dsh-tui-guide/user-guide.md +6 -5
- package/lib/settings.json +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +10 -7
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +28 -5
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +12 -5
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/agent/session.d.ts +5 -0
- package/lib/types/agent/session.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/core.d.ts +2 -2
- package/lib/types/backends/claude/translate/core.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/core.js +10 -6
- package/lib/types/backends/codex/session/commands.d.ts +2 -0
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +8 -4
- package/lib/types/backends/codex/session/input.d.ts +11 -7
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +68 -15
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +2 -3
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +78 -10
- package/lib/types/channel/questions.d.ts +19 -3
- package/lib/types/channel/questions.d.ts.map +1 -1
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +8 -4
- package/lib/types/channel/subagent-failure.d.ts +49 -0
- package/lib/types/channel/subagent-failure.d.ts.map +1 -0
- package/lib/types/channel/subagent-failure.js +59 -0
- package/lib/types/channel/transcript.d.ts +17 -0
- package/lib/types/channel/transcript.d.ts.map +1 -1
- package/lib/types/channel/transcript.js +35 -0
- package/lib/types/commands.js +1 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +11 -7
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +61 -6
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +7 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +5 -2
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -8
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +7 -4
- package/lib/types/components/questions/PlanReviewPanel.d.ts +3 -6
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/revealScope.d.ts +15 -0
- package/lib/types/components/revealScope.d.ts.map +1 -0
- package/lib/types/components/revealScope.js +17 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +34 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +108 -7
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +1 -1
- package/lib/types/components/smoothReveal.d.ts +36 -6
- package/lib/types/components/smoothReveal.d.ts.map +1 -1
- package/lib/types/components/smoothReveal.js +92 -21
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +4 -14
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +26 -17
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/session.js +12 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +6 -1
- package/lib/types/dsh-adapter/channel/attached-context.d.ts +15 -2
- package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/attached-context.js +26 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +43 -2
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +2 -6
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +7 -1
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +2 -6
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +3 -26
- package/lib/types/dsh-adapter/channel/emitter.js +1 -1
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +8 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +34 -10
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +3 -7
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +26 -9
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +27 -2
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-selection.js +81 -37
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +6 -2
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +8 -4
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +6 -3
- package/lib/types/dsh-adapter/channel/transcript.d.ts +3 -2
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +13 -4
- package/lib/types/dsh-adapter/channel/types.d.ts +11 -2
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.d.ts +26 -3
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +44 -5
- package/lib/types/dsh-adapter/fresh-agent.d.ts +1 -1
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -1
- package/lib/types/dsh-adapter/fresh-agent.js +60 -11
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +60 -11
- package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-contract.js +4 -2
- package/lib/types/dsh-adapter/host-dsh.d.ts +0 -8
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-dsh.js +27 -6
- package/lib/types/dsh-adapter/host-entry.js +4 -0
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +14 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +143 -44
- package/lib/types/dsh-adapter/presets.d.ts +38 -11
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +46 -17
- package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
- package/lib/types/dsh-adapter/process-exit.js +1 -1
- package/lib/types/dsh-adapter/questions.d.ts +3 -4
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +1 -1
- package/lib/types/dsh-adapter/session-list-metadata.js +2 -2
- package/lib/types/dsh-adapter/subagents.d.ts +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +22 -1
- package/lib/types/dsh-adapter/team-mode.d.ts +17 -10
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
- package/lib/types/dsh-adapter/team-mode.js +19 -12
- package/lib/types/dsh-adapter/tool-scope.d.ts +24 -0
- package/lib/types/dsh-adapter/tool-scope.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tool-scope.js +127 -0
- package/lib/types/dsh-adapter/types.d.ts +2 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/heldInputs.d.ts +55 -16
- package/lib/types/heldInputs.d.ts.map +1 -1
- package/lib/types/heldInputs.js +277 -41
- package/lib/types/i18n.d.ts +227 -11
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +60 -5
- package/lib/types/ink/components/App.d.ts +2 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +8 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -1
- package/lib/types/ink/events/input-event.js +7 -6
- package/lib/types/ink/hit-test.d.ts +2 -0
- package/lib/types/ink/hit-test.d.ts.map +1 -1
- package/lib/types/ink/hit-test.js +10 -0
- package/lib/types/ink/hooks/use-program-status.d.ts +1 -1
- package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-program-status.js +3 -2
- package/lib/types/ink/ink.d.ts +1 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +5 -2
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +25 -0
- package/lib/types/ink/terminal.d.ts +13 -2
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +29 -5
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +43 -2
- package/lib/types/screens/SessionSupervisor.d.ts +3 -6
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +5 -8
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +1 -2
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +2 -2
- package/lib/types/screens/sessionSupervisor/model.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +1 -1
- package/lib/types/sessionMounts.d.ts +12 -5
- package/lib/types/sessionMounts.d.ts.map +1 -1
- package/lib/types/sessionMounts.js +33 -6
- package/lib/types/update.d.ts +412 -20
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +2094 -193
- package/lib/types/updateHost.d.ts +198 -0
- package/lib/types/updateHost.d.ts.map +1 -0
- package/lib/types/updateHost.js +608 -0
- package/lib/types/utils/processName.d.ts +16 -0
- package/lib/types/utils/processName.d.ts.map +1 -0
- package/lib/types/utils/processName.js +27 -0
- package/package.json +111 -108
- package/tui-profile/feed/README.md +1 -1
- package/tui-profile/feed/first-party.json +1 -1
|
@@ -27,11 +27,20 @@ export function createModelActions(ctx, state, deps) {
|
|
|
27
27
|
const effortWarm = { tried: false };
|
|
28
28
|
const modelNodeCache = { nodes: undefined, load: undefined, generation: 0 };
|
|
29
29
|
const presetOptionCache = { lang: undefined, list: undefined, load: undefined };
|
|
30
|
-
|
|
30
|
+
// Metadata-only refreshes also run during adoption, before selection binds.
|
|
31
|
+
const captureRoute = () => ({
|
|
31
32
|
binding: deps.binding.capture(), provider: state.provider, model: state.model, operation: ++effortOperation,
|
|
32
33
|
});
|
|
33
|
-
const
|
|
34
|
+
const captureEffort = () => ({ ...captureRoute(), selected: selection.current });
|
|
35
|
+
const effortRouteCurrent = (capture) => owner.current() && deps.binding.isCurrent(capture.binding) && capture.binding.session?.status !== 'disposed' &&
|
|
34
36
|
state.provider === capture.provider && state.model === capture.model && effortOperation === capture.operation;
|
|
37
|
+
const effortCurrent = (capture) => {
|
|
38
|
+
if (!effortRouteCurrent(capture))
|
|
39
|
+
return false;
|
|
40
|
+
const selected = selection.current;
|
|
41
|
+
return selected?.provider === capture.selected?.provider && selected?.model === capture.selected?.model &&
|
|
42
|
+
selected?.reasoningEffort === capture.selected?.reasoningEffort;
|
|
43
|
+
};
|
|
35
44
|
/** Route-level metadata shared by every resolveModelInfo consumer. The
|
|
36
45
|
* context window follows the route, not the binding: a resume rebuilds
|
|
37
46
|
* the binding (effortCurrent goes false) while the capacity answer for
|
|
@@ -88,10 +97,16 @@ export function createModelActions(ctx, state, deps) {
|
|
|
88
97
|
try {
|
|
89
98
|
const info = await llmRuntime.resolveModelInfo(capture.provider, capture.model);
|
|
90
99
|
applyRouteMetadata(capture, info);
|
|
91
|
-
if (!
|
|
100
|
+
if (!effortRouteCurrent(capture))
|
|
92
101
|
return 'stale';
|
|
93
102
|
const efforts = tiersOf(info.reasoning);
|
|
94
103
|
state.effortLevels = efforts.map(level => level.id);
|
|
104
|
+
// An effort-only external choice invalidates a pin commit, not this
|
|
105
|
+
// route's still-valid tier metadata (including the initial bind read).
|
|
106
|
+
if (!effortCurrent(capture)) {
|
|
107
|
+
state.emit();
|
|
108
|
+
return 'stale';
|
|
109
|
+
}
|
|
95
110
|
return { efforts, defaultEffort: typeof info.reasoning === 'object' && info.reasoning !== null ? info.reasoning.defaultEffort : undefined };
|
|
96
111
|
}
|
|
97
112
|
catch (error) {
|
|
@@ -169,13 +184,13 @@ export function createModelActions(ctx, state, deps) {
|
|
|
169
184
|
const refreshEffortLevels = () => {
|
|
170
185
|
if (llmRuntime === undefined || typeof llmRuntime.resolveModelInfo !== 'function')
|
|
171
186
|
return;
|
|
172
|
-
const capture =
|
|
187
|
+
const capture = captureRoute();
|
|
173
188
|
const generation = ++effortLevelsGeneration;
|
|
174
189
|
void llmRuntime.resolveModelInfo(capture.provider, capture.model).then(info => {
|
|
175
190
|
if (generation !== effortLevelsGeneration)
|
|
176
191
|
return;
|
|
177
192
|
applyRouteMetadata(capture, info);
|
|
178
|
-
if (!
|
|
193
|
+
if (!effortRouteCurrent(capture))
|
|
179
194
|
return;
|
|
180
195
|
state.effortLevels = tiersOf(info.reasoning).map(level => level.id);
|
|
181
196
|
state.emit();
|
|
@@ -183,13 +198,15 @@ export function createModelActions(ctx, state, deps) {
|
|
|
183
198
|
};
|
|
184
199
|
const applyEffort = (effort, capture) => {
|
|
185
200
|
if (!effortCurrent(capture))
|
|
186
|
-
return;
|
|
187
|
-
|
|
201
|
+
return false;
|
|
202
|
+
const selected = { provider: capture.provider, model: capture.model, reasoningEffort: ReasoningEffortId(effort.id) };
|
|
203
|
+
selection.current = selected;
|
|
188
204
|
preferredEffort = effort.id;
|
|
189
205
|
state.reasoningEffort = effort.id;
|
|
190
206
|
writeEffortPref(effort.id);
|
|
191
207
|
notify(t('effort-switched', { name: effort.name }));
|
|
192
208
|
state.emit();
|
|
209
|
+
return effortCurrent({ ...capture, selected });
|
|
193
210
|
};
|
|
194
211
|
const listEfforts = async (route) => {
|
|
195
212
|
if (route !== undefined) {
|
|
@@ -249,8 +266,7 @@ export function createModelActions(ctx, state, deps) {
|
|
|
249
266
|
notify(t('effort-invalid', { id, ids: resolved.efforts.map(effort => effort.id).join(', ') }), { color: 'warning' });
|
|
250
267
|
return false;
|
|
251
268
|
}
|
|
252
|
-
applyEffort(found, capture);
|
|
253
|
-
return effortCurrent(capture);
|
|
269
|
+
return applyEffort(found, capture);
|
|
254
270
|
};
|
|
255
271
|
/**
|
|
256
272
|
* Re-seat the future-sessions default reasoning effort. `id` is the settings
|
|
@@ -396,6 +412,7 @@ export function createModelActions(ctx, state, deps) {
|
|
|
396
412
|
return false;
|
|
397
413
|
state.agentPreset = preset.id;
|
|
398
414
|
state.emit();
|
|
415
|
+
deps.onPresetChanged?.(targetAgent);
|
|
399
416
|
if (!current())
|
|
400
417
|
return false;
|
|
401
418
|
if (!writePresetPref(target.id)) {
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import type { Agent,
|
|
2
|
+
import type { Agent, ModelSelection } from '@deepseek-ai/dsh-agent';
|
|
3
3
|
import { type ChannelOwner } from './owner.js';
|
|
4
|
+
/**
|
|
5
|
+
* The foreground selection facade. Modern hosts read the Agent-owned durable
|
|
6
|
+
* choice live; only legacy hosts keep a mutable route locally. `assembled`
|
|
7
|
+
* captures the selection the current step entered prompt assembly with.
|
|
8
|
+
*/
|
|
9
|
+
export interface ModelSelectionRef {
|
|
10
|
+
/** Model selected for the next step that enters prompt assembly. */
|
|
11
|
+
current: ModelSelection | undefined;
|
|
12
|
+
/** Selection captured when the current step entered prompt assembly. */
|
|
13
|
+
assembled: ModelSelection | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The upstream seam that replaced the mutable ref: `current()` folds the
|
|
17
|
+
* session's recorded selection over the last request and the creation
|
|
18
|
+
* options, `select()` records a new one durably. Absent on hosts before
|
|
19
|
+
* 0.2.2, where the channel drives the same pipeline through its own
|
|
20
|
+
* waterfalls; probed by shape so older installs keep working.
|
|
21
|
+
*/
|
|
22
|
+
interface ModelSeam {
|
|
23
|
+
current(): Readonly<ModelSelection> | undefined;
|
|
24
|
+
select(selection: Readonly<ModelSelection>): void;
|
|
25
|
+
}
|
|
26
|
+
/** The public durable seam, absent on legacy hosts. */
|
|
27
|
+
export declare function modelSeamOf(agent: Agent): ModelSeam | undefined;
|
|
4
28
|
/** Routing belongs to the live agent, including turns running while parked.
|
|
5
29
|
* The foreground facade follows the binding; each waterfall captures its own
|
|
6
30
|
* agent's ref so a later binding can never supply its route. */
|
|
@@ -12,6 +36,7 @@ export declare function createModelSelection(ctx: Context, deps: {
|
|
|
12
36
|
bind: (agent: Agent, route: {
|
|
13
37
|
provider: string;
|
|
14
38
|
model: string;
|
|
15
|
-
}) =>
|
|
39
|
+
}) => boolean;
|
|
16
40
|
};
|
|
41
|
+
export {};
|
|
17
42
|
//# sourceMappingURL=model-selection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-selection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/model-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"model-selection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/model-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAGnE,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAElE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,OAAO,EAAE,cAAc,GAAG,SAAS,CAAA;IACnC,wEAAwE;IACxE,SAAS,EAAE,cAAc,GAAG,SAAS,CAAA;CACtC;AAED;;;;;;GAMG;AACH,UAAU,SAAS;IACjB,OAAO,IAAI,QAAQ,CAAC,cAAc,CAAC,GAAG,SAAS,CAAA;IAC/C,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA;CAClD;AAED,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAK/D;AAOD;;gEAEgE;AAChE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IACvD,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,IAAI,KAAK,CAAA;CACf;;kBAgCsB,KAAK,SAAS;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAG,OAAO;EA8FjF"}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { boundContextSummary, createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
|
|
2
3
|
import { createChannelOwner } from './owner.js';
|
|
4
|
+
/** The public durable seam, absent on legacy hosts. */
|
|
5
|
+
export function modelSeamOf(agent) {
|
|
6
|
+
const model = agent.model;
|
|
7
|
+
return typeof model?.current === 'function' && typeof model.select === 'function'
|
|
8
|
+
? model
|
|
9
|
+
: undefined;
|
|
10
|
+
}
|
|
11
|
+
function sameRoute(a, b) {
|
|
12
|
+
if (a === undefined || b === undefined)
|
|
13
|
+
return a === b;
|
|
14
|
+
return a.provider === b.provider && a.model === b.model && a.reasoningEffort === b.reasoningEffort;
|
|
15
|
+
}
|
|
3
16
|
/** Routing belongs to the live agent, including turns running while parked.
|
|
4
17
|
* The foreground facade follows the binding; each waterfall captures its own
|
|
5
18
|
* agent's ref so a later binding can never supply its route. */
|
|
@@ -9,33 +22,50 @@ export function createModelSelection(ctx, deps) {
|
|
|
9
22
|
const entry = entries.get(deps.agent());
|
|
10
23
|
if (entry === undefined)
|
|
11
24
|
throw new Error('dsh-tui: model selection has not been bound');
|
|
12
|
-
return entry
|
|
25
|
+
return entry;
|
|
26
|
+
};
|
|
27
|
+
/** Write the next step's route, through the durable seam when the host has one. */
|
|
28
|
+
const write = (entry, value) => {
|
|
29
|
+
if (entry.seam === undefined) {
|
|
30
|
+
entry.ref.current = value;
|
|
31
|
+
}
|
|
32
|
+
else if (value !== undefined && !sameRoute(value, entry.seam.current())) {
|
|
33
|
+
entry.seam.select(value);
|
|
34
|
+
}
|
|
13
35
|
};
|
|
14
36
|
const selection = {
|
|
15
|
-
get current() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
37
|
+
get current() {
|
|
38
|
+
const entry = foreground();
|
|
39
|
+
return entry.seam === undefined ? entry.ref.current : entry.seam.current();
|
|
40
|
+
},
|
|
41
|
+
set current(value) { write(foreground(), value); },
|
|
42
|
+
get assembled() { return foreground().ref.assembled; },
|
|
43
|
+
set assembled(value) { foreground().ref.assembled = value; },
|
|
19
44
|
};
|
|
20
45
|
deps.owner.own(ctx.on('agent/disposed', ({ agent }) => entries.get(agent)?.release()));
|
|
46
|
+
/** Bind without selecting; return whether the session owns its effort too. */
|
|
21
47
|
const bind = (agent, route) => {
|
|
22
48
|
deps.owner.assertActive();
|
|
23
|
-
|
|
24
|
-
return;
|
|
49
|
+
const seam = modelSeamOf(agent);
|
|
25
50
|
const recorded = agent.session.requestHeader?.()?.config;
|
|
51
|
+
const durable = seam !== undefined && (recorded !== undefined ||
|
|
52
|
+
snapshotLiveSessionEvents(agent.session).some(event => event.type === 'model/selection'));
|
|
53
|
+
if (entries.has(agent))
|
|
54
|
+
return durable;
|
|
26
55
|
const hasCreatedRoute = agent.options?.provider !== undefined && agent.options.model !== undefined;
|
|
27
56
|
// Seeded children can deliberately replace the inherited header's route.
|
|
28
57
|
// Restore a recorded pin only when the caller actually adopted that route.
|
|
29
58
|
const usesRecordedRoute = recorded?.provider === route.provider && recorded?.model === route.model;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
59
|
+
// The pre-0.2.2 seed: creation options plus the persisted request header.
|
|
60
|
+
const legacySeed = usesRecordedRoute && recorded?.reasoningEffort !== undefined
|
|
61
|
+
? { ...route, reasoningEffort: recorded.reasoningEffort }
|
|
62
|
+
: route.provider !== '' && route.model !== '' &&
|
|
63
|
+
(!hasCreatedRoute || (usesRecordedRoute &&
|
|
64
|
+
(route.provider !== agent.options.provider || route.model !== agent.options.model)))
|
|
65
|
+
? { ...route } : undefined;
|
|
66
|
+
const adopted = seam?.current();
|
|
67
|
+
const seed = adopted !== undefined ? { ...adopted } : legacySeed;
|
|
68
|
+
const ref = { current: seed, assembled: undefined };
|
|
39
69
|
const lifetime = createChannelOwner();
|
|
40
70
|
lifetime.bind(deps.owner.current);
|
|
41
71
|
let assemblyOperation = 0;
|
|
@@ -44,15 +74,21 @@ export function createModelSelection(ctx, deps) {
|
|
|
44
74
|
entries.delete(agent);
|
|
45
75
|
lifetime.dispose();
|
|
46
76
|
});
|
|
47
|
-
entries.set(agent, { ref, release });
|
|
77
|
+
entries.set(agent, { ref, seam, release });
|
|
78
|
+
// Only a host with no recorded route or creation options needs a seed.
|
|
79
|
+
if (seam !== undefined && adopted === undefined && seed !== undefined)
|
|
80
|
+
seam.select(seed);
|
|
48
81
|
const own = (dispose) => {
|
|
49
82
|
lifetime.own(dispose);
|
|
50
83
|
lifetime.assertActive();
|
|
51
84
|
};
|
|
52
85
|
try {
|
|
53
|
-
own(agent.ctx.on('system-prompt/assemble', async (_assembly,
|
|
86
|
+
own(agent.ctx.on('system-prompt/assemble', async (_assembly, context, next) => {
|
|
54
87
|
const operation = ++assemblyOperation;
|
|
55
|
-
|
|
88
|
+
// A step fixes its choice before asynchronous tool/prompt resolution.
|
|
89
|
+
// Diagnostics have no fixed step and inspect the current durable choice.
|
|
90
|
+
const selected = seam === undefined ? ref.current
|
|
91
|
+
: context.modelSelection ?? seam.current();
|
|
56
92
|
const assembled = await next();
|
|
57
93
|
if (!current())
|
|
58
94
|
return assembled;
|
|
@@ -63,32 +99,39 @@ export function createModelSelection(ctx, deps) {
|
|
|
63
99
|
return assembled;
|
|
64
100
|
return { ...assembled, variables: { ...assembled.variables, provider: selected.provider, model: selected.model } };
|
|
65
101
|
}));
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
...withoutInheritedEffort
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
102
|
+
// Modern hosts fix request routing upstream and reject rewrites here.
|
|
103
|
+
if (seam === undefined) {
|
|
104
|
+
own(agent.ctx.on('agent/request', async (_payload, next) => {
|
|
105
|
+
const resolved = await next();
|
|
106
|
+
if (!current())
|
|
107
|
+
return resolved;
|
|
108
|
+
const selected = ref.assembled;
|
|
109
|
+
if (selected === undefined)
|
|
110
|
+
return resolved;
|
|
111
|
+
const { reasoningEffort: _inheritedEffort, ...withoutInheritedEffort } = resolved;
|
|
112
|
+
return {
|
|
113
|
+
...withoutInheritedEffort,
|
|
114
|
+
provider: selected.provider,
|
|
115
|
+
model: selected.model,
|
|
116
|
+
...(selected.reasoningEffort === undefined ? {} : { reasoningEffort: selected.reasoningEffort }),
|
|
117
|
+
};
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
81
120
|
// Match upstream installModelSelection's admission-time provenance.
|
|
82
|
-
|
|
121
|
+
// Not every composition installs it, but one step must have at most one notice.
|
|
122
|
+
own(agent.ctx.on('agent/pre-step', async (payload, next) => {
|
|
123
|
+
const { agent: subject, messages, signal, step } = payload;
|
|
83
124
|
const decision = await next();
|
|
84
125
|
if (!current() || decision.kind === 'reject' || signal.aborted)
|
|
85
126
|
return decision;
|
|
86
127
|
if (decision.messages.length === 0 && (step === 1 || messages.length > 0))
|
|
87
128
|
return decision;
|
|
88
|
-
const selected = ref.assembled
|
|
129
|
+
const selected = seam === undefined ? ref.assembled
|
|
130
|
+
: payload.modelSelection;
|
|
89
131
|
const previous = subject.session.requestHeader()?.config;
|
|
90
132
|
if (selected === undefined || previous === undefined ||
|
|
91
|
-
(selected.provider === previous.provider && selected.model === previous.model)
|
|
133
|
+
(selected.provider === previous.provider && selected.model === previous.model) ||
|
|
134
|
+
decision.messages.some(message => message.source?.kind === 'model-selection'))
|
|
92
135
|
return decision;
|
|
93
136
|
const from = selected.provider === previous.provider ? previous.model : `${previous.provider}/${previous.model}`;
|
|
94
137
|
const to = selected.provider === previous.provider ? selected.model : `${selected.provider}/${selected.model}`;
|
|
@@ -106,6 +149,7 @@ export function createModelSelection(ctx, deps) {
|
|
|
106
149
|
catch { /* preserve the registration failure */ }
|
|
107
150
|
throw error;
|
|
108
151
|
}
|
|
152
|
+
return durable;
|
|
109
153
|
};
|
|
110
154
|
return { selection, bind };
|
|
111
155
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import type { ModelSelectionRef } from '
|
|
2
|
+
import type { ModelSelectionRef } from './model-selection.js';
|
|
3
3
|
import type { createChannelBinding } from './binding.js';
|
|
4
4
|
import type { ChannelOwner } from './owner.js';
|
|
5
5
|
import type { ChannelState } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-switch.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/model-switch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"model-switch.d.ts","sourceRoot":"","sources":["../../../../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session-rewind.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"session-rewind.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-rewind.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAavE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEvD,KAAK,OAAO,GAAG,iBAAiB,CAAA;AAChC,KAAK,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AAgB/E,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC,CAAA;IAC7F,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,gBAAgB,CAAC,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,YAAY,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,MAAM,CAAA;IAC9K,qBAAqB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1F,IAEa,KAAK,OAAO,EAAE,OAAM,MAAM,GAAG,IAAW,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsHhF"}
|
|
@@ -10,6 +10,7 @@ import { composePreset, runningPresetOf } from '../presets.js';
|
|
|
10
10
|
import { holdsNoConversation, latestPolicyFacts, replayPolicyFacts } from '../session-seed.js';
|
|
11
11
|
import { attachSessionToWorkspace } from '../workspace.js';
|
|
12
12
|
import { reserveNewSession } from '../../sessionMounts.js';
|
|
13
|
+
import { modelSeamOf } from './model-selection.js';
|
|
13
14
|
async function waitForTurnEnd(session, fromSeq, timeoutMs) {
|
|
14
15
|
const deadline = Date.now() + timeoutMs;
|
|
15
16
|
while (Date.now() < deadline) {
|
|
@@ -79,12 +80,14 @@ export function createRewindToAction(ctx, state, deps) {
|
|
|
79
80
|
// beat.
|
|
80
81
|
const { reservation } = await reserveNewSession(String(childId));
|
|
81
82
|
let candidate;
|
|
83
|
+
// A branch keeps the live explicit pin, not an adapter-default UI readout.
|
|
84
|
+
const route = { ...(modelSeamOf(deps.binding.agent)?.current() ?? { provider: state.provider, model: state.model }) };
|
|
82
85
|
try {
|
|
83
86
|
const create = () => cutHoldsNoConversation
|
|
84
87
|
? createFreshAgent(ctx, agents, {
|
|
85
88
|
sessionId: childId,
|
|
86
89
|
meta: { cwd: state.cwd, ...(composed.agentPreset === undefined ? {} : { agentPreset: composed.agentPreset }) },
|
|
87
|
-
agentOptions:
|
|
90
|
+
agentOptions: route,
|
|
88
91
|
setup: composed.setup,
|
|
89
92
|
})
|
|
90
93
|
: agents.create(liveSessionCreateOptions({
|
|
@@ -95,8 +98,9 @@ export function createRewindToAction(ctx, state, deps) {
|
|
|
95
98
|
cwd: state.cwd,
|
|
96
99
|
parentSession: source.id,
|
|
97
100
|
agentPreset: composed.agentPreset,
|
|
98
|
-
agentOptions:
|
|
101
|
+
agentOptions: route,
|
|
99
102
|
setup: async (agentCtx, agent) => {
|
|
103
|
+
modelSeamOf(agent)?.select(route);
|
|
100
104
|
agent.inbox.clear();
|
|
101
105
|
return composed.setup?.(agentCtx, agent);
|
|
102
106
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-tree-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-tree-actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"session-tree-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-tree-actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAa1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,KAAK,OAAO,GAAG,iBAAiB,CAAA;AAChC,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AAYnF,+GAA+G;AAC/G,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC,CAAA;IAC7F,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,gBAAgB,CAAC,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,YAAY,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,MAAM,CAAA;IAC9K,qBAAqB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CACnG,IAEa,WAAW,MAAM,EAAE,KAAK,MAAM,EAAE,OAAM,QAAQ,GAAG,MAAiB,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyI1G"}
|
|
@@ -10,6 +10,7 @@ import { composePreset, resolvePersistedPreset, runningPresetOf } from '../prese
|
|
|
10
10
|
import { holdsNoConversation, latestPolicyFacts, replayPolicyFacts } from '../session-seed.js';
|
|
11
11
|
import { attachSessionToWorkspace } from '../workspace.js';
|
|
12
12
|
import { reserveNewSession } from '../../sessionMounts.js';
|
|
13
|
+
import { modelSeamOf } from './model-selection.js';
|
|
13
14
|
import { forkTarget, rewindTarget, turnUserText } from '../sessionTree.js';
|
|
14
15
|
async function waitForTurnEnd(session, fromSeq, timeoutMs) {
|
|
15
16
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -100,12 +101,14 @@ export function createTreeRewindAction(ctx, state, deps) {
|
|
|
100
101
|
// the publisher only learns the id from the registry on its next beat.
|
|
101
102
|
const { reservation } = await reserveNewSession(String(childId));
|
|
102
103
|
let candidate;
|
|
104
|
+
// A branch keeps the live explicit pin, not an adapter-default UI readout.
|
|
105
|
+
const route = { ...(modelSeamOf(deps.binding.agent)?.current() ?? { provider: state.provider, model: state.model }) };
|
|
103
106
|
try {
|
|
104
107
|
const create = () => cutHoldsNoConversation
|
|
105
108
|
? createFreshAgent(ctx, agents, {
|
|
106
109
|
sessionId: childId,
|
|
107
110
|
meta: { cwd: sourceCwd, ...(composed.agentPreset === undefined ? {} : { agentPreset: composed.agentPreset }) },
|
|
108
|
-
agentOptions:
|
|
111
|
+
agentOptions: route,
|
|
109
112
|
setup: composed.setup,
|
|
110
113
|
})
|
|
111
114
|
: agents.create(liveSessionCreateOptions({
|
|
@@ -116,14 +119,15 @@ export function createTreeRewindAction(ctx, state, deps) {
|
|
|
116
119
|
cwd: sourceCwd,
|
|
117
120
|
parentSession: SessionId(sessionId),
|
|
118
121
|
agentPreset: composed.agentPreset,
|
|
119
|
-
agentOptions:
|
|
120
|
-
setup:
|
|
122
|
+
agentOptions: route,
|
|
123
|
+
setup: async (agentCtx, agent) => {
|
|
124
|
+
modelSeamOf(agent)?.select(route);
|
|
121
125
|
if (closeAfterCreate)
|
|
122
126
|
closeLiveForkTurn(agent.session, target.closeTurn);
|
|
123
127
|
if (mode === 'rewind')
|
|
124
128
|
agent.inbox.clear();
|
|
125
129
|
return composed.setup?.(agentCtx, agent);
|
|
126
|
-
}
|
|
130
|
+
},
|
|
127
131
|
}));
|
|
128
132
|
candidate = await deps.binding.prepare(adoption, async () => {
|
|
129
133
|
const handle = await create();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-host.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/settings-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAIvD,OAAO,KAAK,EAAE,qBAAqB,EAA8C,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AAiBpJ,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"settings-host.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/settings-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAIvD,OAAO,KAAK,EAAE,qBAAqB,EAA8C,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AAiBpJ,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,CAyG1H;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,YAAY,GAAE,MAAM,IAAsB,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,eAAe,GAAG,uBAAuB,GAAG,aAAa,CAAC,CA2VlM"}
|
|
@@ -32,15 +32,18 @@ export function webSettingsSections(ctx, namespaces) {
|
|
|
32
32
|
const ns = entry.options.id;
|
|
33
33
|
if (entry.fiber === undefined || !available.has(ns))
|
|
34
34
|
continue;
|
|
35
|
-
|
|
35
|
+
// Loader 1.1 retains the awaitable Fiber wrapper; its context still names
|
|
36
|
+
// the canonical owner, as on older Loaders that stored that owner directly.
|
|
37
|
+
const owner = concreteService(entry.fiber.ctx?.fiber ?? entry.fiber);
|
|
38
|
+
if (webOwner !== undefined && owner === concreteService(webOwner))
|
|
36
39
|
webNs = ns;
|
|
37
40
|
if (entry.fiber.runtime?.name === 'web-deepseek-api') {
|
|
38
41
|
apiNs = ns;
|
|
39
|
-
apiOwner =
|
|
42
|
+
apiOwner = owner;
|
|
40
43
|
}
|
|
41
44
|
if (entry.fiber.runtime?.name === 'web-search-deepseek') {
|
|
42
45
|
messagesNs = ns;
|
|
43
|
-
messagesOwner =
|
|
46
|
+
messagesOwner = owner;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
// This section is introduced together with live provider selection in rc.2.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SessionEvent } from '@deepseek-ai/dsh-session';
|
|
2
2
|
import type { ChatRow, ToolResultView, ToolViewPresenter } from './types.js';
|
|
3
|
-
import { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview, RESULT_PREVIEW_LIMIT } from '../../channel/transcript.js';
|
|
4
|
-
export { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview, RESULT_PREVIEW_LIMIT };
|
|
3
|
+
import { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview, previewIndented, RESULT_PREVIEW_LIMIT, trimLocalRows } from '../../channel/transcript.js';
|
|
4
|
+
export { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview, previewIndented, RESULT_PREVIEW_LIMIT, trimLocalRows };
|
|
5
5
|
/**
|
|
6
6
|
* Fold the oldest rows beyond the transcript window cap: drop each row's
|
|
7
7
|
* full-text fields (assistant/reasoning text, tool args/results) and keep
|
|
@@ -16,6 +16,7 @@ export declare function foldRows(rows: ChatRow[], cap: number, cursor?: {
|
|
|
16
16
|
rows: unknown;
|
|
17
17
|
index: number;
|
|
18
18
|
head?: unknown;
|
|
19
|
+
boundary?: unknown;
|
|
19
20
|
},
|
|
20
21
|
/** Rows the backend can restore (default: every foldable kind); any
|
|
21
22
|
* other row keeps its full text. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAG5D,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE5E,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAG5D,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE5E,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAI7J,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,CAAA;AAE1H;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,OAAO,EAAE,EACf,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;AAC7E;qCACqC;AACrC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,GACrC,MAAM,CAqDR;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,EAAE,KAAK,CAAC,EAAE,iBAAiB,GAAG,MAAM,CA8C5G;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,CA+B3E;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,CAAC,aAAa,CAAC,GAAG,MAAM,CAEzE;AAED,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKpD,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,GACxC,cAAc,GAAG,SAAS,CA4C5B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,aAAa,CAAC,GAAG,MAAM,CAIxE;AAED;;;;;sBAKsB;AACtB,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAWxE;AAED,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,CAAC,aAAa,CAAC,GAAG,IAAI,CAUxF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,YAAY,EAAE,CA2BnF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { toolResultPayload } from '../compat/messages.js';
|
|
2
2
|
import { t } from '../../i18n.js';
|
|
3
3
|
import { markChannelReadDirty } from '../../adapter/channel/read-view.js';
|
|
4
|
-
import { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview, RESULT_PREVIEW_LIMIT } from '../../channel/transcript.js';
|
|
4
|
+
import { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview, previewIndented, RESULT_PREVIEW_LIMIT, trimLocalRows } from '../../channel/transcript.js';
|
|
5
5
|
// Limits and the preview helper are backend-neutral (src/channel/transcript.ts);
|
|
6
6
|
// re-exported here for the existing importers.
|
|
7
|
-
export { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview, RESULT_PREVIEW_LIMIT };
|
|
7
|
+
export { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, MAX_ROWS, preview, previewIndented, RESULT_PREVIEW_LIMIT, trimLocalRows };
|
|
8
8
|
/**
|
|
9
9
|
* Fold the oldest rows beyond the transcript window cap: drop each row's
|
|
10
10
|
* full-text fields (assistant/reasoning text, tool args/results) and keep
|
|
@@ -32,7 +32,14 @@ restorable) {
|
|
|
32
32
|
// there was the O(rows) per-frame term of long-session streaming. Rows
|
|
33
33
|
// prepended ahead of the window (older history) shift every index: a new
|
|
34
34
|
// head restarts the pass.
|
|
35
|
-
|
|
35
|
+
let from = cursor === undefined ? 0 : cursor.rows === rows && cursor.head === rows[0] ? cursor.index : 0;
|
|
36
|
+
// A local-block splice can move rows under the cursor with or without
|
|
37
|
+
// changing the array length, so the old boundary row is the witness: if it
|
|
38
|
+
// moved, rescan from the head — otherwise the shifted rows stay unfolded
|
|
39
|
+
// forever. A quiet streaming frame keeps the same boundary and stays
|
|
40
|
+
// incremental. This must run for every shift, not only the shrunken ones.
|
|
41
|
+
if (cursor !== undefined && from > 0 && rows[from - 1] !== cursor.boundary)
|
|
42
|
+
from = 0;
|
|
36
43
|
if (cursor !== undefined) {
|
|
37
44
|
cursor.rows = rows;
|
|
38
45
|
cursor.head = rows[0];
|
|
@@ -66,8 +73,10 @@ restorable) {
|
|
|
66
73
|
markChannelReadDirty(row);
|
|
67
74
|
markChannelReadDirty(rows);
|
|
68
75
|
}
|
|
69
|
-
if (cursor !== undefined)
|
|
76
|
+
if (cursor !== undefined) {
|
|
70
77
|
cursor.index = excess;
|
|
78
|
+
cursor.boundary = rows[excess - 1];
|
|
79
|
+
}
|
|
71
80
|
return folded;
|
|
72
81
|
}
|
|
73
82
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChannelUi } from '../../adapter/ports/channel-ui.js';
|
|
2
|
-
import type { RawTrajEvent, ChatRow, ToolCallView, ToolResultView, NotificationItem, TodoPanelItem, PendingMessage, StagedImageAdjustment, TrajectorySource } from '../../adapter/ports/channel-view.js';
|
|
3
|
-
export type { ChatRow, ToolRow, ToolCallView, ToolFileDiff, ToolResultView, SubagentRow, JobGroupRow, JobRow, TokenUsage, TokenBucket, CostTokenBuckets, SessionCostByModel, SubagentCostEntry, NotificationItem, ChannelGoal, TodoPanelItem, LoadedContext, LoadedContextEntry, LoadedContextFile, LoadedContextSkill, LoadedContextTool, PendingMessage, SubagentControl, SubagentTranscriptView, JobControl, StagedImageInput, StagedImageAdjustment, StagedImageHandle, ComposerImageRef, ComposerSubmission, ExternalCommandOutcome, TranscriptImage, ResumeResult, EffortOption, PermissionPresetSnapshot, PermissionPresetAvailability, PermissionPresetOption, PermissionPresetCurrent, PresetOption, SkillInfo, CredentialStatus, AgentViewRow, AgentViewStatus, AgentViewDispatchResult, BackgroundResult, BackendModeOption, BackendChannelOption, TrajectorySource } from '../../adapter/ports/channel-view.js';
|
|
2
|
+
import type { AttachedContext, RawTrajEvent, ChatRow, ToolCallView, ToolResultView, NotificationItem, TodoPanelItem, PendingMessage, StagedImageAdjustment, ComposerImageRef, TrajectorySource } from '../../adapter/ports/channel-view.js';
|
|
3
|
+
export type { AttachedContext, ChatRow, ToolRow, ToolCallView, ToolFileDiff, ToolResultView, SubagentRow, JobGroupRow, JobRow, TokenUsage, TokenBucket, CostTokenBuckets, SessionCostByModel, SubagentCostEntry, NotificationItem, ChannelGoal, TodoPanelItem, LoadedContext, LoadedContextEntry, LoadedContextFile, LoadedContextSkill, LoadedContextTool, PendingMessage, SubagentControl, SubagentTranscriptView, JobControl, StagedImageInput, StagedImageAdjustment, StagedImageHandle, ComposerImageRef, ComposerSubmission, ExternalCommandOutcome, TranscriptImage, ResumeResult, EffortOption, PermissionPresetSnapshot, PermissionPresetAvailability, PermissionPresetOption, PermissionPresetCurrent, PresetOption, SkillInfo, CredentialStatus, AgentViewRow, AgentViewStatus, AgentViewDispatchResult, BackgroundResult, BackendModeOption, BackendChannelOption, TrajectorySource } from '../../adapter/ports/channel-view.js';
|
|
4
4
|
import { type ContentBlock, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
5
5
|
import { type SessionEvent } from '@deepseek-ai/dsh-session';
|
|
6
6
|
import { type BackgroundJobState } from '../jobs.js';
|
|
@@ -114,6 +114,15 @@ export type FileSuggestionFs = {
|
|
|
114
114
|
};
|
|
115
115
|
}>>;
|
|
116
116
|
};
|
|
117
|
+
/** One pending-row snapshot handed to `trackPending` before a submit: the
|
|
118
|
+
* dock re-sends it later, so everything the message needs to be rebuilt
|
|
119
|
+
* (`contexts` included) travels with it. */
|
|
120
|
+
export interface PendingTrackInput {
|
|
121
|
+
readonly id: string;
|
|
122
|
+
readonly text: string;
|
|
123
|
+
readonly images?: readonly ComposerImageRef[];
|
|
124
|
+
readonly contexts?: readonly AttachedContext[];
|
|
125
|
+
}
|
|
117
126
|
/** The fs-service surface `@`-mention expansion consumes (dsh-fs-local). */
|
|
118
127
|
export interface MentionFs {
|
|
119
128
|
resolve(path: string): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAW,YAAY,EAAgB,cAAc,EAAsH,gBAAgB,EAA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