@deepseek-harness-tui/dsh-tui 0.8.2 → 0.8.4
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 +37 -12
- package/bin/dsh-tui.js +93 -18
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +1 -0
- package/lib/types/components/LogoV2.d.ts +4 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +8 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +1 -3
- package/lib/types/components/TipsPanel.d.ts +14 -0
- package/lib/types/components/TipsPanel.d.ts.map +1 -0
- package/lib/types/components/TipsPanel.js +37 -0
- package/lib/types/components/activityFrames.d.ts.map +1 -1
- package/lib/types/components/activityFrames.js +10 -0
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +8 -14
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +17 -0
- package/lib/types/effortPrefs.d.ts +7 -6
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +7 -6
- package/lib/types/i18n.d.ts +50 -14
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +21 -4
- package/lib/types/ink/ink.d.ts +1 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +11 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +15 -0
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +10 -3
- package/lib/types/screens/StatusLine.js +3 -3
- package/lib/types/tips.d.ts +30 -0
- package/lib/types/tips.d.ts.map +1 -0
- package/lib/types/tips.js +575 -0
- package/package.json +5 -3
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/agent.cordis.yml +7 -5
- package/presets/liangshen/custom-bash.mjs +184 -9
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 精简 Tips 池 —— 启动首屏轮换(LogoV2)与 `/tips` 命令面板共用。
|
|
3
|
+
*
|
|
4
|
+
* 设计约定:
|
|
5
|
+
* - 每条 tip 一句话,中文 ≤ 约 60 字符、英文 ≤ 约 100 字符,首屏单行可读
|
|
6
|
+
* (窄终端自动截断);
|
|
7
|
+
* - 文案只讲"用户能立刻用上"的操作,不讲实现细节;
|
|
8
|
+
* - id 稳定(面板按 id 去重/排序),group 用于 `/tips` 面板分组展示;
|
|
9
|
+
* - 与 docs/user-guide.md 同源:文档是详版,这里是精版,覆盖全部功能面。
|
|
10
|
+
*/
|
|
11
|
+
export const TIP_GROUP_LABELS = {
|
|
12
|
+
keys: { zh: '快捷键', en: 'Shortcuts' },
|
|
13
|
+
commands: { zh: '命令', en: 'Commands' },
|
|
14
|
+
workflow: { zh: '工作流', en: 'Workflow' },
|
|
15
|
+
display: { zh: '界面与个性化', en: 'Display' },
|
|
16
|
+
pitfalls: { zh: '避坑', en: 'Gotchas' },
|
|
17
|
+
};
|
|
18
|
+
export const TIPS = [
|
|
19
|
+
// ── 快捷键 ────────────────────────────────────────────────
|
|
20
|
+
{
|
|
21
|
+
id: 'keys-rewind',
|
|
22
|
+
group: 'keys',
|
|
23
|
+
zh: '空输入双击 Esc = 时间回溯,可改完重发',
|
|
24
|
+
en: 'Double-Esc on empty input rewinds time; edit and resend',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'keys-esc-levels',
|
|
28
|
+
group: 'keys',
|
|
29
|
+
zh: 'Esc 逐层关闭:帮助 → 命令/文件菜单 → 清空输入',
|
|
30
|
+
en: 'Esc closes layers: help → command/file menus → clear input',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'keys-ctrl-o',
|
|
34
|
+
group: 'keys',
|
|
35
|
+
zh: 'Ctrl+O 展开/收起思考全文与工具详情',
|
|
36
|
+
en: 'Ctrl+O expands thinking text and tool details',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'keys-ctrl-r',
|
|
40
|
+
group: 'keys',
|
|
41
|
+
zh: 'Ctrl+R 搜索输入历史,重复按跳下一匹配',
|
|
42
|
+
en: 'Ctrl+R searches input history; press again for next match',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'keys-ctrl-t',
|
|
46
|
+
group: 'keys',
|
|
47
|
+
zh: 'Ctrl+T 打开会话轨迹场景(同 /trace)',
|
|
48
|
+
en: 'Ctrl+T opens the session trajectory scene (same as /trace)',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'keys-traj-fail',
|
|
52
|
+
group: 'keys',
|
|
53
|
+
zh: '轨迹里 [ / ] 跳上/下一个失败点,{ / } 跳轮次',
|
|
54
|
+
en: 'In trajectory: [ / ] jump failures, { / } jump turns',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'keys-traj-query',
|
|
58
|
+
group: 'keys',
|
|
59
|
+
zh: '轨迹按 / 查询:tool:kind:err:>10s tok>1k 等字段',
|
|
60
|
+
en: 'In trajectory, / queries fields like tool:, err:, >10s, tok>1k',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'keys-ctrl-x',
|
|
64
|
+
group: 'keys',
|
|
65
|
+
zh: 'Ctrl+X 用 $VISUAL 编辑器编辑当前输入',
|
|
66
|
+
en: 'Ctrl+X edits your input in the $VISUAL editor',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'keys-ctrl-enter',
|
|
70
|
+
group: 'keys',
|
|
71
|
+
zh: 'Ctrl+Enter 打断当前回合并立即发送',
|
|
72
|
+
en: 'Ctrl+Enter interrupts the turn and sends immediately',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'keys-shift-enter',
|
|
76
|
+
group: 'keys',
|
|
77
|
+
zh: 'Shift+Enter 换行;终端不认修饰键时用 Ctrl+J',
|
|
78
|
+
en: 'Shift+Enter inserts a newline; Ctrl+J works when modifiers are lost',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'keys-ctrl-e',
|
|
82
|
+
group: 'keys',
|
|
83
|
+
zh: 'Ctrl+E:输入框到行尾;转录中展开隐藏旧消息',
|
|
84
|
+
en: 'Ctrl+E: line end in input; reveals old messages in transcript',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'keys-ctrl-l',
|
|
88
|
+
group: 'keys',
|
|
89
|
+
zh: 'Ctrl+L 清屏并强制重绘,画面花了按它',
|
|
90
|
+
en: 'Ctrl+L clears and force-redraws a garbled screen',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'keys-ctrl-p',
|
|
94
|
+
group: 'keys',
|
|
95
|
+
zh: 'Ctrl+P 切换启动时的上下文加载面板',
|
|
96
|
+
en: 'Ctrl+P toggles the startup loaded-context panel',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'keys-home-end',
|
|
100
|
+
group: 'keys',
|
|
101
|
+
zh: 'Home/End 与 Ctrl+A 快速到行首/行尾',
|
|
102
|
+
en: 'Home/End and Ctrl+A jump to line start/end',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'keys-edit-keys',
|
|
106
|
+
group: 'keys',
|
|
107
|
+
zh: 'Ctrl+U/K/W 快速删行首/行尾/前一词',
|
|
108
|
+
en: 'Ctrl+U/K/W delete to line start, end, or previous word',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'keys-shift-tab',
|
|
112
|
+
group: 'keys',
|
|
113
|
+
zh: 'Shift+Tab 循环会话模式:默认→计划→完全访问',
|
|
114
|
+
en: 'Shift+Tab cycles modes: default → plan → full access',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: 'keys-shift-up',
|
|
118
|
+
group: 'keys',
|
|
119
|
+
zh: 'Shift+↑ 进入消息选择模式,Enter 展开单条',
|
|
120
|
+
en: 'Shift+↑ enters message selection; Enter expands one row',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 'keys-help',
|
|
124
|
+
group: 'keys',
|
|
125
|
+
zh: '按 ? 随时查看快捷键菜单(输入框为空时)',
|
|
126
|
+
en: 'Press ? anytime for the shortcut menu (empty input)',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 'keys-paste',
|
|
130
|
+
group: 'keys',
|
|
131
|
+
zh: 'Ctrl+V 粘贴文本、文件路径或图片附件',
|
|
132
|
+
en: 'Ctrl+V pastes text, file paths, or image attachments',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'keys-slash-search',
|
|
136
|
+
group: 'keys',
|
|
137
|
+
zh: '转录态按 / 全文搜索,n / N 前后跳转',
|
|
138
|
+
en: 'In transcript mode, / searches; n / N jump between hits',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: 'keys-mouse-click',
|
|
142
|
+
group: 'keys',
|
|
143
|
+
zh: '单击消息行展开/收起;点链接直接打开浏览器',
|
|
144
|
+
en: 'Click a message row to expand it; click links to open the browser',
|
|
145
|
+
},
|
|
146
|
+
// ── 命令 ──────────────────────────────────────────────────
|
|
147
|
+
{
|
|
148
|
+
id: 'cmd-new-resume',
|
|
149
|
+
group: 'commands',
|
|
150
|
+
zh: '/new 新会话;/resume 恢复历史会话',
|
|
151
|
+
en: '/new starts a session; /resume brings back old ones',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: 'cmd-resume-search',
|
|
155
|
+
group: 'commands',
|
|
156
|
+
zh: '/resume 里直接打字即可搜索会话',
|
|
157
|
+
en: 'In /resume, just type to search sessions',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'cmd-rename',
|
|
161
|
+
group: 'commands',
|
|
162
|
+
zh: '/rename <标题> 给会话起个好名字',
|
|
163
|
+
en: '/rename <title> gives the session a proper name',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: 'cmd-clear',
|
|
167
|
+
group: 'commands',
|
|
168
|
+
zh: '/clear 只清视图不动会话日志,放心用',
|
|
169
|
+
en: '/clear wipes the view, not the log',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 'cmd-compact',
|
|
173
|
+
group: 'commands',
|
|
174
|
+
zh: '/compact 压缩上下文,长会话救星',
|
|
175
|
+
en: '/compact condenses context — a lifesaver for long sessions',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: 'cmd-export',
|
|
179
|
+
group: 'commands',
|
|
180
|
+
zh: '/export 把完整会话导出为 Markdown(含思考)',
|
|
181
|
+
en: '/export saves the full session as Markdown (thinking included)',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: 'cmd-btw',
|
|
185
|
+
group: 'commands',
|
|
186
|
+
zh: '/btw 侧问:不打断主回合、不留历史',
|
|
187
|
+
en: '/btw asks aside: no interruption, no history',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: 'cmd-status',
|
|
191
|
+
group: 'commands',
|
|
192
|
+
zh: '/status 看模型、分支、token 与上下文占用',
|
|
193
|
+
en: '/status shows model, branch, tokens, and context usage',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: 'cmd-cost',
|
|
197
|
+
group: 'commands',
|
|
198
|
+
zh: '/cost 看 token 用量与缓存命中率',
|
|
199
|
+
en: '/cost shows token usage and cache hit rate',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
id: 'cmd-context',
|
|
203
|
+
group: 'commands',
|
|
204
|
+
zh: '/context 查看已加载的上下文明细',
|
|
205
|
+
en: '/context lists the loaded context in detail',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: 'cmd-doctor',
|
|
209
|
+
group: 'commands',
|
|
210
|
+
zh: '/doctor 环境自检,出问题先跑它',
|
|
211
|
+
en: '/doctor checks your environment — run it first when stuck',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: 'cmd-config',
|
|
215
|
+
group: 'commands',
|
|
216
|
+
zh: '/config 看配置来源与启动方式',
|
|
217
|
+
en: '/config shows config sources and how you launched',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
id: 'cmd-model',
|
|
221
|
+
group: 'commands',
|
|
222
|
+
zh: '/model 换模型会 fork 续聊,历史不丢',
|
|
223
|
+
en: '/model forks to continue: history is preserved',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: 'cmd-effort',
|
|
227
|
+
group: 'commands',
|
|
228
|
+
zh: '/effort 滑杆 ←/→ 实时调推理强度',
|
|
229
|
+
en: '/effort slider tunes reasoning effort live with ←/→',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: 'cmd-thinking',
|
|
233
|
+
group: 'commands',
|
|
234
|
+
zh: '/thinking 切换思考块的展开显示',
|
|
235
|
+
en: '/thinking toggles expanded thinking display',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: 'cmd-tokens',
|
|
239
|
+
group: 'commands',
|
|
240
|
+
zh: '/tokens 看 token 明细与上下文百分比',
|
|
241
|
+
en: '/tokens shows token details and context percentage',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: 'cmd-preset',
|
|
245
|
+
group: 'commands',
|
|
246
|
+
zh: '/preset 切换 agent 预设(standard/code 等)',
|
|
247
|
+
en: '/preset switches presets: standard/code/minimal/cordis/liangshen',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
id: 'cmd-preset-liangshen',
|
|
251
|
+
group: 'commands',
|
|
252
|
+
zh: '/preset liangshen 梁神模式:首轮最小工具,之后全开',
|
|
253
|
+
en: '/preset liangshen starts minimal, then opens up',
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 'cmd-settings',
|
|
257
|
+
group: 'commands',
|
|
258
|
+
zh: '/settings 自定义底栏:开关 TPS/轨迹条/上下文条等',
|
|
259
|
+
en: '/settings customizes the status bar: TPS, trajectory, context bars',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: 'cmd-workspace',
|
|
263
|
+
group: 'commands',
|
|
264
|
+
zh: '/workspace open <路径> 切换工作区',
|
|
265
|
+
en: '/workspace open <path> switches the workspace',
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: 'cmd-skills',
|
|
269
|
+
group: 'commands',
|
|
270
|
+
zh: '/skills 浏览技能目录',
|
|
271
|
+
en: '/skills lists the skill catalog',
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
id: 'cmd-audit',
|
|
275
|
+
group: 'commands',
|
|
276
|
+
zh: '/audit 全面代码审计;/review 代码评审',
|
|
277
|
+
en: '/audit runs a code audit; /review reviews the code',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
id: 'cmd-vuln',
|
|
281
|
+
group: 'commands',
|
|
282
|
+
zh: '/vuln-check 扫依赖漏洞;/bug 生成结构化 bug 报告',
|
|
283
|
+
en: '/vuln-check scans dependencies; /bug drafts a bug report',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: 'cmd-init',
|
|
287
|
+
group: 'commands',
|
|
288
|
+
zh: '/init 一键创建 AGENTS.md 项目规则',
|
|
289
|
+
en: '/init creates AGENTS.md project rules',
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: 'cmd-provider',
|
|
293
|
+
group: 'commands',
|
|
294
|
+
zh: '/provider 交互式添加自己的模型提供方',
|
|
295
|
+
en: '/provider adds your own model provider interactively',
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: 'cmd-login',
|
|
299
|
+
group: 'commands',
|
|
300
|
+
zh: '/login 查看凭证状态;/logout 登出',
|
|
301
|
+
en: '/login shows credential status; /logout signs out',
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
id: 'cmd-mcp',
|
|
305
|
+
group: 'commands',
|
|
306
|
+
zh: '/mcp 查看 MCP 服务器与工具连接',
|
|
307
|
+
en: '/mcp lists MCP servers and their tools',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
id: 'cmd-plugins',
|
|
311
|
+
group: 'commands',
|
|
312
|
+
zh: '/plugins check <清单路径> 诊断插件兼容性',
|
|
313
|
+
en: '/plugins check <manifest> diagnoses plugin compatibility',
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
id: 'cmd-update',
|
|
317
|
+
group: 'commands',
|
|
318
|
+
zh: '/update 自动更新 TUI 并重启恢复会话',
|
|
319
|
+
en: '/update updates the TUI and restarts, resuming the session',
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: 'cmd-permission',
|
|
323
|
+
group: 'commands',
|
|
324
|
+
zh: '/permission 切换权限预设(read-only/workspace/full)',
|
|
325
|
+
en: '/permission switches permission presets (read-only/workspace/full)',
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: 'cmd-plan-goal',
|
|
329
|
+
group: 'commands',
|
|
330
|
+
zh: '/plan 计划模式;/goal 设置会话目标',
|
|
331
|
+
en: '/plan enters plan mode; /goal sets a session goal',
|
|
332
|
+
},
|
|
333
|
+
// ── 工作流 ────────────────────────────────────────────────
|
|
334
|
+
{
|
|
335
|
+
id: 'flow-steer',
|
|
336
|
+
group: 'workflow',
|
|
337
|
+
zh: '模型工作时:Enter 加塞、Tab 排队、Ctrl+Enter 打断',
|
|
338
|
+
en: 'While working: Enter steers, Tab queues, Ctrl+Enter interrupts',
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: 'flow-alt-up',
|
|
342
|
+
group: 'workflow',
|
|
343
|
+
zh: 'Alt+Up 取回最后一条消息,改完重发',
|
|
344
|
+
en: 'Alt+Up retrieves the last message to edit and resend',
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
id: 'flow-rewind-fork',
|
|
348
|
+
group: 'workflow',
|
|
349
|
+
zh: '时间回溯会 fork 新会话,原消息回到输入框',
|
|
350
|
+
en: 'Rewind forks a session; your message returns to the input',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
id: 'flow-resume',
|
|
354
|
+
group: 'workflow',
|
|
355
|
+
zh: '/resume 里 Ctrl+S 折叠子 agent 运行',
|
|
356
|
+
en: 'In /resume, Ctrl+S folds subagent runs',
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
id: 'flow-search',
|
|
360
|
+
group: 'workflow',
|
|
361
|
+
zh: 'Ctrl+R 搜历史输入;转录态 / 搜会话全文',
|
|
362
|
+
en: 'Ctrl+R searches input history; / searches the transcript',
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
id: 'flow-at',
|
|
366
|
+
group: 'workflow',
|
|
367
|
+
zh: '任意位置 @ 补全文件,@ink 也能命中 src/ink',
|
|
368
|
+
en: '@ completes files anywhere; @ink matches src/ink',
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
id: 'flow-question-type',
|
|
372
|
+
group: 'workflow',
|
|
373
|
+
zh: '问卷选项行直接打字 = 选项 + 自定义文本一起提交',
|
|
374
|
+
en: 'Typing on a question row submits option + custom text',
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
id: 'flow-plan-review',
|
|
378
|
+
group: 'workflow',
|
|
379
|
+
zh: '计划评审按 1 / 2 数字键快速批准或反馈',
|
|
380
|
+
en: 'Plan review: press 1 / 2 to approve or give feedback fast',
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
id: 'flow-approval',
|
|
384
|
+
group: 'workflow',
|
|
385
|
+
zh: '审批条按 1 允许(仅本次)/ 2 拒绝',
|
|
386
|
+
en: 'Approval bar: 1 allows once, 2 rejects',
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
id: 'flow-goals',
|
|
390
|
+
group: 'workflow',
|
|
391
|
+
zh: '模型写 Goals/Todos 时面板自动出现,无需操作',
|
|
392
|
+
en: 'Goals/Todos appear automatically when the model writes them',
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
id: 'flow-btw-copy',
|
|
396
|
+
group: 'workflow',
|
|
397
|
+
zh: '/btw 面板按 c 一键复制答案',
|
|
398
|
+
en: 'In /btw, press c to copy the answer',
|
|
399
|
+
},
|
|
400
|
+
// ── 界面与个性化 ──────────────────────────────────────────
|
|
401
|
+
{
|
|
402
|
+
id: 'disp-statusbar',
|
|
403
|
+
group: 'display',
|
|
404
|
+
zh: '底栏 TPS、轨迹条、上下文条默认关,/settings 里打开',
|
|
405
|
+
en: 'TPS, trajectory, context bars are off by default — enable in /settings',
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
id: 'disp-context-warn',
|
|
409
|
+
group: 'display',
|
|
410
|
+
zh: '上下文 ≥80% 变琥珀预警,该 /compact 了',
|
|
411
|
+
en: 'Context ≥80% turns amber — time to /compact',
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
id: 'disp-tps-color',
|
|
415
|
+
group: 'display',
|
|
416
|
+
zh: 'TPS 仪表:≥50 绿 / ≥20 黄 / <20 红',
|
|
417
|
+
en: 'TPS gauge: ≥50 green / ≥20 yellow / <20 red',
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
id: 'disp-theme',
|
|
421
|
+
group: 'display',
|
|
422
|
+
zh: '/theme auto 跟随终端背景色;/theme <名> 直接切',
|
|
423
|
+
en: '/theme auto follows your terminal; /theme <name> switches directly',
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
id: 'disp-theme-custom',
|
|
427
|
+
group: 'display',
|
|
428
|
+
zh: '自定义主题:~/.dsh-tui/themes/<名>.json 即写即热切换',
|
|
429
|
+
en: 'Custom themes: ~/.dsh-tui/themes/<name>.json, hot-swappable',
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
id: 'disp-theme-status',
|
|
433
|
+
group: 'display',
|
|
434
|
+
zh: '/theme status 查看 auto 实际解析到的色板',
|
|
435
|
+
en: '/theme status shows which palette auto resolved to',
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
id: 'disp-lang',
|
|
439
|
+
group: 'display',
|
|
440
|
+
zh: '/lang zh|en 界面语言即时切换',
|
|
441
|
+
en: '/lang zh|en switches UI language instantly',
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
id: 'disp-activity',
|
|
445
|
+
group: 'display',
|
|
446
|
+
zh: '/activity frames comet 换状态行动画(31 种)',
|
|
447
|
+
en: '/activity frames comet changes the spinner (31 presets)',
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
id: 'disp-diff-layout',
|
|
451
|
+
group: 'display',
|
|
452
|
+
zh: '/settings 里 diffLayout 切双栏/单栏 diff',
|
|
453
|
+
en: 'In /settings, diffLayout switches split/unified diff',
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
id: 'disp-thinking-fold',
|
|
457
|
+
group: 'display',
|
|
458
|
+
zh: '/settings 里 thinkingFold:preview 折叠 / full 全展开',
|
|
459
|
+
en: 'In /settings, thinkingFold: preview folds, full expands',
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
id: 'disp-tool-bg',
|
|
463
|
+
group: 'display',
|
|
464
|
+
zh: '/settings 里 toolBackground 调工具卡背景强调',
|
|
465
|
+
en: 'In /settings, toolBackground tunes tool-card emphasis',
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
id: 'disp-mouse',
|
|
469
|
+
group: 'display',
|
|
470
|
+
zh: '全屏模式鼠标拖选即复制;Esc 取消选区',
|
|
471
|
+
en: 'Drag-select copies instantly in fullscreen; Esc cancels',
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
id: 'disp-whale',
|
|
475
|
+
group: 'display',
|
|
476
|
+
zh: '首屏鲸鱼动画(终端 ≥64 列才显示)',
|
|
477
|
+
en: 'The whale intro shows on terminals ≥64 columns',
|
|
478
|
+
},
|
|
479
|
+
// ── 避坑 ──────────────────────────────────────────────────
|
|
480
|
+
{
|
|
481
|
+
id: 'pit-busy',
|
|
482
|
+
group: 'pitfalls',
|
|
483
|
+
zh: '回合运行中 /compact /model 会被拒绝,先 Ctrl+C',
|
|
484
|
+
en: '/compact and /model refuse while working — Ctrl+C first',
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: 'pit-esc',
|
|
488
|
+
group: 'pitfalls',
|
|
489
|
+
zh: '审批条 Esc=拒绝;问卷 Esc=取消整批提问',
|
|
490
|
+
en: 'Esc rejects approvals and cancels question batches',
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
id: 'pit-ctrl-c',
|
|
494
|
+
group: 'pitfalls',
|
|
495
|
+
zh: 'Ctrl+C 有输入时先清空,连按两次才退出',
|
|
496
|
+
en: 'Ctrl+C clears input first; double-tap to exit',
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
id: 'pit-unknown-cmd',
|
|
500
|
+
group: 'pitfalls',
|
|
501
|
+
zh: '未知命令会作为普通消息发给模型',
|
|
502
|
+
en: 'Unknown commands are sent to the model as plain messages',
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
id: 'pit-preset-lock',
|
|
506
|
+
group: 'pitfalls',
|
|
507
|
+
zh: '/preset 已开始的会话不可切换,新会话才生效',
|
|
508
|
+
en: '/preset only applies to new sessions (blank-only rule)',
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
id: 'pit-update',
|
|
512
|
+
group: 'pitfalls',
|
|
513
|
+
zh: '/update 需 dsh --profile 方式启动',
|
|
514
|
+
en: '/update requires launching via dsh --profile',
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
id: 'pit-version-skew',
|
|
518
|
+
group: 'pitfalls',
|
|
519
|
+
zh: '提示版本错位时,按提示 npm install -g 对齐启动器',
|
|
520
|
+
en: 'On version skew, follow the npm install -g hint to align the launcher',
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
id: 'pit-mac',
|
|
524
|
+
group: 'pitfalls',
|
|
525
|
+
zh: 'macOS ⌘ 键需 iTerm2/kitty/WezTerm/ghostty/tmux',
|
|
526
|
+
en: 'macOS ⌘ needs iTerm2, kitty, WezTerm, ghostty, or tmux',
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
id: 'pit-thinking',
|
|
530
|
+
group: 'pitfalls',
|
|
531
|
+
zh: '/thinking 开关不持久化,重启回默认',
|
|
532
|
+
en: '/thinking does not persist across restarts',
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
id: 'pit-minimal',
|
|
536
|
+
group: 'pitfalls',
|
|
537
|
+
zh: 'minimal preset 下 /compact 与问卷不可用',
|
|
538
|
+
en: '/compact and questions are unavailable under minimal preset',
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
id: 'pit-mouse-mode',
|
|
542
|
+
group: 'pitfalls',
|
|
543
|
+
zh: '鼠标操作仅在全屏模式(fullscreen)下生效',
|
|
544
|
+
en: 'Mouse support only works in fullscreen mode',
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
id: 'pit-env-rename',
|
|
548
|
+
group: 'pitfalls',
|
|
549
|
+
zh: '旧 CC_TUI_*/DSH_CC_* 环境变量已改名 DSH_TUI_*',
|
|
550
|
+
en: 'Legacy CC_TUI_*/DSH_CC_* env vars are now DSH_TUI_*',
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
id: 'pit-pnpm',
|
|
554
|
+
group: 'pitfalls',
|
|
555
|
+
zh: '需要 pnpm 10+(pnpm 9 会启动失败)',
|
|
556
|
+
en: 'pnpm 10+ is required (pnpm 9 fails at startup)',
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
id: 'pit-terminal',
|
|
560
|
+
group: 'pitfalls',
|
|
561
|
+
zh: '需要交互 TTY;推荐 Windows Terminal ≥110 列',
|
|
562
|
+
en: 'An interactive TTY is required; try Windows Terminal ≥110 cols',
|
|
563
|
+
},
|
|
564
|
+
];
|
|
565
|
+
/**
|
|
566
|
+
* 启动随机轮换选择:每次启动随机取一条,让首屏每次都有新鲜感。
|
|
567
|
+
* random 可注入以便测试固定(默认 Math.random)。
|
|
568
|
+
*/
|
|
569
|
+
export function pickRandomTip(random = Math.random) {
|
|
570
|
+
return TIPS[Math.floor(random() * TIPS.length)];
|
|
571
|
+
}
|
|
572
|
+
/** 按分组取 tips(/tips 面板展示用,保持 TIPS 内顺序)。 */
|
|
573
|
+
export function tipsByGroup(group) {
|
|
574
|
+
return TIPS.filter(tip => tip.group === group);
|
|
575
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-harness-tui/dsh-tui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Claude Code style interactive TUI front door for DeepSeek Harness agents, built on the ported Ink core.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -105,13 +105,15 @@
|
|
|
105
105
|
"verify:packaged-presets": "node scripts/verify-packaged-presets.mjs",
|
|
106
106
|
"verify:minimal-preset-tools": "node scripts/verify-minimal-preset-tools.mjs",
|
|
107
107
|
"verify:liangshen-bootstrap": "node scripts/verify-liangshen-bootstrap.mjs",
|
|
108
|
+
"verify:liangshen-bash": "node scripts/verify-liangshen-bash.mjs",
|
|
108
109
|
"verify:package": "npm pack --dry-run --json --ignore-scripts | node scripts/verify-package.mjs",
|
|
109
110
|
"verify:prompt-debug": "npm run build && node scripts/verify-prompt-debug.mjs",
|
|
110
111
|
"verify:clipboard-image": "node --import tsx/esm scripts/verify-clipboard-image.ts",
|
|
111
112
|
"verify:plugin-ledger": "node --import tsx/esm scripts/verify-plugin-ledger.ts",
|
|
112
113
|
"verify:plugin-commands": "node --import tsx/esm scripts/verify-plugin-commands.ts",
|
|
113
114
|
"verify:plugin-negotiation": "node --import tsx/esm scripts/verify-plugin-negotiation.ts",
|
|
114
|
-
"verify:plugin-lifecycle": "node --import tsx/esm scripts/verify-plugin-lifecycle.ts"
|
|
115
|
+
"verify:plugin-lifecycle": "node --import tsx/esm scripts/verify-plugin-lifecycle.ts",
|
|
116
|
+
"verify:tips": "node --import tsx/esm scripts/verify-tips.tsx"
|
|
115
117
|
},
|
|
116
118
|
"peerDependencies": {
|
|
117
119
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -156,7 +158,7 @@
|
|
|
156
158
|
"cli-highlight": "^2.1.11",
|
|
157
159
|
"code-excerpt": "^3.0.0 || ^4.0.0",
|
|
158
160
|
"diff": "^8.0.4",
|
|
159
|
-
"dsh-working-activity": "^0.
|
|
161
|
+
"dsh-working-activity": "^0.3.0",
|
|
160
162
|
"emoji-regex": "^10.0.0",
|
|
161
163
|
"figures": "^6.1.0",
|
|
162
164
|
"get-east-asian-width": "^1.0.0",
|
|
@@ -151,15 +151,17 @@
|
|
|
151
151
|
# Windows-only `bash` tool (see custom-bash.mjs): registers the SAME
|
|
152
152
|
# tool name as the persistent shell with a Minimal-compatible description, but
|
|
153
153
|
# executes through the ordinary cross-platform subprocess seam (`bash -c`)
|
|
154
|
-
# instead of a PTY.
|
|
155
|
-
#
|
|
156
|
-
#
|
|
154
|
+
# instead of a PTY. The Git Bash executable is DISCOVERED at preset mount:
|
|
155
|
+
# an explicit `config.bashPath` (or DSH_TUI_LIANGSHEN_BASH_PATH) is honored as
|
|
156
|
+
# the only candidate, otherwise a PATH git.exe is followed to its install tree
|
|
157
|
+
# (installer/portable/Scoop layouts, Scoop shims followed), then conventional
|
|
158
|
+
# roots, then bare `bash` — never the System32 WSL launcher. A miss warns and
|
|
159
|
+
# skips registration, which fails the bootstrap open to the full catalog.
|
|
160
|
+
# No OS sandbox confinement on Windows (landlock is linux-only); the tool
|
|
157
161
|
# description says so.
|
|
158
162
|
- id: custom-bash
|
|
159
163
|
name: ./custom-bash.mjs
|
|
160
164
|
disabled: !!js process.platform !== 'win32'
|
|
161
|
-
config:
|
|
162
|
-
bashPath: 'C:\Program Files\Git\bin\bash.exe'
|
|
163
165
|
|
|
164
166
|
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
165
167
|
|