@fishwithcat/dsh-tui-app 0.2.2-alpha.2 → 0.2.2-alpha.3.fork.1
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.i18n.yaml +6 -6
- package/README.md +4 -4
- package/README.zh.md +4 -4
- package/lib/index.js +14 -16
- package/lib/types/ansi.d.ts +4 -4
- package/lib/types/session.d.ts +1 -1
- package/package.json +61 -61
package/README.i18n.yaml
CHANGED
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
en: 88c14b005e03bf78
|
|
19
19
|
zh: 0b9ad8bc5a690a3c
|
|
20
20
|
/deepseek-ai-dsh-tui-app/use-this-package/composing-prompting-and-interrupting:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
21
|
+
en: 34da0bc57f324c76
|
|
22
|
+
zh: 7ca36d67e490aeaf
|
|
23
23
|
/deepseek-ai-dsh-tui-app/use-this-package/watching-a-subagent:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: 06e52609345e4e25
|
|
25
|
+
zh: fde80695a5359b03
|
|
26
26
|
/deepseek-ai-dsh-tui-app/use-this-package/commands:
|
|
27
27
|
en: 39e96c52dda57e65
|
|
28
28
|
zh: d2aade8d44940539
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
en: a7daa7d1183a433f
|
|
37
37
|
zh: 8abbd0d3ec08a8d6
|
|
38
38
|
/deepseek-ai-dsh-tui-app/understand-the-implementation/rendering:
|
|
39
|
-
en:
|
|
40
|
-
zh:
|
|
39
|
+
en: 5acabadd3a7a501d
|
|
40
|
+
zh: de3908c848d3d1fa
|
|
41
41
|
/deepseek-ai-dsh-tui-app/understand-the-implementation/interaction-seams:
|
|
42
42
|
en: ad6ba4563696862a
|
|
43
43
|
zh: 469b082552af2e27
|
package/README.md
CHANGED
|
@@ -57,17 +57,17 @@ Press Shift+Tab to toggle plan mode for the session's Agent. While plan mode is
|
|
|
57
57
|
| `Space` | Check or uncheck an option in a multi-select question |
|
|
58
58
|
| `Ctrl+L` | Repaint from scratch |
|
|
59
59
|
|
|
60
|
-
Exiting — Ctrl+C with nothing running, Ctrl+D, or `/quit` — restores the terminal and prints the session id as a `dsh --resume <session-id>` command, so a later invocation continues the same conversation. Resuming — that command at startup, or `/resume` in the composer — restores the stored conversation into the transcript before the composer accepts the next prompt, so the earlier prompts, replies, and Tool rows are back on screen instead of only their effects on the model. The `/resume` picker and `/sessions` label each stored session with its title — the leading words of the first human message, a generated title, or an explicit rename — beside its id, start time, and workspace. The hint is printed only where the deployment mounts a session-persistence backend; without one there is nothing for `--resume` to open.
|
|
60
|
+
Exiting — Ctrl+C with nothing running, Ctrl+D, or `/quit` — restores the terminal and prints the session id as a `dsh-tui --resume <session-id>` command, so a later invocation continues the same conversation. Resuming — that command at startup, or `/resume` in the composer — restores the stored conversation into the transcript before the composer accepts the next prompt, so the earlier prompts, replies, and Tool rows are back on screen instead of only their effects on the model. The `/resume` picker and `/sessions` label each stored session with its title — the leading words of the first human message, a generated title, or an explicit rename — beside its id, start time, and workspace. The hint is printed only where the deployment mounts a session-persistence backend; without one there is nothing for `--resume` to open.
|
|
61
61
|
|
|
62
62
|
### Watching a subagent
|
|
63
63
|
|
|
64
64
|
When a local subagent starts, the TUI publishes a loopback connection record and then prints a watch command as an ordinary notice:
|
|
65
65
|
|
|
66
66
|
```
|
|
67
|
-
· watch: dsh watch <session-id>
|
|
67
|
+
· watch: dsh-tui watch <session-id>
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
The
|
|
70
|
+
The `--watch <session-id>` application flag is equivalent.
|
|
71
71
|
|
|
72
72
|
`/subagents` opens a pinned panel listing the session's delegated descendants through the subagent service, each with its activation state and the exact watch command. The read reaches stored children as well as resident ones, and a child catalog it cannot read appears as a diagnostic row. The panel refreshes when a catalog fact or lifecycle edge lands, so children that start or settle while it is open join or leave the list; the list never writes a transcript row, and the main Agent keeps streaming underneath without moving it. Up and Down or PageUp and PageDown scroll a list taller than the panel, and Enter, Esc, or Ctrl+C closes it without cancelling the Agent.
|
|
73
73
|
|
|
@@ -124,7 +124,7 @@ While the renderer owns the terminal, console writes from mounted plugins are ca
|
|
|
124
124
|
|
|
125
125
|
### Rendering
|
|
126
126
|
|
|
127
|
-
[`src/transcript.ts`](src/transcript.ts) folds those events into ordered rows — prompts, assistant messages, retained reasoning, Tool calls with their settled outcome, approval decisions, and app notices — and invalidates its rendered lines through a revision counter, while the view re-renders only the rows that revision changed: it caches each row's lines by row identity and viewport width, so a streamed delta renders the live row alone instead of the whole transcript. A prompt renders its image markers before its text, one marker per attached image in content order, because the terminal has no thumbnail and the durable content blocks are the record of what was attached. Message rows
|
|
127
|
+
[`src/transcript.ts`](src/transcript.ts) folds those events into ordered rows — prompts, assistant messages, retained reasoning, Tool calls with their settled outcome, approval decisions, and app notices — and invalidates its rendered lines through a revision counter, while the view re-renders only the rows that revision changed: it caches each row's lines by row identity and viewport width, so a streamed delta renders the live row alone instead of the whole transcript. A prompt renders its image markers before its text, one marker per attached image in content order, because the terminal has no thumbnail and the durable content blocks are the record of what was attached. Message rows mark their role on the first line: a prompt opens with `›` and an assistant message with `◆`, in that role's color, while every later line aligns under a two-space indent. The first-line glyphs keep the roles apart even without color, and no rule is drawn into the continuation lines, so copying a reply does not drag a vertical bar along. Injected context is model input rather than conversation, so it produces a row only when its producer declared a one-line `notice` form: a workspace-instruction, skill-catalog, or runtime-context message stays in the session log, while a model switch, a plan-mode change, or a goal appears as an app notice. The footer sits under the composer in both screen strategies and occupies two lines: the workspace and Agent state right-aligned against the routed model and its reasoning effort, then the occupancy of the next request against the routed model's capacity, with the whole log's token figures at the bottom-right edge. Once the session has delegated any child, the occupancy is followed by a `● subagents (running/total)` marker — `●` while a child activation runs, `○` once every recorded child has settled — read from the same catalogs `/subagents` lists, and shown alone on a frame that knows no occupancy yet. Those figures are the decode throughput in tokens per second, the billed prompt-plus-output total, and the cache-read share of billed prompt tokens; each is omitted until it has data, the rate is the whole-log average the Web stats strip reports rather than a live instantaneous one, and the group yields before the occupancy when the terminal is too narrow for both. Plan mode adds a `plan` marker beside the Agent state, toggled by `Shift+Tab` through `ctx.planMode`. The key hints are the placeholder of the empty composer rather than a footer line: the composer is wrapped so its content line shows them until the first typed character, because the editor component renders no placeholder of its own. Occupancy and capacity come from the `contextPressure` projection of the mounted `ctx.tokenMeter`, the totals from its `tokenUsage` projection, and the throughput from the `sessionStats` projection this bundle inserts; the `(auto)` marker comes from `ctx.compaction.autoCompactionEnabled`; the model's provider qualifies the label only when the deployment registers several. [`src/views.ts`](src/views.ts) turns rows into terminal lines with [`@earendil-works/pi-tui`](https://www.npmjs.com/package/@earendil-works/pi-tui) components, truncating every line to the viewport width because the renderer treats an over-wide line as a component defect, and flattening a Tool heading to one line because one row owns exactly one terminal row: a multi-line argument would otherwise print its own line breaks and spill the row into the pinned footer. A picker or prompt renders as ordinary output rather than a dialog — a plain title, a blank row, and the body — anchored directly above the composer in the alternate-screen layout, with every row padded to the viewport width so the transcript cannot show through beside it. The alternate-screen renderer owns scrolling: the transcript is its primary scroll view, so PageUp/PageDown and the wheel move the transcript while the status bar and composer stay pinned; stopping the renderer writes the whole transcript back to the normal screen, so the output stays selectable after exit. `stop()` then flushes the session and writes the resume command to stderr, after the restore because the surface no longer owns the screen, and only where a persistence backend is mounted. A Tool's declared Host presentation decides its row: the call and result views resolved through `ctx.tools` while the fold runs render as a `card: 'diff'` unified diff with the Tool's own heading and a `+added -removed` count, a `card: 'terminal'` command with its description, working directory, output, and exit-status pill, a `card: 'read'` numbered line window, a `card: 'search'` grouped match or path list with its cap signal, a `card: 'web'` cited-source or fetch summary, and a `card: 'generic'` title with its salient input. A card body folds after a bounded number of lines; a settled result view replaces the pending one, an omitted result view keeps the call-time card, and a failed mutation falls back to the ordinary name-and-summary row with its error text. A Tool row's ordinary result body renders in the palette's tool-result grey rather than the assistant body's terminal foreground. The palette follows the terminal background: `colorScheme` pins dark or light, and `auto` reads the terminal's `COLORFGBG` background signal, defaulting to dark. Switching sessions releases the transcript view’s cached lines and Markdown components. Provider reasoning stays visible after streaming ends and is restored from the session log when resuming.
|
|
128
128
|
|
|
129
129
|
### Interaction seams
|
|
130
130
|
|
package/README.zh.md
CHANGED
|
@@ -57,17 +57,17 @@ dsh
|
|
|
57
57
|
| `Space` | 在多选问题中勾选或取消勾选一个选项 |
|
|
58
58
|
| `Ctrl+L` | 全量重绘 |
|
|
59
59
|
|
|
60
|
-
退出时——无运行时按 Ctrl+C、按 Ctrl+D,或执行 `/quit`——应用会恢复终端,并把会话 id 以 `dsh --resume <session-id>` 命令的形式打印出来,以便之后的调用继续同一段对话。恢复时——启动时执行该命令,或在输入框执行 `/resume`——应用会把已存储的对话恢复到对话记录中,然后才接受下一条提示,因此此前的提示、回复与工具行都会重新出现在屏幕上,而不只是留在模型上下文中。`/resume` 选择器与 `/sessions` 用会话标题——第一条人类消息的开头词语、生成的标题或显式重命名——作为标识,并在其旁显示 id、开始时间与工作区。仅当部署挂载了会话持久化后端时才会打印该提示;没有后端时 `--resume` 无可打开的对象。
|
|
60
|
+
退出时——无运行时按 Ctrl+C、按 Ctrl+D,或执行 `/quit`——应用会恢复终端,并把会话 id 以 `dsh-tui --resume <session-id>` 命令的形式打印出来,以便之后的调用继续同一段对话。恢复时——启动时执行该命令,或在输入框执行 `/resume`——应用会把已存储的对话恢复到对话记录中,然后才接受下一条提示,因此此前的提示、回复与工具行都会重新出现在屏幕上,而不只是留在模型上下文中。`/resume` 选择器与 `/sessions` 用会话标题——第一条人类消息的开头词语、生成的标题或显式重命名——作为标识,并在其旁显示 id、开始时间与工作区。仅当部署挂载了会话持久化后端时才会打印该提示;没有后端时 `--resume` 无可打开的对象。
|
|
61
61
|
|
|
62
62
|
### 查看子代理
|
|
63
63
|
|
|
64
64
|
本地 subagent 启动后,TUI 会先发布回环连接记录,然后以普通提示显示查看命令:
|
|
65
65
|
|
|
66
66
|
```
|
|
67
|
-
· watch: dsh watch <session-id>
|
|
67
|
+
· watch: dsh-tui watch <session-id>
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
`--watch <session-id>` 应用参数是等效写法。
|
|
71
71
|
|
|
72
72
|
`/subagents` 通过子代理服务打开一个固定面板,列出当前会话委派的所有后代子代理,并给出各自的执行状态与查看命令。该读取既覆盖常驻子代理,也覆盖已存储的子代理;无法读取的子代理目录会显示为诊断行。面板在目录事实或生命周期边沿到达时刷新,因此在面板打开期间启动或结束的子代理会自动加入或离开列表;列表不写入对话记录,主 Agent 在下方继续输出也不会移动面板。列表超出面板高度时可用 Up/Down 或 PageUp/PageDown 滚动;按 Enter、Esc 或 Ctrl+C 关闭面板,不会取消主 Agent。
|
|
73
73
|
|
|
@@ -124,7 +124,7 @@ dsh
|
|
|
124
124
|
|
|
125
125
|
### 渲染
|
|
126
126
|
|
|
127
|
-
[`src/transcript.ts`](src/transcript.ts) 把这些事件折叠为有序行——提示、assistant 消息、保留的 reasoning
|
|
127
|
+
[`src/transcript.ts`](src/transcript.ts) 把这些事件折叠为有序行——提示、assistant 消息、保留的 reasoning、带最终结果的工具调用、审批决定与应用通知——并通过修订计数器使其渲染行失效;而视图只重新渲染该修订真正改动的行:它按行身份与视口宽度缓存每一行的渲染结果,因此一次流式增量只渲染实时行,而不是整份对话记录。提示会先渲染其图片标记、再渲染文本,每个标记按内容顺序对应一张已附图片,因为终端没有缩略图,而持久内容块才是所附内容的记录。消息行只在首行标记角色:提示以 `›` 开头,assistant 消息以 `◆` 开头,并使用该角色的颜色;其后的每一行都以两个空格缩进对齐。首行符号使两种角色即使没有颜色也能区分,而续行不再绘制竖线,因此复制回复时不会把 `│` 一并带走。注入的上下文是模型输入而非对话,因此只有生产者声明了一行式 `notice` 形式时才产生行:工作区指令、技能目录与运行时上下文消息只留在会话日志中,而模型切换、plan 模式变化与 goal 以应用通知呈现。两种屏幕策略下页脚都位于输入框之下,共两行:第一行是工作区与 Agent 状态,其右侧右对齐路由模型名及其推理档位;第二行是「下一次请求相对路由模型容量的占用」,其右下角是整段会话的 token 数字。一旦本会话委派过子代理,占用之后会跟随一个 `● subagents (运行中/总数)` 标记——`●` 表示仍有子代理激活在运行,`○` 表示已记录的子代理全部结束——它读取的子代理目录与 `/subagents` 列出的是同一份;尚未得知占用时该标记单独显示。这些数字分别是解码吞吐量(每秒 token 数)、计费的提示词加输出 token 总量,以及计费提示词 token 中由缓存读取提供的占比;每项在有数据前都不显示,速率是 Web 统计条所报的整段会话平均值而非实时瞬时值,终端宽度不足时这一组会先于占用被丢弃。plan 模式开启时会在 Agent 状态旁显示 `plan` 标记,由 `Shift+Tab` 通过 `ctx.planMode` 切换。快捷键提示是空输入框的 placeholder 而非页脚的一行:应用包装了输入框,使其内容行在用户键入第一个字符前显示这些提示,因为编辑器组件本身不渲染 placeholder。占用与容量取自已挂载 `ctx.tokenMeter` 的 `contextPressure` 投影,总量取自其 `tokenUsage` 投影,吞吐量取自本 bundle 插入的 `sessionStats` 投影;`(auto)` 标记取自 `ctx.compaction.autoCompactionEnabled`;只有当部署注册了多个 provider 时,模型标签才会带上 provider。[`src/views.ts`](src/views.ts) 使用 [`@earendil-works/pi-tui`](https://www.npmjs.com/package/@earendil-works/pi-tui) 组件把行转为终端行,并把每一行截断到视口宽度,因为渲染器会把超宽行视为组件缺陷;工具标题还会被压成单行,因为一行只拥有一个终端行:多行参数否则会打印出自身的换行,使该行越出转录区压到固定页脚上。选择器或提示以普通输出而非对话框的形式呈现——一行普通标题、一行空行和主体——在备用屏幕布局中紧贴输入框上方,并把每一行填充到视口宽度,因此转录内容不会从旁边透出。滚动由备用屏幕渲染器负责:对话记录是它的主滚动视图,因此 PageUp/PageDown 与滚轮移动对话记录,而页脚与输入框保持固定。停止渲染器时会把整份对话记录写回普通屏幕,因此退出后输出仍可选择。`stop()` 随后落盘会话,并把 resume 命令写到 stderr:写在恢复屏幕之后,因为此时界面已不再拥有屏幕;且仅在挂载了持久化后端时写出。工具声明的 Host 呈现决定其行:折叠事件时通过 `ctx.tools` 解析出的调用与结果视图,会分别渲染为 `card: 'diff'` 的统一 diff(含工具自己的标题与 `+新增 -删除` 计数)、`card: 'terminal'` 的命令及其描述、工作目录、输出与退出状态标记、`card: 'read'` 的带行号窗口、`card: 'search'` 的分组匹配或路径列表及其截断信号、`card: 'web'` 的来源引用或抓取摘要,以及 `card: 'generic'` 的标题与关键输入。卡片主体超过限定行数后折叠;已结算的结果视图替换待定卡片,结果视图缺省时保留调用时卡片,失败的变更则回退为普通的名称加摘要行并显示错误文本。工具行的普通结果主体以调色板的工具结果灰渲染,而非 assistant 主体的终端前景色。调色板跟随终端背景:`colorScheme` 固定深色或浅色,`auto` 读取终端的 `COLORFGBG` 背景信号,读不到时默认深色。 切换会话时会释放对话记录视图缓存的行和 Markdown 组件。 模型的思考内容在流式输出结束后仍保留显示,恢复会话时也会从会话日志中还原。
|
|
128
128
|
|
|
129
129
|
### 交互接缝
|
|
130
130
|
|
package/lib/index.js
CHANGED
|
@@ -66,8 +66,8 @@ function measureUsage(values, automatic) {
|
|
|
66
66
|
/** Palette for a dark terminal background (the default). */
|
|
67
67
|
const DARK = {
|
|
68
68
|
user: "1;38;5;81",
|
|
69
|
-
|
|
70
|
-
reasoning: "38;5;
|
|
69
|
+
assistantMarker: "38;5;79",
|
|
70
|
+
reasoning: "38;5;245",
|
|
71
71
|
tool: "1;38;5;214",
|
|
72
72
|
toolOk: "38;5;114",
|
|
73
73
|
toolError: "1;38;5;203",
|
|
@@ -86,8 +86,8 @@ const DARK = {
|
|
|
86
86
|
/** Palette for a light terminal background. */
|
|
87
87
|
const LIGHT = {
|
|
88
88
|
user: "1;38;5;25",
|
|
89
|
-
|
|
90
|
-
reasoning: "38;5;
|
|
89
|
+
assistantMarker: "38;5;29",
|
|
90
|
+
reasoning: "38;5;245",
|
|
91
91
|
tool: "1;38;5;130",
|
|
92
92
|
toolOk: "38;5;28",
|
|
93
93
|
toolError: "1;38;5;124",
|
|
@@ -152,7 +152,7 @@ function createTheme(options) {
|
|
|
152
152
|
return {
|
|
153
153
|
user: style(spec.user),
|
|
154
154
|
assistant: (text) => text,
|
|
155
|
-
|
|
155
|
+
assistantMarker: style(spec.assistantMarker),
|
|
156
156
|
reasoning: style(spec.reasoning),
|
|
157
157
|
tool: style(spec.tool),
|
|
158
158
|
toolOk: style(spec.toolOk),
|
|
@@ -1947,7 +1947,7 @@ var SubagentPanel = class {
|
|
|
1947
1947
|
const indent = `${" ".repeat(row.depth - 1)}${row.depth > 1 ? "↳ " : ""}`;
|
|
1948
1948
|
const glyph = row.running ? this.theme.accent("●") : this.theme.dim(row.mode === "external" ? "◇" : "○");
|
|
1949
1949
|
const label = (row.label ?? String(row.id).slice(-12)).replace(/\s+/g, " ");
|
|
1950
|
-
const detail = row.mode === "external" ? "external · no local session" : `${row.mode} · ${this.theme.accent(`dsh watch ${String(row.id)}`)}`;
|
|
1950
|
+
const detail = row.mode === "external" ? "external · no local session" : `${row.mode} · ${this.theme.accent(`dsh-tui watch ${String(row.id)}`)}`;
|
|
1951
1951
|
return `${indent}${glyph} ${this.theme.bold(label)} · ${this.theme.dim(detail)}`;
|
|
1952
1952
|
}
|
|
1953
1953
|
};
|
|
@@ -2559,16 +2559,14 @@ const TOOL_SUMMARY_KEYS = [
|
|
|
2559
2559
|
"description",
|
|
2560
2560
|
"name"
|
|
2561
2561
|
];
|
|
2562
|
-
/** Columns a message row's
|
|
2562
|
+
/** Columns a message row's first-line marker or continuation indent occupies. */
|
|
2563
2563
|
const MESSAGE_GUTTER_WIDTH = 2;
|
|
2564
2564
|
/** First-line glyph of a human prompt row. */
|
|
2565
2565
|
const USER_MARKER = "› ";
|
|
2566
|
-
/** Continuation glyph of a human prompt row. */
|
|
2567
|
-
const USER_RULE = "│ ";
|
|
2568
2566
|
/** First-line glyph of an assistant message row. */
|
|
2569
2567
|
const ASSISTANT_MARKER = "◆ ";
|
|
2570
|
-
/**
|
|
2571
|
-
const
|
|
2568
|
+
/** Indent that aligns a message's later lines under its first-line content. */
|
|
2569
|
+
const MESSAGE_INDENT = " ".repeat(MESSAGE_GUTTER_WIDTH);
|
|
2572
2570
|
/** Narrowest gap between a shell row's command and its right-aligned label. */
|
|
2573
2571
|
const SHELL_LABEL_GAP = 2;
|
|
2574
2572
|
/** Glyph every streamed shell output line starts with. */
|
|
@@ -2851,12 +2849,12 @@ var TranscriptView = class {
|
|
|
2851
2849
|
}
|
|
2852
2850
|
renderEntry(entry, width) {
|
|
2853
2851
|
switch (entry.kind) {
|
|
2854
|
-
case "user": return prefixBody(promptText(entry), width, this.theme.user(USER_MARKER),
|
|
2852
|
+
case "user": return prefixBody(promptText(entry), width, this.theme.user(USER_MARKER), MESSAGE_INDENT);
|
|
2855
2853
|
case "assistant": {
|
|
2856
|
-
const lines = this.assistantMarkdown(entry.id, entry.text, Math.max(1, width - MESSAGE_GUTTER_WIDTH)).map((line, index) => (index === 0 ? this.theme.
|
|
2854
|
+
const lines = this.assistantMarkdown(entry.id, entry.text, Math.max(1, width - MESSAGE_GUTTER_WIDTH)).map((line, index) => (index === 0 ? this.theme.assistantMarker(ASSISTANT_MARKER) : MESSAGE_INDENT) + line);
|
|
2857
2855
|
if (!entry.interrupted) return lines;
|
|
2858
2856
|
const cancelled = wrap("[cancelled]", Math.max(1, width - MESSAGE_GUTTER_WIDTH));
|
|
2859
|
-
return [...lines, ...cancelled.map((line) =>
|
|
2857
|
+
return [...lines, ...cancelled.map((line) => MESSAGE_INDENT + this.theme.dim(line))];
|
|
2860
2858
|
}
|
|
2861
2859
|
case "reasoning": return prefixBody(entry.text, width, this.theme.reasoning("✻ "), this.theme.reasoning(" "));
|
|
2862
2860
|
case "tool": return this.toolLines(entry, width);
|
|
@@ -4438,7 +4436,7 @@ var SubagentWatchHub = class {
|
|
|
4438
4436
|
return;
|
|
4439
4437
|
}
|
|
4440
4438
|
this.published.add(sessionId);
|
|
4441
|
-
this.hooks?.published(sessionId, `dsh watch ${sessionId}`);
|
|
4439
|
+
this.hooks?.published(sessionId, `dsh-tui watch ${sessionId}`);
|
|
4442
4440
|
} catch (error) {
|
|
4443
4441
|
if (!this.closed) this.hooks?.failed(sessionId, error);
|
|
4444
4442
|
}
|
|
@@ -4636,7 +4634,7 @@ function isTeardown(error) {
|
|
|
4636
4634
|
* @returns the heading and the resume command, each on its own line.
|
|
4637
4635
|
*/
|
|
4638
4636
|
function resumeHint(sessionId) {
|
|
4639
|
-
return `To resume this session:\n dsh --resume ${sessionId}\n`;
|
|
4637
|
+
return `To resume this session:\n dsh-tui --resume ${sessionId}\n`;
|
|
4640
4638
|
}
|
|
4641
4639
|
/** The interactive application. */
|
|
4642
4640
|
var TuiApp = class TuiApp {
|
package/lib/types/ansi.d.ts
CHANGED
|
@@ -13,13 +13,13 @@ import type { TuiColorScheme } from './config.ts';
|
|
|
13
13
|
export type Styler = (text: string) => string;
|
|
14
14
|
/** Semantic styles the transcript, status bar, and prompts share. */
|
|
15
15
|
export interface TuiTheme {
|
|
16
|
-
/** Human prompt role marker
|
|
16
|
+
/** Human prompt role marker. */
|
|
17
17
|
user: Styler;
|
|
18
18
|
/** Assistant message body. */
|
|
19
19
|
assistant: Styler;
|
|
20
|
-
/** Assistant message role marker
|
|
21
|
-
|
|
22
|
-
/** Provider reasoning text, shown while it streams. */
|
|
20
|
+
/** Assistant message role marker. */
|
|
21
|
+
assistantMarker: Styler;
|
|
22
|
+
/** Provider reasoning text, shown while it streams in a muted light grey. */
|
|
23
23
|
reasoning: Styler;
|
|
24
24
|
/** Tool-call heading. */
|
|
25
25
|
tool: Styler;
|
package/lib/types/session.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { ContentBlock } from '@deepseek-ai/dsh-llm';
|
|
|
11
11
|
import type { Session, SessionEvent, SessionId } from '@deepseek-ai/dsh-session';
|
|
12
12
|
/** One delegated child as the `/subagents` listing reports it. */
|
|
13
13
|
export interface TuiSubagent {
|
|
14
|
-
/** Durable child session id, also the argument `dsh watch` takes. */
|
|
14
|
+
/** Durable child session id, also the argument `dsh-tui watch` takes. */
|
|
15
15
|
readonly id: SessionId;
|
|
16
16
|
/** Catalog mode recorded by the parent when the child was created. */
|
|
17
17
|
readonly mode: 'one-shot' | 'continuable' | 'external' | 'unknown';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishwithcat/dsh-tui-app",
|
|
3
3
|
"description": "The dsh terminal application: an interactive full-screen TUI that drives one in-process Agent over dsh-base",
|
|
4
|
-
"version": "0.2.2-alpha.
|
|
4
|
+
"version": "0.2.2-alpha.3.fork.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -41,72 +41,72 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@deepseek-ai/dsh-brand": "0.2.2-alpha.
|
|
45
|
-
"@deepseek-ai/dsh-cmdline": "0.2.2-alpha.
|
|
46
|
-
"@deepseek-ai/dsh-home-paths": "0.2.2-alpha.
|
|
47
|
-
"@deepseek-ai/dsh-session-stats": "0.2.2-alpha.
|
|
48
|
-
"@deepseek-ai/dsh-tool-ask-user": "npm:@fishwithcat/dsh-tool-ask-user@0.2.2-alpha.
|
|
49
|
-
"@deepseek-ai/dsh-util-values": "0.2.2-alpha.
|
|
50
|
-
"@deepseek-ai/schemastery": "~3.18.6-alpha.
|
|
44
|
+
"@deepseek-ai/dsh-brand": "0.2.2-alpha.3",
|
|
45
|
+
"@deepseek-ai/dsh-cmdline": "0.2.2-alpha.3",
|
|
46
|
+
"@deepseek-ai/dsh-home-paths": "0.2.2-alpha.3",
|
|
47
|
+
"@deepseek-ai/dsh-session-stats": "0.2.2-alpha.3",
|
|
48
|
+
"@deepseek-ai/dsh-tool-ask-user": "npm:@fishwithcat/dsh-tool-ask-user@0.2.2-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-util-values": "0.2.2-alpha.3",
|
|
50
|
+
"@deepseek-ai/schemastery": "~3.18.6-alpha.2",
|
|
51
51
|
"@earendil-works/pi-tui": "^0.85.1",
|
|
52
52
|
"commander": "^15.0.0",
|
|
53
53
|
"diff": "^9.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@deepseek-ai/cordis": "~4.0.6-alpha.
|
|
57
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.
|
|
58
|
-
"@deepseek-ai/dsh-agent": "0.2.2-alpha.
|
|
59
|
-
"@deepseek-ai/dsh-agent-default-model": "0.2.2-alpha.
|
|
60
|
-
"@deepseek-ai/dsh-attachment": "0.2.2-alpha.
|
|
61
|
-
"@deepseek-ai/dsh-commands": "0.2.2-alpha.
|
|
62
|
-
"@deepseek-ai/dsh-compaction": "0.2.2-alpha.
|
|
63
|
-
"@deepseek-ai/dsh-llm": "0.2.2-alpha.
|
|
64
|
-
"@deepseek-ai/dsh-plan-mode": "0.2.2-alpha.
|
|
65
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.
|
|
66
|
-
"@deepseek-ai/dsh-session": "0.2.2-alpha.
|
|
67
|
-
"@deepseek-ai/dsh-session-persistence": "0.2.2-alpha.
|
|
68
|
-
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.
|
|
69
|
-
"@deepseek-ai/dsh-session-query": "0.2.2-alpha.
|
|
70
|
-
"@deepseek-ai/dsh-shell": "0.2.2-alpha.
|
|
71
|
-
"@deepseek-ai/dsh-skill": "0.2.2-alpha.
|
|
72
|
-
"@deepseek-ai/dsh-subagent": "0.2.2-alpha.
|
|
73
|
-
"@deepseek-ai/dsh-token-meter": "0.2.2-alpha.
|
|
74
|
-
"@deepseek-ai/dsh-tool-ask-user": "0.2.2-alpha.
|
|
75
|
-
"@deepseek-ai/dsh-tools": "0.2.2-alpha.
|
|
76
|
-
"@deepseek-ai/dsh-user-approval": "0.2.2-alpha.
|
|
77
|
-
"@deepseek-ai/dsh-user-questions": "0.2.2-alpha.
|
|
78
|
-
"@deepseek-ai/dsh-working-directory": "0.2.2-alpha.
|
|
56
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.2",
|
|
57
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-agent": "0.2.2-alpha.3",
|
|
59
|
+
"@deepseek-ai/dsh-agent-default-model": "0.2.2-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-attachment": "0.2.2-alpha.3",
|
|
61
|
+
"@deepseek-ai/dsh-commands": "0.2.2-alpha.3",
|
|
62
|
+
"@deepseek-ai/dsh-compaction": "0.2.2-alpha.3",
|
|
63
|
+
"@deepseek-ai/dsh-llm": "0.2.2-alpha.3",
|
|
64
|
+
"@deepseek-ai/dsh-plan-mode": "0.2.2-alpha.3",
|
|
65
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.3",
|
|
66
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.3",
|
|
67
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.2-alpha.3",
|
|
68
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.3",
|
|
69
|
+
"@deepseek-ai/dsh-session-query": "0.2.2-alpha.3",
|
|
70
|
+
"@deepseek-ai/dsh-shell": "0.2.2-alpha.3",
|
|
71
|
+
"@deepseek-ai/dsh-skill": "0.2.2-alpha.3",
|
|
72
|
+
"@deepseek-ai/dsh-subagent": "0.2.2-alpha.3",
|
|
73
|
+
"@deepseek-ai/dsh-token-meter": "0.2.2-alpha.3",
|
|
74
|
+
"@deepseek-ai/dsh-tool-ask-user": "0.2.2-alpha.3",
|
|
75
|
+
"@deepseek-ai/dsh-tools": "0.2.2-alpha.3",
|
|
76
|
+
"@deepseek-ai/dsh-user-approval": "0.2.2-alpha.3",
|
|
77
|
+
"@deepseek-ai/dsh-user-questions": "0.2.2-alpha.3",
|
|
78
|
+
"@deepseek-ai/dsh-working-directory": "0.2.2-alpha.3"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@deepseek-ai/cordis": "~4.0.6-alpha.
|
|
82
|
-
"@deepseek-ai/cordis-plugin-include": "~1.0.11-alpha.
|
|
83
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.
|
|
84
|
-
"@deepseek-ai/dsh-agent": "0.2.2-alpha.
|
|
85
|
-
"@deepseek-ai/dsh-agent-default-model": "0.2.2-alpha.
|
|
86
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.2-alpha.
|
|
87
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-alpha.
|
|
88
|
-
"@deepseek-ai/dsh-attachment": "0.2.2-alpha.
|
|
89
|
-
"@deepseek-ai/dsh-attachment-local": "0.2.2-alpha.
|
|
90
|
-
"@deepseek-ai/dsh-bash-local": "0.2.2-alpha.
|
|
91
|
-
"@deepseek-ai/dsh-commands": "0.2.2-alpha.
|
|
92
|
-
"@deepseek-ai/dsh-compaction": "0.2.2-alpha.
|
|
93
|
-
"@deepseek-ai/dsh-llm": "0.2.2-alpha.
|
|
94
|
-
"@deepseek-ai/dsh-plan-mode": "0.2.2-alpha.
|
|
95
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.
|
|
96
|
-
"@deepseek-ai/dsh-session": "0.2.2-alpha.
|
|
97
|
-
"@deepseek-ai/dsh-session-persistence": "0.2.2-alpha.
|
|
98
|
-
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.
|
|
99
|
-
"@deepseek-ai/dsh-session-query": "0.2.2-alpha.
|
|
100
|
-
"@deepseek-ai/dsh-shell": "0.2.2-alpha.
|
|
101
|
-
"@deepseek-ai/dsh-skill": "0.2.2-alpha.
|
|
102
|
-
"@deepseek-ai/dsh-subagent": "0.2.2-alpha.
|
|
103
|
-
"@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.
|
|
104
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.
|
|
105
|
-
"@deepseek-ai/dsh-token-meter": "0.2.2-alpha.
|
|
106
|
-
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.
|
|
107
|
-
"@deepseek-ai/dsh-tools": "0.2.2-alpha.
|
|
108
|
-
"@deepseek-ai/dsh-user-approval": "0.2.2-alpha.
|
|
109
|
-
"@deepseek-ai/dsh-user-questions": "0.2.2-alpha.
|
|
110
|
-
"@deepseek-ai/dsh-working-directory": "0.2.2-alpha.
|
|
81
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.2",
|
|
82
|
+
"@deepseek-ai/cordis-plugin-include": "~1.0.11-alpha.2",
|
|
83
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.2",
|
|
84
|
+
"@deepseek-ai/dsh-agent": "0.2.2-alpha.3",
|
|
85
|
+
"@deepseek-ai/dsh-agent-default-model": "0.2.2-alpha.3",
|
|
86
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.2-alpha.3",
|
|
87
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-alpha.3",
|
|
88
|
+
"@deepseek-ai/dsh-attachment": "0.2.2-alpha.3",
|
|
89
|
+
"@deepseek-ai/dsh-attachment-local": "0.2.2-alpha.3",
|
|
90
|
+
"@deepseek-ai/dsh-bash-local": "0.2.2-alpha.3",
|
|
91
|
+
"@deepseek-ai/dsh-commands": "0.2.2-alpha.3",
|
|
92
|
+
"@deepseek-ai/dsh-compaction": "0.2.2-alpha.3",
|
|
93
|
+
"@deepseek-ai/dsh-llm": "0.2.2-alpha.3",
|
|
94
|
+
"@deepseek-ai/dsh-plan-mode": "0.2.2-alpha.3",
|
|
95
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.3",
|
|
96
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.3",
|
|
97
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.2-alpha.3",
|
|
98
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.3",
|
|
99
|
+
"@deepseek-ai/dsh-session-query": "0.2.2-alpha.3",
|
|
100
|
+
"@deepseek-ai/dsh-shell": "0.2.2-alpha.3",
|
|
101
|
+
"@deepseek-ai/dsh-skill": "0.2.2-alpha.3",
|
|
102
|
+
"@deepseek-ai/dsh-subagent": "0.2.2-alpha.3",
|
|
103
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.3",
|
|
104
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.3",
|
|
105
|
+
"@deepseek-ai/dsh-token-meter": "0.2.2-alpha.3",
|
|
106
|
+
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.3",
|
|
107
|
+
"@deepseek-ai/dsh-tools": "0.2.2-alpha.3",
|
|
108
|
+
"@deepseek-ai/dsh-user-approval": "0.2.2-alpha.3",
|
|
109
|
+
"@deepseek-ai/dsh-user-questions": "0.2.2-alpha.3",
|
|
110
|
+
"@deepseek-ai/dsh-working-directory": "0.2.2-alpha.3"
|
|
111
111
|
}
|
|
112
112
|
}
|