dsh-code 1.0.7 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +70 -24
- package/README.md +71 -25
- package/bin/deepseek.mjs +202 -39
- package/cordis.patch.yml +13 -4
- package/lib/index.mjs +4063 -844
- package/lib/session-query.mjs +3 -2
- package/lib/startup.mjs +4 -4
- package/lib/{theme-DCT8Y2xf.mjs → theme-7u5Qo3dF.mjs} +657 -20
- package/lib/types/app.d.ts +100 -63
- package/lib/types/authorization-panel.d.ts +3 -3
- package/lib/types/git-workflow.d.ts +91 -2
- package/lib/types/i18n.d.ts +39 -0
- package/lib/types/index.d.ts +73 -1
- package/lib/types/input-split.d.ts +1 -1
- package/lib/types/kernel-panels.d.ts +86 -31
- package/lib/types/language-panel.d.ts +12 -0
- package/lib/types/locales/en.d.ts +450 -0
- package/lib/types/locales/zh.d.ts +9 -0
- package/lib/types/mentions.d.ts +7 -3
- package/lib/types/models.d.ts +14 -0
- package/lib/types/panel-accent.d.ts +28 -0
- package/lib/types/rainbow.d.ts +69 -0
- package/lib/types/render/animations.d.ts +42 -0
- package/lib/types/render/inspector.d.ts +26 -0
- package/lib/types/render/lines.d.ts +21 -1
- package/lib/types/render/markdown.d.ts +1 -1
- package/lib/types/render/projection.d.ts +95 -4
- package/lib/types/render/status.d.ts +8 -8
- package/lib/types/render/text.d.ts +6 -0
- package/lib/types/render/usage.d.ts +113 -0
- package/lib/types/session-directory.d.ts +17 -0
- package/lib/types/startup.d.ts +1 -1
- package/lib/types/terminal-title.d.ts +8 -0
- package/lib/types/theme-panel.d.ts +2 -2
- package/lib/types/theme.d.ts +271 -52
- package/lib/types/update-panel.d.ts +5 -5
- package/lib/types/update.d.ts +10 -1
- package/lib/types/version.d.ts +4 -3
- package/package.json +24 -7
- package/src/app.ts +1155 -478
- package/src/approval.ts +166 -166
- package/src/authorization-panel.ts +19 -16
- package/src/editor-keys.ts +371 -371
- package/src/git-workflow.ts +229 -3
- package/src/i18n.ts +68 -0
- package/src/index.ts +412 -76
- package/src/input-split.ts +3 -3
- package/src/kernel-panels.ts +471 -89
- package/src/keyboard.ts +5 -4
- package/src/language-panel.ts +53 -0
- package/src/locales/en.ts +489 -0
- package/src/locales/zh.ts +488 -0
- package/src/mentions.ts +8 -4
- package/src/models.ts +264 -212
- package/src/panel-accent.ts +41 -0
- package/src/presets.ts +1 -1
- package/src/provider-settings.ts +1 -1
- package/src/rainbow.ts +208 -0
- package/src/render/animations.ts +104 -6
- package/src/render/editor.ts +20 -20
- package/src/render/export.ts +116 -95
- package/src/render/inspector.ts +42 -0
- package/src/render/lines.ts +628 -415
- package/src/render/markdown.ts +15 -3
- package/src/render/projection.ts +429 -19
- package/src/render/status.ts +41 -35
- package/src/render/text.ts +14 -0
- package/src/render/tool-preview.ts +77 -77
- package/src/render/usage.ts +430 -0
- package/src/render/width.ts +2 -2
- package/src/session-directory.ts +8 -6
- package/src/session-query.ts +8 -4
- package/src/startup.ts +3 -3
- package/src/subagents.ts +229 -229
- package/src/terminal-title.ts +22 -5
- package/src/theme-panel.ts +17 -21
- package/src/theme.ts +281 -33
- package/src/update-panel.ts +37 -27
- package/src/update.ts +19 -3
- package/src/version.ts +58 -20
- package/src/whale-glyph.ts +23 -23
|
@@ -7,6 +7,8 @@ import type { PermissionRow } from './permissions.ts';
|
|
|
7
7
|
import type { PresetRow } from './presets.ts';
|
|
8
8
|
import type { PluginRow } from './plugin-inventory.ts';
|
|
9
9
|
import type { SessionDirectoryOptions, SessionRow } from './session-directory.ts';
|
|
10
|
+
import type { ReviewBranch, ReviewCommit, ReviewSelection } from './git-workflow.ts';
|
|
11
|
+
import { type UsageView } from './render/usage.ts';
|
|
10
12
|
import { type StatusItemId } from './render/status.ts';
|
|
11
13
|
/**
|
|
12
14
|
* Apply one keystroke to a panel search query. IME commits arrive as one
|
|
@@ -19,19 +21,19 @@ export declare function editQuery(query: string, input: string, key: {
|
|
|
19
21
|
}): string | undefined;
|
|
20
22
|
export declare function ModePanel({ current, load, select, close }: {
|
|
21
23
|
current: string;
|
|
22
|
-
load()
|
|
23
|
-
select(id: string)
|
|
24
|
-
close()
|
|
24
|
+
load: () => Promise<readonly PresetRow[]>;
|
|
25
|
+
select: (id: string) => void;
|
|
26
|
+
close: () => void;
|
|
25
27
|
}): ReactElement;
|
|
26
28
|
export declare function PermissionPanel({ current, load, select, close }: {
|
|
27
29
|
current: string;
|
|
28
|
-
load()
|
|
29
|
-
select(id: string)
|
|
30
|
-
close()
|
|
30
|
+
load: () => Promise<readonly PermissionRow[]>;
|
|
31
|
+
select: (id: string) => void;
|
|
32
|
+
close: () => void;
|
|
31
33
|
}): ReactElement;
|
|
32
34
|
export declare function PluginPanel({ load, close, initialQuery }: {
|
|
33
|
-
load()
|
|
34
|
-
close()
|
|
35
|
+
load: () => readonly PluginRow[];
|
|
36
|
+
close: () => void;
|
|
35
37
|
initialQuery?: string;
|
|
36
38
|
}): ReactElement;
|
|
37
39
|
/** One background job snapshot for the /jobs panel (the registry's read-only view). */
|
|
@@ -61,23 +63,23 @@ export declare function runClock(ms: number): string;
|
|
|
61
63
|
* registry renders as the plain empty state (a harmless missing service).
|
|
62
64
|
*/
|
|
63
65
|
export declare function JobsPanel({ load, close }: {
|
|
64
|
-
load()
|
|
65
|
-
close()
|
|
66
|
+
load: () => readonly JobRow[];
|
|
67
|
+
close: () => void;
|
|
66
68
|
}): ReactElement;
|
|
67
69
|
export declare function ResumePanel({ currentCwd, load, readTranscript, select, requestDelete, deleteConfirmId, reloadToken, deleteMode, close }: {
|
|
68
70
|
currentCwd: string;
|
|
69
|
-
load(options: SessionDirectoryOptions, signal?: AbortSignal)
|
|
70
|
-
readTranscript(id: string, signal?: AbortSignal)
|
|
71
|
-
select(row: SessionRow)
|
|
71
|
+
load: (options: SessionDirectoryOptions, signal?: AbortSignal) => Promise<readonly SessionRow[]>;
|
|
72
|
+
readTranscript: (id: string, signal?: AbortSignal) => Promise<string>;
|
|
73
|
+
select: (row: SessionRow) => void;
|
|
72
74
|
/** Arm the composer-based delete confirm for one row (App owns the keys). */
|
|
73
|
-
requestDelete
|
|
75
|
+
requestDelete?: (row: SessionRow) => void;
|
|
74
76
|
/** The row id awaiting y/n in the composer, when any (App-owned). */
|
|
75
77
|
deleteConfirmId?: string;
|
|
76
78
|
/** Bump to reload the listing (e.g. after a deletion). */
|
|
77
79
|
reloadToken?: number;
|
|
78
80
|
/** Opened via /delete: hint-first delete mode. */
|
|
79
81
|
deleteMode?: boolean;
|
|
80
|
-
close()
|
|
82
|
+
close: () => void;
|
|
81
83
|
}): ReactElement;
|
|
82
84
|
/**
|
|
83
85
|
* The /history recall panel (Codex composer-history search, bounded): one
|
|
@@ -89,8 +91,51 @@ export declare function HistoryPanel({ entries, fill, close }: {
|
|
|
89
91
|
/** Newest-first recall entries (persistent + in-session, deduped). */
|
|
90
92
|
entries: readonly string[];
|
|
91
93
|
/** Accept one entry: its text plus its recall-space index (browsing resumes there). */
|
|
92
|
-
fill(text: string, index: number)
|
|
93
|
-
close()
|
|
94
|
+
fill: (text: string, index: number) => void;
|
|
95
|
+
close: () => void;
|
|
96
|
+
}): ReactElement;
|
|
97
|
+
/**
|
|
98
|
+
* The /review candidate picker (Codex's preset popup): bare /review opens a
|
|
99
|
+
* four-way preset — review uncommitted changes, pick a base branch, pick a
|
|
100
|
+
* recent commit, or type a custom focus. Branch and commit phases are
|
|
101
|
+
* type-to-filter lists; every selection resolves to the same /review
|
|
102
|
+
* argument string the direct command accepts.
|
|
103
|
+
*/
|
|
104
|
+
export declare function ReviewPickerPanel({ loadBranches, loadCommits, choose, close }: {
|
|
105
|
+
loadBranches: (signal?: AbortSignal) => Promise<readonly ReviewBranch[]>;
|
|
106
|
+
loadCommits: (signal?: AbortSignal) => Promise<readonly ReviewCommit[]>;
|
|
107
|
+
/** Run the review for one picker selection. */
|
|
108
|
+
choose: (selection: ReviewSelection) => void;
|
|
109
|
+
close: () => void;
|
|
110
|
+
}): ReactElement;
|
|
111
|
+
/** One cross-session full-text search hit mapped from the session-query engine. */
|
|
112
|
+
export interface SearchRow {
|
|
113
|
+
/** Session id (Enter resumes it through the switch machinery). */
|
|
114
|
+
readonly id: string;
|
|
115
|
+
/** Display label: session title or the short id form. */
|
|
116
|
+
readonly label: string;
|
|
117
|
+
/** Secondary facts line (workspace · preset markers). */
|
|
118
|
+
readonly detail: string;
|
|
119
|
+
/** Bounded plain-text excerpt around the strongest match. */
|
|
120
|
+
readonly snippet: string;
|
|
121
|
+
/** Match timestamp (relative labels derive from it). */
|
|
122
|
+
readonly updatedAt: number;
|
|
123
|
+
/** Whether the hit is a delegated subagent conversation (not resumable). */
|
|
124
|
+
readonly subagent: boolean;
|
|
125
|
+
/** Whether Enter may switch into it. */
|
|
126
|
+
readonly resumable: boolean;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The /search panel: full-text search over every persisted session through
|
|
130
|
+
* the in-process session-query engine (the same corpus the model's
|
|
131
|
+
* session_search tool reads). Type a query, Enter searches, Enter again
|
|
132
|
+
* resumes the hit; the query line edits like every kernel panel.
|
|
133
|
+
*/
|
|
134
|
+
export declare function SearchPanel({ load, select, initialQuery, close }: {
|
|
135
|
+
load: (query: string, signal?: AbortSignal) => Promise<readonly SearchRow[]>;
|
|
136
|
+
select: (row: SearchRow) => void;
|
|
137
|
+
initialQuery?: string;
|
|
138
|
+
close: () => void;
|
|
94
139
|
}): ReactElement;
|
|
95
140
|
/**
|
|
96
141
|
* The /statusline picker (the Codex setup-view contract): one bounded list
|
|
@@ -100,8 +145,8 @@ export declare function HistoryPanel({ entries, fill, close }: {
|
|
|
100
145
|
*/
|
|
101
146
|
export declare function StatuslinePanel({ enabled, change, close }: {
|
|
102
147
|
enabled: readonly StatusItemId[];
|
|
103
|
-
change(items: readonly StatusItemId[])
|
|
104
|
-
close()
|
|
148
|
+
change: (items: readonly StatusItemId[]) => void;
|
|
149
|
+
close: () => void;
|
|
105
150
|
}): ReactElement;
|
|
106
151
|
/**
|
|
107
152
|
* The `/model` reasoning-effort stage (the Codex model → reasoning popup
|
|
@@ -122,11 +167,11 @@ export declare function EffortPanel({ row, current, select, back, onExit }: {
|
|
|
122
167
|
/** Effective effort currently in force ('' when none), for the ● mark. */
|
|
123
168
|
current: string | undefined;
|
|
124
169
|
/** Accept one advertised effort id, or '' for the provider default. */
|
|
125
|
-
select(effortId: string)
|
|
170
|
+
select: (effortId: string) => void;
|
|
126
171
|
/** Return to the model list without applying. */
|
|
127
|
-
back()
|
|
172
|
+
back: () => void;
|
|
128
173
|
/** Leave the whole /model flow (Ctrl+C). */
|
|
129
|
-
onExit()
|
|
174
|
+
onExit: () => void;
|
|
130
175
|
}): ReactElement;
|
|
131
176
|
/**
|
|
132
177
|
* The /agents panel (the Codex agent-picker contract, read-only): this
|
|
@@ -139,10 +184,10 @@ export declare function AgentsPanel({ live, load, readTranscript, close }: {
|
|
|
139
184
|
/** Live feed rows (child sessions observed this process). */
|
|
140
185
|
live: readonly SubagentRow[];
|
|
141
186
|
/** Load this session's persisted child sessions by lineage. */
|
|
142
|
-
load()
|
|
187
|
+
load: () => Promise<readonly SessionRow[]>;
|
|
143
188
|
/** Read one child session's full transcript as markdown. */
|
|
144
|
-
readTranscript(id: string, signal?: AbortSignal)
|
|
145
|
-
close()
|
|
189
|
+
readTranscript: (id: string, signal?: AbortSignal) => Promise<string>;
|
|
190
|
+
close: () => void;
|
|
146
191
|
}): ReactElement;
|
|
147
192
|
/**
|
|
148
193
|
* The /subagent model panel: which model configuration delegated subagents
|
|
@@ -159,12 +204,12 @@ export declare function AgentsPanel({ live, load, readTranscript, close }: {
|
|
|
159
204
|
export declare function SubagentPanel({ current, load, pick, inherit, close }: {
|
|
160
205
|
/** Display label of the override in force, '' when following the current model. */
|
|
161
206
|
current: string;
|
|
162
|
-
load()
|
|
207
|
+
load: () => Promise<ModelDirectory>;
|
|
163
208
|
/** Apply one model (with an advertised effort, when picked) as the override. */
|
|
164
|
-
pick(row: ModelRow, effortId?: string)
|
|
209
|
+
pick: (row: ModelRow, effortId?: string) => void;
|
|
165
210
|
/** Drop the override: subagents follow the current model again. */
|
|
166
|
-
inherit()
|
|
167
|
-
close()
|
|
211
|
+
inherit: () => void;
|
|
212
|
+
close: () => void;
|
|
168
213
|
}): ReactElement;
|
|
169
214
|
/**
|
|
170
215
|
* The /schedule panel: the read-only catalog of active reminders folded from
|
|
@@ -185,6 +230,16 @@ export declare function scheduleRelative(targetAt: number, now: number): string;
|
|
|
185
230
|
/** Ordered display rows: overdue first (error tone), then ascending target. */
|
|
186
231
|
export declare function scheduleDisplayRows(rows: readonly ScheduleRow[], now: number): readonly ScheduleDisplayRow[];
|
|
187
232
|
export declare function SchedulePanel({ rows, close }: {
|
|
188
|
-
rows()
|
|
189
|
-
close()
|
|
233
|
+
rows: () => readonly ScheduleRow[];
|
|
234
|
+
close: () => void;
|
|
235
|
+
}): ReactElement;
|
|
236
|
+
/**
|
|
237
|
+
* The /usage panel: the session's provider-reported token totals, its context
|
|
238
|
+
* pressure and estimated composition, and the exact per-turn accounting, in
|
|
239
|
+
* one bounded scrollable surface. Read-only — Esc or q closes it.
|
|
240
|
+
*/
|
|
241
|
+
export declare function UsagePanel({ load, close }: {
|
|
242
|
+
/** Read the current session's usage blocks from the mounted projections. */
|
|
243
|
+
load: () => Promise<UsageView>;
|
|
244
|
+
close: () => void;
|
|
190
245
|
}): ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The /language picker: one row per interface language, the active one
|
|
3
|
+
* marked, arrow selection, Enter applies (persisting through the runner and
|
|
4
|
+
* repainting the whole screen so Static-region text switches too).
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactElement } from 'react';
|
|
7
|
+
import { type LanguageName } from './i18n.ts';
|
|
8
|
+
export declare function LanguagePanel({ current, select, close }: {
|
|
9
|
+
current: LanguageName;
|
|
10
|
+
select: (name: LanguageName) => void;
|
|
11
|
+
close: () => void;
|
|
12
|
+
}): ReactElement;
|