@songtonyli/dsh-cli 0.1.18 → 0.1.20
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.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +12 -6
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +12 -6
- package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +548 -51
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +9 -13
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +9 -13
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +188 -329
- package/package.json +1 -1
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/bundle/tui-app/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 0091a867e9e5c6168b97f7ad08421b105f6c5935
|
|
6
|
+
README.zh.md: 5b4cd27f195d6018f57cd12ffcdb02c5f3b223cc
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Interactive terminal mode for dsh: talk to the agent in your terminal with streamed replies, tool cards, keyboard navigation over the conversation, a full-screen reader for turns
|
|
2
|
+
description: "Interactive terminal mode for dsh: talk to the agent in your terminal with streamed replies, tool cards, keyboard navigation over the conversation, a full-screen two-panel reader for turns, approvals, questions, slash commands, @-references, attachments, and session switching."
|
|
3
3
|
kind: "package-bundle"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -48,7 +48,7 @@ While the keyboard walks the conversation a framed inspector is docked directly
|
|
|
48
48
|
|
|
49
49
|
The focused block is also marked where it stands, with a two-column gutter that is dim beside the block's other lines and accented beside the focused section's own — or beside the fold marker, when the fold left that section out of the drawn rows entirely — and its content wraps two columns narrower while the mark is drawn. That mark reaches only the lines pi-tui still repaints differentially — the last `rows` lines of the last frame it wrote, a window a taller frame raises and a shorter one never lowers — because changing anything above them would clear the terminal's scrollback. A block that has scrolled past that point keeps no gutter, the inspector heading appends ` · off screen`, and the frame's own rules draw dim instead of accent, so the frame itself reports that the mark cannot be drawn where the block stands. A fade whose rows reach that edge settles them to their final colors in the frame that writes them, so nothing stays dim in the scrollback.
|
|
50
50
|
|
|
51
|
-
`Ctrl+G` from any region, `Enter` on a conversation section, and `/turns` read the conversation full screen. The reader is an overlay composited into the viewport, so it costs the conversation no line and leaves the repaint window where it was.
|
|
51
|
+
`Ctrl+G` from any region, `Enter` on a conversation section, and `/turns` read the conversation full screen. The reader is an overlay composited into the viewport, so it costs the conversation no line and leaves the repaint window where it was. It draws two panels under a top rule carrying a ` ● READER ` chip and `turn <n> of <total>`: the left panel lists one row per turn — `▸` on the selected one, the turn number, the first line of its prompt, and right-aligned markers, `⬡<n>` injected context blocks, `✻` any reasoning, `¶` any reply, `⚒<n>` tool calls — so turns are comparable at a glance; the right panel scrolls that turn end to end, its sections stacked under `── <label> · turn <n> ` headers with the section the top row belongs to accented. Rows are never folded there: the reader is where the full model-facing text of a system prompt, an injected snapshot, a long reply, or a tool result is read. `Right` opens the selected turn and `Left` goes back to the list; `Up` / `Down` scroll the turn one row at a time, and the section the top row belongs to is where the conversation resumes when the reader closes. `/` opens a query line in place of the legend and narrows the list to the turns whose prompt or text matches, with the readout reading `<kept>/<total> turns`; otherwise the legend rule reports `turn 3/12 · row 14/212` at its right, which no width drops. Below `readerMinColumns` the body draws one panel at a time — the list, or the turn `Right` opens from it — and below 24 columns or 8 rows it draws one dim line, `terminal too small for the reader (needs 24×8)`, and answers only `Esc`, `Ctrl+G`, and `Ctrl+C`. It re-reads the conversation on every render, so a streaming reply grows inside it, a landing tool result appears, and a new turn joins the list; a rewrap re-anchors on the section being read rather than on a row number; an approval or a question steps it aside for that prompt's lifetime; and a session switch takes it down with the notice `the transcript changed · reader closed`.
|
|
52
52
|
|
|
53
53
|
Transient key feedback floats as a dim framed line in the top-right corner of the viewport: `press Esc again to stop turn <n>`, `press Ctrl+C again to quit`, `nothing in the transcript to read yet`, and `above the repaint window · opened in the reader`. It holds at full strength for `toastMs`, fades out, costs the conversation no row of its own, and takes no keyboard; where the renderer can no longer repaint the top of the viewport it is printed into the conversation instead, which keeps it. Facts worth keeping are notices in the conversation: `stopping the turn…`, `wait for the session switch to finish`, and every command result.
|
|
54
54
|
|
|
@@ -128,17 +128,13 @@ While the reader is open:
|
|
|
128
128
|
|
|
129
129
|
| Key | Effect |
|
|
130
130
|
|---|---|
|
|
131
|
-
| `Up` / `Down` | In the
|
|
132
|
-
| `Shift+Up` / `Shift+Down` | In the sections, scroll one row and leave the selection where it is |
|
|
131
|
+
| `Up` / `Down` | In the turn list, the previous / next turn; in the turn, one row up / down |
|
|
133
132
|
| `PageUp` / `PageDown` | A page of turns, or a page of rows with one row of overlap |
|
|
134
|
-
| `Home` / `End` | The first / last turn, or the first / last
|
|
135
|
-
| `Right` | From the
|
|
136
|
-
| `Left` |
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
| `Enter` | From the rail, open the turn's sections; in the sections, pin the held section beside the walk, or unpin the pinned one |
|
|
140
|
-
| `/` | In the rail, open the turn filter: printable keys extend the query, `Backspace` drops one character, `Ctrl+U` clears it, `Enter` keeps the narrowed rail and closes the line, and `Esc` clears a non-empty query and then closes the line |
|
|
141
|
-
| `Esc` | Unpin the pinned section, on a narrow terminal return from the sections to the rail, and otherwise close the reader and return to the conversation on the section last read |
|
|
133
|
+
| `Home` / `End` | The first / last turn, or the first / last row of the turn |
|
|
134
|
+
| `Right`, `Tab`, `Enter` | From the list, read the turn beside it |
|
|
135
|
+
| `Left`, `Tab`, `Shift+Tab` | From the turn, return to the list |
|
|
136
|
+
| `/` | In the list, open the turn filter: printable keys extend the query, `Backspace` drops one character, `Ctrl+U` clears it, `Enter` keeps the narrowed list and closes the line, and `Esc` clears a non-empty query and then closes the line |
|
|
137
|
+
| `Esc` | Close the reader and return to the conversation on the section last read; with the query line open, clear a non-empty query and then close the line |
|
|
142
138
|
| `Ctrl+G`, `Ctrl+C` | Close the reader and return to the input |
|
|
143
139
|
|
|
144
140
|
Every other key reaching the reader is consumed, and closing it opens the same 750 ms handoff window, so no number of consecutive `Esc` presses reaches the input's stop.
|
|
@@ -200,7 +196,7 @@ An approval request draws `Allow <tool>?` with the asker's reason, the logged ca
|
|
|
200
196
|
| `toolPreviewLines` | `8` | Collapsed tool-card body rows before `Space` on the marked card, or `Ctrl+O`, expands them |
|
|
201
197
|
| `contextPreviewLines` | `4` | Rows a system prompt or an injected `⬡` context block draws before `Space` on the marked block, or `Ctrl+O`, expands it |
|
|
202
198
|
| `focusPreviewLines` | `12` | Rows of the focused section the docked inspector shows before its fold marker sends the rest to the reader, for every section kind |
|
|
203
|
-
| `readerMinColumns` | `
|
|
199
|
+
| `readerMinColumns` | `60` | Columns the reader needs before it draws the selected turn beside the turn list; below it one panel is drawn at a time |
|
|
204
200
|
| `toastMs` | `2000` | How long a transient key-feedback line holds at full strength before it fades out, which is also the window in which a second `Esc` stops the running turn |
|
|
205
201
|
| `liveRefreshMs` | `1000` | Period of the redraw that advances the `turn` segment and the panel's elapsed values and re-reads a stale subagent listing |
|
|
206
202
|
| `streamFadeSteps` | `8` | How many ticks a fade lasts: reply text fades in, reasoning and tool cards float out, over `streamFadeSteps × streamFadeStepMs` |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "dsh 的交互式终端模式:在你的终端里与 agent
|
|
2
|
+
description: "dsh 的交互式终端模式:在你的终端里与 agent(智能体)对话,带流式回复、工具卡片、用键盘浏览对话记录、双面板全屏阅读器、审批、提问、斜杠命令、@ 引用、附件与会话切换。"
|
|
3
3
|
kind: "package-bundle"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -48,7 +48,7 @@ dsh tui --no-open # print sign-in URLs without opening a
|
|
|
48
48
|
|
|
49
49
|
被聚焦的块也会在原地被标记:一条两列宽的标记条,在块的其他行旁为暗色、在被聚焦小节自身的行旁为强调色——若折叠把该小节整个留在了绘出的行之外,强调色便落在那一行折叠标记旁——标记绘制期间该块的内容按窄两列换行。这个标记只能落在 pi-tui 仍以差分方式重绘的行上——也就是它写出的上一帧的最后 `rows` 行,这条边界只会被更高的帧抬高、不会被更矮的帧降低——因为改动其上方的任何一行都会清空终端的回滚区。已经滚过该位置的块不带标记条,检视面板的标题追加 ` · off screen`,其边框线也改画暗色而非强调色,于是边框本身就报告出标记无法画在该块所在之处。淡入中的各行抵达这一边界时,会在写出它们的同一帧内被结算为最终颜色,因此回滚区里不会留下暗色文字。
|
|
50
50
|
|
|
51
|
-
在任一区域按 `Ctrl+G`、在对话记录的某个小节上按 `Enter`,以及 `/turns
|
|
51
|
+
在任一区域按 `Ctrl+G`、在对话记录的某个小节上按 `Enter`,以及 `/turns`,都会整屏读出对话记录。阅读器是合成进视口的浮层,因此不占用对话记录的任何一行,也让重绘边界保持原位。它在带有 ` ● READER ` 徽标与 `turn <n> of <total>` 的顶边线之下画两个面板:左面板每个轮次一行——被选中的那行带 `▸`、轮次编号、其提示的首行,以及右对齐的标记 `⬡<n>` 注入上下文块数、`✻` 有推理、`¶` 有回复、`⚒<n>` 工具调用数——因此各轮次一眼可比;右面板把该轮次从头到尾滚动读出,各小节堆叠在 `── <label> · turn <n> ` 标题之下,顶行所属的那个小节带强调色。那里的行从不折叠:阅读器正是读取系统提示词、注入快照、长回复或工具结果完整面向模型文本的地方。`Right` 打开被选中的轮次,`Left` 回到轮次列表;`Up` / `Down` 逐行滚动该轮次,而顶行所属的小节就是阅读器关闭后对话记录恢复到的位置。`/` 在按键提示的位置打开一行查询,把轮次列表收窄到提示或文本匹配的轮次,读数写作 `<kept>/<total> turns`;其余时候提示边线在右端报告 `turn 3/12 · row 14/212`,任何宽度都不会丢弃它。列数不足 `readerMinColumns` 时正文一次只画一个面板——轮次列表,或由 `Right` 从中打开的那个轮次——不足 24 列或 8 行时只画一行暗色文字 `terminal too small for the reader (needs 24×8)`,并且只应答 `Esc`、`Ctrl+G` 与 `Ctrl+C`。它在每一帧都重新读取对话记录,因此流式回复会在其中增长、落地的工具结果会出现、新轮次会加入轮次列表;重新换行时它按正在阅读的小节重新锚定,而不是按行号;审批或提问出现时它在该提示存续期间让位;切换会话会让它随通知 `the transcript changed · reader closed` 一同关闭。
|
|
52
52
|
|
|
53
53
|
临时按键反馈以一行暗色带框文字浮在视口右上角:`press Esc again to stop turn <n>`、`press Ctrl+C again to quit`、`nothing in the transcript to read yet` 与 `above the repaint window · opened in the reader`。它以全亮度保持 `toastMs`、随后淡出,不占用对话记录自身的任何一行,也不接管键盘;渲染器已无法重绘视口顶部时,它改为打印进对话记录,从而被保留下来。值得留存的事实则是对话记录中的通知:`stopping the turn…`、`wait for the session switch to finish` 以及每一条命令结果。
|
|
54
54
|
|
|
@@ -128,17 +128,13 @@ dsh tui --no-open # print sign-in URLs without opening a
|
|
|
128
128
|
|
|
129
129
|
| 按键 | 效果 |
|
|
130
130
|
|---|---|
|
|
131
|
-
| `Up` / `Down` |
|
|
132
|
-
| `Shift+Up` / `Shift+Down` | 在各小节中滚动一行,选择保持不变 |
|
|
131
|
+
| `Up` / `Down` | 在轮次列表中是上一个 / 下一个轮次;在轮次面板中是上滚 / 下滚一行 |
|
|
133
132
|
| `PageUp` / `PageDown` | 翻一页轮次,或翻一页行并重叠一行 |
|
|
134
|
-
| `Home` / `End` | 第一个 /
|
|
135
|
-
| `Right` |
|
|
136
|
-
| `Left` |
|
|
137
|
-
|
|
|
138
|
-
| `
|
|
139
|
-
| `Enter` | 在轮次栏中打开该轮次的各小节;在各小节中把被持有的小节固定到走查旁边,或取消已固定的那个 |
|
|
140
|
-
| `/` | 在轮次栏中打开轮次过滤:可打印键扩展查询,`Backspace` 删除一个字符,`Ctrl+U` 清空,`Enter` 保留收窄后的轮次栏并关闭该行,`Esc` 先清空非空查询、再关闭该行 |
|
|
141
|
-
| `Esc` | 取消固定的小节;窄终端上从各小节回到轮次栏;其余情况关闭阅读器,并回到对话记录上最后阅读的那个小节 |
|
|
133
|
+
| `Home` / `End` | 第一个 / 最后一个轮次,或该轮次的第一行 / 最后一行 |
|
|
134
|
+
| `Right`、`Tab`、`Enter` | 从轮次列表进入旁边的那个轮次 |
|
|
135
|
+
| `Left`、`Tab`、`Shift+Tab` | 从轮次面板回到轮次列表 |
|
|
136
|
+
| `/` | 在轮次列表中打开轮次过滤:可打印键扩展查询,`Backspace` 删除一个字符,`Ctrl+U` 清空,`Enter` 保留收窄后的列表并关闭该行,`Esc` 先清空非空查询、再关闭该行 |
|
|
137
|
+
| `Esc` | 关闭阅读器,并回到对话记录上最后阅读的那个小节;查询行打开时,先清空非空查询、再关闭该行 |
|
|
142
138
|
| `Ctrl+G`、`Ctrl+C` | 关闭阅读器并回到编辑器 |
|
|
143
139
|
|
|
144
140
|
到达阅读器的其他每个按键都被消费,而关闭它同样打开那 750 ms 的交接窗口,因此连按多少次 `Esc` 都到不了编辑器的停止。
|
|
@@ -200,7 +196,7 @@ dsh tui --no-open # print sign-in URLs without opening a
|
|
|
200
196
|
| `toolPreviewLines` | `8` | 在被标记的卡片上按 `Space` 或按 `Ctrl+O` 展开之前,工具卡片折叠状态下的正文行数 |
|
|
201
197
|
| `contextPreviewLines` | `4` | 在被标记的块上按 `Space` 或按 `Ctrl+O` 展开之前,系统提示词或注入的 `⬡` 上下文块绘制的行数 |
|
|
202
198
|
| `focusPreviewLines` | `12` | 停靠的检视面板为聚焦小节显示的行数,其后由折叠标记把剩余部分交给阅读器;对每一种小节都适用 |
|
|
203
|
-
| `readerMinColumns` | `
|
|
199
|
+
| `readerMinColumns` | `60` | 阅读器把被选中的轮次画在轮次列表旁边所需的列数;不足时一次只画一个面板 |
|
|
204
200
|
| `toastMs` | `2000` | 临时按键提示行以全亮度保持多久后淡出,这同时也是第二次 `Esc` 停止正在进行轮次的窗口 |
|
|
205
201
|
| `liveRefreshMs` | `1000` | 重绘周期:推进 `turn` 分段与面板中的已用时间,并重新读取已过期的子 agent 列表 |
|
|
206
202
|
| `streamFadeSteps` | `8` | 一次淡入或浮出持续多少拍:回复文字淡入,推理与工具卡片浮出,时长为 `streamFadeSteps × streamFadeStepMs` |
|