@askdkc/dsh-cli 0.13.5 → 0.14.1
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/bin/{dsh-tui.js → dsh-cli.js} +27 -27
- package/cordis.patch.yml +32 -32
- package/cordis.yml +17 -17
- package/lib/types/activityPrefs.d.ts +2 -2
- package/lib/types/activityPrefs.js +2 -2
- package/lib/types/adapter/channel/actions.js +1 -1
- package/lib/types/adapter/channel/consumer.js +1 -1
- package/lib/types/adapter/channel/internal-token.js +1 -1
- package/lib/types/adapter/channel/plugins.js +1 -1
- package/lib/types/adapter/channel/session-projection.js +3 -3
- package/lib/types/adapter/channel/transcript.js +1 -1
- package/lib/types/adapter/channel/ui.js +3 -3
- package/lib/types/adapter/kernel/host-facade.d.ts +1 -1
- package/lib/types/adapter/kernel/host-facade.js +6 -6
- package/lib/types/adapter/kernel/host-probe-access.d.ts +1 -1
- package/lib/types/adapter/kernel/host-probe-access.js +6 -6
- package/lib/types/adapter/kernel/kernel-runtime.js +1 -1
- package/lib/types/adapter/kernel/legacy-facade.d.ts +1 -1
- package/lib/types/adapter/kernel/legacy-facade.js +1 -1
- package/lib/types/adapter/kernel/replay-isolation.js +1 -1
- package/lib/types/adapter/kernel/runtime.d.ts +1 -1
- package/lib/types/adapter/kernel/runtime.js +7 -7
- package/lib/types/adapter/ports/channel-display.d.ts +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +15 -15
- package/lib/types/adapter/standard/descriptor.d.ts +1 -1
- package/lib/types/adapter/standard/descriptor.js +2 -2
- package/lib/types/adapter/standard/registry.d.ts +1 -1
- package/lib/types/adapter/standard/registry.js +2 -2
- package/lib/types/adapter/standard/tui-extension.d.ts +2 -2
- package/lib/types/adapter/standard/tui-extension.js +3 -3
- package/lib/types/adapter/upstream/channel-driver.js +10 -10
- package/lib/types/adapter/upstream/decisions-driver.js +3 -3
- package/lib/types/adapter/upstream/extensions-driver.js +18 -18
- package/lib/types/adapter/upstream/host-descriptor-driver.js +4 -4
- package/lib/types/adapter/upstream/presentation-driver.js +5 -5
- package/lib/types/adapter/upstream/scenes-driver.js +4 -4
- package/lib/types/adapter/upstream/settings-driver.js +4 -4
- package/lib/types/adapter/upstream/workspace-driver.js +2 -2
- package/lib/types/bootstrap/state.d.ts +4 -4
- package/lib/types/bootstrap/state.js +4 -4
- package/lib/types/{tuiDisplayPrefs.d.ts → cliDisplayPrefs.d.ts} +1 -1
- package/lib/types/{tuiDisplayPrefs.d.ts.map → cliDisplayPrefs.d.ts.map} +1 -1
- package/lib/types/{tuiDisplayPrefs.js → cliDisplayPrefs.js} +1 -1
- package/lib/types/commands.js +7 -7
- package/lib/types/components/AutoRecapRow.d.ts +1 -1
- package/lib/types/components/AutoRecapRow.js +1 -1
- package/lib/types/components/HelpMenu.d.ts +1 -1
- package/lib/types/components/HelpMenu.js +1 -1
- package/lib/types/components/LogoV2.d.ts +2 -2
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +5 -19
- package/lib/types/components/MermaidDiagram.js +1 -1
- package/lib/types/components/MessageList.d.ts +2 -2
- package/lib/types/components/MessageList.js +1 -1
- package/lib/types/components/PageMargin.d.ts +3 -3
- package/lib/types/components/PageMargin.js +1 -1
- package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
- package/lib/types/components/PluginSceneBoundary.js +1 -1
- package/lib/types/components/PromptInput.d.ts +1 -1
- package/lib/types/components/PromptInput.js +3 -3
- package/lib/types/components/ScrollbarGutter.d.ts +1 -1
- package/lib/types/components/ScrollbarGutter.js +1 -1
- package/lib/types/components/Select.d.ts +1 -1
- package/lib/types/components/Select.js +1 -1
- package/lib/types/components/SplitDiffView.d.ts +1 -1
- package/lib/types/components/ThemePicker.d.ts +1 -1
- package/lib/types/components/ThemePicker.js +1 -1
- package/lib/types/components/activityFrames.d.ts +1 -1
- package/lib/types/components/activityFrames.js +1 -1
- package/lib/types/components/design-system/Byline.d.ts +1 -1
- package/lib/types/components/design-system/Byline.js +1 -1
- package/lib/types/components/design-system/Divider.d.ts +1 -1
- package/lib/types/components/design-system/Divider.js +1 -1
- package/lib/types/components/design-system/StatusIcon.d.ts +1 -1
- package/lib/types/components/design-system/StatusIcon.js +1 -1
- package/lib/types/components/design-system/ThemeProvider.d.ts +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +11 -11
- package/lib/types/components/design-system/ThemedBox.d.ts +1 -1
- package/lib/types/components/design-system/ThemedBox.js +1 -1
- package/lib/types/components/design-system/ThemedText.d.ts +1 -1
- package/lib/types/components/design-system/ThemedText.js +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +3 -3
- package/lib/types/components/messages/AssistantToolUseMessage.js +1 -1
- package/lib/types/components/messages/originalImage.js +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +1 -1
- package/lib/types/components/smoothReveal.d.ts +1 -1
- package/lib/types/components/smoothReveal.js +1 -1
- package/lib/types/customTheme.d.ts +5 -5
- package/lib/types/customTheme.js +7 -7
- package/lib/types/dsh-adapter/activity-store.d.ts +1 -1
- package/lib/types/dsh-adapter/activity-store.js +3 -3
- package/lib/types/dsh-adapter/bundled-presets.js +2 -2
- package/lib/types/dsh-adapter/channel/action-readiness.js +2 -2
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +1 -1
- package/lib/types/dsh-adapter/channel/binding.js +14 -14
- package/lib/types/dsh-adapter/channel/external-commands.js +3 -3
- package/lib/types/dsh-adapter/channel/input-delivery.js +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +1 -1
- package/lib/types/dsh-adapter/channel/lifetime-resources.js +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +1 -1
- package/lib/types/dsh-adapter/channel/mode-actions.js +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission.js +6 -6
- package/lib/types/dsh-adapter/channel/mode-roster.js +1 -1
- package/lib/types/dsh-adapter/channel/owner.js +2 -2
- package/lib/types/dsh-adapter/channel/preferences.js +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +3 -3
- package/lib/types/dsh-adapter/channel/session-fork.js +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-metadata.js +2 -2
- package/lib/types/dsh-adapter/channel/session-rewind.js +2 -2
- package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/state.js +1 -1
- package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
- package/lib/types/dsh-adapter/channel-ui.js +2 -2
- package/lib/types/dsh-adapter/channel.js +9 -9
- package/lib/types/dsh-adapter/cli-registration.d.ts.map +1 -1
- package/lib/types/dsh-adapter/cli-registration.js +5 -4
- package/lib/types/dsh-adapter/command-trees.d.ts +1 -1
- package/lib/types/dsh-adapter/command-trees.js +2 -2
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +3 -3
- package/lib/types/dsh-adapter/compat/sessionLog.js +5 -5
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/settings.js +15 -7
- package/lib/types/dsh-adapter/contract.d.ts +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +0 -1
- package/lib/types/dsh-adapter/decision-guard.d.ts +3 -3
- package/lib/types/dsh-adapter/decision-guard.js +6 -6
- package/lib/types/dsh-adapter/dialogs.d.ts +1 -1
- package/lib/types/dsh-adapter/dialogs.js +7 -7
- package/lib/types/dsh-adapter/effect-ledger.d.ts +2 -2
- package/lib/types/dsh-adapter/effect-ledger.js +5 -5
- package/lib/types/dsh-adapter/extension-events.js +10 -10
- package/lib/types/dsh-adapter/extensions.d.ts +3 -3
- package/lib/types/dsh-adapter/extensions.js +3 -3
- package/lib/types/dsh-adapter/host-access.js +11 -11
- package/lib/types/dsh-adapter/ide-channel.d.ts +6 -6
- package/lib/types/dsh-adapter/ide-channel.js +6 -6
- package/lib/types/dsh-adapter/index.d.ts +18 -18
- package/lib/types/dsh-adapter/index.js +5 -5
- package/lib/types/dsh-adapter/inject-channel.d.ts +4 -4
- package/lib/types/dsh-adapter/inject-channel.js +5 -5
- package/lib/types/dsh-adapter/invariant.d.ts +9 -2
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -1
- package/lib/types/dsh-adapter/invariant.js +1 -1
- package/lib/types/dsh-adapter/message-observer.d.ts +2 -2
- package/lib/types/dsh-adapter/message-observer.js +23 -23
- package/lib/types/dsh-adapter/migrate/adapters/scan.js +1 -1
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/bin-path.js +4 -4
- package/lib/types/dsh-adapter/migrate/picker.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/picker.js +1 -1
- package/lib/types/dsh-adapter/migrate/uuid.js +1 -1
- package/lib/types/dsh-adapter/packaged-presets.js +1 -1
- package/lib/types/dsh-adapter/plugin-host.d.ts +2 -2
- package/lib/types/dsh-adapter/plugin-host.js +32 -32
- package/lib/types/dsh-adapter/plugin-storage.d.ts +3 -3
- package/lib/types/dsh-adapter/plugin-storage.js +5 -5
- package/lib/types/dsh-adapter/plugin.d.ts +4 -4
- package/lib/types/dsh-adapter/plugin.js +89 -89
- package/lib/types/dsh-adapter/preset-resolution.d.ts +1 -1
- package/lib/types/dsh-adapter/presets.js +1 -1
- package/lib/types/dsh-adapter/promptDebug.js +1 -1
- package/lib/types/dsh-adapter/questions.d.ts +1 -1
- package/lib/types/dsh-adapter/questions.js +1 -1
- package/lib/types/dsh-adapter/renderers.js +7 -7
- package/lib/types/dsh-adapter/scenes.d.ts +1 -1
- package/lib/types/dsh-adapter/scenes.js +6 -6
- package/lib/types/dsh-adapter/settings-sections.d.ts +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +5 -5
- package/lib/types/dsh-adapter/sharp.js +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +9 -9
- package/lib/types/dsh-adapter/status.js +21 -21
- package/lib/types/dsh-adapter/themes.js +2 -2
- package/lib/types/dsh-adapter/toast.js +7 -7
- package/lib/types/dsh-adapter/types.d.ts +0 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.d.ts +1 -1
- package/lib/types/dsh-adapter/workspaces.js +6 -6
- package/lib/types/effortPrefs.d.ts +2 -2
- package/lib/types/effortPrefs.js +2 -2
- package/lib/types/force-production-react.js +1 -1
- package/lib/types/herdr.js +4 -4
- package/lib/types/homePrefs.js +1 -1
- package/lib/types/i18n.d.ts +54 -54
- package/lib/types/i18n.js +39 -39
- package/lib/types/ink/clearTerminal.d.ts +1 -1
- package/lib/types/ink/clearTerminal.js +1 -1
- package/lib/types/ink/colorize.js +1 -1
- package/lib/types/ink/components/App.d.ts +1 -1
- package/lib/types/ink/components/App.js +5 -5
- package/lib/types/ink/components/Text.d.ts +1 -1
- package/lib/types/ink/devtools.d.ts +1 -1
- package/lib/types/ink/dom.d.ts +1 -1
- package/lib/types/ink/dom.js +1 -1
- package/lib/types/ink/geometry-trace.js +4 -4
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +8 -19
- package/lib/types/ink/reconciler.d.ts +1 -1
- package/lib/types/ink/reconciler.d.ts.map +1 -1
- package/lib/types/ink/reconciler.js +6 -3
- package/lib/types/ink/render-to-screen.d.ts.map +1 -1
- package/lib/types/ink/render-to-screen.js +0 -5
- package/lib/types/ink/terminal.js +3 -3
- package/lib/types/ink/termio/osc.js +1 -1
- package/lib/types/ink/update-overflow-guard.js +2 -2
- package/lib/types/minimalMode.d.ts +2 -2
- package/lib/types/minimalMode.js +2 -2
- package/lib/types/modelGroups.d.ts +1 -1
- package/lib/types/modelGroups.js +1 -1
- package/lib/types/modelPrefs.d.ts +1 -1
- package/lib/types/modelPrefs.js +1 -1
- package/lib/types/modelRecents.d.ts +2 -2
- package/lib/types/modelRecents.js +2 -2
- package/lib/types/package-version.d.ts +3 -0
- package/lib/types/package-version.d.ts.map +1 -0
- package/lib/types/package-version.js +25 -0
- package/lib/types/presetPrefs.d.ts +1 -1
- package/lib/types/presetPrefs.js +1 -1
- package/lib/types/reload.d.ts +8 -8
- package/lib/types/reload.js +4 -4
- package/lib/types/screens/Chat.js +27 -27
- package/lib/types/screens/StatusLine.js +1 -1
- package/lib/types/screens/StatusMetrics.js +1 -1
- package/lib/types/sessionHistory.d.ts +3 -3
- package/lib/types/sessionHistory.js +7 -7
- package/lib/types/sessionModes.js +1 -1
- package/lib/types/sessionMounts.d.ts +1 -1
- package/lib/types/sessionMounts.js +1 -1
- package/lib/types/sessionPins.d.ts +1 -1
- package/lib/types/sessionPins.js +1 -1
- package/lib/types/terminal-utils/cliHighlight.d.ts +1 -1
- package/lib/types/terminal-utils/hash.d.ts +1 -1
- package/lib/types/terminal-utils/hash.js +1 -1
- package/lib/types/terminal-utils/mermaid.d.ts +1 -1
- package/lib/types/terminal-utils/syntaxTheme.js +1 -1
- package/lib/types/theme.d.ts +3 -3
- package/lib/types/theme.js +3 -3
- package/lib/types/themePrefs.d.ts +3 -3
- package/lib/types/themePrefs.js +3 -3
- package/lib/types/tips.js +4 -4
- package/lib/types/trajectory/effortIgnition.d.ts +1 -1
- package/lib/types/trajectoryPrefs.d.ts +1 -1
- package/lib/types/trajectoryPrefs.js +1 -1
- package/lib/types/ui.d.ts +1 -1
- package/lib/types/ui.js +1 -1
- package/lib/types/update.d.ts +25 -26
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +55 -73
- package/lib/types/utils/clipboard.js +1 -1
- package/lib/types/utils/credentials.js +2 -2
- package/lib/types/utils/debug.d.ts +3 -3
- package/lib/types/utils/debug.js +6 -6
- package/lib/types/utils/earlyInput.d.ts +1 -1
- package/lib/types/utils/earlyInput.js +1 -1
- package/lib/types/utils/externalEditor.js +1 -1
- package/lib/types/utils/fullscreen.d.ts +3 -3
- package/lib/types/utils/fullscreen.js +4 -4
- package/lib/types/utils/log.js +1 -1
- package/lib/types/utils/paths.d.ts +3 -3
- package/lib/types/utils/paths.js +4 -4
- package/lib/types/working-activity.js +1 -1
- package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +1 -1
- package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +2 -2
- package/node_modules/@askdkc/dsh-auth/lib/index.js +2 -2
- package/node_modules/@askdkc/dsh-auth/lib/pi-ai.d.ts +0 -2
- package/node_modules/@askdkc/dsh-auth/lib/pi-ai.js +0 -2
- package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +1 -1
- package/node_modules/@askdkc/dsh-auth/lib/service.js +2 -2
- package/node_modules/dsh-working-activity/lib/client.js.map +1 -1
- package/node_modules/dsh-working-activity/lib/types/client/index.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/config.d.ts +2 -2
- package/node_modules/dsh-working-activity/lib/types/config.js +2 -2
- package/node_modules/dsh-working-activity/lib/types/frames.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/frames.js +1 -1
- package/node_modules/dsh-working-activity/lib/types/index.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/index.js +2 -2
- package/node_modules/dsh-working-activity/lib/types/invariant.d.ts +13 -1
- package/node_modules/dsh-working-activity/lib/types/lang.d.ts +5 -5
- package/node_modules/dsh-working-activity/lib/types/lang.js +8 -8
- package/node_modules/dsh-working-activity/lib/types/projection.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/projection.js +1 -1
- package/node_modules/dsh-working-activity/lib/types/status.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/status.js +1 -1
- package/node_modules/dsh-working-activity/package.json +0 -4
- package/node_modules/dsh-working-activity/src/client/index.ts +1 -1
- package/node_modules/dsh-working-activity/src/config.ts +2 -2
- package/node_modules/dsh-working-activity/src/frames.ts +1 -1
- package/node_modules/dsh-working-activity/src/index.ts +4 -4
- package/node_modules/dsh-working-activity/src/invariant.ts +10 -3
- package/node_modules/dsh-working-activity/src/lang.ts +8 -8
- package/node_modules/dsh-working-activity/src/projection.ts +1 -1
- package/node_modules/dsh-working-activity/src/status.ts +1 -1
- package/package.json +8 -13
- package/presets/liangshen/agent.cordis.yml +1 -1
- package/presets/liangshen/custom-bash.mjs +2 -2
|
@@ -85,7 +85,7 @@ export default class App extends PureComponent {
|
|
|
85
85
|
/**
|
|
86
86
|
* Bitmask of currently held mouse buttons (bit 0 = left, 1 = middle,
|
|
87
87
|
* 2 = right). Updated in the transport layer of handleMouseEvent BEFORE
|
|
88
|
-
* the click-disabled gate, so
|
|
88
|
+
* the click-disabled gate, so DSH_CLI_DISABLE_MOUSE=1 still maintains
|
|
89
89
|
* the physical latch. X10's generic release (low bits 3) cannot identify
|
|
90
90
|
* which button ended and conservatively clears the entire set — a
|
|
91
91
|
* no-button motion or focus-out is the reliable termination signal.
|
|
@@ -221,7 +221,7 @@ export default class App extends PureComponent {
|
|
|
221
221
|
componentDidMount() {
|
|
222
222
|
// In accessibility mode, keep the native cursor visible for screen magnifiers and other tools
|
|
223
223
|
if (this.props.stdout.isTTY &&
|
|
224
|
-
!isEnvTruthy(process.env.
|
|
224
|
+
!isEnvTruthy(process.env.DSH_CLI_ACCESSIBILITY)) {
|
|
225
225
|
this.props.stdout.write(HIDE_CURSOR);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -528,7 +528,7 @@ export default class App extends PureComponent {
|
|
|
528
528
|
}
|
|
529
529
|
// Hide cursor (unless in accessibility mode) and re-enable focus reporting after resuming
|
|
530
530
|
if (this.props.stdout.isTTY) {
|
|
531
|
-
if (!isEnvTruthy(process.env.
|
|
531
|
+
if (!isEnvTruthy(process.env.DSH_CLI_ACCESSIBILITY)) {
|
|
532
532
|
this.props.stdout.write(HIDE_CURSOR);
|
|
533
533
|
}
|
|
534
534
|
// Re-enable focus reporting to restore terminal state
|
|
@@ -548,7 +548,7 @@ function processKeysInBatch(app, items, _unused1, _unused2) {
|
|
|
548
548
|
// Mouse-chain diagnostics: the single choke point every parsed mouse and
|
|
549
549
|
// wheel event passes through. Empty log here = the terminal never sent
|
|
550
550
|
// the sequences (tracking modes, ConPTY) rather than an in-app loss.
|
|
551
|
-
if (process.env.
|
|
551
|
+
if (process.env.DSH_CLI_DEBUG_MOUSE) {
|
|
552
552
|
for (const item of items) {
|
|
553
553
|
if (item.kind === "mouse") {
|
|
554
554
|
logMouseDebug("mouse arrive", {
|
|
@@ -725,7 +725,7 @@ export function handleMouseEvent(app, m) {
|
|
|
725
725
|
const row = Math.max(0, Math.min(m.row - 1, app.props.terminalRows - 1));
|
|
726
726
|
const baseButton = m.button & 0x03;
|
|
727
727
|
// Transport-layer button state: track held buttons BEFORE the
|
|
728
|
-
// click-disabled gate, so
|
|
728
|
+
// click-disabled gate, so DSH_CLI_DISABLE_MOUSE=1 still maintains the
|
|
729
729
|
// physical latch (probe must not write while a button is held even if
|
|
730
730
|
// clicks are disabled). SGR encodes button identity in the low 2 bits;
|
|
731
731
|
// X10's generic release (low bits 3) cannot identify which button ended,
|
|
@@ -8,7 +8,7 @@ type BaseProps = {
|
|
|
8
8
|
*/
|
|
9
9
|
readonly color?: Color;
|
|
10
10
|
/**
|
|
11
|
-
* Ref to the underlying ink-text DOMElement. dsh-
|
|
11
|
+
* Ref to the underlying ink-text DOMElement. dsh-cli addition: lets
|
|
12
12
|
* useDeclaredCursor park the native cursor on an inline caret cell without
|
|
13
13
|
* wrapping it in a Box (a wrapper Box changes flex shrink behaviour and
|
|
14
14
|
* breaks wrapped-line layouts).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dev-only React DevTools bridge placeholder. The reconciler dynamically
|
|
3
3
|
* imports this module when NODE_ENV is development and swallows
|
|
4
|
-
* ERR_MODULE_NOT_FOUND; dsh-
|
|
4
|
+
* ERR_MODULE_NOT_FOUND; dsh-cli ships a no-op so the import always resolves.
|
|
5
5
|
*/
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=devtools.d.ts.map
|
package/lib/types/ink/dom.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export declare const clearYogaNodeReferences: (node: DOMElement | TextNode) => v
|
|
|
182
182
|
* the deepest node whose bounding box contains `y`. Called from ink.tsx when
|
|
183
183
|
* log-update triggers a full reset, to attribute the flicker to its source.
|
|
184
184
|
*
|
|
185
|
-
* Only useful when
|
|
185
|
+
* Only useful when DSH_CLI_DEBUG_REPAINTS is set (otherwise chains are
|
|
186
186
|
* undefined and this returns []).
|
|
187
187
|
* @param root - the ink-root element to search from.
|
|
188
188
|
* @param y - the screen row to locate.
|
package/lib/types/ink/dom.js
CHANGED
|
@@ -395,7 +395,7 @@ export const clearYogaNodeReferences = (node) => {
|
|
|
395
395
|
* the deepest node whose bounding box contains `y`. Called from ink.tsx when
|
|
396
396
|
* log-update triggers a full reset, to attribute the flicker to its source.
|
|
397
397
|
*
|
|
398
|
-
* Only useful when
|
|
398
|
+
* Only useful when DSH_CLI_DEBUG_REPAINTS is set (otherwise chains are
|
|
399
399
|
* undefined and this returns []).
|
|
400
400
|
* @param root - the ink-root element to search from.
|
|
401
401
|
* @param y - the screen row to locate.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Geometry forensics — per-frame scroll-geometry trace (issues #421/#433).
|
|
3
3
|
*
|
|
4
|
-
* `
|
|
4
|
+
* `DSH_CLI_GEOMETRY_TRACE=<file>` appends one JSON line per painted frame:
|
|
5
5
|
* the frame's trigger cause, every ScrollBox's resolved geometry (scrollTop
|
|
6
6
|
* before/after follow + drain + virtual clamp, scrollHeight/maxScroll
|
|
7
7
|
* prev/cur, sticky/shrunk/grew flags, clamp bounds), the MessageList
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* note at paint time means a plain reconciler commit.
|
|
18
18
|
*/
|
|
19
19
|
import { appendFileSync } from 'node:fs';
|
|
20
|
-
export const GEOMETRY_TRACE_ENABLED = process.env.
|
|
21
|
-
process.env.
|
|
22
|
-
const TRACE_PATH = process.env.
|
|
20
|
+
export const GEOMETRY_TRACE_ENABLED = process.env.DSH_CLI_GEOMETRY_TRACE !== undefined &&
|
|
21
|
+
process.env.DSH_CLI_GEOMETRY_TRACE !== '';
|
|
22
|
+
const TRACE_PATH = process.env.DSH_CLI_GEOMETRY_TRACE ?? '';
|
|
23
23
|
let state = {
|
|
24
24
|
frame: -1,
|
|
25
25
|
cause: null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ink.d.ts","sourceRoot":"","sources":["../../../src/ink/ink.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc9C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAIhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAarE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAA4B,KAAK,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AAIpG,OAAO,EAAqG,KAAK,SAAS,EAAqH,KAAK,cAAc,EAA4L,MAAM,gBAAgB,CAAC;AAqCrd,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,E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AC,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI;IAiHtC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAOpC,cAAc,IAAI,IAAI;IAYtB;;;;;;;OAOG;IACH,UAAU,IAAI,IAAI;IAalB,YAAY,IAAI,MAAM,IAAI;IAqB1B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,WAAW;CAmDpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wBAAgB,UAAU,CAAC,KAAK,GAAE,MAAM,CAAC,UAA0B,GAAG,IAAI,CAsDzE"}
|
package/lib/types/ink/ink.js
CHANGED
|
@@ -310,8 +310,6 @@ export default class Ink {
|
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
-
// @ts-ignore -- runtime/type-definition mismatch: @types/react-reconciler@0.32.3 declares 11 args with transitionCallbacks,
|
|
314
|
-
// but react-reconciler 0.33.0 source only accepts 10 args (no transitionCallbacks)
|
|
315
313
|
this.container = reconciler.createContainer(this.rootNode, ConcurrentRoot, null, false, null, 'id', noop,
|
|
316
314
|
// onUncaughtError
|
|
317
315
|
noop,
|
|
@@ -326,13 +324,9 @@ export default class Ink {
|
|
|
326
324
|
// error class process-wide is safe — see update-overflow-guard.ts.
|
|
327
325
|
installNestedUpdateOverflowProcessGuard();
|
|
328
326
|
if (process.env.NODE_ENV === 'development') {
|
|
329
|
-
reconciler.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
// See https://github.com/facebook/react/issues/16666#issuecomment-532639905
|
|
333
|
-
version: '16.13.1',
|
|
334
|
-
rendererPackageName: 'ink'
|
|
335
|
-
});
|
|
327
|
+
// The installed reconciler reads metadata from HostConfig. The published
|
|
328
|
+
// types still require the retired config parameter; narrow this call only.
|
|
329
|
+
reconciler.injectIntoDevTools();
|
|
336
330
|
}
|
|
337
331
|
}
|
|
338
332
|
handleResume = () => {
|
|
@@ -1002,7 +996,7 @@ export default class Ink {
|
|
|
1002
996
|
y: rect.y + decl.relativeY
|
|
1003
997
|
} : null;
|
|
1004
998
|
const parked = this.displayCursor;
|
|
1005
|
-
// Diagnostics: the resolved park target per frame (
|
|
999
|
+
// Diagnostics: the resolved park target per frame (DSH_CLI_DEBUG only).
|
|
1006
1000
|
// ConPTY's readback drops trailing cursor moves, so pty probes can't
|
|
1007
1001
|
// observe the park position — this trace is the ground truth of where
|
|
1008
1002
|
// the native cursor is being told to go.
|
|
@@ -1137,7 +1131,6 @@ export default class Ink {
|
|
|
1137
1131
|
}
|
|
1138
1132
|
pause() {
|
|
1139
1133
|
// Flush pending React updates and render before pausing.
|
|
1140
|
-
// @ts-ignore -- runtime/type-definition mismatch: flushSyncFromReconciler exists in react-reconciler 0.31 but not in @types/react-reconciler
|
|
1141
1134
|
reconciler.flushSyncFromReconciler();
|
|
1142
1135
|
this.renderNow();
|
|
1143
1136
|
this.isPaused = true;
|
|
@@ -1710,9 +1703,9 @@ export default class Ink {
|
|
|
1710
1703
|
!this.options.stdout.isTTY ||
|
|
1711
1704
|
process.env.TMUX !== undefined ||
|
|
1712
1705
|
process.env.STY !== undefined ||
|
|
1713
|
-
isEnvTruthy(process.env.
|
|
1714
|
-
isEnvTruthy(process.env.
|
|
1715
|
-
|| process.env.
|
|
1706
|
+
isEnvTruthy(process.env.DSH_CLI_ACCESSIBILITY) ||
|
|
1707
|
+
isEnvTruthy(process.env.DSH_CLI_DISABLE_TERMINAL_IMAGES)
|
|
1708
|
+
|| process.env.DSH_CLI_IMAGE_PROTOCOL === 'none') {
|
|
1716
1709
|
return;
|
|
1717
1710
|
}
|
|
1718
1711
|
const querier = this.app?.querier;
|
|
@@ -1732,7 +1725,7 @@ export default class Ink {
|
|
|
1732
1725
|
if (this.isUnmounted || this.isPaused || this.terminalQueriesSuspended) {
|
|
1733
1726
|
return;
|
|
1734
1727
|
}
|
|
1735
|
-
const protocol = selectTerminalImageProtocol(reply?.status, attributes?.params, process.env.
|
|
1728
|
+
const protocol = selectTerminalImageProtocol(reply?.status, attributes?.params, process.env.DSH_CLI_IMAGE_PROTOCOL);
|
|
1736
1729
|
if (protocol === 'none')
|
|
1737
1730
|
return;
|
|
1738
1731
|
if (protocol === 'sixel') {
|
|
@@ -2488,9 +2481,7 @@ export default class Ink {
|
|
|
2488
2481
|
render(node) {
|
|
2489
2482
|
this.currentNode = node;
|
|
2490
2483
|
const tree = _jsx(App, { ref: this.setAppRef, stdin: this.options.stdin, stdout: this.options.stdout, stderr: this.options.stderr, exitOnCtrlC: this.options.exitOnCtrlC, onExit: this.unmount, terminalColumns: this.terminalColumns, terminalRows: this.terminalRows, selection: this.selection, onSelectionChange: this.notifySelectionChange, onClickAt: this.dispatchClick, onContextMenuAt: this.dispatchContextMenu, onHoverAt: this.dispatchHover, onWheelAt: this.dispatchWheelAt, getHyperlinkAt: this.getHyperlinkAt, onOpenHyperlink: this.openHyperlink, onMultiClick: this.handleMultiClick, onSelectionDrag: this.handleSelectionDrag, onDragTargetAt: this.findDragTargetAt, onDragDispatch: this.dispatchDrag, onPointerGestureChange: this.setPointerGestureActive, onProtocolCandidateChange: this.setProtocolCandidateActive, onReleaseTail: this.drainReleaseTail, onClickProbe: this.clickProbeAtBatchTail, onStdinResume: this.reassertTerminalModes, onTerminalFocus: this.handleTerminalFocusProbe, onCursorDeclaration: this.setCursorDeclaration, dispatchKeyboardEvent: this.dispatchKeyboardEvent, children: _jsx(TerminalWriteProvider, { value: this.writeRaw, children: _jsx(TerminalImagesContext.Provider, { value: this.terminalImages, children: node }) }) });
|
|
2491
|
-
// @ts-ignore -- runtime/type-definition mismatch: updateContainerSync exists in react-reconciler but not in @types/react-reconciler
|
|
2492
2484
|
reconciler.updateContainerSync(tree, this.container, null, noop);
|
|
2493
|
-
// @ts-ignore -- runtime/type-definition mismatch: flushSyncWork exists in react-reconciler but not in @types/react-reconciler
|
|
2494
2485
|
reconciler.flushSyncWork();
|
|
2495
2486
|
}
|
|
2496
2487
|
unmount(error) {
|
|
@@ -2587,9 +2578,7 @@ export default class Ink {
|
|
|
2587
2578
|
clearTimeout(this.terminalQueryResumeTimer);
|
|
2588
2579
|
this.terminalQueryResumeTimer = null;
|
|
2589
2580
|
}
|
|
2590
|
-
// @ts-ignore -- runtime/type-definition mismatch: updateContainerSync exists in react-reconciler but not in @types/react-reconciler
|
|
2591
2581
|
reconciler.updateContainerSync(null, this.container, null, noop);
|
|
2592
|
-
// @ts-ignore -- runtime/type-definition mismatch: flushSyncWork exists in react-reconciler but not in @types/react-reconciler
|
|
2593
2582
|
reconciler.flushSyncWork();
|
|
2594
2583
|
instances.delete(this.options.stdout);
|
|
2595
2584
|
// Free the root yoga node, then clear its reference. Children are already
|
|
@@ -9,7 +9,7 @@ import { Dispatcher } from './events/dispatcher.js';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function getOwnerChain(fiber: unknown): string[];
|
|
11
11
|
/**
|
|
12
|
-
* Read the
|
|
12
|
+
* Read the DSH_CLI_DEBUG_REPAINTS flag once and cache it.
|
|
13
13
|
* @returns whether repaint debugging is enabled.
|
|
14
14
|
*/
|
|
15
15
|
export declare function isDebugRepaintsEnabled(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconciler.d.ts","sourceRoot":"","sources":["../../../src/ink/reconciler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reconciler.d.ts","sourceRoot":"","sources":["../../../src/ink/reconciler.ts"],"names":[],"mappings":"AAIA,OAAO,gBAAgB,MAAM,kBAAkB,CAAA;AAG/C,OAAO,EAKL,KAAK,UAAU,EAUf,KAAK,QAAQ,EACd,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAsInD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAmBtD;AAGD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAKhD;AAED,qFAAqF;AACrF,eAAO,MAAM,UAAU,YAAmB,CAAA;AAkB1C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE7C;AACD;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AACD,0EAA0E;AAC1E,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AACD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AACD,8DAA8D;AAC9D,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C;AAGD;;;GAGG;AACH,QAAA,MAAM,UAAU,gGAiSd,CAAA;AAMF,eAAe,UAAU,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable custom-rules/no-top-level-side-effects */
|
|
2
2
|
import { appendFileSync } from 'fs';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import createReconciler from 'react-reconciler';
|
|
4
5
|
import { getYogaCounters } from '../native-ts/yoga-layout/index.js';
|
|
5
6
|
import { isEnvTruthy } from '../utils/envUtils.js';
|
|
@@ -127,12 +128,12 @@ export function getOwnerChain(fiber) {
|
|
|
127
128
|
}
|
|
128
129
|
let debugRepaints;
|
|
129
130
|
/**
|
|
130
|
-
* Read the
|
|
131
|
+
* Read the DSH_CLI_DEBUG_REPAINTS flag once and cache it.
|
|
131
132
|
* @returns whether repaint debugging is enabled.
|
|
132
133
|
*/
|
|
133
134
|
export function isDebugRepaintsEnabled() {
|
|
134
135
|
if (debugRepaints === undefined) {
|
|
135
|
-
debugRepaints = isEnvTruthy(process.env.
|
|
136
|
+
debugRepaints = isEnvTruthy(process.env.DSH_CLI_DEBUG_REPAINTS);
|
|
136
137
|
}
|
|
137
138
|
return debugRepaints;
|
|
138
139
|
}
|
|
@@ -140,7 +141,7 @@ export function isDebugRepaintsEnabled() {
|
|
|
140
141
|
export const dispatcher = new Dispatcher();
|
|
141
142
|
// --- COMMIT INSTRUMENTATION (temp debugging) ---
|
|
142
143
|
// eslint-disable-next-line custom-rules/no-process-env-top-level -- debug instrumentation, read-once is fine
|
|
143
|
-
const COMMIT_LOG = process.env.
|
|
144
|
+
const COMMIT_LOG = process.env.DSH_CLI_COMMIT_LOG;
|
|
144
145
|
let _commits = 0;
|
|
145
146
|
let _lastLog = 0;
|
|
146
147
|
let _lastCommitAt = 0;
|
|
@@ -190,6 +191,8 @@ export function resetProfileCounters() {
|
|
|
190
191
|
* DOM tree, wired to the event dispatcher for update priorities.
|
|
191
192
|
*/
|
|
192
193
|
const reconciler = createReconciler({
|
|
194
|
+
// Runtime metadata is absent from the published HostConfig definition.
|
|
195
|
+
...{ rendererVersion: React.version, rendererPackageName: 'ink' },
|
|
193
196
|
getRootHostContext: () => ({ isInsideText: false }),
|
|
194
197
|
prepareForCommit: () => {
|
|
195
198
|
if (COMMIT_LOG)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-to-screen.d.ts","sourceRoot":"","sources":["../../../src/ink/render-to-screen.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAUzC,OAAO,EAML,KAAK,MAAM,EACX,SAAS,EAEV,MAAM,aAAa,CAAA;AAEpB;;yEAEyE;AACzE,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX;wCACoC;IACpC,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAgBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,MAAM,GACZ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"render-to-screen.d.ts","sourceRoot":"","sources":["../../../src/ink/render-to-screen.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAUzC,OAAO,EAML,KAAK,MAAM,EACX,SAAS,EAEV,MAAM,aAAa,CAAA;AAEpB;;yEAEyE;AACzE,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX;wCACoC;IACpC,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAgBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,MAAM,GACZ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAwEpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAoD5E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,aAAa,EAAE,EAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACjB,OAAO,CAaT"}
|
|
@@ -42,13 +42,10 @@ export function renderToScreen(el, width) {
|
|
|
42
42
|
stylePool = new StylePool();
|
|
43
43
|
charPool = new CharPool();
|
|
44
44
|
hyperlinkPool = new HyperlinkPool();
|
|
45
|
-
// @ts-ignore -- runtime/type-definition mismatch: react-reconciler 0.33 takes 10 args; @types says 11
|
|
46
45
|
container = reconciler.createContainer(root, LegacyRoot, null, false, null, 'search-render', noop, noop, noop, noop);
|
|
47
46
|
}
|
|
48
47
|
const t0 = performance.now();
|
|
49
|
-
// @ts-ignore -- runtime/type-definition mismatch: updateContainerSync exists but not in @types
|
|
50
48
|
reconciler.updateContainerSync(el, container, null, noop);
|
|
51
|
-
// @ts-ignore -- runtime/type-definition mismatch: flushSyncWork exists but not in @types
|
|
52
49
|
reconciler.flushSyncWork();
|
|
53
50
|
const t1 = performance.now();
|
|
54
51
|
// Yoga layout. Root might not have a yogaNode if the tree is empty.
|
|
@@ -74,9 +71,7 @@ export function renderToScreen(el, width) {
|
|
|
74
71
|
const rendered = output.get();
|
|
75
72
|
const t3 = performance.now();
|
|
76
73
|
// Unmount so next call gets a fresh tree. Leaves root/container/pools.
|
|
77
|
-
// @ts-ignore -- runtime/type-definition mismatch: updateContainerSync exists but not in @types
|
|
78
74
|
reconciler.updateContainerSync(null, container, null, noop);
|
|
79
|
-
// @ts-ignore -- runtime/type-definition mismatch: flushSyncWork exists but not in @types
|
|
80
75
|
reconciler.flushSyncWork();
|
|
81
76
|
timing.reconcile += t1 - t0;
|
|
82
77
|
timing.yoga += t2 - t1;
|
|
@@ -134,7 +134,7 @@ export function isSynchronizedOutputSupported() {
|
|
|
134
134
|
// -- XTVERSION-detected terminal name (populated async at startup) --
|
|
135
135
|
//
|
|
136
136
|
// TERM_PROGRAM is not forwarded over SSH by default, so env-based detection
|
|
137
|
-
// fails when dsh-
|
|
137
|
+
// fails when dsh-cli runs remotely inside a VS Code integrated terminal.
|
|
138
138
|
// XTVERSION (CSI > 0 q → DCS > | name ST) goes through the pty — the query
|
|
139
139
|
// reaches the *client* terminal and the reply comes back through stdin.
|
|
140
140
|
// App.tsx fires the query when raw mode enables; setXtversionName() is called
|
|
@@ -297,7 +297,7 @@ export function isDecstbmSafe() {
|
|
|
297
297
|
return SYNC_OUTPUT_SUPPORTED && !isJetBrainsIdeTerminal() && !isZellij();
|
|
298
298
|
}
|
|
299
299
|
/**
|
|
300
|
-
* Render forensics: when
|
|
300
|
+
* Render forensics: when DSH_CLI_RENDER_LOG names a file path, every painted
|
|
301
301
|
* frame's raw ANSI bytes append to it (one JSON-escaped line per frame,
|
|
302
302
|
* prefixed with a timestamp header). Real-terminal rendering corruption
|
|
303
303
|
* (missing rows, stale attributes) cannot be reproduced in headless xterm
|
|
@@ -305,7 +305,7 @@ export function isDecstbmSafe() {
|
|
|
305
305
|
* the corrupt frame can be diffed against the expected screen. Opt-in and
|
|
306
306
|
* zero-cost when unset: the env read happens once at module load.
|
|
307
307
|
*/
|
|
308
|
-
const RENDER_LOG_PATH = process.env.
|
|
308
|
+
const RENDER_LOG_PATH = process.env.DSH_CLI_RENDER_LOG ?? '';
|
|
309
309
|
function dumpFrame(buffer) {
|
|
310
310
|
if (RENDER_LOG_PATH === '')
|
|
311
311
|
return;
|
|
@@ -450,7 +450,7 @@ export const CLEAR_TERMINAL_TITLE = `${OSC_PREFIX}${OSC.SET_TITLE_AND_ICON};${BE
|
|
|
450
450
|
export const CLEAR_TAB_STATUS = osc(OSC.TAB_STATUS, 'indicator=;status=;status-color=');
|
|
451
451
|
/** Enable experimental tab status only when explicitly requested by the terminal owner. */
|
|
452
452
|
export function supportsTabStatus() {
|
|
453
|
-
return process.env.
|
|
453
|
+
return process.env.DSH_CLI_TAB_STATUS === '1';
|
|
454
454
|
}
|
|
455
455
|
/**
|
|
456
456
|
* Emit an OSC 21337 tab-status sequence. Omitted fields are left unchanged
|
|
@@ -139,14 +139,14 @@ export function callWithUpdateOverflowGuard(source, onChange) {
|
|
|
139
139
|
* This installs uncaughtException/unhandledRejection handlers that absorb
|
|
140
140
|
* exactly the overflow error class (same self-healing contract: React
|
|
141
141
|
* already reset the counter before throwing) and rethrow everything else
|
|
142
|
-
* unchanged. Idempotent; opt out with
|
|
142
|
+
* unchanged. Idempotent; opt out with DSH_CLI_NO_185_PROCESS_GUARD=1 when a
|
|
143
143
|
* host owns process error policy.
|
|
144
144
|
*/
|
|
145
145
|
let processGuardInstalled = false;
|
|
146
146
|
export function installNestedUpdateOverflowProcessGuard() {
|
|
147
147
|
if (processGuardInstalled)
|
|
148
148
|
return;
|
|
149
|
-
if (process.env.
|
|
149
|
+
if (process.env.DSH_CLI_NO_185_PROCESS_GUARD === '1')
|
|
150
150
|
return;
|
|
151
151
|
processGuardInstalled = true;
|
|
152
152
|
process.on('uncaughtException', error => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Minimal mode: one process-wide flag gating decorative UI (header splash,
|
|
3
3
|
* emoji status glyphs, non-tool text colors, status-bar extras). The flag is
|
|
4
|
-
* owned by the channel (settings `dsh-
|
|
4
|
+
* owned by the channel (settings `dsh-cli.minimal`, applied live through
|
|
5
5
|
* scope.watch); leaf components read it here instead of threading a prop
|
|
6
6
|
* through four render layers. Code highlighting and tool-name colors are
|
|
7
7
|
* deliberately NOT gated — minimal keeps those.
|
|
8
8
|
*/
|
|
9
|
-
/** True when minimal mode is active (settings `dsh-
|
|
9
|
+
/** True when minimal mode is active (settings `dsh-cli.minimal`). */
|
|
10
10
|
export declare function isMinimalMode(): boolean;
|
|
11
11
|
/** @internal channel-owned setter; also called once at boot. */
|
|
12
12
|
export declare function setMinimalMode(enabled: boolean): void;
|
package/lib/types/minimalMode.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Minimal mode: one process-wide flag gating decorative UI (header splash,
|
|
3
3
|
* emoji status glyphs, non-tool text colors, status-bar extras). The flag is
|
|
4
|
-
* owned by the channel (settings `dsh-
|
|
4
|
+
* owned by the channel (settings `dsh-cli.minimal`, applied live through
|
|
5
5
|
* scope.watch); leaf components read it here instead of threading a prop
|
|
6
6
|
* through four render layers. Code highlighting and tool-name colors are
|
|
7
7
|
* deliberately NOT gated — minimal keeps those.
|
|
8
8
|
*/
|
|
9
9
|
let minimal = false;
|
|
10
|
-
/** True when minimal mode is active (settings `dsh-
|
|
10
|
+
/** True when minimal mode is active (settings `dsh-cli.minimal`). */
|
|
11
11
|
export function isMinimalMode() {
|
|
12
12
|
return minimal;
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The centered picker builds its display rows in modelPickerRows.ts;
|
|
4
4
|
* older group consumers and their regression tests still use the helpers here.
|
|
5
5
|
*
|
|
6
|
-
* @module dsh-
|
|
6
|
+
* @module dsh-cli/modelGroups
|
|
7
7
|
*/
|
|
8
8
|
import type { LlmModelInfo, LlmProviderInfo } from './adapter/ports/channel-view.js';
|
|
9
9
|
/**
|
package/lib/types/modelGroups.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The centered picker builds its display rows in modelPickerRows.ts;
|
|
4
4
|
* older group consumers and their regression tests still use the helpers here.
|
|
5
5
|
*
|
|
6
|
-
* @module dsh-
|
|
6
|
+
* @module dsh-cli/modelGroups
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* The pseudo provider key of the pinned "recently used" group. Provider
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted model-route preference (`/model` picker choice), kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/model.json` (`provider` + `model` keys) so the choice survives
|
|
4
4
|
* restarts — same pattern as agent-preset.json. The file is best-effort: a
|
|
5
5
|
* missing/corrupt file or an incomplete route simply falls back to the
|
|
6
6
|
* harness default. Explicit `provider`/`model` keys in cordis.yml win over
|
package/lib/types/modelPrefs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted model-route preference (`/model` picker choice), kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/model.json` (`provider` + `model` keys) so the choice survives
|
|
4
4
|
* restarts — same pattern as agent-preset.json. The file is best-effort: a
|
|
5
5
|
* missing/corrupt file or an incomplete route simply falls back to the
|
|
6
6
|
* harness default. Explicit `provider`/`model` keys in cordis.yml win over
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted recently-used models (`/model` picker's 最近使用 group), kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/model-recents.json` so the list survives restarts — same
|
|
4
4
|
* best-effort pattern as agent-preset.json: a missing/corrupt file simply
|
|
5
5
|
* reads as empty, and a failed write never blocks the switch that caused it.
|
|
6
6
|
* Entries are `{ provider, id }` refs, most-recent-first, deduped, capped at
|
|
7
7
|
* {@link MODEL_RECENTS_LIMIT}.
|
|
8
8
|
*
|
|
9
|
-
* @module dsh-
|
|
9
|
+
* @module dsh-cli/modelRecents
|
|
10
10
|
*/
|
|
11
11
|
/** How many recent entries the file and the picker group keep. */
|
|
12
12
|
export declare const MODEL_RECENTS_LIMIT = 10;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted recently-used models (`/model` picker's 最近使用 group), kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/model-recents.json` so the list survives restarts — same
|
|
4
4
|
* best-effort pattern as agent-preset.json: a missing/corrupt file simply
|
|
5
5
|
* reads as empty, and a failed write never blocks the switch that caused it.
|
|
6
6
|
* Entries are `{ provider, id }` refs, most-recent-first, deduped, capped at
|
|
7
7
|
* {@link MODEL_RECENTS_LIMIT}.
|
|
8
8
|
*
|
|
9
|
-
* @module dsh-
|
|
9
|
+
* @module dsh-cli/modelRecents
|
|
10
10
|
*/
|
|
11
11
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
12
12
|
import { join } from 'node:path';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-version.d.ts","sourceRoot":"","sources":["../../src/package-version.ts"],"names":[],"mappings":"AAOA,gFAAgF;AAChF,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAiBxD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { valid } from 'semver';
|
|
5
|
+
const PACKAGE_NAME = '@askdkc/dsh-cli';
|
|
6
|
+
/** Read the version from either the compiled package or the source checkout. */
|
|
7
|
+
export function installedCliVersion() {
|
|
8
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
for (const relativePath of ['../../package.json', '../package.json']) {
|
|
10
|
+
try {
|
|
11
|
+
const parsed = JSON.parse(readFileSync(join(here, relativePath), 'utf8'));
|
|
12
|
+
if (parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
13
|
+
const packageJson = parsed;
|
|
14
|
+
const version = packageJson.version;
|
|
15
|
+
if (packageJson.name === PACKAGE_NAME && typeof version === 'string' && valid(version) !== null) {
|
|
16
|
+
return version;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// Try the source-layout fallback after the compiled-layout path.
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted agent-preset preference (`/preset` picker choice), kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/agent-preset.json` (`preset` key) so the choice survives
|
|
4
4
|
* restarts — same pattern as working-activity.json. The file is best-effort:
|
|
5
5
|
* a missing/corrupt file or an id the roster no longer supplies simply falls
|
|
6
6
|
* back to the roster default (`standard`). An explicit `preset` key in
|
package/lib/types/presetPrefs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted agent-preset preference (`/preset` picker choice), kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/agent-preset.json` (`preset` key) so the choice survives
|
|
4
4
|
* restarts — same pattern as working-activity.json. The file is best-effort:
|
|
5
5
|
* a missing/corrupt file or an id the roster no longer supplies simply falls
|
|
6
6
|
* back to the roster default (`standard`). An explicit `preset` key in
|
package/lib/types/reload.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `/reload` planning — the pi-style soft reload: re-read the TUI's persisted
|
|
3
|
-
* preference files (`~/.dsh-
|
|
3
|
+
* preference files (`~/.dsh-cli/{theme,lang,agent-preset,model,
|
|
4
4
|
* working-activity}.json`) and decide what to re-apply live, honoring the
|
|
5
5
|
* same boot-time precedence every picker does:
|
|
6
6
|
*
|
|
7
|
-
* - theme:
|
|
8
|
-
* - lang:
|
|
7
|
+
* - theme: DSH_CLI_THEME wins; else theme.json.
|
|
8
|
+
* - lang: DSH_CLI_LANG > settings `dsh-cli.lang` (folded in by the
|
|
9
9
|
* caller as `langOverriddenBySettings`) > cordis.yml `lang`
|
|
10
10
|
* > lang.json.
|
|
11
11
|
* - preset: cordis.yml `preset` wins; else agent-preset.json.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* working-activity.json.
|
|
16
16
|
*
|
|
17
17
|
* Settings-namespace values (settings.yaml user layer) are deliberately NOT
|
|
18
|
-
* re-read here: the dsh-
|
|
18
|
+
* re-read here: the dsh-cli namespace applies live through its settings
|
|
19
19
|
* watch and hot-reloads its document through the platform's file watcher,
|
|
20
20
|
* so /reload only needs the five boot-only pref files. What no reload can
|
|
21
21
|
* re-read (cordis.yml root config, frozen fullscreen layout, newly built
|
|
@@ -30,7 +30,7 @@ import type { ModelRoute } from './modelRoute.js';
|
|
|
30
30
|
/** The five boot-only preference surfaces /reload re-reads. */
|
|
31
31
|
export type ReloadKind = 'theme' | 'lang' | 'preset' | 'model' | 'activity';
|
|
32
32
|
export type ReloadSkipReason =
|
|
33
|
-
/** A launch-time environment variable pins the value (
|
|
33
|
+
/** A launch-time environment variable pins the value (DSH_CLI_THEME / DSH_CLI_LANG). */
|
|
34
34
|
'env-wins'
|
|
35
35
|
/** cordis.yml or the settings user layer pins the value; the pref must not override it. */
|
|
36
36
|
| 'config-wins'
|
|
@@ -62,9 +62,9 @@ export interface ReloadPlan {
|
|
|
62
62
|
}
|
|
63
63
|
/** Everything the planner needs — caller reads the files and live values. */
|
|
64
64
|
export interface ReloadInput {
|
|
65
|
-
/**
|
|
65
|
+
/** DSH_CLI_THEME, when it holds a valid theme name. */
|
|
66
66
|
envTheme?: string;
|
|
67
|
-
/**
|
|
67
|
+
/** DSH_CLI_LANG, when it holds a valid language. */
|
|
68
68
|
envLang?: string;
|
|
69
69
|
/** Fresh readThemePref(). */
|
|
70
70
|
themePref?: string;
|
|
@@ -74,7 +74,7 @@ export interface ReloadInput {
|
|
|
74
74
|
langPref?: Lang;
|
|
75
75
|
/** The live UI language. */
|
|
76
76
|
currentLang: Lang;
|
|
77
|
-
/** True when the settings user layer (settings.yaml `dsh-
|
|
77
|
+
/** True when the settings user layer (settings.yaml `dsh-cli.lang`) pins a language. */
|
|
78
78
|
langOverriddenBySettings: boolean;
|
|
79
79
|
/** cordis.yml's raw `lang` key, when set. */
|
|
80
80
|
configuredLang?: string;
|
package/lib/types/reload.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `/reload` planning — the pi-style soft reload: re-read the TUI's persisted
|
|
3
|
-
* preference files (`~/.dsh-
|
|
3
|
+
* preference files (`~/.dsh-cli/{theme,lang,agent-preset,model,
|
|
4
4
|
* working-activity}.json`) and decide what to re-apply live, honoring the
|
|
5
5
|
* same boot-time precedence every picker does:
|
|
6
6
|
*
|
|
7
|
-
* - theme:
|
|
8
|
-
* - lang:
|
|
7
|
+
* - theme: DSH_CLI_THEME wins; else theme.json.
|
|
8
|
+
* - lang: DSH_CLI_LANG > settings `dsh-cli.lang` (folded in by the
|
|
9
9
|
* caller as `langOverriddenBySettings`) > cordis.yml `lang`
|
|
10
10
|
* > lang.json.
|
|
11
11
|
* - preset: cordis.yml `preset` wins; else agent-preset.json.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* working-activity.json.
|
|
16
16
|
*
|
|
17
17
|
* Settings-namespace values (settings.yaml user layer) are deliberately NOT
|
|
18
|
-
* re-read here: the dsh-
|
|
18
|
+
* re-read here: the dsh-cli namespace applies live through its settings
|
|
19
19
|
* watch and hot-reloads its document through the platform's file watcher,
|
|
20
20
|
* so /reload only needs the five boot-only pref files. What no reload can
|
|
21
21
|
* re-read (cordis.yml root config, frozen fullscreen layout, newly built
|