@toddzheng024/dscode-bundle 0.1.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/LICENSE +21 -0
- package/README.md +5 -0
- package/THIRD_PARTY_NOTICES.md +11 -0
- package/bin/apply_patch +4 -0
- package/bootstrap.mjs +21 -0
- package/cordis.patch.yml +756 -0
- package/package.json +327 -0
- package/plugins/auto-review/audit.mjs +20 -0
- package/plugins/auto-review/index.mjs +181 -0
- package/plugins/auto-review/policy.mjs +59 -0
- package/plugins/dscode/index.mjs +35 -0
- package/plugins/session-metrics/index.mjs +44 -0
- package/plugins/session-metrics/pricing.mjs +18 -0
- package/plugins/session-metrics/store.mjs +24 -0
- package/plugins/session-metrics/view.mjs +58 -0
- package/plugins/tui-tools/hooks.mjs +23 -0
- package/plugins/tui-tools/index.mjs +164 -0
- package/plugins/ultra/policy.mjs +11 -0
- package/presets/dscode/agent.cordis.yml +288 -0
- package/presets/dscode/preset.yml +3 -0
- package/vendor/bash/LICENSE +21 -0
- package/vendor/bash/index.js +449 -0
- package/vendor/bash/types/background.d.ts +19 -0
- package/vendor/bash/types/index.d.ts +22 -0
- package/vendor/bash/types/render.d.ts +38 -0
- package/vendor/deepseek/LICENSE +21 -0
- package/vendor/deepseek/index.js +2102 -0
- package/vendor/deepseek/types/adapter.d.ts +163 -0
- package/vendor/deepseek/types/file-id.d.ts +19 -0
- package/vendor/deepseek/types/file-store.d.ts +83 -0
- package/vendor/deepseek/types/files-api.d.ts +103 -0
- package/vendor/deepseek/types/image-tokens.d.ts +19 -0
- package/vendor/deepseek/types/index.d.ts +106 -0
- package/vendor/deepseek/types/request-pricing.d.ts +48 -0
- package/vendor/deepseek/types/serialize.d.ts +85 -0
- package/vendor/deepseek/types/sse.d.ts +24 -0
- package/vendor/deepseek/types/translate.d.ts +37 -0
- package/vendor/deepseek/types/types.d.ts +178 -0
- package/vendor/deepseek/types/upload-index.d.ts +68 -0
- package/vendor/persistent/LICENSE +21 -0
- package/vendor/persistent/index.js +386 -0
- package/vendor/persistent/types/index.d.ts +24 -0
- package/vendor/tui/LICENSE +21 -0
- package/vendor/tui/devtools-CdTl3MNy.mjs +3643 -0
- package/vendor/tui/index.mjs +39105 -0
- package/vendor/tui/invariant.mjs +21 -0
- package/vendor/tui/rolldown-runtime-CMFfr-1z.mjs +26 -0
- package/vendor/tui/startup.mjs +109 -0
- package/vendor/tui/theme-DCT8Y2xf.mjs +628 -0
- package/vendor/tui/types/app.d.ts +304 -0
- package/vendor/tui/types/approval.d.ts +59 -0
- package/vendor/tui/types/attachments.d.ts +52 -0
- package/vendor/tui/types/authorization-panel.d.ts +22 -0
- package/vendor/tui/types/authorization.d.ts +36 -0
- package/vendor/tui/types/commands.d.ts +52 -0
- package/vendor/tui/types/editor-keys.d.ts +105 -0
- package/vendor/tui/types/editor.d.ts +6 -0
- package/vendor/tui/types/fork.d.ts +8 -0
- package/vendor/tui/types/git-workflow.d.ts +32 -0
- package/vendor/tui/types/history.d.ts +97 -0
- package/vendor/tui/types/index.d.ts +124 -0
- package/vendor/tui/types/input-split.d.ts +54 -0
- package/vendor/tui/types/internals.d.ts +26 -0
- package/vendor/tui/types/invariant.d.ts +15 -0
- package/vendor/tui/types/kernel-panels.d.ts +167 -0
- package/vendor/tui/types/keyboard.d.ts +80 -0
- package/vendor/tui/types/mentions.d.ts +81 -0
- package/vendor/tui/types/model-capabilities.d.ts +82 -0
- package/vendor/tui/types/models.d.ts +119 -0
- package/vendor/tui/types/permissions.d.ts +27 -0
- package/vendor/tui/types/plugin-inventory.d.ts +11 -0
- package/vendor/tui/types/presets.d.ts +22 -0
- package/vendor/tui/types/provider-settings.d.ts +239 -0
- package/vendor/tui/types/questions.d.ts +54 -0
- package/vendor/tui/types/render/animations.d.ts +265 -0
- package/vendor/tui/types/render/editor.d.ts +162 -0
- package/vendor/tui/types/render/export.d.ts +9 -0
- package/vendor/tui/types/render/fuzzy.d.ts +21 -0
- package/vendor/tui/types/render/inspector.d.ts +36 -0
- package/vendor/tui/types/render/lines.d.ts +66 -0
- package/vendor/tui/types/render/markdown.d.ts +29 -0
- package/vendor/tui/types/render/projection.d.ts +461 -0
- package/vendor/tui/types/render/status.d.ts +196 -0
- package/vendor/tui/types/render/text.d.ts +58 -0
- package/vendor/tui/types/render/tool-detail.d.ts +94 -0
- package/vendor/tui/types/render/tool-preview.d.ts +28 -0
- package/vendor/tui/types/render/width.d.ts +29 -0
- package/vendor/tui/types/session-directory.d.ts +173 -0
- package/vendor/tui/types/session-switch.d.ts +17 -0
- package/vendor/tui/types/settings-file.d.ts +41 -0
- package/vendor/tui/types/skills.d.ts +47 -0
- package/vendor/tui/types/startup.d.ts +65 -0
- package/vendor/tui/types/store.d.ts +58 -0
- package/vendor/tui/types/subagents.d.ts +70 -0
- package/vendor/tui/types/theme-panel.d.ts +24 -0
- package/vendor/tui/types/theme.d.ts +215 -0
- package/vendor/tui/types/version.d.ts +18 -0
- package/vendor/tui/types/whale-glyph.d.ts +6 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live subagent activity feed: a bounded, display-only projection of CHILD
|
|
3
|
+
* session events. The transcript store folds only the root session (the
|
|
4
|
+
* durable truth this TUI renders); subagent conversations are their own
|
|
5
|
+
* sessions, and before this module their events were dropped entirely —
|
|
6
|
+
* a running subagent was invisible until its parent tool call settled.
|
|
7
|
+
*
|
|
8
|
+
* This is NOT a second transcript: each child folds to ONE row (label,
|
|
9
|
+
* running state, bounded last-activity text), capped at
|
|
10
|
+
* {@link MAX_SUBAGENT_ROWS}. The cap is a display budget, not a fan-out
|
|
11
|
+
* limit: a new running child evicts the OLDEST settled row when one
|
|
12
|
+
* exists, and while every row is busy the newcomer waits off-screen — but
|
|
13
|
+
* the observed-session total (getTotalSeen) keeps counting, so status
|
|
14
|
+
* totals never under-report the fan-out. Rows are advisory display
|
|
15
|
+
* state, rebuilt from live events; nothing here persists or replays.
|
|
16
|
+
* Notification is coalesced
|
|
17
|
+
* by the same ~16ms frame throttle as the transcript store (per-burst
|
|
18
|
+
* microtask notify chained SyncLane rerenders past React's nested update
|
|
19
|
+
* limit; a bare macrotask merge repaints a whole turn's bursts at once).
|
|
20
|
+
*
|
|
21
|
+
* @module @deepseek-ai/dsh-code/subagents
|
|
22
|
+
*/
|
|
23
|
+
import type { SessionEvent } from '@deepseek-ai/dsh-session';
|
|
24
|
+
/** Hard row cap: overflow evicts the oldest settled row; a fully busy feed waits. */
|
|
25
|
+
export declare const MAX_SUBAGENT_ROWS = 8;
|
|
26
|
+
/** One live subagent row in the feed. */
|
|
27
|
+
export interface SubagentRow {
|
|
28
|
+
/** Child session id. */
|
|
29
|
+
readonly id: string;
|
|
30
|
+
/** Display label (session title when observed, else a short id form). */
|
|
31
|
+
readonly label: string;
|
|
32
|
+
/** Coarse lifecycle state folded from the child's events. */
|
|
33
|
+
readonly state: 'running' | 'idle' | 'done';
|
|
34
|
+
/** Bounded last-activity text for the status line. */
|
|
35
|
+
readonly activity: string;
|
|
36
|
+
/** Last fold time (ms, event clock) — newest-first ordering key. */
|
|
37
|
+
readonly updatedAt: number;
|
|
38
|
+
}
|
|
39
|
+
/** The read-only snapshot surface the renderer subscribes to. */
|
|
40
|
+
export interface SubagentFeedView {
|
|
41
|
+
/** Subscribe to feed changes; returns the unsubscribe function. */
|
|
42
|
+
subscribe(listener: () => void): () => void;
|
|
43
|
+
/** Read the current rows (identity-stable between changes). */
|
|
44
|
+
getSnapshot(): readonly SubagentRow[];
|
|
45
|
+
/**
|
|
46
|
+
* Distinct child sessions observed since the last reset. The row cap is
|
|
47
|
+
* a display budget, not a count of the fan-out; totals surface this.
|
|
48
|
+
*/
|
|
49
|
+
getTotalSeen(): number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Fold one child-session event into its feed row (pure).
|
|
53
|
+
* Unknown event kinds leave the row untouched.
|
|
54
|
+
* @param previous - the row's current state, when any.
|
|
55
|
+
* @param sessionId - the child session id.
|
|
56
|
+
* @param event - the child session event.
|
|
57
|
+
* @returns the next row state.
|
|
58
|
+
*/
|
|
59
|
+
export declare function foldSubagentRow(previous: SubagentRow | undefined, sessionId: string, event: SessionEvent): SubagentRow;
|
|
60
|
+
/**
|
|
61
|
+
* Create one subagent feed. `apply` folds a child event (the caller gates
|
|
62
|
+
* which sessions are children); `reset` clears on a session switch. Row
|
|
63
|
+
* order is first-seen; the snapshot array is frozen and only replaced when
|
|
64
|
+
* a row actually changed.
|
|
65
|
+
* @returns the mutable feed handle plus its `SubagentFeedView`.
|
|
66
|
+
*/
|
|
67
|
+
export declare function createSubagentFeed(): SubagentFeedView & {
|
|
68
|
+
apply(sessionId: string, event: SessionEvent): void;
|
|
69
|
+
reset(): void;
|
|
70
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/theme` picker (the Codex `/theme` contract): one bounded list over
|
|
3
|
+
* the three color themes — dark, light, and auto (terminal-sensed; auto
|
|
4
|
+
* falls back to dark until OSC-11 detection lands). Enter applies the row
|
|
5
|
+
* and the runner persists it; Esc closes without changing the theme.
|
|
6
|
+
*
|
|
7
|
+
* @module @deepseek-ai/dsh-tui/theme-panel
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactElement } from 'react';
|
|
10
|
+
import { type ThemeName } from './theme.ts';
|
|
11
|
+
/**
|
|
12
|
+
* The /theme list: one row per theme, the current one marked with ●, the
|
|
13
|
+
* focused one with ›. Enter applies the focused theme (the runner persists
|
|
14
|
+
* it), Esc/q closes without changing anything. Colors read the ACTIVE
|
|
15
|
+
* palette, so the panel itself adapts to a light theme once applied.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ThemePanel({ current, select, close }: {
|
|
18
|
+
/** Theme name in force (the requested name; 'auto' included). */
|
|
19
|
+
current: ThemeName;
|
|
20
|
+
/** Accept one theme name: applied immediately and persisted by the runner. */
|
|
21
|
+
select(name: ThemeName): void;
|
|
22
|
+
/** Close without changing the theme. */
|
|
23
|
+
close(): void;
|
|
24
|
+
}): ReactElement;
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal color tokens for the dsh TUI, mapped from the product design
|
|
3
|
+
* platform's DeepSeek palette
|
|
4
|
+
* (`packages/client/ui-theme/src/styles/design-platform.css`). Truecolor RGB
|
|
5
|
+
* rides chalk, which degrades automatically on terminals without truecolor.
|
|
6
|
+
*
|
|
7
|
+
* Two palettes — `dark` (the default) and `light` — share the same token keys
|
|
8
|
+
* with different values. Painters and the palette accessor read the ACTIVE
|
|
9
|
+
* palette selected through {@link setTheme}, so a theme switch recolors every
|
|
10
|
+
* painted surface on the next render without touching call sites. Raw token
|
|
11
|
+
* consumers keep reading {@link TUI_RGB} (the dark values) until the
|
|
12
|
+
* theme-aware integration replaces those call sites with
|
|
13
|
+
* `inkColor(getPalette().token)`.
|
|
14
|
+
*
|
|
15
|
+
* @module @deepseek-ai/dsh-tui/theme
|
|
16
|
+
*/
|
|
17
|
+
/** One RGB triple for a palette token. */
|
|
18
|
+
export type RgbTriple = readonly [number, number, number];
|
|
19
|
+
/** Palette token keys shared by every theme. */
|
|
20
|
+
export type ThemeToken = 'brand' | 'brandBright' | 'brandMid' | 'brandDeep' | 'dim' | 'success' | 'error' | 'warn' | 'text' | 'code' | 'composerBand';
|
|
21
|
+
/** One full color palette: every token key mapped to an RGB triple. */
|
|
22
|
+
export type ThemePalette = Readonly<Record<ThemeToken, RgbTriple>>;
|
|
23
|
+
/** Selectable theme names: dark, light, or auto (terminal-sensed). */
|
|
24
|
+
export type ThemeName = 'dark' | 'light' | 'auto';
|
|
25
|
+
/** Valid theme names in canonical picker order. */
|
|
26
|
+
export declare const THEME_NAMES: readonly ThemeName[];
|
|
27
|
+
/**
|
|
28
|
+
* DeepSeek dark palette: the original TUI colors, one entry per
|
|
29
|
+
* design-platform token in use. Keep names and values in sync with the CSS
|
|
30
|
+
* custom properties cited inline.
|
|
31
|
+
*/
|
|
32
|
+
export declare const DARK_PALETTE: {
|
|
33
|
+
/** Primary brand blue — `--dsw-static-deepseek-500`. */
|
|
34
|
+
readonly brand: readonly [65, 118, 230];
|
|
35
|
+
/** Brighter brand blue for live/streaming emphasis — `--dsw-static-deepseek-400`. */
|
|
36
|
+
readonly brandBright: readonly [103, 158, 254];
|
|
37
|
+
/** Intermediate brand blue between brand and brandBright — `--dsw-static-deepseek-450`. */
|
|
38
|
+
readonly brandMid: readonly [86, 134, 254];
|
|
39
|
+
/** Deep brand blue for secondary chrome — `--dsw-static-deepseek-600`. */
|
|
40
|
+
readonly brandDeep: readonly [72, 104, 178];
|
|
41
|
+
/** Muted caption gray — `--dsw-static-neutral-bluish-600`. */
|
|
42
|
+
readonly dim: readonly [129, 133, 140];
|
|
43
|
+
/** Success green — `--dsw-static-green-500`. */
|
|
44
|
+
readonly success: readonly [34, 197, 94];
|
|
45
|
+
/** Error red — `--dsw-static-red-500`. */
|
|
46
|
+
readonly error: readonly [239, 68, 68];
|
|
47
|
+
/** Warning amber — `--dsw-static-amber-500`. */
|
|
48
|
+
readonly warn: readonly [245, 158, 11];
|
|
49
|
+
/** Default foreground text — `--dsw-static-neutral-50`. */
|
|
50
|
+
readonly text: readonly [236, 240, 246];
|
|
51
|
+
/** Inline/fenced code — soft sky blue, distinct from brand accents. */
|
|
52
|
+
readonly code: readonly [125, 211, 252];
|
|
53
|
+
/** Composer three-row band base — neutral light gray, hue-free so wave tints read on it. */
|
|
54
|
+
readonly composerBand: readonly [46, 48, 52];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Light palette tuned for white terminals: the same token keys as dark with
|
|
58
|
+
* contrast-driven values (AA on a white background). Brand keeps its dark
|
|
59
|
+
* value (≈4.9:1); the bright/mid/deep blues, muted grays, and status colors
|
|
60
|
+
* deepen so they stay legible on bright backgrounds.
|
|
61
|
+
*/
|
|
62
|
+
export declare const LIGHT_PALETTE: {
|
|
63
|
+
/** Primary brand blue — unchanged, ≈4.9:1 AA on white. */
|
|
64
|
+
readonly brand: readonly [65, 118, 230];
|
|
65
|
+
/** Brighter brand blue deepened for white backgrounds (was 2.7:1). */
|
|
66
|
+
readonly brandBright: readonly [72, 104, 178];
|
|
67
|
+
/** Intermediate brand blue — Tailwind blue-500. */
|
|
68
|
+
readonly brandMid: readonly [59, 130, 246];
|
|
69
|
+
/** Deep brand blue for secondary chrome — `--dsw-static-deepseek-700`. */
|
|
70
|
+
readonly brandDeep: readonly [47, 76, 143];
|
|
71
|
+
/** Muted caption gray deepened for white backgrounds. */
|
|
72
|
+
readonly dim: readonly [101, 103, 107];
|
|
73
|
+
/** Success green — Tailwind green-700. */
|
|
74
|
+
readonly success: readonly [21, 128, 61];
|
|
75
|
+
/** Error red — Tailwind red-600. */
|
|
76
|
+
readonly error: readonly [236, 19, 19];
|
|
77
|
+
/** Warning amber — Tailwind amber-700. */
|
|
78
|
+
readonly warn: readonly [180, 83, 9];
|
|
79
|
+
/** Default foreground text — near-black. */
|
|
80
|
+
readonly text: readonly [21, 21, 23];
|
|
81
|
+
/** Inline/fenced code — Tailwind cyan-700, distinct from brand accents. */
|
|
82
|
+
readonly code: readonly [14, 116, 144];
|
|
83
|
+
/** Composer three-row band base — neutral light gray, hue-free so wave tints read on it. */
|
|
84
|
+
readonly composerBand: readonly [229, 231, 235];
|
|
85
|
+
};
|
|
86
|
+
/** Every palette by theme name; auto resolves through {@link resolveTheme}. */
|
|
87
|
+
export declare const PALETTES: {
|
|
88
|
+
readonly dark: {
|
|
89
|
+
/** Primary brand blue — `--dsw-static-deepseek-500`. */
|
|
90
|
+
readonly brand: readonly [65, 118, 230];
|
|
91
|
+
/** Brighter brand blue for live/streaming emphasis — `--dsw-static-deepseek-400`. */
|
|
92
|
+
readonly brandBright: readonly [103, 158, 254];
|
|
93
|
+
/** Intermediate brand blue between brand and brandBright — `--dsw-static-deepseek-450`. */
|
|
94
|
+
readonly brandMid: readonly [86, 134, 254];
|
|
95
|
+
/** Deep brand blue for secondary chrome — `--dsw-static-deepseek-600`. */
|
|
96
|
+
readonly brandDeep: readonly [72, 104, 178];
|
|
97
|
+
/** Muted caption gray — `--dsw-static-neutral-bluish-600`. */
|
|
98
|
+
readonly dim: readonly [129, 133, 140];
|
|
99
|
+
/** Success green — `--dsw-static-green-500`. */
|
|
100
|
+
readonly success: readonly [34, 197, 94];
|
|
101
|
+
/** Error red — `--dsw-static-red-500`. */
|
|
102
|
+
readonly error: readonly [239, 68, 68];
|
|
103
|
+
/** Warning amber — `--dsw-static-amber-500`. */
|
|
104
|
+
readonly warn: readonly [245, 158, 11];
|
|
105
|
+
/** Default foreground text — `--dsw-static-neutral-50`. */
|
|
106
|
+
readonly text: readonly [236, 240, 246];
|
|
107
|
+
/** Inline/fenced code — soft sky blue, distinct from brand accents. */
|
|
108
|
+
readonly code: readonly [125, 211, 252];
|
|
109
|
+
/** Composer three-row band base — neutral light gray, hue-free so wave tints read on it. */
|
|
110
|
+
readonly composerBand: readonly [46, 48, 52];
|
|
111
|
+
};
|
|
112
|
+
readonly light: {
|
|
113
|
+
/** Primary brand blue — unchanged, ≈4.9:1 AA on white. */
|
|
114
|
+
readonly brand: readonly [65, 118, 230];
|
|
115
|
+
/** Brighter brand blue deepened for white backgrounds (was 2.7:1). */
|
|
116
|
+
readonly brandBright: readonly [72, 104, 178];
|
|
117
|
+
/** Intermediate brand blue — Tailwind blue-500. */
|
|
118
|
+
readonly brandMid: readonly [59, 130, 246];
|
|
119
|
+
/** Deep brand blue for secondary chrome — `--dsw-static-deepseek-700`. */
|
|
120
|
+
readonly brandDeep: readonly [47, 76, 143];
|
|
121
|
+
/** Muted caption gray deepened for white backgrounds. */
|
|
122
|
+
readonly dim: readonly [101, 103, 107];
|
|
123
|
+
/** Success green — Tailwind green-700. */
|
|
124
|
+
readonly success: readonly [21, 128, 61];
|
|
125
|
+
/** Error red — Tailwind red-600. */
|
|
126
|
+
readonly error: readonly [236, 19, 19];
|
|
127
|
+
/** Warning amber — Tailwind amber-700. */
|
|
128
|
+
readonly warn: readonly [180, 83, 9];
|
|
129
|
+
/** Default foreground text — near-black. */
|
|
130
|
+
readonly text: readonly [21, 21, 23];
|
|
131
|
+
/** Inline/fenced code — Tailwind cyan-700, distinct from brand accents. */
|
|
132
|
+
readonly code: readonly [14, 116, 144];
|
|
133
|
+
/** Composer three-row band base — neutral light gray, hue-free so wave tints read on it. */
|
|
134
|
+
readonly composerBand: readonly [229, 231, 235];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* The dark palette under its original name: call sites that predate the
|
|
139
|
+
* two-palette switch keep compiling and painting identically (the default
|
|
140
|
+
* theme IS dark). New code should read the active palette through
|
|
141
|
+
* {@link getPalette} so a theme switch reaches it.
|
|
142
|
+
*
|
|
143
|
+
* @deprecated Read the active palette through {@link getPalette}; this
|
|
144
|
+
* compatibility alias is removed in the next minor release.
|
|
145
|
+
*/
|
|
146
|
+
export declare const TUI_RGB: {
|
|
147
|
+
/** Primary brand blue — `--dsw-static-deepseek-500`. */
|
|
148
|
+
readonly brand: readonly [65, 118, 230];
|
|
149
|
+
/** Brighter brand blue for live/streaming emphasis — `--dsw-static-deepseek-400`. */
|
|
150
|
+
readonly brandBright: readonly [103, 158, 254];
|
|
151
|
+
/** Intermediate brand blue between brand and brandBright — `--dsw-static-deepseek-450`. */
|
|
152
|
+
readonly brandMid: readonly [86, 134, 254];
|
|
153
|
+
/** Deep brand blue for secondary chrome — `--dsw-static-deepseek-600`. */
|
|
154
|
+
readonly brandDeep: readonly [72, 104, 178];
|
|
155
|
+
/** Muted caption gray — `--dsw-static-neutral-bluish-600`. */
|
|
156
|
+
readonly dim: readonly [129, 133, 140];
|
|
157
|
+
/** Success green — `--dsw-static-green-500`. */
|
|
158
|
+
readonly success: readonly [34, 197, 94];
|
|
159
|
+
/** Error red — `--dsw-static-red-500`. */
|
|
160
|
+
readonly error: readonly [239, 68, 68];
|
|
161
|
+
/** Warning amber — `--dsw-static-amber-500`. */
|
|
162
|
+
readonly warn: readonly [245, 158, 11];
|
|
163
|
+
/** Default foreground text — `--dsw-static-neutral-50`. */
|
|
164
|
+
readonly text: readonly [236, 240, 246];
|
|
165
|
+
/** Inline/fenced code — soft sky blue, distinct from brand accents. */
|
|
166
|
+
readonly code: readonly [125, 211, 252];
|
|
167
|
+
/** Composer three-row band base — neutral light gray, hue-free so wave tints read on it. */
|
|
168
|
+
readonly composerBand: readonly [46, 48, 52];
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Resolve a theme name to the palette actually in use. `auto` detection
|
|
172
|
+
* (OSC 11 terminal background query) is a later enhancement; until it lands,
|
|
173
|
+
* auto falls back to the dark palette.
|
|
174
|
+
* @param name - the requested theme name.
|
|
175
|
+
* @returns 'dark' or 'light' — the palette key to paint with.
|
|
176
|
+
*/
|
|
177
|
+
export declare function resolveTheme(name: ThemeName): 'dark' | 'light';
|
|
178
|
+
/**
|
|
179
|
+
* Switch the active theme: painters and {@link getPalette} reflect the new
|
|
180
|
+
* palette from the next render onward. The default is dark, so a process
|
|
181
|
+
* that never calls this paints exactly as before.
|
|
182
|
+
* @param name - the theme to activate ('auto' resolves to dark for now).
|
|
183
|
+
*/
|
|
184
|
+
export declare function setTheme(name: ThemeName): void;
|
|
185
|
+
/**
|
|
186
|
+
* The theme name in force. Returns the requested name ('auto' included) so
|
|
187
|
+
* the /theme picker and persistence can round-trip the user's choice; the
|
|
188
|
+
* palette actually used is {@link getPalette}.
|
|
189
|
+
*/
|
|
190
|
+
export declare function getTheme(): ThemeName;
|
|
191
|
+
/** The palette in force; theme-aware call sites read colors through it. */
|
|
192
|
+
export declare function getPalette(): ThemePalette;
|
|
193
|
+
/**
|
|
194
|
+
* Parse a persisted theme name: only 'light' and 'auto' survive; anything
|
|
195
|
+
* else (missing, corrupt, or unknown) falls back to the dark default.
|
|
196
|
+
* @param value - the raw parsed JSON value (expected string).
|
|
197
|
+
* @returns a valid theme name.
|
|
198
|
+
*/
|
|
199
|
+
export declare function parseThemeName(value: unknown): ThemeName;
|
|
200
|
+
/** Ink `color` string for one RGB triple. */
|
|
201
|
+
export declare function inkColor(triple: RgbTriple): string;
|
|
202
|
+
/** Paint with the primary brand blue: whale, wordmark, tool names, accents. */
|
|
203
|
+
export declare function brand(text: string): string;
|
|
204
|
+
/** Paint with the bright brand blue: streaming output and active spinners. */
|
|
205
|
+
export declare function brandBright(text: string): string;
|
|
206
|
+
/** Paint with the deep brand blue: borders and secondary chrome. */
|
|
207
|
+
export declare function brandDeep(text: string): string;
|
|
208
|
+
/** Paint muted captions, hints, and meta lines. */
|
|
209
|
+
export declare function dim(text: string): string;
|
|
210
|
+
/** Paint completed tool results and confirmations. */
|
|
211
|
+
export declare function success(text: string): string;
|
|
212
|
+
/** Paint failures and error entries. */
|
|
213
|
+
export declare function error(text: string): string;
|
|
214
|
+
/** Paint warnings. */
|
|
215
|
+
export declare function warn(text: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Installed dsh-code version exposed by the terminal header. */
|
|
2
|
+
/** Version of the installed dsh-code package. */
|
|
3
|
+
export declare const DSH_CODE_VERSION: string;
|
|
4
|
+
/**
|
|
5
|
+
* Resolve the running dsh CLI host's version from its entry file
|
|
6
|
+
* (`process.argv[1]`, e.g. `.../@deepseek-ai/dsh/lib/bin.js`). Only a manifest
|
|
7
|
+
* literally named `@deepseek-ai/dsh` counts, so an unrelated entry (vitest, a
|
|
8
|
+
* plain node script) resolves to undefined instead of faking a kernel version.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveDshHostVersion(entry?: string | undefined): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The dsh kernel version the TUI runs on, memoized after the first probe: the
|
|
13
|
+
* host process never changes within a run, and the header reads this on every
|
|
14
|
+
* Static replay.
|
|
15
|
+
*/
|
|
16
|
+
export declare function dshKernelVersion(): string | undefined;
|
|
17
|
+
/** Test-only: forget the memoized kernel version so a new argv can be probed. */
|
|
18
|
+
export declare function _resetDshKernelVersionForTests(): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Half-block whale glyph rows; render with the brand color. */
|
|
2
|
+
export declare const WHALE_GLYPH: readonly string[];
|
|
3
|
+
/** Fixed glyph width in terminal columns. */
|
|
4
|
+
export declare const WHALE_GLYPH_COLUMNS = 26;
|
|
5
|
+
/** Fixed glyph height in half-block rows. */
|
|
6
|
+
export declare const WHALE_GLYPH_ROWS = 8;
|