@deepseek-harness-tui/dsh-tui 0.19.0 → 0.20.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 +63 -57
- package/cordis.patch.yml +5 -3
- package/cordis.yml +3 -2
- package/guide/dsh-tui-guide/configuration.en.md +1 -1
- package/guide/dsh-tui-guide/configuration.md +1 -1
- package/guide/dsh-tui-guide/getting-started.en.md +2 -2
- package/guide/dsh-tui-guide/getting-started.md +2 -2
- package/guide/dsh-tui-guide/user-guide.en.md +7 -2
- package/guide/dsh-tui-guide/user-guide.md +7 -2
- package/lib/settings.json +24 -8
- package/lib/types/adapter/ports/channel-view.d.ts +39 -3
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +3 -1
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/backends/claude/tools.d.ts.map +1 -1
- package/lib/types/backends/claude/tools.js +8 -3
- package/lib/types/backends/codex/translate/presentation.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/presentation.js +5 -2
- package/lib/types/channel/interaction.d.ts.map +1 -1
- package/lib/types/channel/interaction.js +1 -0
- package/lib/types/channel/permissions.d.ts +15 -0
- package/lib/types/channel/permissions.d.ts.map +1 -1
- package/lib/types/channel/permissions.js +28 -0
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +11 -1
- package/lib/types/channel/questions.d.ts +26 -0
- package/lib/types/channel/questions.d.ts.map +1 -1
- package/lib/types/channel/questions.js +43 -0
- package/lib/types/commands.js +1 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +3 -3
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +3 -2
- package/lib/types/components/StarPrompt.d.ts +5 -3
- package/lib/types/components/StarPrompt.d.ts.map +1 -1
- package/lib/types/components/StarPrompt.js +56 -6
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +1 -1
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +3 -2
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +121 -23
- package/lib/types/components/teamRoster.d.ts +6 -3
- package/lib/types/components/teamRoster.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.d.ts +19 -0
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +17 -1
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +15 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +7 -4
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +7 -3
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.js +4 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +179 -33
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +55 -4
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +80 -16
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-transcript.js +6 -5
- package/lib/types/dsh-adapter/channel/task-completion.js +2 -10
- package/lib/types/dsh-adapter/compat/compaction-previews.d.ts +11 -0
- package/lib/types/dsh-adapter/compat/compaction-previews.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/compaction-previews.js +38 -0
- package/lib/types/dsh-adapter/compat/messages.d.ts +1 -1
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/messages.js +2 -2
- package/lib/types/dsh-adapter/contract.d.ts +7 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +8 -4
- package/lib/types/dsh-adapter/experimental-bundles.d.ts +5 -0
- package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/experimental-bundles.js +0 -2
- package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
- package/lib/types/dsh-adapter/host-contract.js +2 -2
- package/lib/types/dsh-adapter/host-dsh.d.ts +2 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-dsh.js +3 -0
- package/lib/types/dsh-adapter/index.d.ts +9 -1
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +5 -0
- package/lib/types/dsh-adapter/oauth/account-notifications.d.ts +73 -0
- package/lib/types/dsh-adapter/oauth/account-notifications.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/account-notifications.js +250 -0
- package/lib/types/dsh-adapter/oauth/bonus.d.ts +34 -9
- package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/bonus.js +47 -5
- package/lib/types/dsh-adapter/oauth/deepseek.d.ts +7 -2
- package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/deepseek.js +6 -1
- package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/index.js +44 -0
- package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/service.js +5 -6
- package/lib/types/dsh-adapter/plugin-manage.d.ts +6 -4
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-manage.js +3 -2
- package/lib/types/dsh-adapter/plugin.d.ts +237 -6
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +608 -23
- package/lib/types/dsh-adapter/session-projection-store.d.ts +1 -1
- package/lib/types/dsh-adapter/session-projection-store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/session-projection-store.js +30 -23
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessionTree.js +4 -1
- package/lib/types/dsh-adapter/subagents.d.ts +1 -0
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +10 -2
- package/lib/types/dsh-adapter/team-mode.d.ts +29 -17
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
- package/lib/types/dsh-adapter/team-mode.js +138 -17
- package/lib/types/dsh-adapter/team-roster.d.ts +53 -18
- package/lib/types/dsh-adapter/team-roster.d.ts.map +1 -1
- package/lib/types/dsh-adapter/team-roster.js +206 -39
- package/lib/types/dsh-adapter/team-tools.d.ts +25 -12
- package/lib/types/dsh-adapter/team-tools.d.ts.map +1 -1
- package/lib/types/dsh-adapter/team-tools.js +81 -26
- package/lib/types/i18n.d.ts +65 -9
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +29 -8
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +13 -3
- package/lib/types/ink/flush-tick.d.ts +6 -0
- package/lib/types/ink/flush-tick.d.ts.map +1 -1
- package/lib/types/ink/flush-tick.js +31 -0
- package/lib/types/ink/hooks/use-terminal-title.d.ts +15 -0
- package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-terminal-title.js +23 -3
- package/lib/types/ink/ink.js +2 -2
- package/lib/types/ink/jumpback-state.d.ts +33 -0
- package/lib/types/ink/jumpback-state.d.ts.map +1 -0
- package/lib/types/ink/jumpback-state.js +51 -0
- package/lib/types/ink/jumpback.d.ts +78 -0
- package/lib/types/ink/jumpback.d.ts.map +1 -0
- package/lib/types/ink/jumpback.js +515 -0
- package/lib/types/ink/log-update.js +37 -14
- package/lib/types/ink/notify-helper/activate.cs +836 -0
- package/lib/types/ink/notify-helper/compile.d.ts +30 -0
- package/lib/types/ink/notify-helper/compile.d.ts.map +1 -0
- package/lib/types/ink/notify-helper/compile.js +235 -0
- package/lib/types/ink/terminal-notification-windows.d.ts +8 -4
- package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -1
- package/lib/types/ink/terminal-notification-windows.js +14 -21
- package/lib/types/ink/terminal-notification.d.ts +31 -2
- package/lib/types/ink/terminal-notification.d.ts.map +1 -1
- package/lib/types/ink/terminal-notification.js +51 -0
- package/lib/types/ink/terminal.d.ts +2 -1
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +9 -4
- package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
- package/lib/types/screens/AgentTranscriptScene.js +1 -1
- package/lib/types/screens/Chat.d.ts +4 -3
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +38 -9
- package/lib/types/settings/definitions.d.ts +12 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +15 -7
- package/package.json +112 -112
- package/presets/liangshen/agent.cordis.yml +4 -0
- 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,KA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AK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX;oEACgE;IAChE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,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"}
|
|
@@ -1320,7 +1320,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
1320
1320
|
else if (row.kind === 'reasoning' && smoothStreaming) {
|
|
1321
1321
|
displayText = revealTextOf(scopeRevealKey(revealScope, `r${row.id}`), row.text, { enabled: true, active: displayStreaming });
|
|
1322
1322
|
}
|
|
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));
|
|
1323
|
+
return (_jsx(MemoRow, { rowId: row.id, kind: row.kind, text: displayText, compactSummaryPreview: row.compactPreview, 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));
|
|
1324
1324
|
}), bottomPad > 0 && _jsx(Box, { height: bottomPad, flexShrink: 0 })] }));
|
|
1325
1325
|
}
|
|
1326
1326
|
/** Load-earlier / show-previous divider row with a mouse hover tint — the
|
|
@@ -1329,7 +1329,7 @@ function ClickableDivider({ title, onClick }) {
|
|
|
1329
1329
|
const [hovered, setHovered] = useState(false);
|
|
1330
1330
|
return (_jsx(Box, { marginTop: 1, onClick: onClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), backgroundColor: hovered ? 'userMessageBackgroundHover' : undefined, children: _jsx(Divider, { title: title }) }));
|
|
1331
1331
|
}
|
|
1332
|
-
function TranscriptRow({ rowId, kind, text, interruptBackend, images, textFull, executionTarget, selectionAttached, sender, sessionCwd, streaming, thinkingOpen, durationMs, reasoningTokens, time, marginTopOnTurn, isSelected, isExpanded, expanded, model, diffLayout, smoothStreaming, fresh, revealVersion, thinkingFold, toolBackground, foldTerminalCommand, activityFrames, background, toolCallId, toolName, toolArgsText, toolArgsFull, toolStatus, toolResultText, toolResultFull, toolErrorText, toolFootnote, toolCallView, toolResultView, toolStartedAt, toolDurationMs, toolSourceFolded, toolLiveOutput, toolLiveOutputDropped, fullscreen, turnUsage, subagent, job, jobGroup, onToggleRow, onToggleStreamView, streamViewToggled, onOpenSubagent, onOpenSubagentView, onOpenJobs, onWatchJobOutput, onOpenFile, onPreviewImage, suppressImageGraphics, setRowRef, }) {
|
|
1332
|
+
function TranscriptRow({ rowId, kind, text, compactSummaryPreview, interruptBackend, images, textFull, executionTarget, selectionAttached, sender, sessionCwd, streaming, thinkingOpen, durationMs, reasoningTokens, time, marginTopOnTurn, isSelected, isExpanded, expanded, model, diffLayout, smoothStreaming, fresh, revealVersion, thinkingFold, toolBackground, foldTerminalCommand, activityFrames, background, toolCallId, toolName, toolArgsText, toolArgsFull, toolStatus, toolResultText, toolResultFull, toolErrorText, toolFootnote, toolCallView, toolResultView, toolStartedAt, toolDurationMs, toolSourceFolded, toolLiveOutput, toolLiveOutputDropped, fullscreen, turnUsage, subagent, job, jobGroup, onToggleRow, onToggleStreamView, streamViewToggled, onOpenSubagent, onOpenSubagentView, onOpenJobs, onWatchJobOutput, onOpenFile, onPreviewImage, suppressImageGraphics, setRowRef, }) {
|
|
1333
1333
|
const ref = React.useCallback((el) => {
|
|
1334
1334
|
setRowRef(rowId, el);
|
|
1335
1335
|
}, [setRowRef, rowId]);
|
|
@@ -1452,7 +1452,7 @@ function TranscriptRow({ rowId, kind, text, interruptBackend, images, textFull,
|
|
|
1452
1452
|
// The post-compaction summary defaults to a folded one-liner with a
|
|
1453
1453
|
// text preview; Ctrl+O (global), message-selection Enter, or a click
|
|
1454
1454
|
// reveals the full summary.
|
|
1455
|
-
return (_jsx(Box, { marginTop: marginTopOnTurn ? 1 : 0, paddingLeft: 2, backgroundColor: background, ref: ref, onClick: foldOnClick, onMouseEnter: () => setCompactHovered(true), onMouseLeave: () => setCompactHovered(false), children: expanded || isExpanded ? (_jsx(Text, { dimColor: true, children: text })) : (_jsxs(Text, { dimColor: true, italic: true, color: compactHovered ? 'text' : undefined, children: [_jsx(Text, { color: compactHovered ? 'text' : undefined, children: "\u2234" }), ' ', t('compact-summary-folded'), " \u00B7 ", compactPreview(displayText), ' ', t('hint-expand-ctrl-o', { key: primaryComboString('transcript') })] })) }));
|
|
1455
|
+
return (_jsx(Box, { marginTop: marginTopOnTurn ? 1 : 0, paddingLeft: 2, backgroundColor: background, ref: ref, onClick: foldOnClick, onMouseEnter: () => setCompactHovered(true), onMouseLeave: () => setCompactHovered(false), children: expanded || isExpanded ? (_jsx(Text, { dimColor: true, children: text })) : (_jsxs(Text, { dimColor: true, italic: true, color: compactHovered ? 'text' : undefined, children: [_jsx(Text, { color: compactHovered ? 'text' : undefined, children: "\u2234" }), ' ', t('compact-summary-folded'), " \u00B7 ", compactPreview(compactSummaryPreview ?? displayText), ' ', t('hint-expand-ctrl-o', { key: primaryComboString('transcript') })] })) }));
|
|
1456
1456
|
case 'subagent':
|
|
1457
1457
|
if (!subagent)
|
|
1458
1458
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitDiffView.d.ts","sourceRoot":"","sources":["../../../src/components/SplitDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAQ7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"SplitDiffView.d.ts","sourceRoot":"","sources":["../../../src/components/SplitDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAQ7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AA4hB3D,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAuB,EACvB,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAA;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3C,GAAG,KAAK,CAAC,SAAS,CA0MlB"}
|
|
@@ -393,8 +393,9 @@ function clippedGraphemes(segments, budget) {
|
|
|
393
393
|
* the same distance from their divider; the one-cell gap between gutter and
|
|
394
394
|
* text is the caller's. */
|
|
395
395
|
function gutterText(kind, tone, lineNo, hasContent, lineNoWidth) {
|
|
396
|
-
// Status gutter instead of line numbers:
|
|
397
|
-
// offsets, and an invented number misleads
|
|
396
|
+
// Status gutter instead of line numbers: this view does not consume the
|
|
397
|
+
// optional oldStart/newStart offsets, and an invented number misleads
|
|
398
|
+
// (issue #250, P2-3).
|
|
398
399
|
const marker = kind === 'context' ? ' ' : tone === 'old' ? '−' : '+';
|
|
399
400
|
const numbered = lineNoWidth > 0
|
|
400
401
|
? `${(lineNo === undefined || !hasContent ? '' : String(lineNo)).padStart(lineNoWidth)} ${marker}`
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AccountNotificationNotice } from '../dsh-adapter/oauth/account-notifications.js';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { StarMilestone } from '../usageStats.js';
|
|
3
4
|
import type { WhaleCouponNotice } from '../dsh-adapter/oauth/bonus.js';
|
|
@@ -51,9 +52,10 @@ export declare function StarPrompt({ milestone, actions, onClose, initialPhase,
|
|
|
51
52
|
* 走这条(只演感谢,不再问一次)。 */
|
|
52
53
|
readonly initialPhase?: 'ask' | 'done';
|
|
53
54
|
}): React.ReactNode;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
readonly
|
|
55
|
+
/** One existing account-notice lane, with server copy when no coupon data exists. */
|
|
56
|
+
export declare function WhaleCouponPrompt(props: {
|
|
57
|
+
readonly notice: WhaleCouponNotice | AccountNotificationNotice;
|
|
58
|
+
readonly onShown: (orderId: string) => void;
|
|
57
59
|
readonly onClose: () => void;
|
|
58
60
|
}): React.ReactNode;
|
|
59
61
|
//# sourceMappingURL=StarPrompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StarPrompt.d.ts","sourceRoot":"","sources":["../../../src/components/StarPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"StarPrompt.d.ts","sourceRoot":"","sources":["../../../src/components/StarPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAA;AAE9F,OAAO,KAAK,MAAM,OAAO,CAAA;AAczB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAuBtE,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9E;;0DAE0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IAChD,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,OAAO,EACP,YAAoB,GACrB,EAAE;IACD,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B;2BACuB;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACvC,GAAG,KAAK,CAAC,SAAS,CAuOlB;AAqBD,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,yBAAyB,CAAA;IAC9D,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAC7B,GAAG,KAAK,CAAC,SAAS,CASlB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { sanitizeEditableText } from '../utils/inputPaste.js';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
+
import { afterNextTerminalFlush } from '../ink/flush-tick.js';
|
|
5
|
+
import { Box, Text, ScrollBox, useApp, useInput, useTerminalImages, useTerminalSize } from '../ui.js';
|
|
4
6
|
import { getLang, subscribeLang, t } from '../i18n.js';
|
|
5
7
|
import { Divider } from './design-system/Divider.js';
|
|
6
8
|
import { HintLine } from './design-system/HintLine.js';
|
|
@@ -171,7 +173,19 @@ function couponExpiry(expiresAt) {
|
|
|
171
173
|
return month === undefined || day === undefined || hour === undefined || minute === undefined
|
|
172
174
|
? null : { month, day, time: `${hour}:${minute}` };
|
|
173
175
|
}
|
|
174
|
-
|
|
176
|
+
/** One existing account-notice lane, with server copy when no coupon data exists. */
|
|
177
|
+
export function WhaleCouponPrompt(props) {
|
|
178
|
+
const notice = props.notice;
|
|
179
|
+
if (notice.kind !== 'account-notification')
|
|
180
|
+
return _jsx(LegacyWhaleCouponPrompt, { ...props, notice: notice });
|
|
181
|
+
if (notice.amount !== undefined && notice.currency !== undefined && notice.expiresAt !== undefined) {
|
|
182
|
+
// Keep the store's snapshot identity: allocating a presentation object here
|
|
183
|
+
// would re-arm the write receipt on every unrelated Chat commit.
|
|
184
|
+
return _jsx(LegacyWhaleCouponPrompt, { ...props, notice: notice });
|
|
185
|
+
}
|
|
186
|
+
return _jsx(ServerAccountNotice, { ...props, notice: notice });
|
|
187
|
+
}
|
|
188
|
+
function LegacyWhaleCouponPrompt({ notice, onShown, onClose, }) {
|
|
175
189
|
const lang = React.useSyncExternalStore(subscribeLang, getLang);
|
|
176
190
|
const { columns, rows } = useTerminalSize();
|
|
177
191
|
const imagesAvailable = useTerminalImages();
|
|
@@ -186,10 +200,17 @@ export function WhaleCouponPrompt({ notice, onShown, onClose, }) {
|
|
|
186
200
|
const amount = notice.amount.replace(/(\.\d*?)0+$/u, '$1').replace(/\.$/u, '');
|
|
187
201
|
const unit = lang === 'zh' ? notice.currency === 'CNY' ? '元' : '美元' : notice.currency;
|
|
188
202
|
const expiry = couponExpiry(notice.expiresAt);
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
203
|
+
const { stdout } = useApp();
|
|
204
|
+
// Register during mutation so even synchronous commits capture this card.
|
|
205
|
+
// A queued write is not presentation: wait for its successful completion.
|
|
206
|
+
// Register once per snapshot identity: an unrelated commit with a fresh
|
|
207
|
+
// parent callback must not re-arm the receipt, but a refreshed same-id
|
|
208
|
+
// snapshot must (the store rejects an ack carrying the previous snapshot).
|
|
209
|
+
// The callback reads the latest pair so the newest card acknowledges itself.
|
|
210
|
+
const receipt = React.useRef({ onShown, orderId: notice.orderId });
|
|
211
|
+
receipt.current.onShown = onShown;
|
|
212
|
+
receipt.current.orderId = notice.orderId;
|
|
213
|
+
React.useInsertionEffect(() => afterNextTerminalFlush(stdout, () => receipt.current.onShown(receipt.current.orderId)), [stdout, notice]);
|
|
193
214
|
useInput((_input, key) => {
|
|
194
215
|
if (key.return || key.escape)
|
|
195
216
|
onClose();
|
|
@@ -326,3 +347,32 @@ function useConfettiFrame() {
|
|
|
326
347
|
}, []);
|
|
327
348
|
return frame;
|
|
328
349
|
}
|
|
350
|
+
/** Server-authored account text uses the existing account-notice modal lane. */
|
|
351
|
+
function ServerAccountNotice({ notice, onShown, onClose }) {
|
|
352
|
+
const { columns, rows } = useTerminalSize();
|
|
353
|
+
const { stdout } = useApp();
|
|
354
|
+
const background = useTerminalBackground();
|
|
355
|
+
const scroll = React.useRef(null);
|
|
356
|
+
const width = Math.max(1, Math.min(columns, 72));
|
|
357
|
+
const height = Math.max(1, Math.min(rows, 20));
|
|
358
|
+
// Mutation-phase registration precedes even the synchronous test renderer's
|
|
359
|
+
// resetAfterCommit. The callback requires a real write, never a timer guess;
|
|
360
|
+
// it re-arms only when this snapshot changes (a language refresh keeps the
|
|
361
|
+
// same id) and reads the latest callback through the ref.
|
|
362
|
+
const receipt = React.useRef({ onShown, orderId: notice.orderId });
|
|
363
|
+
receipt.current.onShown = onShown;
|
|
364
|
+
receipt.current.orderId = notice.orderId;
|
|
365
|
+
React.useInsertionEffect(() => afterNextTerminalFlush(stdout, () => receipt.current.onShown(receipt.current.orderId)), [stdout, notice]);
|
|
366
|
+
useInput((_input, key, event) => {
|
|
367
|
+
event.stopImmediatePropagation();
|
|
368
|
+
if (key.return || key.escape)
|
|
369
|
+
onClose();
|
|
370
|
+
else if (key.upArrow || key.wheelUp || key.pageUp)
|
|
371
|
+
scroll.current?.scrollBy(key.pageUp ? -Math.max(1, height - 5) : -3);
|
|
372
|
+
else if (key.downArrow || key.wheelDown || key.pageDown)
|
|
373
|
+
scroll.current?.scrollBy(key.pageDown ? Math.max(1, height - 5) : 3);
|
|
374
|
+
});
|
|
375
|
+
const accountAction = notice.actions.find(action => action.target.type === 'app_route');
|
|
376
|
+
const dismiss = notice.actions.find(action => action.target.type === 'dismiss');
|
|
377
|
+
return _jsxs(_Fragment, { children: [_jsx(Box, { position: "absolute", bottom: 0, left: 0, width: "100%", height: rows, backdrop: "dim", onClick: onClose }), _jsxs(Box, { position: "absolute", left: Math.max(0, Math.floor((columns - width) / 2)), bottom: Math.max(0, Math.floor((rows - height) / 2)), width: width, height: height, flexDirection: "column", borderStyle: "round", borderColor: "inactive", paddingX: 1, backgroundColor: background, opaque: true, overflow: "hidden", onClick: event => event.stopImmediatePropagation(), children: [_jsx(Box, { flexShrink: 0, children: _jsx(Text, { bold: true, color: "accent", wrap: "truncate-end", children: sanitizeEditableText(notice.title) }) }), _jsxs(ScrollBox, { ref: scroll, flexDirection: "column", flexGrow: 1, height: Math.max(1, height - 5), children: [_jsx(Text, { wrap: "wrap", children: sanitizeEditableText(notice.body) }), accountAction !== undefined && _jsx(Text, { dimColor: true, wrap: "wrap", children: t('account-notice-account-route', { label: sanitizeEditableText(accountAction.label) }) })] }), _jsx(Box, { flexShrink: 0, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: t('account-notice-hint', { label: dismiss === undefined ? t('account-notice-close') : sanitizeEditableText(dismiss.label) }) }) })] })] });
|
|
378
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentCard.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAOvD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,CAAA;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B;oEACgE;IAChE,UAAU,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAA;CAC1E;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;CAAE,CAQpK;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAmB,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"SubagentCard.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAOvD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,CAAA;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B;oEACgE;IAChE,UAAU,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAA;CAC1E;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;CAAE,CAQpK;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAmB,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAAG,KAAK,CAAC,SAAS,CAgGhI"}
|
|
@@ -70,7 +70,7 @@ export function SubagentCard({ subagent, focused, onClick, variant = 'default',
|
|
|
70
70
|
subagent.effort,
|
|
71
71
|
shownDuration === undefined ? undefined : formatDuration(shownDuration),
|
|
72
72
|
].filter(part => part !== undefined && part !== '').join(' · ');
|
|
73
|
-
return _jsxs(Box, { ref: clockRef, flexDirection: "column", paddingLeft: 1, marginBottom: panelMode ? 0 : 1, onClick: onClick, onMouseEnter: onClick !== undefined ? () => setHovered(true) : undefined, onMouseLeave: onClick !== undefined ? () => setHovered(false) : undefined, backgroundColor: hoverTint ? 'userMessageBackgroundHover' : undefined, children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { flexShrink: 0, marginRight: 1, children: _jsx(Text, { color: glyphColor, children: glyph }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsx(Text, { bold: true, color: focused ? 'accent' : undefined, wrap: "truncate-end", children: teamMember !== undefined ? teamMember.name : panelMode ? subagent.description : `${t('subagent-card-prefix')}${subagent.description}` }) }), teamMember !== undefined && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : teamGlyph?.color, dimColor: teamMember.status === 'provisioning', children: t(`team-status-${teamMember.status}`) }) })), teamMember === undefined && subagent.mode === 'continuable' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : 'warning', children: t('subagent-mode-continuable') }) })), teamMember === undefined && subagent.mode === 'one-shot' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }) })), !panelMode && meta !== '' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: meta }) }))] }), panelMode && panelMeta !== '' && _jsx(Box, { paddingLeft: 3, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: panelMeta }) }), panelMode
|
|
73
|
+
return _jsxs(Box, { ref: clockRef, flexDirection: "column", paddingLeft: 1, marginBottom: panelMode ? 0 : 1, onClick: onClick, onMouseEnter: onClick !== undefined ? () => setHovered(true) : undefined, onMouseLeave: onClick !== undefined ? () => setHovered(false) : undefined, backgroundColor: hoverTint ? 'userMessageBackgroundHover' : undefined, children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { flexShrink: 0, marginRight: 1, children: _jsx(Text, { color: glyphColor, children: glyph }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsx(Text, { bold: true, color: focused ? 'accent' : undefined, wrap: "truncate-end", children: teamMember !== undefined ? teamMember.name : panelMode ? subagent.description : `${t('subagent-card-prefix')}${subagent.description}` }) }), teamMember === undefined && subagent.name !== undefined && subagent.name !== '' && (_jsx(Box, { flexShrink: 1, overflow: "hidden", marginLeft: 1, children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: subagent.name }) })), teamMember !== undefined && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : teamGlyph?.color, dimColor: teamMember.status === 'provisioning', children: t(`team-status-${teamMember.status}`) }) })), teamMember === undefined && subagent.mode === 'continuable' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : 'warning', children: t('subagent-mode-continuable') }) })), teamMember === undefined && subagent.mode === 'one-shot' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }) })), !panelMode && meta !== '' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: meta }) }))] }), panelMode && panelMeta !== '' && _jsx(Box, { paddingLeft: 3, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: panelMeta }) }), panelMode
|
|
74
74
|
? previewRows.map(row => _jsx(Text, { dimColor: true, wrap: "truncate", children: ` ${row.text}` }, row.key))
|
|
75
75
|
: liveLine !== undefined && _jsx(Text, { dimColor: true, wrap: "truncate", children: ` │ ${liveLine}` })] });
|
|
76
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentDashboard.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAOhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,KAAK,EAAY,QAAQ,EAAE,M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|
@@ -28,7 +28,7 @@ export function ExitButton({ onClick }) {
|
|
|
28
28
|
/** A teammate the host has not announced as a subagent yet. */
|
|
29
29
|
function TeamRosterOnlyRow({ row, focused, panelMode, self }) {
|
|
30
30
|
const { glyph, color } = teamStatusGlyph(row.status, isMinimalUiMode());
|
|
31
|
-
return (_jsxs(Box, { flexDirection: "row", paddingLeft: 1, marginBottom: panelMode ? 0 : 1, children: [_jsx(Box, { flexShrink: 0, marginRight: 1, children: _jsx(Text, { color: color, children: glyph }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { bold: true, color: focused ? 'accent' : undefined, children: row.member.name }), self && _jsx(Text, { dimColor: true, children: ' · ' + t('team-self-mark') })] }) }), _jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : color, dimColor: row.status === 'provisioning', children: t(`team-status-${row.status}`) }) })] }));
|
|
31
|
+
return (_jsxs(Box, { flexDirection: "row", paddingLeft: 1, marginBottom: panelMode ? 0 : 1, children: [_jsx(Box, { flexShrink: 0, marginRight: 1, children: _jsx(Text, { color: color, children: glyph }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { bold: true, color: focused ? 'accent' : undefined, children: row.member.name }), row.member.description !== undefined && _jsx(Text, { dimColor: true, children: ' · ' + row.member.description }), self && _jsx(Text, { dimColor: true, children: ' · ' + t('team-self-mark') })] }) }), _jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : color, dimColor: row.status === 'provisioning', children: t(`team-status-${row.status}`) }) })] }));
|
|
32
32
|
}
|
|
33
33
|
const TASK_GLYPH = {
|
|
34
34
|
pending: { glyph: '○', color: 'subtle' },
|
|
@@ -164,7 +164,8 @@ export function SubagentDashboard({ subagents, team, sessionId, peers, onClose,
|
|
|
164
164
|
const outer = panelMode
|
|
165
165
|
? { paddingLeft: 1, paddingRight: 1, paddingTop: 0 }
|
|
166
166
|
: { paddingX: 2, paddingY: 1 };
|
|
167
|
-
|
|
167
|
+
const teamOff = team !== undefined && team.mode === 'switch' && !team.enabled;
|
|
168
|
+
return (_jsxs(Box, { flexDirection: "column", ...outer, children: [!panelMode && (_jsx(Divider, { color: "accent", title: t(team === undefined ? 'subagent-dashboard-title' : teamOff ? 'team-dashboard-title-off' : '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 }) })), teamOff && _jsx(Text, { dimColor: true, wrap: "wrap", children: t('team-mode-off-note') }), channelFailures.map(summary => (_jsx(Text, { color: "error", wrap: "wrap", children: '⚠ ' + t('subagent-channel-degraded', {
|
|
168
169
|
provider: summary.provider,
|
|
169
170
|
failed: summary.failed,
|
|
170
171
|
settled: summary.settled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentDetailScene.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDetailScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAExG,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAA;AA+JzC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,aAAa,CAAA;IACvB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAA;IACjD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;qDAEiD;IACjD,cAAc,CAAC,EAAE,gBAAgB,CAAA;IACjC,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,I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ACjC,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACtC,gDAAgD;IAChD,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAA;IACxF;iCAC6B;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,QAAa,EACb,OAAO,EACP,OAAmB,EACnB,OAAc,EACd,OAAc,GACf,EAAE,wBAAwB,GAAG,KAAK,CAAC,SAAS,CA2mB5C"}
|
|
@@ -398,7 +398,7 @@ export function SubagentDetailScene({ subagent, onFailureRead, onBack, onInterru
|
|
|
398
398
|
const outer = panelMode
|
|
399
399
|
? { paddingLeft: 1, paddingRight: 1, paddingTop: 0 }
|
|
400
400
|
: { paddingX: 2, paddingY: 1 };
|
|
401
|
-
return (_jsxs(Box, { flexDirection: "column", ...outer, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: info.color, bold: true, children: info.glyph }), _jsx(Text, { bold: true, children: `${t('subagent-card-prefix')}${subagent.description}` }), _jsx(Text, { dimColor: true, children: "\u00B7" }), _jsx(Text, { color: info.color, children: info.label }), subagent.mode === 'continuable' && _jsx(Text, { color: "warning", children: t('subagent-mode-continuable') }), subagent.mode === 'one-shot' && _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }), _jsx(Box, { flexGrow: 1 }), onOpenView !== undefined && (_jsx(Box, { onClick: openMainView, children: _jsx(Text, { color: "subtle", children: "\u2922" }) })), _jsx(ExitButton, { onClick: onBack })] }), _jsxs(Text, { children: [_jsx(Text, { children: subagent.model ?? subagent.provider ?? 'default' }), _jsxs(Text, { dimColor: true, children: [shownDuration !== undefined ? ` · ${formatDuration(shownDuration)} · ` : ' · ', totalTokens || '—', " tok \u00B7 ", toolsCount, " tools"] })] }), _jsxs(Text, { dimColor: true, children: [`${t('subagent-started')} ${formatTimestamp(subagent.startedAt)}`
|
|
401
|
+
return (_jsxs(Box, { flexDirection: "column", ...outer, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: info.color, bold: true, children: info.glyph }), _jsx(Text, { bold: true, children: `${t('subagent-card-prefix')}${subagent.description}` }), subagent.name !== undefined && subagent.name !== '' && (_jsx(Box, { flexShrink: 1, overflow: "hidden", children: _jsx(Text, { color: "accent", wrap: "truncate-end", children: subagent.name }) })), _jsx(Text, { dimColor: true, children: "\u00B7" }), _jsx(Text, { color: info.color, children: info.label }), subagent.mode === 'continuable' && _jsx(Text, { color: "warning", children: t('subagent-mode-continuable') }), subagent.mode === 'one-shot' && _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }), _jsx(Box, { flexGrow: 1 }), onOpenView !== undefined && (_jsx(Box, { onClick: openMainView, children: _jsx(Text, { color: "subtle", children: "\u2922" }) })), _jsx(ExitButton, { onClick: onBack })] }), _jsxs(Text, { children: [_jsx(Text, { children: subagent.model ?? subagent.provider ?? 'default' }), _jsxs(Text, { dimColor: true, children: [shownDuration !== undefined ? ` · ${formatDuration(shownDuration)} · ` : ' · ', totalTokens || '—', " tok \u00B7 ", toolsCount, " tools"] })] }), _jsxs(Text, { dimColor: true, children: [`${t('subagent-started')} ${formatTimestamp(subagent.startedAt)}`
|
|
402
402
|
+ (subagent.completedAt ? ` · ${t('subagent-completed')} ${formatTimestamp(subagent.completedAt)}` : ''), ` · id ${subagent.agentId.slice(0, 8)}`] }), subagent.error && (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: "error", wrap: "wrap", children: `${t('subagent-error-label')}: ${subagent.error}` }) })), _jsxs(Box, { flexDirection: "row", gap: 0, marginTop: 1, children: [tab('summary', t('subagent-tab-summary')), tab('output', subagent.outputEvents.length > 0 ? `${t('subagent-output-label')} ${subagent.outputEvents.length}` : t('subagent-output-label')), loadTranscript !== undefined && tab('transcript', t('subagent-tab-transcript')), tab('tools', toolsCount > 0 ? `${t('subagent-tools')} ${toolsCount}` : t('subagent-tools')), messages.length > 0 && tab('messages', `${t('agent-messages-tab')} ${messages.length}`), _jsx(Text, { dimColor: true, children: ` ${pageIndex + 1}/${pages.length}` })] }), _jsx(Text, { dimColor: true, children: '─'.repeat(Math.max(20, Math.min(72, columns - 6))) }), activePage === 'output' && loadTranscript === undefined && subagent.outputEvents.length >= OUTPUT_WINDOW_CAP && (_jsx(Text, { dimColor: true, children: t('subagent-transcript-retained', { count: subagent.outputEvents.length }) })), _jsx(Box, { flexDirection: "column", paddingX: 1, maxHeight: panelMode ? Math.max(6, rows - 10) : Math.max(10, rows - 14), children: _jsxs(ScrollBox, { ref: scrollRef, flexDirection: "column", flexGrow: 1, children: [activePage === 'summary' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(StatGrid, { subagent: subagent, totalTokens: totalTokens, elapsed: elapsed, statusLabel: info.label, statusColor: info.color }), subagent.summary && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { dimColor: true, bold: true, children: '─ summary ' }), _jsx(Text, { wrap: "wrap", children: subagent.summary })] })), !subagent.summary && (_jsx(Text, { dimColor: true, children: isRunning ? t('subagent-no-output') : t('subagent-no-summary') }))] })), activePage === 'output' && (subagent.outputEvents.length === 0 && subagent.output.length === 0 ? (_jsx(Text, { dimColor: true, children: t('subagent-no-output') })) : (_jsx(_Fragment, { children: blocks.map((block, index) => {
|
|
403
403
|
if (block.kind === 'thinking') {
|
|
404
404
|
const text = block.lines.map(line => line.text).join('\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantToolUseMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantToolUseMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"AssistantToolUseMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantToolUseMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,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;AAUjE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,CAAA;IACb,4CAA4C;IAC5C,eAAe,EAAE,OAAO,CAAA;IACxB,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAA;IAChB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;qCACiC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,OAAO,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACjC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IACzC,2EAA2E;IAC3E,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;8CAC0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;4BAGwB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;6BAEyB;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AA2LD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,KAAK,CAS9F;AAmfD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,eAAe,EACf,OAAO,EACP,UAAkB,EAClB,UAAkB,EAClB,OAAO,EACP,QAAQ,EACR,UAAmB,EACnB,cAAuB,EACvB,UAAU,EACV,mBAA2B,EAC3B,YAAoB,EACpB,KAAa,EACb,aAAa,EACb,YAAoB,EACpB,UAAkB,GACnB,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,CA4YzB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { extname } from 'node:path';
|
|
4
|
+
import * as JsDiff from 'diff';
|
|
4
5
|
import { Box, Text, useTerminalSize } from '../../ui.js';
|
|
5
6
|
import { stringWidth } from '../../ink/stringWidth.js';
|
|
6
7
|
import { useAnimationFrame } from '../../ink/hooks/use-animation-frame.js';
|
|
@@ -187,16 +188,57 @@ export function toolNameColor(raw, category) {
|
|
|
187
188
|
return 'toolNameExec';
|
|
188
189
|
return 'accent';
|
|
189
190
|
}
|
|
190
|
-
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
191
|
+
/** Context lines a unified diff keeps around each change block (git's
|
|
192
|
+
* default). The card locates a change instead of replaying the whole file
|
|
193
|
+
* (issue #1777). */
|
|
194
|
+
const DIFF_CONTEXT_LINES = 3;
|
|
195
|
+
/** Budget for the structured re-diff. A whole-file before/after image (the
|
|
196
|
+
* Claude backend) can be arbitrarily large, and jsdiff's Myers pass runs
|
|
197
|
+
* synchronously during render — a full rewrite of a big file took seconds.
|
|
198
|
+
* Past this budget jsdiff aborts (returns undefined) and the card falls back
|
|
199
|
+
* to the bounded whole-text listing; the ordinary line caps bound the rows
|
|
200
|
+
* either way. */
|
|
201
|
+
const DIFF_MAX_EDIT_LENGTH = 4000;
|
|
202
|
+
const DIFF_TIMEOUT_MS = 100;
|
|
203
|
+
/** `start,count` as a unified-diff range: git drops `,1` for a one-line
|
|
204
|
+
* range. */
|
|
205
|
+
function diffRange(start, count) {
|
|
206
|
+
return count === 1 ? String(start) : `${start},${count}`;
|
|
207
|
+
}
|
|
208
|
+
/** One side's range in a unified hunk header: `start,count` in file lines, or
|
|
209
|
+
* undefined when the side's file position is unknown. A zero-line side names
|
|
210
|
+
* the line BEFORE the range (git's convention), so a known start S maps to
|
|
211
|
+
* `S + hunkStart - 2` — a whole-file image at 1 keeps the `0,0` spelling.
|
|
212
|
+
* Without a start the side is a whole empty image (a new file's before-image
|
|
213
|
+
* or a deleted file's after-image), which is also `0,0`. */
|
|
214
|
+
function hunkRange(start, hunkStart, lines) {
|
|
215
|
+
if (lines === 0)
|
|
216
|
+
return start === undefined ? '0,0' : diffRange(Math.max(0, start + hunkStart - 2), 0);
|
|
217
|
+
return start === undefined ? undefined : diffRange(start + hunkStart - 1, lines);
|
|
218
|
+
}
|
|
219
|
+
/** One hunk's `@@ -a,b +c,d @@` header, or undefined when the texts' file
|
|
220
|
+
* positions are unknown. `oldStart`/`newStart` are the 1-based file lines of
|
|
221
|
+
* the diff's first text lines; only a producer that knows the texts are a
|
|
222
|
+
* whole-file image (or a known slice) may set them, so a missing offset stays
|
|
223
|
+
* unnumbered instead of guessed (#250 P2-3). */
|
|
224
|
+
function hunkHeader(hunk, oldStart, newStart) {
|
|
225
|
+
const oldRange = hunkRange(oldStart, hunk.oldStart, hunk.oldLines);
|
|
226
|
+
const newRange = hunkRange(newStart, hunk.newStart, hunk.newLines);
|
|
227
|
+
return oldRange === undefined || newRange === undefined ? undefined : `@@ -${oldRange} +${newRange} @@`;
|
|
228
|
+
}
|
|
229
|
+
/** One hunk body in git's unified layout: context lines keep their leading
|
|
230
|
+
* space, removals get `-`, additions `+`. A `\ No newline` marker carries no
|
|
231
|
+
* readable content and is dropped (the patch parser does the same). */
|
|
232
|
+
function hunkBodyLines(hunk) {
|
|
233
|
+
const out = [];
|
|
234
|
+
for (const raw of hunk.lines) {
|
|
235
|
+
if (raw.startsWith('\\'))
|
|
236
|
+
continue;
|
|
237
|
+
const marker = raw[0] ?? ' ';
|
|
238
|
+
const text = raw.slice(1);
|
|
239
|
+
out.push(marker === '-' ? del(`-${text}`) : marker === '+' ? add(`+${text}`) : plain(` ${text}`));
|
|
240
|
+
}
|
|
241
|
+
return out;
|
|
200
242
|
}
|
|
201
243
|
/** A patch file → its header and numbered hunk rows: each line carries
|
|
202
244
|
* its real line number (old for a removed line, new otherwise) in a gutter
|
|
@@ -229,10 +271,63 @@ function patchLines(diff, multiFile) {
|
|
|
229
271
|
});
|
|
230
272
|
return out;
|
|
231
273
|
}
|
|
232
|
-
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
274
|
+
/** One side's text → display lines (upstream contentLines rule: empty text
|
|
275
|
+
* is zero lines; a single trailing newline is a terminator, not a line;
|
|
276
|
+
* interior blanks survive). The hunk path gets the same rule from jsdiff;
|
|
277
|
+
* this listing is only the over-budget fallback. */
|
|
278
|
+
function sideLines(text) {
|
|
279
|
+
if (text === '')
|
|
280
|
+
return [];
|
|
281
|
+
const lines = text.split('\n');
|
|
282
|
+
if (lines[lines.length - 1] === '')
|
|
283
|
+
lines.pop();
|
|
284
|
+
return lines;
|
|
285
|
+
}
|
|
286
|
+
/** Whole-text fallback for a diff too large to hunk within the render budget:
|
|
287
|
+
* removed lines then added lines, with no hunk header (the position is not
|
|
288
|
+
* known here). The ordinary line caps bound the rows like any other body. */
|
|
289
|
+
function wholeTextDiffLines(diff) {
|
|
290
|
+
const out = [];
|
|
291
|
+
if (diff.oldText !== null)
|
|
292
|
+
for (const line of sideLines(diff.oldText))
|
|
293
|
+
out.push(del(`-${line}`));
|
|
294
|
+
for (const line of sideLines(diff.newText))
|
|
295
|
+
out.push(add(`+${line}`));
|
|
296
|
+
return out;
|
|
297
|
+
}
|
|
298
|
+
/** One old/new file diff → git-style hunks: each hunk shows its change plus
|
|
299
|
+
* {@link DIFF_CONTEXT_LINES} context lines, removed and added lines adjacent,
|
|
300
|
+
* and — when the backend told us where the texts start — the hunk header
|
|
301
|
+
* with real file line numbers. Without offsets a hunk prints no numbers and
|
|
302
|
+
* `⋯` separates the hunks instead (#250 P2-3, #1777). */
|
|
303
|
+
function oldNewDiffLines(diff) {
|
|
304
|
+
const patch = JsDiff.structuredPatch('', '', diff.oldText ?? '', diff.newText, undefined, undefined, {
|
|
305
|
+
context: DIFF_CONTEXT_LINES,
|
|
306
|
+
maxEditLength: DIFF_MAX_EDIT_LENGTH,
|
|
307
|
+
timeout: DIFF_TIMEOUT_MS,
|
|
308
|
+
});
|
|
309
|
+
// Over budget: keep the frame responsive with the bounded listing instead.
|
|
310
|
+
if (patch === undefined)
|
|
311
|
+
return wholeTextDiffLines(diff);
|
|
312
|
+
const out = [];
|
|
313
|
+
patch.hunks.forEach((hunk, index) => {
|
|
314
|
+
const header = hunkHeader(hunk, diff.oldStart, diff.newStart);
|
|
315
|
+
if (header !== undefined)
|
|
316
|
+
out.push(dim(header));
|
|
317
|
+
else if (index > 0)
|
|
318
|
+
out.push(dim('⋯'));
|
|
319
|
+
// Append row by row: a hunk can carry one row per file line, and spreading
|
|
320
|
+
// a large array into one `push` call hits the engine's argument limit.
|
|
321
|
+
for (const line of hunkBodyLines(hunk))
|
|
322
|
+
out.push(line);
|
|
323
|
+
});
|
|
324
|
+
return out;
|
|
325
|
+
}
|
|
326
|
+
/** Diff hunks → unified card rows. The header already carries the path for
|
|
327
|
+
* the common single-hunk case; with several hunks a path row separates files
|
|
328
|
+
* and `⋯` separates scattered hunks of one file (upstream DiffBlock). An
|
|
329
|
+
* old/new file diff is re-diffed into git-style hunks (#1777); a patch file
|
|
330
|
+
* (`ToolFileDiff.patch`) renders through {@link patchLines}. */
|
|
236
331
|
function diffLines(diffs) {
|
|
237
332
|
const out = [];
|
|
238
333
|
let prevPath;
|
|
@@ -249,12 +344,9 @@ function diffLines(diffs) {
|
|
|
249
344
|
out.push(dim('⋯'));
|
|
250
345
|
}
|
|
251
346
|
prevPath = diff.path;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
for (const line of sideLines(diff.newText))
|
|
257
|
-
out.push(add(`+ ${line}`));
|
|
347
|
+
// Same append-by-row rule: the over-budget fallback lists every source line.
|
|
348
|
+
for (const line of oldNewDiffLines(diff))
|
|
349
|
+
out.push(line);
|
|
258
350
|
}
|
|
259
351
|
return out;
|
|
260
352
|
}
|
|
@@ -413,7 +505,7 @@ function foldTerminalTitle(title, foldLines) {
|
|
|
413
505
|
let separators = 1;
|
|
414
506
|
for (let at = title.indexOf('\n', firstEnd + 1); at !== -1; at = title.indexOf('\n', at + 1))
|
|
415
507
|
separators++;
|
|
416
|
-
//
|
|
508
|
+
// A trailing newline is a terminator, not a line.
|
|
417
509
|
hiddenLines = separators - (title.endsWith('\n') ? 1 : 0);
|
|
418
510
|
body = title.slice(0, title.charCodeAt(firstEnd - 1) === 13 ? firstEnd - 1 : firstEnd);
|
|
419
511
|
}
|
|
@@ -611,6 +703,12 @@ export function AssistantToolUseMessage({ tool, marginTopOnTurn, verbose, isSele
|
|
|
611
703
|
const liveMaxLines = liveOutputMaxLines(verbose, fullscreen);
|
|
612
704
|
const liveWidth = Math.max(1, columns - 4);
|
|
613
705
|
const liveView = React.useMemo(() => liveText === '' ? undefined : liveOutputView(liveText, liveDropped, liveMaxLines, liveWidth), [liveText, liveDropped, liveMaxLines, liveWidth]);
|
|
706
|
+
// Structured body (diff hunks / tool output / read content) memoized on the
|
|
707
|
+
// view identity: a running card re-renders on the 1 s elapsed tick and on
|
|
708
|
+
// every reveal step, and the unified diff layout re-diffs its old/new texts
|
|
709
|
+
// into git hunks — a Claude card carries the whole file. `lang` joins the
|
|
710
|
+
// deps for the localized rows (patch stats, search totals).
|
|
711
|
+
const viewBody = React.useMemo(() => (useSplitDiff || view === undefined ? undefined : viewLines(view)), [useSplitDiff, view, lang]);
|
|
614
712
|
let body = [];
|
|
615
713
|
if (sendMessage !== undefined) {
|
|
616
714
|
// 正文 = message 文本预览(长文走既有的三行折叠),summary 作副行;
|
|
@@ -643,8 +741,8 @@ export function AssistantToolUseMessage({ tool, marginTopOnTurn, verbose, isSele
|
|
|
643
741
|
body = tool.errorText.split('\n').map((text) => ({ text, tone: 'error' }));
|
|
644
742
|
}
|
|
645
743
|
else if (!useSplitDiff) {
|
|
646
|
-
if (
|
|
647
|
-
body =
|
|
744
|
+
if (viewBody !== undefined)
|
|
745
|
+
body = viewBody;
|
|
648
746
|
if (body.length === 0 && result) {
|
|
649
747
|
body = result.trimEnd().split('\n').map(plain);
|
|
650
748
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent Teams in the agents surfaces (issue #1241, phase 2): fold the
|
|
3
3
|
* session's `TeamView` and its subagent rows into what the dashboard
|
|
4
|
-
* renders.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* renders. Both upstream shapes arrive as the same `TeamView`: a legacy
|
|
5
|
+
* roster wire's durable members, or the `0.2.2-rc.2` selection wire's Lead
|
|
6
|
+
* plus named subagents composed in `team-roster.ts`. A teammate is a
|
|
7
|
+
* continuable subagent of the Lead whose row id is the member id, so the two
|
|
8
|
+
* join by id; neither side overwrites the other's state (see
|
|
9
|
+
* `teamMemberStatus`). Pure: no I/O, no backend import.
|
|
7
10
|
*/
|
|
8
11
|
import type { TeamMember, TeamTask, TeamView } from '../adapter/ports/channel-view.js';
|
|
9
12
|
import type { SubagentState } from '../dsh-adapter/subagents.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teamRoster.d.ts","sourceRoot":"","sources":["../../../src/components/teamRoster.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"teamRoster.d.ts","sourceRoot":"","sources":["../../../src/components/teamRoster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAEhE;;8CAE8C;AAC9C,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAExF,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAA;IAC1B,uFAAuF;IACvF,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAA;IAC5C,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAA;CAC1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,GAAG,SAAS,EAAE,QAAQ,UAAO,GAAG,gBAAgB,CAK3H;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,aAAa,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAmB9H;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,aAAa,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAQtL;AAED,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAEnH;AAED,oDAAoD;AACpD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEzD"}
|
|
@@ -64,6 +64,15 @@ export interface ApprovalSnapshot extends PermissionPanelSnapshot {
|
|
|
64
64
|
export declare function bindApprovalStore(ctx: Parameters<typeof compositionRoot>[0], store: ApprovalStore): void;
|
|
65
65
|
/** Host-only lookup used by the presentation Port bridge. */
|
|
66
66
|
export declare function getApprovalStore(ctx: Parameters<typeof compositionRoot>[0]): ApprovalStore | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The ask's reason in the UI language. Requests may carry a localized
|
|
69
|
+
* `displayReason: { en, zh }` next to the English audit `reason` (DSH's
|
|
70
|
+
* auto-review asks do); older request types lack the field, so it is read
|
|
71
|
+
* structurally.
|
|
72
|
+
* @param req - The pending approval request.
|
|
73
|
+
* @returns The localized reason, else `req.reason`.
|
|
74
|
+
*/
|
|
75
|
+
export declare function reasonOf(req: ApprovalRequest): string | undefined;
|
|
67
76
|
/**
|
|
68
77
|
* Approval store: parks asks from the harness's approval seam, surfaces
|
|
69
78
|
* one at a time to the TUI, and settles each ask when the user decides or
|
|
@@ -129,6 +138,16 @@ export declare class ApprovalStore implements PermissionPanelSource {
|
|
|
129
138
|
* @returns One id per asking agent, or an empty array when none waits.
|
|
130
139
|
*/
|
|
131
140
|
pendingAgentIds(): readonly string[];
|
|
141
|
+
/**
|
|
142
|
+
* Whether this exact request object is still parked (active or queued). A
|
|
143
|
+
* notification queued before the native transport dispatches uses it to drop
|
|
144
|
+
* a toast whose approval was answered in the meantime; object identity is the
|
|
145
|
+
* only per-ask identity the protocol carries (the request has no id of its
|
|
146
|
+
* own and a null callId is legal).
|
|
147
|
+
* @param request - The request object handed to {@link park}.
|
|
148
|
+
* @returns True while that ask is still waiting for a decision.
|
|
149
|
+
*/
|
|
150
|
+
hasParkedRequest(request: ApprovalRequest): boolean;
|
|
132
151
|
/**
|
|
133
152
|
* The first parked ask's detail for one agent — the agent view's row
|
|
134
153
|
* summary while it needs input (the question it is blocked on).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/approvals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAG5D,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAA;AAElC;oDACoD;AACpD,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;IAC/D,wEAAwE;IACxE,QAAQ,CAAC,GAAG,EAAE,MAAM,C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