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
package/lib/session-query.mjs
CHANGED
|
@@ -50,9 +50,10 @@ function sameHeader(a, b) {
|
|
|
50
50
|
return a.id === b.id && a.createdAt === b.createdAt && a.cwd === b.cwd && a.parentSession === b.parentSession && a.isSeeded === b.isSeeded && (a.delegationDepth ?? 0) === (b.delegationDepth ?? 0) && a.agentPreset === b.agentPreset;
|
|
51
51
|
}
|
|
52
52
|
function materializePersistenceSnapshots(snapshots) {
|
|
53
|
-
|
|
53
|
+
const candidate = snapshots;
|
|
54
|
+
if (!Array.isArray(candidate)) throw new Error("persistence snapshots must be an array");
|
|
54
55
|
const result = /* @__PURE__ */ new Map();
|
|
55
|
-
for (const snapshot of
|
|
56
|
+
for (const snapshot of candidate) {
|
|
56
57
|
if (typeof snapshot.revision !== "string") throw new Error("persistence snapshot revision must be a string");
|
|
57
58
|
const header = structuredClone(snapshot.header);
|
|
58
59
|
if (result.has(header.id)) throw new Error(`persistence listed duplicate session "${header.id}"`);
|
package/lib/startup.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as THEME_NAMES } from "./theme-7u5Qo3dF.mjs";
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import { parseCmdline } from "@deepseek-ai/dsh-cmdline";
|
|
4
4
|
//#region src/startup.ts
|
|
@@ -18,7 +18,7 @@ import { parseCmdline } from "@deepseek-ai/dsh-cmdline";
|
|
|
18
18
|
* whose project directory matches the current working directory.
|
|
19
19
|
* - `--session <id>` — create a new session under an explicit identity (the
|
|
20
20
|
* id must not exist yet).
|
|
21
|
-
* - `--theme <dark|light|auto>` — the color palette; auto follows the
|
|
21
|
+
* - `--theme <dark|light|prismatic|rainbow|auto>` — the color palette; auto follows the
|
|
22
22
|
* terminal (dark fallback until OSC-11 detection lands).
|
|
23
23
|
* - no flags — a fresh session with a minted id.
|
|
24
24
|
*
|
|
@@ -41,7 +41,7 @@ function resolveTuiStartup(options) {
|
|
|
41
41
|
if (options.resume === "") throw new Error("--resume needs a session id or id prefix");
|
|
42
42
|
if (options.mode === "") throw new Error("--mode needs a preset id");
|
|
43
43
|
if (options.mode !== void 0 && (options.resume !== void 0 || options.continue === true)) throw new Error("--mode applies only to a new session; it cannot be combined with --resume or --continue");
|
|
44
|
-
if (options.theme !== void 0 && !THEME_NAMES.includes(options.theme)) throw new Error(
|
|
44
|
+
if (options.theme !== void 0 && !THEME_NAMES.includes(options.theme)) throw new Error(`--theme must be one of: ${THEME_NAMES.join(", ")}`);
|
|
45
45
|
const input = {
|
|
46
46
|
...options.theme === void 0 ? {} : { theme: options.theme },
|
|
47
47
|
...options.prompt === void 0 || options.prompt.trim() === "" ? {} : { prompt: options.prompt.trim() },
|
|
@@ -71,7 +71,7 @@ function resolveTuiStartup(options) {
|
|
|
71
71
|
* @returns a fresh program, so one process can parse more than once (tests).
|
|
72
72
|
*/
|
|
73
73
|
function tuiCommand() {
|
|
74
|
-
return new Command().name("dsh --profile cli").description("DeepSeek Harness CLI core: the interactive coding terminal.").helpOption("-h, --help", "show this help").option("-r, --resume <session>", "resume the persisted session with this id (or unique id prefix)").option("-c, --continue", "resume the most recent persisted session for this working directory").option("--session <id>", "create a new session under this explicit id").option("--mode <preset>", "agent preset for a newly created session").option("--theme <name>", "color theme: dark (default), light, or auto").option("-i, --image <path>", "attach an image to the initial prompt (repeatable)", (path, paths) => [...paths, path], []).argument("[prompt...]", "initial prompt; sends immediately after startup").addHelpText("after", `
|
|
74
|
+
return new Command().name("dsh --profile cli").description("DeepSeek Harness CLI core: the interactive coding terminal.").helpOption("-h, --help", "show this help").option("-r, --resume <session>", "resume the persisted session with this id (or unique id prefix)").option("-c, --continue", "resume the most recent persisted session for this working directory").option("--session <id>", "create a new session under this explicit id").option("--mode <preset>", "agent preset for a newly created session").option("--theme <name>", "color theme: dark (default), light, prismatic, rainbow, or auto").option("-i, --image <path>", "attach an image to the initial prompt (repeatable)", (path, paths) => [...paths, path], []).argument("[prompt...]", "initial prompt; sends immediately after startup").addHelpText("after", `
|
|
75
75
|
Examples:
|
|
76
76
|
dsh --profile cli fresh session, minted id
|
|
77
77
|
dsh --profile cli --resume abc123 resume session by id prefix
|