@askdkc/dsh-cli 0.13.5 → 0.14.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/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/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 +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/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/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/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/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 -8
- package/presets/liangshen/agent.cordis.yml +1 -1
- package/presets/liangshen/custom-bash.mjs +2 -2
|
@@ -39,7 +39,7 @@ import { NoSelect } from '../ink/components/NoSelect.js';
|
|
|
39
39
|
import { LogoHeader, MessageList } from '../components/MessageList.js';
|
|
40
40
|
import { TimelineRail } from '../components/TimelineRail.js';
|
|
41
41
|
import { ScrollbarGutter } from '../components/ScrollbarGutter.js';
|
|
42
|
-
import { normalizeScrollGutter } from '../
|
|
42
|
+
import { normalizeScrollGutter } from '../cliDisplayPrefs.js';
|
|
43
43
|
import { OverlayAbove } from '../components/OverlayAbove.js';
|
|
44
44
|
import { TooltipLayer } from '../components/Tooltip.js';
|
|
45
45
|
import { PromptInput } from '../components/PromptInput.js';
|
|
@@ -125,7 +125,7 @@ const STATUS_VIEW_UI = Object.freeze({
|
|
|
125
125
|
/** Shared empty snapshot for hosts whose channel has no event log. */
|
|
126
126
|
const NO_EVENTS = [];
|
|
127
127
|
const COMMAND_RESULT_CELLS = 200;
|
|
128
|
-
/** Ceiling for one `dsh-
|
|
128
|
+
/** Ceiling for one `dsh-cli migrate` child run. Discovery parses every source
|
|
129
129
|
* file, but a healthy import of thousands of conversations finishes well
|
|
130
130
|
* inside this; without a cap a wedged child would hang the loop forever. */
|
|
131
131
|
const MIGRATE_CHILD_TIMEOUT_MS = 30 * 60 * 1000;
|
|
@@ -204,7 +204,7 @@ function searchableText(row) {
|
|
|
204
204
|
let fallbackApprovalStore;
|
|
205
205
|
/**
|
|
206
206
|
* Shared inert extension stores for hosts that render Chat without the
|
|
207
|
-
* dsh-
|
|
207
|
+
* dsh-cli-extensions row (headless verify scripts, bare embeds). Never
|
|
208
208
|
* written, so plugin dialogs/status contributions never mount and
|
|
209
209
|
* no shortcut ever matches.
|
|
210
210
|
*/
|
|
@@ -605,7 +605,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
605
605
|
btwAbortRef.current = null;
|
|
606
606
|
setBtw(null);
|
|
607
607
|
}, [channel.agentId]);
|
|
608
|
-
// Auto-recap (`dsh-
|
|
608
|
+
// Auto-recap (`dsh-cli.recapOnOpen`): every time the session switches
|
|
609
609
|
// (mount = open/resume, rewind/fork included), summarize its tail into
|
|
610
610
|
// the dim AutoRecapRow. Failures stay silent in auto mode — `/recap`
|
|
611
611
|
// surfaces them; the summary never enters the transcript or session log.
|
|
@@ -1208,9 +1208,9 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1208
1208
|
loadingStartTimeRef.current = channel.turnStart;
|
|
1209
1209
|
const thinkingStatus = useThinkingStatus(channel.spinnerMode === 'thinking');
|
|
1210
1210
|
// Terminal tab title: the session
|
|
1211
|
-
// title when set, else "dsh-
|
|
1211
|
+
// title when set, else "dsh-CLI"; a `⠂/⠐` spinner prefix while a turn is
|
|
1212
1212
|
// working (960ms cadence, only while the terminal is focused), a static
|
|
1213
|
-
// `✦` otherwise. dsh-
|
|
1213
|
+
// `✦` otherwise. dsh-CLI brands the idle prefix with the DeepSeek whale.
|
|
1214
1214
|
const [titleFrame, setTitleFrame] = React.useState(0);
|
|
1215
1215
|
const terminalFocused = useTerminalFocus();
|
|
1216
1216
|
// Mouse text selection auto-copy: active only in
|
|
@@ -1439,16 +1439,16 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1439
1439
|
});
|
|
1440
1440
|
};
|
|
1441
1441
|
/** Hot-swap the UI language (`/lang <id>` and the LangPicker both land
|
|
1442
|
-
* here): persist to ~/.dsh-
|
|
1442
|
+
* here): persist to ~/.dsh-cli/lang.json and mirror into the dsh-cli
|
|
1443
1443
|
* settings namespace when it is served (best effort). */
|
|
1444
1444
|
const applyLang = (lang) => {
|
|
1445
1445
|
const ok = writeLangPref(lang);
|
|
1446
1446
|
setLang(lang);
|
|
1447
1447
|
const settingsHost = channel.settingsHost();
|
|
1448
|
-
const tuiView = settingsHost?.listNamespaces().find(entry => entry.ns === 'dsh-
|
|
1448
|
+
const tuiView = settingsHost?.listNamespaces().find(entry => entry.ns === 'dsh-cli');
|
|
1449
1449
|
if (settingsHost !== undefined && tuiView !== undefined) {
|
|
1450
1450
|
void settingsHost
|
|
1451
|
-
.write('dsh-
|
|
1451
|
+
.write('dsh-cli', [{ op: 'set', path: ['lang'], value: lang }], tuiView.revision)
|
|
1452
1452
|
.catch(() => { });
|
|
1453
1453
|
}
|
|
1454
1454
|
channel.notify(ok ? t('lang-switched', { lang }) : t('lang-switch-failed', { lang }), { color: ok ? 'success' : 'error' });
|
|
@@ -1469,7 +1469,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1469
1469
|
const collectMigrateRows = () => new Promise(resolve => {
|
|
1470
1470
|
setImmediate(() => resolve(collectMigratePickerRows(Date.now())));
|
|
1471
1471
|
});
|
|
1472
|
-
/** Run `dsh-
|
|
1472
|
+
/** Run `dsh-cli migrate <args>` in a child process through the package
|
|
1473
1473
|
* bin; resolves with the exit code and the combined output. Uses the
|
|
1474
1474
|
* shared no-throw runner (bounded capture, timeout, windowsHide): a wedged
|
|
1475
1475
|
* child would otherwise hang the sequential per-source loop forever. */
|
|
@@ -1546,7 +1546,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1546
1546
|
// opens the interactive indicator picker; `/activity frames <name>`
|
|
1547
1547
|
// switches directly; `/activity frames` lists presets; `/activity
|
|
1548
1548
|
// status` shows the current choice. The choice persists to
|
|
1549
|
-
// ~/.dsh-
|
|
1549
|
+
// ~/.dsh-cli/working-activity.json and survives restarts.
|
|
1550
1550
|
const parts = rawInput.trim().split(/\s+/).filter(Boolean);
|
|
1551
1551
|
if (parts[0] === 'status') {
|
|
1552
1552
|
setHelpOpen(false);
|
|
@@ -1590,7 +1590,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1590
1590
|
// switches directly; `/preset status` shows the current choice. A
|
|
1591
1591
|
// blank session swaps composition in place (official blank-only
|
|
1592
1592
|
// rule); a started session is locked and the choice persists as the
|
|
1593
|
-
// default for future sessions (~/.dsh-
|
|
1593
|
+
// default for future sessions (~/.dsh-cli/agent-preset.json).
|
|
1594
1594
|
const parts = rawInput.trim().split(/\s+/).filter(Boolean);
|
|
1595
1595
|
if (parts[0] === 'status') {
|
|
1596
1596
|
setHelpOpen(false);
|
|
@@ -1635,7 +1635,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1635
1635
|
// Bare `/effort` opens the rheostat slider over the live route's
|
|
1636
1636
|
// adapter levels (←/→ applies each step immediately); `/effort <id>`
|
|
1637
1637
|
// sets directly (validated by the channel); `/effort status` prints
|
|
1638
|
-
// the current level. The choice persists to ~/.dsh-
|
|
1638
|
+
// the current level. The choice persists to ~/.dsh-cli/effort.json.
|
|
1639
1639
|
const parts = rawInput.trim().split(/\s+/).filter(Boolean);
|
|
1640
1640
|
if (parts[0] === 'status') {
|
|
1641
1641
|
setHelpOpen(false);
|
|
@@ -1670,9 +1670,9 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1670
1670
|
}
|
|
1671
1671
|
case 'lang': {
|
|
1672
1672
|
// `/lang` shows the current UI language, `/lang en|zh` switches
|
|
1673
|
-
// (hot-swap, persisted to ~/.dsh-
|
|
1674
|
-
// the en/zh picker. Precedence on next launch:
|
|
1675
|
-
// settings.yaml `dsh-
|
|
1673
|
+
// (hot-swap, persisted to ~/.dsh-cli/lang.json), bare `/lang` opens
|
|
1674
|
+
// the en/zh picker. Precedence on next launch: DSH_CLI_LANG >
|
|
1675
|
+
// settings.yaml `dsh-cli.lang` > cordis.yml `lang` > the persisted
|
|
1676
1676
|
// choice.
|
|
1677
1677
|
const parts = rawInput.trim().split(/\s+/).filter(Boolean);
|
|
1678
1678
|
if (parts[0] === 'status') {
|
|
@@ -1706,8 +1706,8 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
1706
1706
|
// palettes + static/runtime themes); `/theme <name>`
|
|
1707
1707
|
// switches directly; `/theme status` shows the current choice.
|
|
1708
1708
|
// `auto` follows the terminal background (OSC 11). Selection
|
|
1709
|
-
// persists to ~/.dsh-
|
|
1710
|
-
// ThemeProvider setter (
|
|
1709
|
+
// persists to ~/.dsh-cli/theme.json and hot swaps via the
|
|
1710
|
+
// ThemeProvider setter (DSH_CLI_THEME still wins on next launch).
|
|
1711
1711
|
const parts = rawInput.trim().split(/\s+/).filter(Boolean);
|
|
1712
1712
|
if (parts[0] === 'status') {
|
|
1713
1713
|
setHelpOpen(false);
|
|
@@ -2127,8 +2127,8 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2127
2127
|
case 'config': {
|
|
2128
2128
|
const userHome = process.env.USERPROFILE ?? '';
|
|
2129
2129
|
const lines = [
|
|
2130
|
-
t('doctor-example-config', { path: 'dsh --profile dsh-
|
|
2131
|
-
t('doctor-user-config', { path: `${userHome}/.dsh/profiles/dsh-
|
|
2130
|
+
t('doctor-example-config', { path: 'dsh --profile dsh-cli' }),
|
|
2131
|
+
t('doctor-user-config', { path: `${userHome}/.dsh/profiles/dsh-cli/cordis.patch.yml` }),
|
|
2132
2132
|
'',
|
|
2133
2133
|
t('doctor-launch-hint'),
|
|
2134
2134
|
t('doctor-route-hint'),
|
|
@@ -2398,9 +2398,9 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2398
2398
|
return true;
|
|
2399
2399
|
case 'reload': {
|
|
2400
2400
|
// pi-style soft reload: re-read the persisted preference files
|
|
2401
|
-
// (~/.dsh-
|
|
2401
|
+
// (~/.dsh-cli/{theme,lang,agent-preset,model,working-activity}.json)
|
|
2402
2402
|
// and re-apply live, honoring the boot-time precedence (env >
|
|
2403
|
-
// cordis.yml > settings user layer > pref). The dsh-
|
|
2403
|
+
// cordis.yml > settings user layer > pref). The dsh-cli settings
|
|
2404
2404
|
// namespace is NOT re-read here — its watch applies edits live and
|
|
2405
2405
|
// the platform watcher hot-reloads settings.yaml itself. What no
|
|
2406
2406
|
// reload can re-read (cordis.yml root config, frozen fullscreen,
|
|
@@ -2408,10 +2408,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2408
2408
|
setHelpOpen(false);
|
|
2409
2409
|
const tuiNamespace = channel.settingsHost()
|
|
2410
2410
|
?.listNamespaces()
|
|
2411
|
-
.find(entry => entry.ns === 'dsh-
|
|
2411
|
+
.find(entry => entry.ns === 'dsh-cli');
|
|
2412
2412
|
const plan = planReload({
|
|
2413
2413
|
envTheme: envThemeOverride(),
|
|
2414
|
-
envLang: isLang(process.env.
|
|
2414
|
+
envLang: isLang(process.env.DSH_CLI_LANG) ? process.env.DSH_CLI_LANG : undefined,
|
|
2415
2415
|
themePref: readThemePref(),
|
|
2416
2416
|
currentTheme: themeName,
|
|
2417
2417
|
langPref: readLangPref(),
|
|
@@ -2895,7 +2895,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
2895
2895
|
// dismissing the panel and killing the turn with one key.
|
|
2896
2896
|
if (jobsPanelOpen)
|
|
2897
2897
|
return;
|
|
2898
|
-
// A plugin scene (dsh-
|
|
2898
|
+
// A plugin scene (dsh-cli-scenes) or the trajectory scene owns the whole
|
|
2899
2899
|
// screen while open: every key belongs to it. Unguarded, an Esc meant to
|
|
2900
2900
|
// CLOSE the scene also reached the chat:cancel branch below whenever a
|
|
2901
2901
|
// turn was in flight — closing the view and killing the turn in one key.
|
|
@@ -3896,7 +3896,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
3896
3896
|
const node = (_jsx(Box, { flexDirection: "column", width: "100%", paddingX: 1, children: interruptPanel }));
|
|
3897
3897
|
return fullscreen ? node : _jsx(AlternateScreen, { children: node });
|
|
3898
3898
|
}
|
|
3899
|
-
// A plugin scene (dsh-
|
|
3899
|
+
// A plugin scene (dsh-cli-scenes) takes the whole terminal the same way
|
|
3900
3900
|
// the trajectory scene does, and sits at the TOP of this return chain:
|
|
3901
3901
|
// an open() landing while the session browser or the trajectory scene is
|
|
3902
3902
|
// up must still take the screen (and the keyboard, via the useInput guard
|
|
@@ -4126,7 +4126,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
|
|
|
4126
4126
|
// A remount after a whole screen closed also settles instantly
|
|
4127
4127
|
// (see suppressLogoIntroRef).
|
|
4128
4128
|
skipIntro: suppressLogoIntroRef.current || channel.rows.length > 30 }, logoNonce), loadedContextVisible && (_jsx(LoadedContextPanel, { context: channel.loadedContext, open: loadedContextOpen, onToggle: toggleLoadedContext })), _jsx(MessageList, { rows: channel.rows, failureHintRowId: failureHintRowId, failureHint: t('traj-hint-failure', { key: `${modLabel}t` }), expanded: expanded, expandedRows: expandedRows, selectedId: selectionActive ? selectedId : null, onToggleRow: toggleRowExpanded, streamViewToggledRows: streamViewToggledRows, onToggleStreamView: toggleStreamView, model: channel.model, diffLayout: channel.diffLayout, thinkingFold: channel.thinkingFold, toolBackground: channel.toolBackground, foldTerminalCommand: channel.foldTerminalCommand, smoothStreaming: channel.smoothStreaming, activityFrames: channel.activityFrames, showAll: showAllMessages, thinkingVisible: thinkingVisible, historyPaintEnabled: !fullscreen, onToggleAll: () => { setShowAllMessages(previous => !previous); }, onLoadOlder: () => channel.loadOlder(), registerRowRef: registerRowRef, scrollHandle: handle, forceMountRowId: forceMountRowId, newSinceRowId: isSticky ? null : lastSeenRowIdRef.current, onUnseenCount: setUnseenCount, onTimeline: setTimeline, onOpenSubagent: setSubagentDetailId, onOpenJobs: openJobsPanel, onOpenFile: openFileActions, sessionCwd: channel.cwd, onPreviewImage: openImagePreview, suppressImageGraphics: activePreview !== null })] }), (() => {
|
|
4129
|
-
// Gutter mode (settings `dsh-
|
|
4129
|
+
// Gutter mode (settings `dsh-cli.scrollGutter`): the timeline
|
|
4130
4130
|
// rail (default), the proportional scrollbar, or nothing. The
|
|
4131
4131
|
// slot keeps its 2 columns in both rendered modes (Qwen's
|
|
4132
4132
|
// permanent-gutter rule — an appearing/disappearing gutter
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Box, Text, useTerminalSize, useTheme } from '../ui.js';
|
|
4
4
|
import { formatTokens } from '../terminal-utils/format.js';
|
|
5
5
|
import { t } from '../i18n.js';
|
|
6
|
-
import { formatContextUsage, DEFAULT_STATUS_BAR, normalizeStatusBar } from '../
|
|
6
|
+
import { formatContextUsage, DEFAULT_STATUS_BAR, normalizeStatusBar } from '../cliDisplayPrefs.js';
|
|
7
7
|
import { estimateSessionCostCny, estimateSessionCostSplitCny, isDeepSeekOfficialProvider, isPeakHour } from '../deepseekPricing.js';
|
|
8
8
|
import { ActivityLine, contextPressurePct } from '../components/ActivityLine.js';
|
|
9
9
|
import { GoalStatusChip } from '../components/GoalTodoPanel.js';
|
|
@@ -299,7 +299,7 @@ export function speedColor(tps, text) {
|
|
|
299
299
|
return `\x1b[38;2;${colorHex(color)}m${text}\x1b[39m`;
|
|
300
300
|
}
|
|
301
301
|
function colorHex(key) {
|
|
302
|
-
// dsh-
|
|
302
|
+
// dsh-cli dark theme values (theme.ts), semicolon-separated for raw ANSI.
|
|
303
303
|
const palette = {
|
|
304
304
|
success: '78;186;101',
|
|
305
305
|
warning: '202;138;4',
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
export declare function resumeCommand(profile: string | undefined, sessionId: string, platform?: NodeJS.Platform): string;
|
|
3
3
|
/**
|
|
4
4
|
* Store the session to resume and report the launcher invocation.
|
|
5
|
-
* @param sessionId - Session id for `dsh-
|
|
5
|
+
* @param sessionId - Session id for `dsh-cli --resume` on the next launch.
|
|
6
6
|
*/
|
|
7
7
|
export declare function writeResumeTarget(sessionId: string): void;
|
|
8
8
|
/** Forget the resume marker (`/new` starts a fresh conversation). */
|
|
9
9
|
export declare function clearResumeTarget(): void;
|
|
10
10
|
/**
|
|
11
|
-
* The session id requested by `dsh-
|
|
11
|
+
* The session id requested by `dsh-cli --resume`, if any.
|
|
12
12
|
* @returns The stored session id, or undefined when none is set.
|
|
13
13
|
*/
|
|
14
14
|
export declare function readResumeTarget(): string | undefined;
|
|
@@ -16,7 +16,7 @@ export declare function readResumeTarget(): string | undefined;
|
|
|
16
16
|
* The session id requested through `--resume`/`-c`/`--continue` in app args,
|
|
17
17
|
* mirroring the standalone bin's interception (issue #120/#53). The
|
|
18
18
|
* `dsh --profile tui` boot path forwards these args to the booted app
|
|
19
|
-
* verbatim and never parses them into
|
|
19
|
+
* verbatim and never parses them into DSH_CLI_RESUME_SESSION, so the
|
|
20
20
|
* in-profile plugin reads them itself. A bare flag with no id defers to the
|
|
21
21
|
* exit-time marker, exactly like the bin.
|
|
22
22
|
* @param argv - the app arguments (typically `process.argv.slice(2)`).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Launcher contract for `dsh-
|
|
3
|
-
* id to `~/.dsh-
|
|
4
|
-
* `
|
|
2
|
+
* Launcher contract for `dsh-cli --resume`: the TUI writes the chosen session
|
|
3
|
+
* id to `~/.dsh-cli/resume.txt`, and the launcher feeds it back as
|
|
4
|
+
* `DSH_CLI_RESUME_SESSION`. Session *records* live in DSH's own persistence
|
|
5
5
|
* backend (dsh-session-persistence-jsonl) — `/resume` lists those via
|
|
6
6
|
* `sessionPersistence.list()`, this file only carries the id across
|
|
7
7
|
* processes. It also keeps a small `last-used.json` of session-id → epoch-ms
|
|
@@ -22,7 +22,7 @@ export function resumeCommand(profile, sessionId, platform = process.platform) {
|
|
|
22
22
|
: profile === undefined ? 'dsh --config cordis.yml' : `dsh --profile ${profile}`;
|
|
23
23
|
return platform === 'win32'
|
|
24
24
|
? `${boot} --resume ${sessionId}`
|
|
25
|
-
: `
|
|
25
|
+
: `DSH_CLI_RESUME_SESSION=${sessionId} ${boot}`;
|
|
26
26
|
}
|
|
27
27
|
function lastUsedFileStamp() {
|
|
28
28
|
try {
|
|
@@ -46,7 +46,7 @@ function ensureDir() {
|
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Store the session to resume and report the launcher invocation.
|
|
49
|
-
* @param sessionId - Session id for `dsh-
|
|
49
|
+
* @param sessionId - Session id for `dsh-cli --resume` on the next launch.
|
|
50
50
|
*/
|
|
51
51
|
export function writeResumeTarget(sessionId) {
|
|
52
52
|
ensureDir();
|
|
@@ -62,7 +62,7 @@ export function clearResumeTarget() {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* The session id requested by `dsh-
|
|
65
|
+
* The session id requested by `dsh-cli --resume`, if any.
|
|
66
66
|
* @returns The stored session id, or undefined when none is set.
|
|
67
67
|
*/
|
|
68
68
|
export function readResumeTarget() {
|
|
@@ -78,7 +78,7 @@ export function readResumeTarget() {
|
|
|
78
78
|
* The session id requested through `--resume`/`-c`/`--continue` in app args,
|
|
79
79
|
* mirroring the standalone bin's interception (issue #120/#53). The
|
|
80
80
|
* `dsh --profile tui` boot path forwards these args to the booted app
|
|
81
|
-
* verbatim and never parses them into
|
|
81
|
+
* verbatim and never parses them into DSH_CLI_RESUME_SESSION, so the
|
|
82
82
|
* in-profile plugin reads them itself. A bare flag with no id defers to the
|
|
83
83
|
* exit-time marker, exactly like the bin.
|
|
84
84
|
* @param argv - the app arguments (typically `process.argv.slice(2)`).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Configurable Shift+Tab session modes (the `modes` dsh-
|
|
2
|
+
* Configurable Shift+Tab session modes (the `modes` dsh-cli plugin config):
|
|
3
3
|
* each mode is a named bundle of optional DSH plane switches — plan mode
|
|
4
4
|
* (dsh-plan-mode `/plan`), sandbox mode (dsh-sandbox-policy `sandbox/mode`
|
|
5
5
|
* session events), approval policy (dsh-user-approval `approval/policy`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cross-process session mounting ledger, kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/session-mounts.json`.
|
|
4
4
|
*
|
|
5
5
|
* A TUI terminal hosts SEVERAL agent sessions at once (the attached one plus
|
|
6
6
|
* every parked background session), and sessions are durable: another TUI, or
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cross-process session mounting ledger, kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/session-mounts.json`.
|
|
4
4
|
*
|
|
5
5
|
* A TUI terminal hosts SEVERAL agent sessions at once (the attached one plus
|
|
6
6
|
* every parked background session), and sessions are durable: another TUI, or
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pinned sessions for the `/resume` browser, kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/session-pins.json` (a JSON array of session ids) so the pins
|
|
4
4
|
* survive restarts.
|
|
5
5
|
*
|
|
6
6
|
* The pin key is the DSH session id (`SessionSummary.id`, from the session
|
package/lib/types/sessionPins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pinned sessions for the `/resume` browser, kept at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/session-pins.json` (a JSON array of session ids) so the pins
|
|
4
4
|
* survive restarts.
|
|
5
5
|
*
|
|
6
6
|
* The pin key is the DSH session id (`SessionSummary.id`, from the session
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** The cli-highlight surface dsh-
|
|
1
|
+
/** The cli-highlight surface dsh-cli consumes: the syntax highlighter and the language support check. */
|
|
2
2
|
export type CliHighlight = {
|
|
3
3
|
highlight: typeof import('cli-highlight').highlight;
|
|
4
4
|
supportsLanguage: typeof import('cli-highlight').supportsLanguage;
|
|
@@ -8,7 +8,7 @@ export declare function djb2Hash(str: string): number;
|
|
|
8
8
|
/**
|
|
9
9
|
* Hash arbitrary content for change detection. Bun.hash is ~100x faster than
|
|
10
10
|
* sha256 and collision-resistant enough for diff detection (not crypto-safe).
|
|
11
|
-
* The original used `require('crypto')`; dsh-
|
|
11
|
+
* The original used `require('crypto')`; dsh-cli runs ESM so node:crypto is
|
|
12
12
|
* imported statically and Bun.hash is skipped entirely.
|
|
13
13
|
* @param content - The content to hash.
|
|
14
14
|
* @returns The lowercase hex SHA-256 digest of `content`.
|
|
@@ -21,7 +21,7 @@ export function djb2Hash(str) {
|
|
|
21
21
|
/**
|
|
22
22
|
* Hash arbitrary content for change detection. Bun.hash is ~100x faster than
|
|
23
23
|
* sha256 and collision-resistant enough for diff detection (not crypto-safe).
|
|
24
|
-
* The original used `require('crypto')`; dsh-
|
|
24
|
+
* The original used `require('crypto')`; dsh-cli runs ESM so node:crypto is
|
|
25
25
|
* imported statically and Bun.hash is skipped entirely.
|
|
26
26
|
* @param content - The content to hash.
|
|
27
27
|
* @returns The lowercase hex SHA-256 digest of `content`.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import type { MermaidArt } from 'lovely-mermaid';
|
|
14
14
|
import type { Theme } from '../theme.js';
|
|
15
15
|
export type { MermaidArt } from 'lovely-mermaid';
|
|
16
|
-
/** The lovely-mermaid surface dsh-
|
|
16
|
+
/** The lovely-mermaid surface dsh-cli consumes. */
|
|
17
17
|
export type MermaidEngine = Pick<typeof import('lovely-mermaid'), 'render'>;
|
|
18
18
|
/**
|
|
19
19
|
* Return the shared engine load promise, starting the lazy load on first call.
|
|
@@ -2,7 +2,7 @@ import chalk from 'chalk';
|
|
|
2
2
|
// --- syntax highlighting theme bridge ----------------------------------------
|
|
3
3
|
// Shared by SplitDiffView (diff panes) and the markdown renderer (fenced
|
|
4
4
|
// code blocks). Both feed cli-highlight's `theme` option so code colors come
|
|
5
|
-
// from the active dsh-
|
|
5
|
+
// from the active dsh-cli theme instead of cli-highlight's own sparse
|
|
6
6
|
// default palette.
|
|
7
7
|
/** highlight.js token classes -> theme syntax tokens. `default` catches
|
|
8
8
|
* every unmapped class so cli-highlight's own yellow never leaks through
|
package/lib/types/theme.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* dsh-
|
|
2
|
+
* dsh-cli color themes — Gentle Mist Blue (雾蓝) family.
|
|
3
3
|
*
|
|
4
4
|
* Two truecolor palettes share one identity: mist blues carry brand, focus,
|
|
5
5
|
* and interaction; body text stays neutral. `light` uses white panel
|
|
@@ -118,7 +118,7 @@ export declare const THEME_NAMES: readonly ["dark", "dark-ansi", "light"];
|
|
|
118
118
|
* The `auto` pseudo-theme: not a palette, but a standing request to follow
|
|
119
119
|
* the terminal background (OSC 11, which tracks the system theme in
|
|
120
120
|
* terminals that follow it). Selectable everywhere a theme name is
|
|
121
|
-
* (/theme,
|
|
121
|
+
* (/theme, DSH_CLI_THEME, ~/.dsh-cli/theme.json); getTheme() resolves it to
|
|
122
122
|
* the last detected `light`/`dark` palette via the auto base below.
|
|
123
123
|
*/
|
|
124
124
|
export declare const AUTO_THEME_NAME = "auto";
|
|
@@ -132,7 +132,7 @@ export declare function setAutoThemeBase(name: 'light' | 'dark'): void;
|
|
|
132
132
|
export declare function getAutoThemeBase(): 'light' | 'dark';
|
|
133
133
|
/**
|
|
134
134
|
* Any theme name: a built-in palette (`light`/`dark`/`dark-ansi`), a user
|
|
135
|
-
* theme from ~/.dsh-
|
|
135
|
+
* theme from ~/.dsh-cli/themes/<name>.json, or a host runtime contribution.
|
|
136
136
|
* Always resolvable to a concrete color palette via getTheme() (unknown names
|
|
137
137
|
* fall back to `dark`).
|
|
138
138
|
*/
|
package/lib/types/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* dsh-
|
|
2
|
+
* dsh-cli color themes — Gentle Mist Blue (雾蓝) family.
|
|
3
3
|
*
|
|
4
4
|
* Two truecolor palettes share one identity: mist blues carry brand, focus,
|
|
5
5
|
* and interaction; body text stays neutral. `light` uses white panel
|
|
@@ -73,7 +73,7 @@ export const THEME_NAMES = ['dark', 'dark-ansi', 'light'];
|
|
|
73
73
|
* The `auto` pseudo-theme: not a palette, but a standing request to follow
|
|
74
74
|
* the terminal background (OSC 11, which tracks the system theme in
|
|
75
75
|
* terminals that follow it). Selectable everywhere a theme name is
|
|
76
|
-
* (/theme,
|
|
76
|
+
* (/theme, DSH_CLI_THEME, ~/.dsh-cli/theme.json); getTheme() resolves it to
|
|
77
77
|
* the last detected `light`/`dark` palette via the auto base below.
|
|
78
78
|
*/
|
|
79
79
|
export const AUTO_THEME_NAME = 'auto';
|
|
@@ -266,7 +266,7 @@ const lightTheme = {
|
|
|
266
266
|
* Dark ANSI theme using only the 16 standard ANSI colors, for terminals
|
|
267
267
|
* without true color support.
|
|
268
268
|
*
|
|
269
|
-
* User themes (JSON files in ~/.dsh-
|
|
269
|
+
* User themes (JSON files in ~/.dsh-cli/themes/) and host runtime themes
|
|
270
270
|
* overlay one of these three bases — see customTheme.ts and the adapter seam.
|
|
271
271
|
* `getTheme` resolves static themes through the resolver registered by
|
|
272
272
|
* ThemeProvider, then consults the optional runtime resolver.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted color-theme preference. The `/theme` choice (built-in palette
|
|
3
|
-
* or user theme name) survives restarts in `~/.dsh-
|
|
4
|
-
* the working-activity preference (`~/.dsh-
|
|
3
|
+
* or user theme name) survives restarts in `~/.dsh-cli/theme.json`, mirroring
|
|
4
|
+
* the working-activity preference (`~/.dsh-cli/working-activity.json`). The
|
|
5
5
|
* file is best-effort: a missing or corrupt file just falls back to the
|
|
6
6
|
* default (terminal-background auto-detection). The preference only wins
|
|
7
|
-
* when
|
|
7
|
+
* when DSH_CLI_THEME is unset — see ThemeProvider.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Parse a persisted `{ theme }` value; anything else yields undefined.
|
package/lib/types/themePrefs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted color-theme preference. The `/theme` choice (built-in palette
|
|
3
|
-
* or user theme name) survives restarts in `~/.dsh-
|
|
4
|
-
* the working-activity preference (`~/.dsh-
|
|
3
|
+
* or user theme name) survives restarts in `~/.dsh-cli/theme.json`, mirroring
|
|
4
|
+
* the working-activity preference (`~/.dsh-cli/working-activity.json`). The
|
|
5
5
|
* file is best-effort: a missing or corrupt file just falls back to the
|
|
6
6
|
* default (terminal-background auto-detection). The preference only wins
|
|
7
|
-
* when
|
|
7
|
+
* when DSH_CLI_THEME is unset — see ThemeProvider.
|
|
8
8
|
*/
|
|
9
9
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
10
10
|
import { join } from 'node:path';
|
package/lib/types/tips.js
CHANGED
|
@@ -641,8 +641,8 @@ export const TIPS = [
|
|
|
641
641
|
{
|
|
642
642
|
id: 'disp-theme-custom',
|
|
643
643
|
group: 'display',
|
|
644
|
-
zh: '主题:~/.dsh-
|
|
645
|
-
en: 'Themes: ~/.dsh-
|
|
644
|
+
zh: '主题:~/.dsh-cli/themes/<名>.json 或 npm 插件注册,即时热切换',
|
|
645
|
+
en: 'Themes: ~/.dsh-cli/themes/<name>.json or npm plugin registration, hot-swappable',
|
|
646
646
|
},
|
|
647
647
|
{
|
|
648
648
|
id: 'disp-theme-status',
|
|
@@ -864,8 +864,8 @@ export const TIPS = [
|
|
|
864
864
|
{
|
|
865
865
|
id: 'pit-safe-mode',
|
|
866
866
|
group: 'pitfalls',
|
|
867
|
-
zh: 'dsh 异常退出会提示进入 dsh-
|
|
868
|
-
en: 'When dsh exits badly, dsh-
|
|
867
|
+
zh: 'dsh 异常退出会提示进入 dsh-cli safe:只读诊断 + 干净救援 profile',
|
|
868
|
+
en: 'When dsh exits badly, dsh-cli safe offers read-only diagnostics and a clean rescue profile',
|
|
869
869
|
},
|
|
870
870
|
{
|
|
871
871
|
id: 'pit-effort-fallback',
|
|
@@ -10,7 +10,7 @@ export declare const IGNITION_TIMELINE: {
|
|
|
10
10
|
* Effort ignition motion math — pure functions, zero dependencies.
|
|
11
11
|
*
|
|
12
12
|
* Waveform semantics ported from Codex CLI's effort_ignition(_styles).rs
|
|
13
|
-
* (openai/codex PR #34365) and revalidated in a dsh-
|
|
13
|
+
* (openai/codex PR #34365) and revalidated in a dsh-CLI integration: a
|
|
14
14
|
* cosine-bell travelling wave produces per-column colours only — a renderer
|
|
15
15
|
* that keeps glyphs constant and changes colours per frame stays SGR-only
|
|
16
16
|
* by construction.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted "the user has seen the trajectory" flag, at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/trajectory.json`.
|
|
4
4
|
*
|
|
5
5
|
* It exists so the key hint beside the status-line wake can retire itself.
|
|
6
6
|
* A permanent `ctrl+t` printed on every frame forever is the classic symptom
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted "the user has seen the trajectory" flag, at
|
|
3
|
-
* `~/.dsh-
|
|
3
|
+
* `~/.dsh-cli/trajectory.json`.
|
|
4
4
|
*
|
|
5
5
|
* It exists so the key hint beside the status-line wake can retire itself.
|
|
6
6
|
* A permanent `ctrl+t` printed on every frame forever is the classic symptom
|
package/lib/types/ui.d.ts
CHANGED
package/lib/types/ui.js
CHANGED