@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,EAA8B,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3E,OAAO,KAAK,EAAE,OAAO,EAA2E,MAAM,2BAA2B,CAAA;AAEjI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAe/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAO3C,OAAO,EAAe,KAAK,gBAAgB,EAAqB,MAAM,yBAAyB,CAAA;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,EAA8B,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3E,OAAO,KAAK,EAAE,OAAO,EAA2E,MAAM,2BAA2B,CAAA;AAEjI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAe/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAO3C,OAAO,EAAe,KAAK,gBAAgB,EAAqB,MAAM,y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AAO,CAAA;IACnB,kDAAkD;IAClD,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;qEACiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,GAAG,KAAK,CAAC,SAAS,CASlB"}
|
|
@@ -24,7 +24,8 @@ import { foldLongLines } from '../utils/fold-long-lines.js';
|
|
|
24
24
|
import { stringWidth } from '../ink/stringWidth.js';
|
|
25
25
|
import { truncateToWidth } from '../ink/truncateToWidth.js';
|
|
26
26
|
import { clipPreview } from '../ink/timeline-rail.js';
|
|
27
|
-
import { getRevealVersion, revealLengthOf, revealTextOf } from './smoothReveal.js';
|
|
27
|
+
import { getRevealVersion, revealLengthOf, revealTextOf, scopeRevealKey } from './smoothReveal.js';
|
|
28
|
+
import { useRevealScope } from './revealScope.js';
|
|
28
29
|
import { useRevealVersion } from '../hooks/useRevealVersion.js';
|
|
29
30
|
import { TranscriptImages } from './messages/TranscriptImages.js';
|
|
30
31
|
import { primaryComboString } from '../utils/keymap.js';
|
|
@@ -109,16 +110,16 @@ function reasoningRevealText(row, enabled) {
|
|
|
109
110
|
return revealTextOf(`r${row.id}`, row.text, { enabled, active: row.streaming === true });
|
|
110
111
|
}
|
|
111
112
|
/** Display length only (layout signature; no slice allocation). */
|
|
112
|
-
function revealDisplayLen(row, enabled) {
|
|
113
|
+
function revealDisplayLen(row, enabled, scope) {
|
|
113
114
|
if (row.kind === 'assistant') {
|
|
114
115
|
const stripped = assistantDisplayText(row);
|
|
115
|
-
return revealLengthOf(`a${row.id}
|
|
116
|
+
return revealLengthOf(scopeRevealKey(scope, `a${row.id}`), stripped, {
|
|
116
117
|
enabled,
|
|
117
118
|
active: row.streaming === true || row.fresh === true,
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
121
|
if (row.kind === 'reasoning') {
|
|
121
|
-
return revealLengthOf(`r${row.id}
|
|
122
|
+
return revealLengthOf(scopeRevealKey(scope, `r${row.id}`), row.text, { enabled, active: row.streaming === true });
|
|
122
123
|
}
|
|
123
124
|
return row.text.length;
|
|
124
125
|
}
|
|
@@ -305,6 +306,9 @@ function signatureParts(row, columns, expanded, expandedRows, streamViewToggledR
|
|
|
305
306
|
}
|
|
306
307
|
export function MessageList({ rows, expanded, expandedRows, selectedId, onToggleRow, streamViewToggledRows = NO_STREAM_VIEW_TOGGLED, onToggleStreamView = NOOP_TOGGLE_STREAM_VIEW, model, diffLayout = 'auto', thinkingFold = 'preview', jobGroupFold = 'auto', toolBackground = 'none', foldTerminalCommand = false, turnUsageRow = false, smoothStreaming = false, activityFrames, showAll, onToggleAll, onLoadOlder, olderHistory, thinkingVisible = true, historyPaintEnabled = true, fullscreen = false, registerRowRef, scrollHandle, forceMountRowId, newSinceRowId, onUnseenCount, onTimeline, failureHintRowId, failureHint, onOpenSubagent, onOpenSubagentView, onOpenJobs, onWatchJobOutput, onOpenFile, sessionCwd, onPreviewImage, suppressImageGraphics = false, }) {
|
|
307
308
|
const lang = React.useSyncExternalStore(subscribeLang, getLang);
|
|
309
|
+
// Reveal memory is per Chat root: a recompose can mount this transcript
|
|
310
|
+
// under a fresh root, and each root owns its row ids.
|
|
311
|
+
const revealScope = useRevealScope();
|
|
308
312
|
const hiddenCount = rows.length - RENDERED_ROW_CAP;
|
|
309
313
|
// The thinking filter runs BEFORE virtualization so window indices line up.
|
|
310
314
|
//
|
|
@@ -665,7 +669,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
665
669
|
// reasoning height at once, remounting the widened window over rows
|
|
666
670
|
// whose rendering never changed (Yoga spike + measure churn for
|
|
667
671
|
// nothing). Base parts cover the universal height inputs.
|
|
668
|
-
const parts = signatureParts(row, columns, expanded, expandedRows, streamViewToggledRows, thinkingVisible, thinkingFold, diffLayout, foldTerminalCommand, model, failureHintRowId, failureHint, revealDisplayLen(row, smoothStreaming), sessionCwd, fullscreen);
|
|
672
|
+
const parts = signatureParts(row, columns, expanded, expandedRows, streamViewToggledRows, thinkingVisible, thinkingFold, diffLayout, foldTerminalCommand, model, failureHintRowId, failureHint, revealDisplayLen(row, smoothStreaming, revealScope), sessionCwd, fullscreen);
|
|
669
673
|
const cachedParts = sigs.get(row.id);
|
|
670
674
|
let same = false;
|
|
671
675
|
if (cachedParts !== undefined && cachedParts.length === parts.length) {
|
|
@@ -1304,7 +1308,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
1304
1308
|
let displayStreaming = row.streaming === true;
|
|
1305
1309
|
if (row.kind === 'assistant' && smoothStreaming) {
|
|
1306
1310
|
const stripped = assistantDisplayText(row);
|
|
1307
|
-
displayText = revealTextOf(`a${row.id}
|
|
1311
|
+
displayText = revealTextOf(scopeRevealKey(revealScope, `a${row.id}`), stripped, {
|
|
1308
1312
|
enabled: true,
|
|
1309
1313
|
active: displayStreaming || row.fresh === true,
|
|
1310
1314
|
});
|
|
@@ -1314,7 +1318,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
1314
1318
|
displayText = assistantDisplayText(row);
|
|
1315
1319
|
}
|
|
1316
1320
|
else if (row.kind === 'reasoning' && smoothStreaming) {
|
|
1317
|
-
displayText = revealTextOf(`r${row.id}
|
|
1321
|
+
displayText = revealTextOf(scopeRevealKey(revealScope, `r${row.id}`), row.text, { enabled: true, active: displayStreaming });
|
|
1318
1322
|
}
|
|
1319
1323
|
return (_jsx(MemoRow, { rowId: row.id, kind: row.kind, text: displayText, interruptBackend: row.interruptBackend, images: row.images, textFull: row.kind === 'reasoning' ? row.text : undefined, executionTarget: row.executionTarget, selectionAttached: row.selectionAttached, sender: teamSenderOf(row), streaming: displayStreaming, thinkingOpen: row.thinkingOpen === true, durationMs: row.durationMs, reasoningTokens: row.reasoningTokens, time: row.time, marginTopOnTurn: marginTopOnTurn, isSelected: selectedId === row.id, isExpanded: expandedRows.has(row.id), expanded: expanded, model: model, diffLayout: diffLayout, thinkingFold: thinkingFold, toolBackground: toolBackground, foldTerminalCommand: foldTerminalCommand, smoothStreaming: smoothStreaming, fresh: row.fresh === true, revealVersion: revealVersion, activityFrames: activityFrames, background: rowBackground(row.id), toolCallId: tool?.callId, toolName: tool?.name, toolArgsText: tool?.argsText, toolArgsFull: tool?.argsFull, toolStatus: tool?.status, toolResultText: tool?.resultText, toolResultFull: tool?.resultFull, toolErrorText: tool?.errorText, toolFootnote: failureHintRowId === row.id ? failureHint : undefined, toolCallView: tool?.callView, toolResultView: tool?.resultView, toolStartedAt: tool?.startedAt, toolDurationMs: tool?.durationMs, toolSourceFolded: row.folded === true, toolLiveOutput: tool?.liveOutput, toolLiveOutputDropped: tool?.liveOutputDropped, fullscreen: fullscreen, turnUsage: row.turnUsage, subagent: subagent, job: job, jobGroup: jobGroup, onToggleRow: onToggleRow, onToggleStreamView: onToggleStreamView, streamViewToggled: streamViewToggledRows.has(row.id), onOpenSubagent: onOpenSubagent, onOpenSubagentView: onOpenSubagentView, onOpenJobs: onOpenJobs, onWatchJobOutput: onWatchJobOutput, onOpenFile: onOpenFile, sessionCwd: sessionCwd, onPreviewImage: onPreviewImage, suppressImageGraphics: suppressImageGraphics, setRowRef: setRowRef }, row.id));
|
|
1320
1324
|
}), bottomPad > 0 && _jsx(Box, { height: bottomPad, flexShrink: 0 })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA+BzB,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;
|
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IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,IAAI,IAAI,CAAA;IAC9B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,eAAe,EACf,SAAiB,EACjB,aAAoB,EACpB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,4BAA4B,EAC5B,aAAa,EACb,YAAY,EACZ,gBAAwB,EACxB,qBAAqB,EACrB,GAAc,GACf,EAAE,gBAAgB,4BAuhIlB"}
|
|
@@ -1465,6 +1465,25 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
1465
1465
|
clearDeliveredDraft();
|
|
1466
1466
|
channel.notify(t('input-queued-after-turn'), { timeoutMs: 2500 });
|
|
1467
1467
|
};
|
|
1468
|
+
/**
|
|
1469
|
+
* Take a retracted row's staged contexts back into the composer. The
|
|
1470
|
+
* submission spent their chips (`consumeAttachedContexts()`), so only the
|
|
1471
|
+
* row's snapshot still has them: without this a row retracted for editing
|
|
1472
|
+
* would re-send without its panel bodies. `truncated` rides along — the
|
|
1473
|
+
* snapshot's body is already capped, and re-deriving the flag from it would
|
|
1474
|
+
* hand the model a cut body with no `[… truncated]` marker.
|
|
1475
|
+
*/
|
|
1476
|
+
const restageContexts = (contexts) => {
|
|
1477
|
+
for (const context of contexts ?? []) {
|
|
1478
|
+
channel.attachContext({
|
|
1479
|
+
source: context.source,
|
|
1480
|
+
sourceId: context.sourceId,
|
|
1481
|
+
title: context.title,
|
|
1482
|
+
content: context.content,
|
|
1483
|
+
truncated: context.truncated,
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1468
1487
|
/**
|
|
1469
1488
|
* Alt+Up: pull the last pending message back into the input for editing
|
|
1470
1489
|
* (never interrupts the running turn). Refused when the running dsh-agent
|
|
@@ -1481,6 +1500,7 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
1481
1500
|
channel.notify(t('input-cannot-retract'), { color: 'warning', timeoutMs: 2500 });
|
|
1482
1501
|
return;
|
|
1483
1502
|
}
|
|
1503
|
+
restageContexts(item.contexts);
|
|
1484
1504
|
restoreDraftImages({
|
|
1485
1505
|
text: item.text,
|
|
1486
1506
|
images: item.images ?? [],
|
|
@@ -1509,6 +1529,9 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
1509
1529
|
if (target === undefined)
|
|
1510
1530
|
return;
|
|
1511
1531
|
if (channel.removePending(target.id)) {
|
|
1532
|
+
// The text is back in the composer; its "send to Chat" contexts belong
|
|
1533
|
+
// there too, or editing and resending drops the panel bodies.
|
|
1534
|
+
restageContexts(target.contexts);
|
|
1512
1535
|
channel.notify(t('input-retracted'), { timeoutMs: 2000 });
|
|
1513
1536
|
}
|
|
1514
1537
|
else {
|
|
@@ -1574,6 +1597,7 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
1574
1597
|
// already retains every capability (nothing is discarded).
|
|
1575
1598
|
const beforeBlock = foldBlockRef.current;
|
|
1576
1599
|
updateFoldBlock(null);
|
|
1600
|
+
restageContexts(item.contexts);
|
|
1577
1601
|
setInput(item.text, item.text.length, 'step', beforeBlock);
|
|
1578
1602
|
replaceDraftImages(item.images ?? []);
|
|
1579
1603
|
setSelectedCommand(0);
|
|
@@ -1585,6 +1609,7 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
1585
1609
|
channel.notify(t('input-cannot-retract'), { color: 'warning', timeoutMs: 2500 });
|
|
1586
1610
|
return;
|
|
1587
1611
|
}
|
|
1612
|
+
restageContexts(item.contexts);
|
|
1588
1613
|
restoreDraftImages({
|
|
1589
1614
|
text: item.text,
|
|
1590
1615
|
images: item.images ?? [],
|
|
@@ -1772,6 +1797,28 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
1772
1797
|
}
|
|
1773
1798
|
return handled !== false;
|
|
1774
1799
|
};
|
|
1800
|
+
/**
|
|
1801
|
+
* Run one completion row. The screen's own (and registry) commands consume
|
|
1802
|
+
* it; a backend command (`/usage`, `/diff`) or backend skill answers through
|
|
1803
|
+
* the session, so its line goes out through the ordinary submit path.
|
|
1804
|
+
* Enter, the mouse pick and the batched-stdin line all share this: returning
|
|
1805
|
+
* on `tryRunCommand`'s false is what used to leave them dead.
|
|
1806
|
+
*/
|
|
1807
|
+
const dispatchCompletion = (line, placement = 'steer') => {
|
|
1808
|
+
if (tryRunCommand(line))
|
|
1809
|
+
return;
|
|
1810
|
+
// A backend command (Codex `/usage`, `/diff`, a backend skill) answers
|
|
1811
|
+
// through the session. Interactive entry points take the typed placement
|
|
1812
|
+
// while a turn runs; a piped whole line keeps the legacy direct submit
|
|
1813
|
+
// (nobody is watching a steer notice there).
|
|
1814
|
+
if (placement === 'steer' && channel.working) {
|
|
1815
|
+
// Same placement as a typed line; the notice is kept because the UI
|
|
1816
|
+
// cannot tell a self-answering command from a real skill here.
|
|
1817
|
+
steerSend(line);
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
submitText(line);
|
|
1821
|
+
};
|
|
1775
1822
|
/**
|
|
1776
1823
|
* The Enter main path, shared by the inline prompt, the expanded
|
|
1777
1824
|
* editor's Ctrl+Enter, and its Send button:
|
|
@@ -1803,8 +1850,8 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
1803
1850
|
// draft through the ordinary path instead of accepting a stale row.
|
|
1804
1851
|
if (overlayOpen && value === completionInput) {
|
|
1805
1852
|
const command = suggestions[selectedCommand];
|
|
1806
|
-
if (command) {
|
|
1807
|
-
|
|
1853
|
+
if (command !== undefined) {
|
|
1854
|
+
dispatchCompletion(command.commandLine);
|
|
1808
1855
|
return;
|
|
1809
1856
|
}
|
|
1810
1857
|
}
|
|
@@ -2443,7 +2490,7 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
2443
2490
|
if (line.startsWith('/')) {
|
|
2444
2491
|
const matches = channel.commandCompletions(line);
|
|
2445
2492
|
if (matches.length === 1) {
|
|
2446
|
-
|
|
2493
|
+
dispatchCompletion(matches[0].commandLine, 'submit');
|
|
2447
2494
|
return;
|
|
2448
2495
|
}
|
|
2449
2496
|
}
|
|
@@ -3891,11 +3938,19 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
|
|
|
3891
3938
|
onWheelStep: (step) => {
|
|
3892
3939
|
setFileSelected(i => Math.max(0, Math.min(fileMatches.length - 1, i + step)));
|
|
3893
3940
|
} })), overlayOpen && (_jsx(CommandSuggestions, { commands: suggestions, selectedIndex: selectedCommand, columns: columns, query: value, accent: promptAccent, holdFrom: suggestionsHoldFrom,
|
|
3894
|
-
// 点击行 =
|
|
3941
|
+
// 点击行 = 运行该命令(选中行与 Enter 共用派遣)
|
|
3895
3942
|
onPick: (index) => {
|
|
3896
3943
|
const command = suggestions[index];
|
|
3897
|
-
if (command)
|
|
3898
|
-
|
|
3944
|
+
if (command === undefined)
|
|
3945
|
+
return;
|
|
3946
|
+
// A stale row (the draft moved on while it was showing) does not
|
|
3947
|
+
// own the click: only run what the screen can dispatch, never
|
|
3948
|
+
// send the half-typed draft to the model.
|
|
3949
|
+
if (valueRef.current !== completionInput) {
|
|
3950
|
+
tryRunCommand(valueRef.current);
|
|
3951
|
+
return;
|
|
3952
|
+
}
|
|
3953
|
+
dispatchCompletion(command.commandLine);
|
|
3899
3954
|
},
|
|
3900
3955
|
// 滚轮 = 移动选中行(与 ↑/↓ 同路径,窗口跟随)
|
|
3901
3956
|
onWheelStep: (step) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentDashboard.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDashboard.tsx"],"names":[],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AS,GAAG,OAAO,CAAA;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAOjF;AAED,yCAAyC;AACzC,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,GAAG,KAAK,CAAC,SAAS,CAWhF;AAgED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,IAAI,EACJ,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAmB,EACnB,OAAc,EACd,OAAc,GACf,EAAE,sBAAsB,GAAG,KAAK,CAAC,SAAS,CAoT1C"}
|
|
@@ -9,6 +9,7 @@ import { actionMatches } from '../utils/keymap.js';
|
|
|
9
9
|
import { usePanelInput } from './sidePanel/usePanelInput.js';
|
|
10
10
|
import { AgentMessagesSummary } from './messages/AgentMessageFlow.js';
|
|
11
11
|
import { isTeamTaskBlocked, teamDashboardModel, teamTaskProgress } from './teamRoster.js';
|
|
12
|
+
import { isDegradedChannel, summarizeChannelFailures } from '../channel/subagent-failure.js';
|
|
12
13
|
import { isMinimalUiMode } from '../minimalUiMode.js';
|
|
13
14
|
/** Accept Ink's Enter flag and the panel dispatcher's normalized alias. */
|
|
14
15
|
export function isPanelPlainReturn(input, key) {
|
|
@@ -156,13 +157,18 @@ export function SubagentDashboard({ subagents, team, sessionId, peers, onClose,
|
|
|
156
157
|
const running = subagents.filter(s => s.status === 'running').length;
|
|
157
158
|
const completed = subagents.filter(s => s.status === 'completed').length;
|
|
158
159
|
const failed = subagents.filter(s => s.status === 'failed').length;
|
|
160
|
+
const channelFailures = summarizeChannelFailures(subagents).filter(isDegradedChannel);
|
|
159
161
|
const memberCount = (status) => model?.teammates.filter(row => row.status === status).length ?? 0;
|
|
160
162
|
const teamSep = panelMode ? ' · ' : ' ';
|
|
161
163
|
// Full-screen keeps its inset; the panel uses one cell on each side.
|
|
162
164
|
const outer = panelMode
|
|
163
165
|
? { paddingLeft: 1, paddingRight: 1, paddingTop: 0 }
|
|
164
166
|
: { paddingX: 2, paddingY: 1 };
|
|
165
|
-
return (_jsxs(Box, { flexDirection: "column", ...outer, children: [!panelMode && _jsx(Divider, { color: "accent", title: t(team === undefined ? 'subagent-dashboard-title' : 'team-dashboard-title') }), _jsxs(Box, { flexDirection: "row", gap: 3, marginTop: panelMode ? 0 : 1, marginBottom: panelMode ? 0 : 1, children: [team !== undefined ? (_jsx(Box, { flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: "accent", children: memberCount('running') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-running') + teamSep }), _jsx(Text, { color: "accent", children: memberCount('idle') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-idle') + teamSep }), memberCount('provisioning') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: memberCount('provisioning') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-provisioning') + teamSep })] })), memberCount('active') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "accent", children: memberCount('active') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-active') + teamSep })] })), memberCount('failed') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "error", children: memberCount('failed') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-failed') + teamSep })] })), _jsx(Text, { dimColor: true, children: t('team-tasks-count', teamTaskProgress(team.tasks)) })] }) })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [_jsx(Text, { color: "accent", children: running }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-running')] })] }), _jsxs(Text, { children: [_jsx(Text, { color: "success", children: completed }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-completed')] })] }), failed > 0 && (_jsxs(Text, { children: [_jsx(Text, { color: "error", children: failed }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-failed')] })] })), nested > 0 && (_jsxs(Text, { children: [_jsx(Text, { color: "accent", children: nested }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-nested')] })] }))] })), _jsx(Box, { flexGrow: 1 }), !panelMode && onClose !== undefined && _jsx(ExitButton, { onClick: onClose })] }), team?.failure !== undefined && (_jsx(Text, { color: "error", wrap: "wrap", children: '⚠ ' + t('team-failure', { failure: team.failure }) })),
|
|
167
|
+
return (_jsxs(Box, { flexDirection: "column", ...outer, children: [!panelMode && _jsx(Divider, { color: "accent", title: t(team === undefined ? 'subagent-dashboard-title' : 'team-dashboard-title') }), _jsxs(Box, { flexDirection: "row", gap: 3, marginTop: panelMode ? 0 : 1, marginBottom: panelMode ? 0 : 1, children: [team !== undefined ? (_jsx(Box, { flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: "accent", children: memberCount('running') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-running') + teamSep }), _jsx(Text, { color: "accent", children: memberCount('idle') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-idle') + teamSep }), memberCount('provisioning') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: memberCount('provisioning') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-provisioning') + teamSep })] })), memberCount('active') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "accent", children: memberCount('active') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-active') + teamSep })] })), memberCount('failed') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "error", children: memberCount('failed') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-failed') + teamSep })] })), _jsx(Text, { dimColor: true, children: t('team-tasks-count', teamTaskProgress(team.tasks)) })] }) })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [_jsx(Text, { color: "accent", children: running }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-running')] })] }), _jsxs(Text, { children: [_jsx(Text, { color: "success", children: completed }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-completed')] })] }), failed > 0 && (_jsxs(Text, { children: [_jsx(Text, { color: "error", children: failed }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-failed')] })] })), nested > 0 && (_jsxs(Text, { children: [_jsx(Text, { color: "accent", children: nested }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-nested')] })] }))] })), _jsx(Box, { flexGrow: 1 }), !panelMode && onClose !== undefined && _jsx(ExitButton, { onClick: onClose })] }), team?.failure !== undefined && (_jsx(Text, { color: "error", wrap: "wrap", children: '⚠ ' + t('team-failure', { failure: team.failure }) })), channelFailures.map(summary => (_jsx(Text, { color: "error", wrap: "wrap", children: '⚠ ' + t('subagent-channel-degraded', {
|
|
168
|
+
provider: summary.provider,
|
|
169
|
+
failed: summary.failed,
|
|
170
|
+
settled: summary.settled,
|
|
171
|
+
}) }, summary.provider))), _jsx(Box, { flexDirection: "column", maxHeight: panelMode ? Math.max(6, rows - 4) : Math.max(10, rows - 10), marginTop: panelMode ? 0 : 1, children: _jsxs(ScrollBox, { ref: scrollRef, flexDirection: "column", flexGrow: 1, children: [model !== undefined && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: t('team-members-title') }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: ' ◆ ' + t(model.viewedFromLead ? 'team-lead-row' : 'team-lead-row-peer') })] })), model === undefined && subagents.length === 0 ? (_jsxs(Box, { flexDirection: "column", alignItems: "center", marginTop: Math.max(2, Math.floor((rows - 16) / 3)), children: [_jsx(Text, { dimColor: true, children: '○' }), _jsx(Text, { dimColor: true, children: t('subagent-none') }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: t('subagent-empty-hint') }) })] })) : (entries.map(({ key, subagent, teamRow, nested: nestedMark }, index) => (_jsxs(Box, { flexDirection: "column", children: [index === othersStart && _jsx(Text, { dimColor: true, children: t('team-others-title') }), nestedMark && (_jsx(Text, { dimColor: true, children: ' ↳ ' + t('subagent-nested-mark') })), subagent === undefined ? (teamRow !== undefined && _jsx(TeamRosterOnlyRow, { row: teamRow, focused: index === focusIndex, panelMode: panelMode, self: teamRow.member.id === sessionId })) : (_jsx(SubagentCard, { subagent: subagent, variant: panelMode ? 'panel' : 'default', focused: index === focusIndex, onClick: onSelect !== undefined
|
|
166
172
|
// Click = view detail, same as Enter on the focused card.
|
|
167
173
|
? () => onSelect(subagent.agentId)
|
|
168
174
|
: undefined, ...teamRow === undefined ? {} : { teamMember: { name: teamRow.member.name, status: teamRow.status } } })), teamRow?.status === 'failed' && teamRow.member.error !== undefined && (_jsx(Text, { color: "error", wrap: "truncate-end", children: ' │ ' + teamRow.member.error })), teamRow?.status === 'idle' && subagent?.status === 'failed' && (_jsx(Text, { color: "error", wrap: "truncate-end", children: ' │ ' + t('team-last-run-failed', { error: subagent.error ?? '' }).trimEnd() })), subagent !== undefined && messages !== undefined && messages.length > 0 && (_jsx(AgentMessagesSummary, { messages: messages.filter(message => message.from === subagent.agentId || message.to === subagent.agentId), selfAgentId: subagent.agentId })), subagent !== undefined && onOpenView !== undefined && (!panelMode || index === focusIndex) && (_jsx(Box, { paddingLeft: 1, onClick: () => onOpenView(subagent.agentId), children: _jsx(Text, { color: "subtle", children: `⤢ ${t('agent-view-open-action')}` }) })), !panelMode && index < entries.length - 1 && index + 1 !== othersStart && (_jsx(Text, { dimColor: true, children: '─'.repeat(Math.max(20, Math.min(72, columns - 6))) }))] }, key)))), team !== undefined && _jsx(TeamTaskBoard, { tasks: team.tasks })] }) }), peers !== undefined && (!panelMode || peers.length > 0) && (_jsx(Box, { flexDirection: "column", children: panelMode ? (_jsx(Text, { dimColor: true, wrap: "truncate-end", children: t('agents-peers-title') + ' · ' + peers.length })) : (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: t('agents-peers-title') }), peers.length === 0 ? (_jsx(Text, { dimColor: true, children: ' ' + t('agents-peers-empty') })) : (_jsxs(Box, { flexDirection: "column", children: [peers.map(peer => (_jsx(Text, { dimColor: true, wrap: "truncate-end", children: ' · ' + (peer.name ?? peer.label ?? peer.agentId.slice(0, 8)) + ' · ' + peer.agentId.slice(0, 8) }, peer.agentId))), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: ' ' + t('agents-peers-note') })] }))] })) })), !panelMode && (_jsxs(_Fragment, { children: [_jsx(Divider, { color: "subtle", title: "" }), _jsx(Box, { children: _jsx(Text, { dimColor: true, children: onSelect ? t('subagent-dashboard-hint-detail') : t('subagent-dashboard-hint-basic') }) })] }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantToolUseMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantToolUseMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAA8C,OAAO,EAAE,MAAM,8BAA8B,CAAA;AASvG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"AssistantToolUseMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantToolUseMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAA8C,OAAO,EAAE,MAAM,8BAA8B,CAAA;AASvG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,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A2B,EAC3B,YAAoB,EACpB,KAAa,EACb,aAAa,EACb,YAAoB,EACpB,UAAkB,GACnB,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,CAmYzB"}
|
|
@@ -12,7 +12,8 @@ import { formatDuration } from '../../terminal-utils/format.js';
|
|
|
12
12
|
import { formatClock } from '../../trajectory/format.js';
|
|
13
13
|
import { foldLongLines } from '../../utils/fold-long-lines.js';
|
|
14
14
|
import { getLang, t, tOr } from '../../i18n.js';
|
|
15
|
-
import { revealLinesOf, snapReveal } from '../smoothReveal.js';
|
|
15
|
+
import { revealLinesOf, scopeRevealKey, snapReveal } from '../smoothReveal.js';
|
|
16
|
+
import { useRevealScope } from '../revealScope.js';
|
|
16
17
|
import { useRevealVersion } from '../../hooks/useRevealVersion.js';
|
|
17
18
|
import { primaryComboString } from '../../utils/keymap.js';
|
|
18
19
|
import { agentMessageStateColor, agentMessageStateText } from './TranscriptLeaves.js';
|
|
@@ -527,6 +528,8 @@ export function AssistantToolUseMessage({ tool, marginTopOnTurn, verbose, isSele
|
|
|
527
528
|
// forces a SyncLane render per tick, and repeated sync commits ending with
|
|
528
529
|
// streaming work pending feed React's nested-update counter (error #185).
|
|
529
530
|
useRevealVersion(revealVersion === undefined);
|
|
531
|
+
// Per-root keyspace: a recompose can render this card under a new root.
|
|
532
|
+
const revealScope = useRevealScope();
|
|
530
533
|
const isRunning = tool.status === 'running';
|
|
531
534
|
const isError = tool.status === 'error';
|
|
532
535
|
const sendMessage = sendMessageCardOf(tool);
|
|
@@ -707,7 +710,7 @@ export function AssistantToolUseMessage({ tool, marginTopOnTurn, verbose, isSele
|
|
|
707
710
|
// paint complete. `snapReveal` on every non-revealable render retires a
|
|
708
711
|
// cursor the moment its card stops qualifying (result arrived, user
|
|
709
712
|
// expanded) — idempotent, safe during render.
|
|
710
|
-
const revealKey = `tool:${tool.callId}
|
|
713
|
+
const revealKey = scopeRevealKey(revealScope, `tool:${tool.callId}`);
|
|
711
714
|
const revealable = smoothReveal && !isError && isRunning && view !== undefined &&
|
|
712
715
|
tool.resultView === undefined && !verbose && !isExpanded && fresh;
|
|
713
716
|
if (!revealable)
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* never be split into a lone surrogate by ←/→/⌫/Del or a paste boundary.
|
|
28
28
|
*/
|
|
29
29
|
import React from 'react';
|
|
30
|
-
import type { QuestionDraft, QuestionSelection } from '../../channel/questions.js';
|
|
30
|
+
import type { QuestionDraft, QuestionIntentView, QuestionSelection } from '../../channel/questions.js';
|
|
31
31
|
import type { ProviderModelEditor as ModelEditor } from '../../adapter/ports/channel-settings.js';
|
|
32
32
|
import { type ClipboardRead } from '../../utils/clipboard.js';
|
|
33
33
|
export type AskUserQuestionPanelProps = {
|
|
@@ -60,13 +60,10 @@ export type AskUserQuestionPanelProps = {
|
|
|
60
60
|
/** Local /provider draft editor. Ordinary model-facing asks carry none. */
|
|
61
61
|
readonly modelEditor?: ModelEditor;
|
|
62
62
|
/** Presentation intent tag (rc.6): 'plan-review' switches to the
|
|
63
|
-
* decision-card layout
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
readonly approveAlso?: readonly string[];
|
|
68
|
-
readonly decline?: string;
|
|
69
|
-
};
|
|
63
|
+
* decision-card layout, 'approval' stays on the generic questionnaire
|
|
64
|
+
* (its option labels carry the decision); an intent never changes the
|
|
65
|
+
* protocol. */
|
|
66
|
+
readonly intent?: QuestionIntentView;
|
|
70
67
|
};
|
|
71
68
|
/** 1-based position within the batch (progress header). */
|
|
72
69
|
readonly position: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AskUserQuestionPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/questions/AskUserQuestionPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B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T,qBAAqB,EACrB,SAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,UAAkB,GACnB,EAAE,yBAAyB,GAAG,KAAK,CAAC,SAAS,CAgzB7C"}
|
|
@@ -75,12 +75,15 @@ export function AskUserQuestionPanel({ question, position, total, answered, init
|
|
|
75
75
|
// Plan-mode's exit_plan_mode ask carries a presentation intent: render
|
|
76
76
|
// the plan decision card instead of the generic questionnaire. The
|
|
77
77
|
// branch precedes every hook so hook order stays stable per remount key.
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
const intent = question.intent;
|
|
79
|
+
if (intent?.kind === 'plan-review') {
|
|
80
|
+
// Spread with the narrowed intent: the decision card's contract is the
|
|
81
|
+
// plan-review variant, not the union the questionnaire accepts.
|
|
82
|
+
return _jsx(PlanReviewPanel, { question: { ...question, intent }, onAnswer: onAnswer, onCancel: onCancel, readClipboardOverride: readClipboardOverride });
|
|
80
83
|
}
|
|
81
84
|
const options = question.options ?? [];
|
|
82
85
|
const multiSelect = question.multiSelect === true;
|
|
83
|
-
const hideCustomInput = question.hideCustomInput === true && options.length > 0;
|
|
86
|
+
const hideCustomInput = intent?.kind === 'approval' || (question.hideCustomInput === true && options.length > 0);
|
|
84
87
|
const modelEditor = typeof question.modelEditor?.read === 'function'
|
|
85
88
|
&& typeof question.modelEditor.save === 'function' && typeof question.modelEditor.edited === 'function'
|
|
86
89
|
? question.modelEditor : undefined;
|
|
@@ -97,7 +100,7 @@ export function AskUserQuestionPanel({ question, position, total, answered, init
|
|
|
97
100
|
const initialSelected = initialDraft !== undefined
|
|
98
101
|
? initialDraft.selected
|
|
99
102
|
: question.defaultSelected ?? [];
|
|
100
|
-
const initialCustom = initialDraft?.custom ?? '';
|
|
103
|
+
const initialCustom = hideCustomInput ? '' : initialDraft?.custom ?? '';
|
|
101
104
|
const selectedIndices = options
|
|
102
105
|
.map((option, index) => initialSelected.includes(option.label) ? index : -1)
|
|
103
106
|
.filter(index => index >= 0);
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* never be split by ←/→/⌫/Del (same contract as the plugin InputDialog).
|
|
29
29
|
*/
|
|
30
30
|
import React from 'react';
|
|
31
|
-
import type { QuestionSelection } from '../../channel/questions.js';
|
|
31
|
+
import type { QuestionIntentView, QuestionSelection } from '../../channel/questions.js';
|
|
32
32
|
import { type ClipboardRead } from '../../utils/clipboard.js';
|
|
33
33
|
export type PlanReviewPanelProps = {
|
|
34
34
|
/** The plan-review question (intent.kind === 'plan-review'). */
|
|
@@ -40,12 +40,9 @@ export type PlanReviewPanelProps = {
|
|
|
40
40
|
readonly label: string;
|
|
41
41
|
readonly description?: string;
|
|
42
42
|
}>;
|
|
43
|
-
readonly intent?: {
|
|
43
|
+
readonly intent?: Extract<QuestionIntentView, {
|
|
44
44
|
readonly kind: 'plan-review';
|
|
45
|
-
|
|
46
|
-
readonly approveAlso?: readonly string[];
|
|
47
|
-
readonly decline?: string;
|
|
48
|
-
};
|
|
45
|
+
}>;
|
|
49
46
|
};
|
|
50
47
|
readonly onAnswer: (selection: QuestionSelection) => void;
|
|
51
48
|
/** Esc / Ctrl+C — dismissed to speak instead (ASK_CANCELLED). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanReviewPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/questions/PlanReviewPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"PlanReviewPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/questions/PlanReviewPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAIvF,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAa5E,MAAM,MAAM,oBAAoB,GAAG;IACjC,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;QACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;YAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QAC3F,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,EAAE;YAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;SAAE,CAAC,CAAA;KAChF,CAAA;IACD,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACzD,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;IAC7B;;;OAGG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,CAAA;CAC9D,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,qBAAqB,GACtB,EAAE,oBAAoB,GAAG,KAAK,CAAC,SAAS,CA+ZxC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which Chat root owns a reveal key. The reveal tables in `smoothReveal.ts`
|
|
3
|
+
* are module-level (the transcript's memo/height pipeline reads them during
|
|
4
|
+
* render), so a second Chat root in the same process — a plugin recompose or
|
|
5
|
+
* a remount builds a fresh tree with its own row ids — would otherwise share
|
|
6
|
+
* them: a rebind in one root wiped the other's completed keys and
|
|
7
|
+
* re-typewrote its history.
|
|
8
|
+
*
|
|
9
|
+
* `undefined` is the shared scope: scripts and tests that mount a transcript
|
|
10
|
+
* without a Chat provider keep the single-root behaviour and bare keys.
|
|
11
|
+
*/
|
|
12
|
+
export declare const RevealScopeContext: import("react").Context<string | undefined>;
|
|
13
|
+
/** The calling component's Chat root scope (`undefined` outside a provider). */
|
|
14
|
+
export declare function useRevealScope(): string | undefined;
|
|
15
|
+
//# sourceMappingURL=revealScope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revealScope.d.ts","sourceRoot":"","sources":["../../../src/components/revealScope.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,6CAA+C,CAAA;AAE9E,gFAAgF;AAChF,wBAAgB,cAAc,IAAI,MAAM,GAAG,SAAS,CAEnD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Which Chat root owns a reveal key. The reveal tables in `smoothReveal.ts`
|
|
4
|
+
* are module-level (the transcript's memo/height pipeline reads them during
|
|
5
|
+
* render), so a second Chat root in the same process — a plugin recompose or
|
|
6
|
+
* a remount builds a fresh tree with its own row ids — would otherwise share
|
|
7
|
+
* them: a rebind in one root wiped the other's completed keys and
|
|
8
|
+
* re-typewrote its history.
|
|
9
|
+
*
|
|
10
|
+
* `undefined` is the shared scope: scripts and tests that mount a transcript
|
|
11
|
+
* without a Chat provider keep the single-root behaviour and bare keys.
|
|
12
|
+
*/
|
|
13
|
+
export const RevealScopeContext = createContext(undefined);
|
|
14
|
+
/** The calling component's Chat root scope (`undefined` outside a provider). */
|
|
15
|
+
export function useRevealScope() {
|
|
16
|
+
return useContext(RevealScopeContext);
|
|
17
|
+
}
|
|
@@ -44,7 +44,34 @@ type BtwKeyFlags = SidePanelKeyFlags & {
|
|
|
44
44
|
* 语义,吃掉即可,免得漏给主聊天去滚 transcript。
|
|
45
45
|
*/
|
|
46
46
|
export declare function btwComposerKey(state: BtwComposerState, input: string, key: BtwKeyFlags): BtwComposerKeyResult | null;
|
|
47
|
-
|
|
47
|
+
/**
|
|
48
|
+
* 单行 composer 的可见窗口:草稿永远只有一行,围绕 caret 开窗。
|
|
49
|
+
* `head + at + tail` 的显示宽度 ≤ budget(`at` 自身比预算还宽时以它为准),
|
|
50
|
+
* 被裁的一侧各用一个 `…` 标出来,每个 `…` 另占 1 列。
|
|
51
|
+
*/
|
|
52
|
+
export interface BtwComposerWindow {
|
|
53
|
+
/** caret 之前可见的文字。 */
|
|
54
|
+
readonly head: string;
|
|
55
|
+
/** caret 处的可见单元;caret 在末尾时是虚拟空格(IME 锚点恒为真实 cell)。 */
|
|
56
|
+
readonly at: string;
|
|
57
|
+
/** caret 之后可见的文字。 */
|
|
58
|
+
readonly tail: string;
|
|
59
|
+
/** 左侧还藏着文字,且框里腾得出 1 列画 `…`(该列已从预算里扣掉)。 */
|
|
60
|
+
readonly clippedLeft: boolean;
|
|
61
|
+
/** 右侧还藏着文字,且框里腾得出 1 列画 `…`。 */
|
|
62
|
+
readonly clippedRight: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 单行输入框的窗口(issue #1812):按显示列把草稿裁成 head + at + tail,
|
|
66
|
+
* caret 始终留在框内;两侧被裁时各补一个 `…`,让人知道那边还有字。
|
|
67
|
+
*
|
|
68
|
+
* 不能只靠 `wrap="truncate"`:截断把节点的宽度夹到可用宽度,排在它后面的
|
|
69
|
+
* `InputCaret` 必然落到框右缘之外。所以先算窗口再上屏。按字素累计列宽,
|
|
70
|
+
* CJK / 宽字符 / emoji 整格取舍,不在中间劈开;草稿由面板与全屏共享,另一个
|
|
71
|
+
* 编辑面可能把这个 caret 留在字素中间,此时吸附到后一个边界,绝不显示半个字。
|
|
72
|
+
*/
|
|
73
|
+
export declare function composerWindow(text: string, caret: number, budget: number): BtwComposerWindow;
|
|
74
|
+
export declare function BtwComposer({ state, focused, busy, notice, width, onActivate, }: {
|
|
48
75
|
readonly state: BtwComposerState;
|
|
49
76
|
/** 编辑焦点(决定边框高亮与原生光标显示)。 */
|
|
50
77
|
readonly focused: boolean;
|
|
@@ -55,6 +82,12 @@ export declare function BtwComposer({ state, focused, busy, notice, onActivate,
|
|
|
55
82
|
readonly text: string;
|
|
56
83
|
readonly failure: boolean;
|
|
57
84
|
} | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* 输入框外宽(含边框);缺省取 useTerminalSize()。分栏传面板列宽,全屏
|
|
87
|
+
* 场景传 columns - 2(根 Box 的 paddingX)——否则声明宽比实际框宽多 2 列,
|
|
88
|
+
* caret 行正好溢出(issue #1812)。
|
|
89
|
+
*/
|
|
90
|
+
readonly width?: number | undefined;
|
|
58
91
|
/** 点击输入框进入编辑(默认箭头归导航,点进来才编辑)。 */
|
|
59
92
|
readonly onActivate?: () => void;
|
|
60
93
|
}): React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BtwComposer.d.ts","sourceRoot":"","sources":["../../../../../src/components/sidePanel/btw/BtwComposer.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"BtwComposer.d.ts","sourceRoot":"","sources":["../../../../../src/components/sidePanel/btw/BtwComposer.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAGpD,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,8DAA8D;AAC9D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,MAAM,CAAC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