dsh-code 1.0.6 → 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 +123 -26
- package/README.md +124 -27
- package/bin/deepseek.mjs +283 -35
- package/cordis.patch.yml +97 -0
- package/lib/index.mjs +5008 -881
- package/lib/session-query.mjs +150 -0
- package/lib/startup.mjs +4 -4
- package/lib/{theme-DCT8Y2xf.mjs → theme-7u5Qo3dF.mjs} +657 -20
- package/lib/types/app.d.ts +106 -62
- 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 +100 -1
- package/lib/types/input-split.d.ts +1 -1
- package/lib/types/kernel-panels.d.ts +107 -29
- 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/editor.d.ts +4 -3
- package/lib/types/render/ime-cursor.d.ts +60 -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 +130 -4
- package/lib/types/render/status.d.ts +9 -9
- 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/session-query.d.ts +92 -0
- package/lib/types/startup.d.ts +1 -1
- package/lib/types/terminal-title.d.ts +66 -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 +49 -0
- package/lib/types/update.d.ts +75 -0
- package/lib/types/version.d.ts +4 -3
- package/package.json +246 -90
- package/src/app.ts +1369 -509
- 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 +534 -80
- package/src/input-split.ts +3 -3
- package/src/internals.ts +5 -0
- package/src/kernel-panels.ts +554 -86
- 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 +25 -24
- package/src/render/export.ts +116 -95
- package/src/render/ime-cursor.ts +147 -0
- 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 +572 -21
- package/src/render/status.ts +59 -39
- 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 +239 -0
- package/src/startup.ts +3 -3
- package/src/subagents.ts +229 -229
- package/src/terminal-title.ts +190 -0
- package/src/theme-panel.ts +17 -21
- package/src/theme.ts +281 -33
- package/src/update-panel.ts +256 -0
- package/src/update.ts +126 -0
- package/src/version.ts +58 -20
- package/src/whale-glyph.ts +23 -23
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
3
|
import type { ModelDirectory, ModelRow } from './models.ts';
|
|
4
4
|
import type { SubagentRow } from './subagents.ts';
|
|
5
|
+
import type { ScheduleRow } from './render/projection.ts';
|
|
5
6
|
import type { PermissionRow } from './permissions.ts';
|
|
6
7
|
import type { PresetRow } from './presets.ts';
|
|
7
8
|
import type { PluginRow } from './plugin-inventory.ts';
|
|
8
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';
|
|
9
12
|
import { type StatusItemId } from './render/status.ts';
|
|
10
13
|
/**
|
|
11
14
|
* Apply one keystroke to a panel search query. IME commits arrive as one
|
|
@@ -18,19 +21,19 @@ export declare function editQuery(query: string, input: string, key: {
|
|
|
18
21
|
}): string | undefined;
|
|
19
22
|
export declare function ModePanel({ current, load, select, close }: {
|
|
20
23
|
current: string;
|
|
21
|
-
load()
|
|
22
|
-
select(id: string)
|
|
23
|
-
close()
|
|
24
|
+
load: () => Promise<readonly PresetRow[]>;
|
|
25
|
+
select: (id: string) => void;
|
|
26
|
+
close: () => void;
|
|
24
27
|
}): ReactElement;
|
|
25
28
|
export declare function PermissionPanel({ current, load, select, close }: {
|
|
26
29
|
current: string;
|
|
27
|
-
load()
|
|
28
|
-
select(id: string)
|
|
29
|
-
close()
|
|
30
|
+
load: () => Promise<readonly PermissionRow[]>;
|
|
31
|
+
select: (id: string) => void;
|
|
32
|
+
close: () => void;
|
|
30
33
|
}): ReactElement;
|
|
31
34
|
export declare function PluginPanel({ load, close, initialQuery }: {
|
|
32
|
-
load()
|
|
33
|
-
close()
|
|
35
|
+
load: () => readonly PluginRow[];
|
|
36
|
+
close: () => void;
|
|
34
37
|
initialQuery?: string;
|
|
35
38
|
}): ReactElement;
|
|
36
39
|
/** One background job snapshot for the /jobs panel (the registry's read-only view). */
|
|
@@ -60,23 +63,23 @@ export declare function runClock(ms: number): string;
|
|
|
60
63
|
* registry renders as the plain empty state (a harmless missing service).
|
|
61
64
|
*/
|
|
62
65
|
export declare function JobsPanel({ load, close }: {
|
|
63
|
-
load()
|
|
64
|
-
close()
|
|
66
|
+
load: () => readonly JobRow[];
|
|
67
|
+
close: () => void;
|
|
65
68
|
}): ReactElement;
|
|
66
69
|
export declare function ResumePanel({ currentCwd, load, readTranscript, select, requestDelete, deleteConfirmId, reloadToken, deleteMode, close }: {
|
|
67
70
|
currentCwd: string;
|
|
68
|
-
load(options: SessionDirectoryOptions, signal?: AbortSignal)
|
|
69
|
-
readTranscript(id: string, signal?: AbortSignal)
|
|
70
|
-
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;
|
|
71
74
|
/** Arm the composer-based delete confirm for one row (App owns the keys). */
|
|
72
|
-
requestDelete
|
|
75
|
+
requestDelete?: (row: SessionRow) => void;
|
|
73
76
|
/** The row id awaiting y/n in the composer, when any (App-owned). */
|
|
74
77
|
deleteConfirmId?: string;
|
|
75
78
|
/** Bump to reload the listing (e.g. after a deletion). */
|
|
76
79
|
reloadToken?: number;
|
|
77
80
|
/** Opened via /delete: hint-first delete mode. */
|
|
78
81
|
deleteMode?: boolean;
|
|
79
|
-
close()
|
|
82
|
+
close: () => void;
|
|
80
83
|
}): ReactElement;
|
|
81
84
|
/**
|
|
82
85
|
* The /history recall panel (Codex composer-history search, bounded): one
|
|
@@ -88,8 +91,51 @@ export declare function HistoryPanel({ entries, fill, close }: {
|
|
|
88
91
|
/** Newest-first recall entries (persistent + in-session, deduped). */
|
|
89
92
|
entries: readonly string[];
|
|
90
93
|
/** Accept one entry: its text plus its recall-space index (browsing resumes there). */
|
|
91
|
-
fill(text: string, index: number)
|
|
92
|
-
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;
|
|
93
139
|
}): ReactElement;
|
|
94
140
|
/**
|
|
95
141
|
* The /statusline picker (the Codex setup-view contract): one bounded list
|
|
@@ -99,8 +145,8 @@ export declare function HistoryPanel({ entries, fill, close }: {
|
|
|
99
145
|
*/
|
|
100
146
|
export declare function StatuslinePanel({ enabled, change, close }: {
|
|
101
147
|
enabled: readonly StatusItemId[];
|
|
102
|
-
change(items: readonly StatusItemId[])
|
|
103
|
-
close()
|
|
148
|
+
change: (items: readonly StatusItemId[]) => void;
|
|
149
|
+
close: () => void;
|
|
104
150
|
}): ReactElement;
|
|
105
151
|
/**
|
|
106
152
|
* The `/model` reasoning-effort stage (the Codex model → reasoning popup
|
|
@@ -121,11 +167,11 @@ export declare function EffortPanel({ row, current, select, back, onExit }: {
|
|
|
121
167
|
/** Effective effort currently in force ('' when none), for the ● mark. */
|
|
122
168
|
current: string | undefined;
|
|
123
169
|
/** Accept one advertised effort id, or '' for the provider default. */
|
|
124
|
-
select(effortId: string)
|
|
170
|
+
select: (effortId: string) => void;
|
|
125
171
|
/** Return to the model list without applying. */
|
|
126
|
-
back()
|
|
172
|
+
back: () => void;
|
|
127
173
|
/** Leave the whole /model flow (Ctrl+C). */
|
|
128
|
-
onExit()
|
|
174
|
+
onExit: () => void;
|
|
129
175
|
}): ReactElement;
|
|
130
176
|
/**
|
|
131
177
|
* The /agents panel (the Codex agent-picker contract, read-only): this
|
|
@@ -138,10 +184,10 @@ export declare function AgentsPanel({ live, load, readTranscript, close }: {
|
|
|
138
184
|
/** Live feed rows (child sessions observed this process). */
|
|
139
185
|
live: readonly SubagentRow[];
|
|
140
186
|
/** Load this session's persisted child sessions by lineage. */
|
|
141
|
-
load()
|
|
187
|
+
load: () => Promise<readonly SessionRow[]>;
|
|
142
188
|
/** Read one child session's full transcript as markdown. */
|
|
143
|
-
readTranscript(id: string, signal?: AbortSignal)
|
|
144
|
-
close()
|
|
189
|
+
readTranscript: (id: string, signal?: AbortSignal) => Promise<string>;
|
|
190
|
+
close: () => void;
|
|
145
191
|
}): ReactElement;
|
|
146
192
|
/**
|
|
147
193
|
* The /subagent model panel: which model configuration delegated subagents
|
|
@@ -158,10 +204,42 @@ export declare function AgentsPanel({ live, load, readTranscript, close }: {
|
|
|
158
204
|
export declare function SubagentPanel({ current, load, pick, inherit, close }: {
|
|
159
205
|
/** Display label of the override in force, '' when following the current model. */
|
|
160
206
|
current: string;
|
|
161
|
-
load()
|
|
207
|
+
load: () => Promise<ModelDirectory>;
|
|
162
208
|
/** Apply one model (with an advertised effort, when picked) as the override. */
|
|
163
|
-
pick(row: ModelRow, effortId?: string)
|
|
209
|
+
pick: (row: ModelRow, effortId?: string) => void;
|
|
164
210
|
/** Drop the override: subagents follow the current model again. */
|
|
165
|
-
inherit()
|
|
166
|
-
close()
|
|
211
|
+
inherit: () => void;
|
|
212
|
+
close: () => void;
|
|
213
|
+
}): ReactElement;
|
|
214
|
+
/**
|
|
215
|
+
* The /schedule panel: the read-only catalog of active reminders folded from
|
|
216
|
+
* durable schedule/change events (the web ui-schedule contract: overdue
|
|
217
|
+
* first, then ascending target; the model creates and cancels through its
|
|
218
|
+
* schedule_* tools, the panel only shows state). A local second-hand keeps
|
|
219
|
+
* the relative labels live while the panel is open.
|
|
220
|
+
*/
|
|
221
|
+
export interface ScheduleDisplayRow {
|
|
222
|
+
readonly key: string;
|
|
223
|
+
readonly text: string;
|
|
224
|
+
readonly tone?: 'error';
|
|
225
|
+
}
|
|
226
|
+
/** Human frequency label: one-shot kinds read as Once, every rows carry the interval. */
|
|
227
|
+
export declare function scheduleFrequency(row: ScheduleRow): string;
|
|
228
|
+
/** Relative label for the next target: in N unit, or N unit overdue. */
|
|
229
|
+
export declare function scheduleRelative(targetAt: number, now: number): string;
|
|
230
|
+
/** Ordered display rows: overdue first (error tone), then ascending target. */
|
|
231
|
+
export declare function scheduleDisplayRows(rows: readonly ScheduleRow[], now: number): readonly ScheduleDisplayRow[];
|
|
232
|
+
export declare function SchedulePanel({ rows, 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;
|
|
167
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;
|