@xmoon76/dsh-pi-tui 0.5.0 → 0.5.2-rc.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.en.md CHANGED
@@ -54,17 +54,22 @@ next compatibility range, and fallback paths.
54
54
 
55
55
  | TUI package line | Official DSH tags for the pairing | Notes |
56
56
  |---|---|---|
57
- | `0.5.0` (stable / `@latest`) | `dsh-v0.1.7-rc.2`, `dsh-v0.2.0-rc.1` | Current stable line; 0.1.7-rc.2 minimum, exact validation target 0.2.0-rc.1 |
57
+ | `0.5.1` (stable / `@latest`) | `dsh-v0.2.0-rc.2` | Current stable line; both the minimum and the exact validation target are the 0.2.0-rc.2 family |
58
+ | `0.5.2-rc.1` (next preview / `@next`) | `dsh-v0.2.0-rc.2` | Current next-line preview; the DSH baseline is identical to `0.5.1` (the 0.2.0-rc.2 family is both the minimum and the exact validation target) |
59
+ | `0.5.0` (stable, previous) | `dsh-v0.1.7-rc.2`, `dsh-v0.2.0-rc.1` | Previous stable; 0.1.7-rc.2 minimum, exact validation target 0.2.0-rc.1 |
58
60
  | `0.4.9` (stable, previous) | `dsh-v0.1.7-rc.2` | Previous stable; the compatible TUI for a 0.1.7-rc.2 runtime |
59
61
  | `0.4.8` (stable, previous) | `dsh-v0.1.7-rc.1` | Previous stable; the compatible TUI for a 0.1.7-rc.1 runtime |
60
62
  | `0.4.6` (stable, previous) | `dsh-v0.1.5-rc.1`, `dsh-v0.1.5-rc.2` | Previous stable; the compatible TUI for a 0.1.5 runtime |
61
63
  | `0.4.7-alpha.2` (next, previous) | `dsh-v0.1.6-alpha.2` | Previous next line; the compatible TUI for a 0.1.6-alpha.2 runtime |
62
64
 
63
- Do not mix the stable and `@next` prerelease lines. The `0.5.0` line unifies its
64
- whole DSH peer floor at `>=0.1.7-rc.2` (the rc.2 preset registry peers
65
- `dsh-agent` exactly, so a wider legacy floor no longer satisfies a standalone
66
- tarball install), while its exact validation and recommended upgrade target is
67
- the published `0.2.0-rc.1` family; older runtimes fail at the normal
65
+ Do not mix the stable and `@next` prerelease lines. `@next` currently resolves to
66
+ the `0.5.2-rc.1` preview, whose DSH baseline is identical to `0.5.1`. `0.5.1` lifts the whole DSH
67
+ peer floor to `>=0.2.0-rc.2`: the Question lifecycle
68
+ consumes contracts published only in rc.2 (the `userQuestions.attachWait`/
69
+ `answer` Remotes and the `userQuestions` Session projection), so mixing in the
70
+ rc.1 family would be a false compatibility statement. The previous stable `0.5.0`
71
+ line keeps its `>=0.1.7-rc.2` floor (exact validation target 0.2.0-rc.1);
72
+ older runtimes fail at the normal
68
73
  incompatible-runtime boundary, so install the paired TUI line from the table
69
74
  above. The startup notice
70
75
  is best-effort rather than a Loader startup-order guarantee. See the [full
@@ -129,7 +134,7 @@ dsh --profile pi-tui --session <session-id>
129
134
 
130
135
  ### Conversation display
131
136
 
132
- `/display focus` groups the current turn's Thinking, Tool Calls, and intermediate replies into a live Thought block; `/display full` restores the normal Transcript projection. `/focus` remains available as a compatibility command. The Compact preset is reserved and `/display compact` is rejected until its projection ships.
137
+ `/display` switches between three presentation presets: `full` (default) is the normal Transcript projection; `focus` groups the current turn's Thinking, Tool Calls, and intermediate replies into a live Thought block; `compact` folds contiguous process into `Activity` spans with Header + `Think:` / `Action:` previews, keeps the session and assistant intermediate output visible in chronological order, renders injected notice / relay / recall entries separately (adjacent environment injections merge into an expandable Context cluster), and expands with a mouse click or `Ctrl+O`. The `Display` row in `/settings` offers the same values and persists the choice; `/focus` remains available as a compatibility command.
133
138
 
134
139
  The full process can still be expanded when needed. In fullscreen Focus, Thought roots can be expanded/collapsed in bulk or opened with an individual card click, and the viewport survives switches and resizes. Display presets only change presentation; they do not modify Session events.
135
140
 
@@ -182,10 +187,14 @@ Regular `↑` / `↓` history recall is still available for recent input.
182
187
 
183
188
  `/tasks` opens the full Task Center, showing the work the current Session's
184
189
  Job Registry / Subagent catalog still tracks; the Footer's `↓` opens the
185
- lightweight Quick Tasks view for the current active work. Selecting a Job
186
- opens a detail with the official non-consuming live
187
- output preview (status, progress and the retained output tail); it never consumes
188
- the model's `job_output` cursor and never becomes session history.
190
+ lightweight Quick Tasks view for the current active work. Selecting a Job opens
191
+ the fullscreen Job workspace: one status row with the Job identity, the themed
192
+ status and the `[GAP]`/`[ERROR]`/`[SETTLED]` facts, followed by the real
193
+ progress/detail, the command summary and the `Output` / `Command` reading tabs.
194
+ Output is the official non-consuming live preview (scrollable, searchable and
195
+ explicitly labelled as a retained tail rather than the full history), and the
196
+ Command page shows and copies the original shell command. It never consumes the
197
+ model's `job_output` cursor and never becomes session history.
189
198
 
190
199
  Task Center is a live tracked/control projection, not an execution-history
191
200
  list. `ACTIVE` / `TRACKED` are presentation scopes: `ACTIVE` shows only the
@@ -253,18 +262,50 @@ The editor supports two Shell modes:
253
262
  ! git status
254
263
  ```
255
264
 
256
- Runs a local command and submits its output into the current Session.
265
+ Runs the command in the Host environment and submits its output into the current Session.
257
266
 
258
267
  ```text
259
268
  !! git status
260
269
  ```
261
270
 
262
- Runs the command locally only. Its output is not added to model context.
271
+ Runs the command in the Host environment as well; its output stays out of model context (card display only).
263
272
 
264
273
  `!` / `!!` are editor modes rather than plain text prefixes. The prompt and completion behavior switch together with the active mode.
265
274
 
266
275
  Shell cards show a bounded output preview by default. `Ctrl+O` expands the retained output — except in fullscreen Focus, where Ctrl+O owns the Thought roots and the shell cards keep their folded state.
267
276
 
277
+ ### Git commit attribution (optional)
278
+
279
+ When enabled, dsh-pi-tui instructs the Agent to add the official attribution trailers when it creates Git commits:
280
+
281
+ ```text
282
+ Co-Authored-By: @xmoon76/dsh-pi-tui <dsh-pi-tui@xmoon.org>
283
+ ```
284
+
285
+ It is **off by default**. Three modes are supported:
286
+
287
+ ```text
288
+ off no attribution guidance (default)
289
+ product the official Co-Authored-By trailer
290
+ product-model official trailer + Assisted-By: <provider>/<model>
291
+ ```
292
+
293
+ This is **Agent guidance (a prompt policy), not repository-level enforcement**:
294
+ dsh-pi-tui installs no Git hooks, rewrites no `git commit` command, and probes
295
+ no repository. The `provider`/`model` in `product-model` come straight from
296
+ DSH's official model selection (a model switch takes effect on the next
297
+ request).
298
+
299
+ Boundaries:
300
+
301
+ - `!` / `!!` user shell commands and commits from your own terminal are completely untouched;
302
+ - no `prepare-commit-msg` hook is installed and existing hooks are never modified;
303
+ - **not effective under the `minimal` preset**: its persona is a complete system prompt
304
+ (`complete: true`) that replaces every other section — the same existing behavior for the
305
+ other TUI guidance (progress updates, response style, focus);
306
+ - no GitHub credentials or API are required; the Author/Committer identity is never modified;
307
+ - a model may in theory ignore or mis-transcribe the instruction — this is the accepted tradeoff: low-intrusion guidance instead of a full Git lifecycle subsystem.
308
+
268
309
  ### File references and images
269
310
 
270
311
  Typing `@` opens workspace file search and completion:
@@ -300,11 +341,89 @@ Common entry points:
300
341
 
301
342
  Model selection, Reasoning Effort, permission presets, Plan, and Goal all keep the corresponding DSH runtime semantics.
302
343
 
344
+ `/settings` opens a real full-screen workspace where the three-, two- and
345
+ single-column layouts are projections of the SAME `categories → rows → detail`
346
+ levels: wide terminals show all three columns, medium ones show
347
+ `categories + rows` or `rows + details` for the current level, and narrow ones
348
+ show only the current level. At every width ASCII `Right` advances exactly one
349
+ level and `Left` returns one level (inert at L0); `Enter` follows the same
350
+ transitions, and `Esc`/`Backspace` step back, closing at the outermost level.
351
+ `Tab`/`Shift+Tab` remain inert. The Action Bar stays pinned to the last physical
352
+ row. Multi-column choosing retains the active `[Details]` marker unless that
353
+ heading would consume the only content row. It presents the real Appearance /
354
+ Display facts: the theme's source-qualified raw value plus its friendly name,
355
+ Icon style, the live Transcript display preset alongside the persisted preference,
356
+ the live Thinking detail state, and each row's configuration Scope and backend
357
+ readiness. `R`
358
+ re-reads and `C` copies the selected row's exact source value. Browsing, choosing
359
+ and copying alone never write configuration.
360
+
361
+ The **`Configured theme` and `Transcript display` rows are directly editable**:
362
+ from L1, `Right` or `Enter`, the painted `[Change…]` button, or ordinary visible
363
+ Detail content opens the candidate choice in the SAME L2 pane. Current-value and
364
+ Runtime/Persisted facts stay in the same pane above the candidate region and scroll
365
+ independently. `Up`/`Down`/`Home`/`End` move the candidate; `PgUp`/`PgDn` and the
366
+ wheel over facts scroll only the fact region, while the candidate wheel scrolls
367
+ independently. During choice, `C` copies the original row value only while the
368
+ Action Bar paints `c copy`; it never copies or commits the draft candidate. `Enter`
369
+ or `[Confirm]` confirms explicitly, and `Left`/`Esc`/`Backspace` or `[Cancel]`
370
+ cancels directly to L1 without writing anything. If the selected candidate identity
371
+ has scrolled out of view, the first Enter only reveals it; confirmation requires a
372
+ later Enter. From L2 browse or a settled outcome, Enter reopens choice for a
373
+ writable non-pending row. At 44×8, a long identity may first reclaim the optional
374
+ `Choose value` heading; if still needed, the fact area shrinks only to one original
375
+ `Value` row. The complete identity, `Confirm` and `Enter confirm` must be visible
376
+ before a write.
377
+ An identity beyond the remaining candidate capacity stays unconfirmable. Only
378
+ buttons and candidates that are really painted can be clicked. A confirmed change is stored through the existing
379
+ serialized whole-document write path and then re-read from the authority: the
380
+ detail names the live runtime fact (`Runtime`, e.g. the current palette) and the
381
+ stored preference (`Persisted`) separately and states `Saving…`, `Verified`,
382
+ `Not saved · <reason>`, `Commit accepted · verification unavailable` or
383
+ `Outcome unknown · <reason>` — only a completed write whose authoritative
384
+ re-read agrees is called Verified; a rejected write re-reads the authority first
385
+ and reports Not saved only while it still carries the value the request started
386
+ from; a third value, a value already in place or an unreadable authority is
387
+ Outcome unknown, and a success whose readable readback disagrees is a failure
388
+ rather than "verification unavailable". On a non-ready backend the theme is
389
+ neither applied nor written; a display preset may already be live locally and
390
+ then says that it was not stored instead of pretending it was. A plugin theme is
391
+ resolved again by its source-qualified identity at confirm time, so an unloaded
392
+ plugin theme is listed as unavailable and refused rather than degrading into a
393
+ same-named file theme. Icon style and Thinking detail stay read-only rows. The
394
+ existing complete settings editor is still available: `Other settings` → `Open
395
+ existing settings…` retires the workspace and restores the surface it paused
396
+ before opening the original editor, so Theme, the Plugin Manager, keybindings,
397
+ permissions and extension settings keep every existing write path.
398
+
303
399
  The `Icon style` option in `/settings` switches the TUI's structural icons:
304
400
  `Emoji` (default, colorful), `Symbols` (compact single-cell terminal
305
401
  symbols), or `Minimal` (decorative icons hidden; only status/interaction
306
402
  markers remain). Switching applies immediately and persists.
307
403
 
404
+ The `Terminal progress` row in `/settings` selects the native terminal status
405
+ reporting in four modes: `9;4+7501` (default — both the OSC 9;4 progress bar and
406
+ the OSC 7501 semantic state), `9;4` (progress-bar compatibility only), `7501`
407
+ (semantic state only: working, waiting for approval/answer, done, error) and
408
+ `Off` (clear and stop reporting). Switching applies immediately; done and error
409
+ are reported only once a real run's last turn result is proven, while a
410
+ cancelled or interrupted run returns to idle. A persisted `On` reads as the
411
+ dual-protocol default.
412
+
413
+ Terminal compatibility: a terminal that does not know OSC 7501 simply ignores
414
+ it — Ghostty's GUI currently shows the OSC 9;4 progress bar and not the 7501
415
+ semantic state, which is expected and not a reporting failure. Inside tmux and
416
+ other terminal multiplexers an unknown OSC may not be forwarded to the outer
417
+ terminal (this feature deliberately implements no tmux DCS passthrough and does
418
+ not change multiplexer settings); use an outer terminal that supports it when
419
+ the state must survive a multiplexer. The OSC 7501 semantic state describes the
420
+ current Main Agent only.
421
+
422
+ This project's own Remote composition (experimental, our Host) reports the same
423
+ state: the Host side is served by this extension's private Host status stream and
424
+ shares ONE interval classifier with Direct. **A third-party DSH Host without this
425
+ extension's Host plugin is not supported** (it has no equivalent event source).
426
+
308
427
  Slash Commands registered by other plugins through `ctx.commands` are discovered automatically.
309
428
 
310
429
  ### Footer customization
@@ -352,7 +471,7 @@ For the full `/footer` workflow, Custom Text / Command items, YAML reference, se
352
471
  | `Tab` | Autocomplete slash commands and file paths |
353
472
  | `@` | File completion |
354
473
  | `!` | Enter Shell mode |
355
- | `!!` | Enter local-only Shell mode |
474
+ | `!!` | Enter Session-excluded Shell mode |
356
475
 
357
476
  Use `/help` inside the TUI for the current command and keybinding list. The table above shows the defaults; after customization, `/help` and `/keybindings` show the effective keys.
358
477
 
@@ -598,8 +717,8 @@ This section contains DSH compatibility and CI validation details only; ordinary
598
717
  ### npm mode (current `next`)
599
718
 
600
719
  The current compatibility-train line is npm mode: it targets the published
601
- `dsh-v0.2.0-rc.1` family declared by this checkout's `package.json` and
602
- resolved by its lockfile (the runtime peer floor stays `>=0.1.7-rc.2`). The
720
+ `dsh-v0.2.0-rc.2` family declared by this checkout's `package.json` and
721
+ resolved by its lockfile (the runtime peer floor is also `>=0.2.0-rc.2`). The
603
722
  isolated npm driver installs that exact
604
723
  family from the public registry and exercises the TUI build/test/package path:
605
724
 
package/README.md CHANGED
@@ -52,16 +52,21 @@ pnpm compat:dsh:npm
52
52
 
53
53
  | TUI 包版本 | 对应的官方 DSH tags | 说明 |
54
54
  |---|---|---|
55
- | `0.5.0`(stable / `@latest`) | `dsh-v0.1.7-rc.2`、`dsh-v0.2.0-rc.1` | 当前稳定版;最低 0.1.7-rc.2,精确验证目标 0.2.0-rc.1 |
55
+ | `0.5.1`(stable / `@latest`) | `dsh-v0.2.0-rc.2` | 当前稳定版;最低与精确验证目标均为 0.2.0-rc.2 family |
56
+ | `0.5.2-rc.1`(next 预览 / `@next`) | `dsh-v0.2.0-rc.2` | 当前 next 线预览;DSH 基线与 `0.5.1` 相同,最低与精确验证目标均为 0.2.0-rc.2 family |
57
+ | `0.5.0`(stable,历史) | `dsh-v0.1.7-rc.2`、`dsh-v0.2.0-rc.1` | 上一稳定版;最低 0.1.7-rc.2,精确验证目标 0.2.0-rc.1 |
56
58
  | `0.4.9`(stable,历史) | `dsh-v0.1.7-rc.2` | 上一稳定版;0.1.7-rc.2 runtime 的兼容 TUI |
57
59
  | `0.4.8`(stable,历史) | `dsh-v0.1.7-rc.1` | 上一稳定版;0.1.7-rc.1 runtime 的兼容 TUI |
58
60
  | `0.4.6`(stable,历史) | `dsh-v0.1.5-rc.1`、`dsh-v0.1.5-rc.2` | 上一稳定版;0.1.5 runtime 的兼容 TUI |
59
61
  | `0.4.7-alpha.2`(next,历史) | `dsh-v0.1.6-alpha.2` | 上一条 next 线;0.1.6-alpha.2 runtime 的兼容 TUI |
60
62
 
61
- 不要把稳定线与 `@next` 预发布线混装。`0.5.0` 的整个 DSH peer floor 统一为
62
- `>=0.1.7-rc.2`(rc.2 的 preset registry 精确 peer `dsh-agent`,更宽的旧
63
- floor 已无法满足独立 tarball 安装),精确验证与推荐升级目标是已发布的
64
- `0.2.0-rc.1` family;旧 runtime 会在正常的不兼容边界以非零状态失败,
63
+ 不要把稳定线与 `@next` 预发布线混装。当前 `@next` 指向 `0.5.2-rc.1` 预览,
64
+ 它的 DSH 基线与 `0.5.1` 完全相同。`0.5.1` 把整个 DSH peer
65
+ floor 提升到 `>=0.2.0-rc.2`:Question 生命周期消费 rc.2 才发布的公开契约
66
+ (`userQuestions.attachWait`/`answer` Remote 与 `userQuestions` Session
67
+ projection),rc.1 family 不提供这些契约,混装属于虚假的兼容声明。上一稳定版
68
+ `0.5.0` 保持 `>=0.1.7-rc.2` floor 不变(精确验证目标 0.2.0-rc.1);旧
69
+ runtime 会在正常的不兼容边界以非零状态失败,
65
70
  请按上表安装配对的 TUI 线。完整的历史兼容矩阵和 fallback 命令见
66
71
  [兼容性文档](docs/dsh-compatibility.md);要查看 `@next` 的最新集成状态,请看
67
72
  [next 分支 README](https://github.com/XMoon/dsh-pi-tui/blob/next/README.md)。
@@ -121,7 +126,7 @@ dsh --profile pi-tui --session <session-id>
121
126
 
122
127
  ### Conversation display
123
128
 
124
- `/display focus` 将运行中的 Thinking、Tool Call 和中间回复聚合为一个实时更新的 Thought 区块;`/display full` 恢复普通 Transcript 展示。`/focus` 仍作为兼容命令保留。Compact 预设尚未开放,`/display compact` 会明确拒绝。
129
+ `/display` 在三种展示预设间切换:`full`(默认)是普通 Transcript 展示;`focus` 将当前回合的 Thinking、Tool Call 和中间回复聚合为一个实时更新的 Thought 区块;`compact` 把连续的过程折叠为带 Header + `Think:` / `Action:` 预览的 `Activity` 段,会话与 assistant 的中间输出仍按时间顺序可见,注入的 notice / relay / recall 改为独立呈现(相邻的环境类注入合并为可展开的 Context 簇),展开用鼠标点击或 `Ctrl+O`。`/settings` 的 `Display` 行提供同一组取值并持久化;`/focus` 仍作为兼容命令保留。
125
130
 
126
131
  需要查看过程时可以展开,关闭 Focus 后恢复普通 Transcript 展示。全屏 Focus 中可以按 Thought root 批量展开/收起,也可以单独点击卡片;切换或缩放时会保留 viewport。展示预设只影响界面投影,不修改 Session 中保存的事件。
127
132
 
@@ -172,7 +177,7 @@ Rewind 会从选中的历史 User Turn 创建新的 Child Session,并把对应
172
177
 
173
178
  ### Subagent 与 Task Center
174
179
 
175
- `/tasks` 打开完整 Task Center,显示当前 Session 中仍由 Job Registry / Subagent catalog 跟踪的工作;Footer 的 `↓` 打开轻量 Quick Tasks,只看当前活动(active)工作。选中 Job 后,详情会显示官方非消耗式的实时输出预览(状态、进度与保留的输出尾部),不会消耗模型的 `job_output` 游标,也不写入会话历史。
180
+ `/tasks` 打开完整 Task Center,显示当前 Session 中仍由 Job Registry / Subagent catalog 跟踪的工作;Footer 的 `↓`(仅在光标位于编辑器最后一个可视行时)打开按需的 Quick 窗口,它默认不占行、出现在整个 Footer 之下。选中 Job 后进入全屏 Job 工作区:顶部一行显示 Job 身份、主题状态与大写状态及 `[GAP]`/`[ERROR]`/`[SETTLED]` 事实,下面是真实进度/说明、命令摘要与 `Output`/`Command` 阅读标签。Output 是官方非消耗式的实时输出预览(可滚动、可搜索,并明确标注为保留尾部而非完整历史),Command 页可阅读并按原文复制 shell 命令。工作区不会消耗模型的 `job_output` 游标,也不写入会话历史。
176
181
 
177
182
  Task Center 的 `ACTIVE` / `TRACKED` 是展示范围:`ACTIVE` 只显示当前活动项,`TRACKED` 显示当前跟踪源(Job Registry / Subagent catalog)仍列出的全部项;`TRACKED` 不是 Session 执行历史。DSH `0.1.7` 会在普通前台 `bash` / `pwsh` 执行期间临时注册 Job,使其可以在 Task Center 中观察和停止;如果命令在前台等待内完成,DSH 会移除该临时记录,最终结果仍保留在 Transcript 的 tool card 中。显式 `run_in_background: true` 或被提升为后台的 Job 在完成后,只要 Job Registry 继续保留其记录,就仍可在 `TRACKED` 中查看。
178
183
 
@@ -195,9 +200,9 @@ main
195
200
  * nested descendant
196
201
  * Job Registry 跟踪的 Job(含运行中的前台 shell)
197
202
 
198
- Footer `↓` 打开的 Quick Tasks 是轻量浏览视图,只提供方向键导航、左右展开/折叠、`Tab` 类型过滤、`Enter` 打开和 `Esc` 关闭。底部 “Open Task Center” 行可进入完整 Task Center。
203
+ Footer `↓` 打开的 Quick 窗口默认不占行,只在编辑器最后一个可视行按 `↓` 时展开到 Footer 之下:`↑↓` / `PgUp` / `PgDn` 选择,`Enter` 用真实任务身份打开既有详情,`↑`(首行)或 `Esc` 返回编辑器并保留草稿;列表末尾的 “Open Task Center” 行进入完整 Task Center。
199
204
 
200
- 完整 Task Center 额外提供 `A` 切换 Active / Tracked、`/` 搜索、`Tab` / `Shift+Tab` 双向切换类型、`S`(确认后)停止所选任务以及 `R` 刷新 / 重试。Quick Tasks 只消费上述白名单按键,其余输入一律 no-op,不会进入搜索、停止确认或任务管理状态,因此 `Esc` 始终一层关闭。
205
+ 完整 Task Center 额外提供 `A` 切换 Active / Tracked、`/` 搜索、`Tab` / `Shift+Tab` 双向切换类型、`S`(确认后)停止所选任务以及 `R` 刷新 / 重试。Quick 窗口只消费上述导航键,其余输入一律 no-op,不会进入搜索、停止确认或任务管理状态,因此 `Esc` 始终一层关闭。
201
206
 
202
207
  已经结束的 one-shot Subagent 仍可以打开并查看持久化 Transcript。
203
208
 
@@ -218,18 +223,49 @@ Footer `↓` 打开的 Quick Tasks 是轻量浏览视图,只提供方向键导
218
223
  ! git status
219
224
  ```
220
225
 
221
- 执行本地命令,并把输出提交到当前 Session。
226
+ 在宿主(Host)环境执行命令,并把输出提交到当前 Session。
222
227
 
223
228
  ```text
224
229
  !! git status
225
230
  ```
226
231
 
227
- 只在本地执行,输出不会进入模型上下文。
232
+ 同样在宿主环境执行,但输出不进入模型上下文(仅卡片展示)。
228
233
 
229
234
  `!` / `!!` 是独立的编辑器模式,而不是普通文本前缀。进入 Shell 模式后 Prompt 和补全行为会同步切换。
230
235
 
231
236
  Shell 卡片默认只显示有限的输出预览,`Ctrl+O` 可以展开完整保留内容——全屏 Focus 除外:那里 `Ctrl+O` 负责 Thought root 的整体开关,Shell 卡片保持折叠。
232
237
 
238
+ ### Git 提交署名(可选)
239
+
240
+ 开启后,dsh-pi-tui 会指示 Agent 在创建 Git 提交时加上官方项目署名:
241
+
242
+ ```text
243
+ Co-Authored-By: @xmoon76/dsh-pi-tui <dsh-pi-tui@xmoon.org>
244
+ ```
245
+
246
+ 默认 **关闭**。支持三种模式:
247
+
248
+ ```text
249
+ off 不添加署名指引(默认)
250
+ product 官方 Co-Authored-By 署名
251
+ product-model 官方署名 + Assisted-By: <provider>/<model>
252
+ ```
253
+
254
+ 这是 **Agent 指引(prompt policy),不是仓库级强制**:dsh-pi-tui 不会安装 Git
255
+ 钩子、不改写任何 `git commit` 命令、也不探测仓库。`product-model` 的
256
+ `provider`/`model` 由 DSH 官方模型选择直接注入(切换模型后下一次请求生效)。
257
+
258
+ 边界说明:
259
+
260
+ - `!` / `!!` 用户 Shell 和你自己终端里的手动提交完全不受影响;
261
+ - 不安装任何 `prepare-commit-msg` 钩子,不修改已有钩子;
262
+ - **使用 `minimal` preset 时不生效**:该 preset 的 persona 是完整 system prompt
263
+ (`complete: true`),会替换掉其它全部 section;既有的 TUI 指引(Progress updates、
264
+ Response style、Focus)在该 preset 下同样是这种既有行为;
265
+ - 不需要 GitHub 凭证/API;不修改 Author/Committer 身份;
266
+ - 模型理论上可能忽略或写错指引——这是有意的取舍:用低侵入的指引替代一整套
267
+ Git 生命周期子系统。
268
+
233
269
  ### 文件引用与图片
234
270
 
235
271
  输入 `@` 可以搜索和补全工作区文件:
@@ -265,10 +301,58 @@ TUI 使用 DSH 提供的模型和设置服务。
265
301
 
266
302
  模型切换、Reasoning Effort、权限 Preset、Plan 和 Goal 都沿用 DSH 对应的运行时语义。
267
303
 
304
+ `/settings` 打开一个真正的全屏工作区,三栏 / 两栏 / 单栏只是同一套
305
+ `分类 → 设置行 → 详情` 三层的投影:宽屏同时显示三栏,中屏按当前层显示
306
+ `分类 + 设置行` 或 `设置行 + 详情`,窄屏只显示当前层。所有宽度上 `Right` 只前进一层,
307
+ `Left` 返回一层(在最外层无效);`Enter` 遵循相同层级,`Esc`/`Backspace` 逐级返回,
308
+ 最外层关闭工作区。`Tab`/`Shift+Tab` 不承担导航,底部操作栏始终固定在最后一行。多栏编辑态仍
309
+ 保留 `[Details]` 焦点标识;只有标题会占掉唯一内容行时才让位。
310
+ 它展示 Appearance / Display 的真实事实:主题的 source-qualified 原始值与友好名称、
311
+ Icon style、Transcript display 的运行时当前值与持久偏好、Thinking detail 的当前运行
312
+ 态,以及每个条目的配置来源 Scope 与 backend 就绪状态;`R` 重新读取、`C` 复制所选行的
313
+ 原始值;浏览、选择与复制本身都不写入配置。
314
+
315
+ 其中**「Configured theme」和「Transcript display」两行可以直接修改**:在 L1 设置行按
316
+ `Right` 或 `Enter`,或点击 `[Change…]` / 可见的 Detail 内容,即可在同一 L2 详情中打开
317
+ 候选选择;当前值与 Runtime / Persisted 事实留在同一详情事实区,并与候选列表独立滚动。`Up`/`Down`/`Home`/`End`
318
+ 移动候选,`PgUp`/`PgDn` 和事实区上的滚轮只滚动详情事实,候选区滚轮独立滚动候选;
319
+ 选择期间可按 `C` 复制仍未更改的原始值,但仅当动作栏实际绘出 `c copy`,它不会提交候选。
320
+ `Enter` 或点击 `[Confirm]` 明确确认,`Left`/`Esc`/`Backspace` 或 `[Cancel]` 取消并直接回到
321
+ L1,零写入。L2 浏览/已结算时,`Enter` 可重新打开可写行的选择;pending 写入时不触发新选择。若当前候选身份已滚出可见区域,第一次 `Enter` 只将其重新显示,之后才能确认;
322
+ 44×8 短屏在长身份需要空间时先省略可选的 `Choose value` 标题;若仍不足,再将事实区压到只保留旧 `Value` 的一行。只有完整身份、`Confirm` 与 `Enter confirm` 同屏可见时才能确认,超过剩余容量仍拒绝写入。只有实际绘制出来的
323
+ 按钮与候选行可以点击。确认后走既有的串行整文档写入路径落盘,再从权威来源重读目标字段核对:
324
+ 详情里分别显示运行态(`Runtime`,如当前 palette)与持久偏好(`Persisted`),并显示
325
+ `Saving…` / `Verified` / `Not saved · 原因` / `Commit accepted · verification unavailable` /
326
+ `Outcome unknown · 原因`,只有写入完成、backend `ready` 且权威回读一致才显示 Verified;
327
+ 被拒绝的写入会先重读权威:仍停留在请求起点值才报 Not saved,出现第三个值、已是目标值或无法读取
328
+ 则如实报 Outcome unknown;写返回成功但权威可读地不一致同样按失败显示,而不是
329
+ "verification unavailable"。backend 不 ready 时主题不会被应用或写入;显示预设可以先在本机生效,
330
+ 此时会明确说明未能保存,而不是假装保存成功。插件主题在确认时再次按 source-qualified 身份解析,
331
+ 已卸载的插件主题标记为 unavailable 并拒绝确认,不会退化成同名文件主题。Icon style 与
332
+ Thinking detail 仍是只读行。旧的完整设置编辑器仍然可用:`Other settings` → `Open existing settings…`
333
+ 会先关闭工作区并恢复原界面,再打开原有编辑器,Theme、Plugin Manager、键位、权限与扩展设置的写入路径全部不变。
334
+
268
335
  `/settings` 中的 `Icon style` 可切换 TUI 结构图标的风格:`Emoji`(默认,
269
336
  彩色)、`Symbols`(紧凑的单格终端符号)、`Minimal`(隐藏装饰性图标,只
270
337
  保留状态/交互标记);切换立即生效并持久化。
271
338
 
339
+ `/settings` 中的 `Terminal progress` 控制原生终端状态上报,共四档:
340
+ `9;4+7501`(默认,同时上报 OSC 9;4 进度条与 OSC 7501 语义状态)、
341
+ `9;4`(只保留进度条兼容协议)、`7501`(只上报语义状态:运行中 / 等待审批 /
342
+ 等待回答 / 完成 / 出错)、`Off`(清除并停止上报)。切换立即生效;完成与出错
343
+ 只在一次真实运行的最后一个 turn 结果被证实后上报,中断或取消会回到空闲。
344
+ 旧的 `On` 配置读作默认双协议。
345
+
346
+ 终端兼容性说明:不认识 OSC 7501 的终端会直接忽略它——目前 Ghostty 的 GUI
347
+ 只显示 OSC 9;4 进度条、不显示 7501 语义状态,这是预期行为,不代表上报失败。
348
+ 在 tmux 等终端复用器里,未知 OSC 可能不会被转发到外层终端(本功能有意不实现
349
+ tmux 的 DCS passthrough,也不修改复用器设置);需要跨复用器保留状态时请直接
350
+ 使用支持它的外层终端。此外,OSC 7501 的语义状态只作用于当前 Main Agent。
351
+
352
+ 本项目的 Remote(实验性、自有 Host 组合)同样上报这套状态:Host 侧由本扩展自带的
353
+ 私有状态流提供,并与 Direct 共用同一份区间判定。**未安装本项目 Host 扩展的第三方
354
+ DSH Host 不支持**这套上报(它没有对应的事件源)。
355
+
272
356
  其他插件注册到 `ctx.commands` 的 Slash Command 也会被自动发现。
273
357
 
274
358
  ### Footer 自定义
@@ -315,8 +399,8 @@ TUI 使用 DSH 提供的模型和设置服务。
315
399
  | `Ctrl+V` | 粘贴图片 |
316
400
  | `Tab` | 补全斜杠命令与文件路径 |
317
401
  | `@` | 文件补全 |
318
- | `!` | 进入 Shell 模式 |
319
- | `!!` | 进入 Local-only Shell 模式 |
402
+ | `!` | 进入 Shell 模式(结果进 Session) |
403
+ | `!!` | 进入 Session 排除的 Shell 模式 |
320
404
 
321
405
  完整按键和命令以 TUI 中的 `/help` 为准。表中的快捷键是默认值;用户自定义后,以 `/help` 和 `/keybindings` 显示的生效键位为准。
322
406
 
@@ -551,8 +635,8 @@ dsh --profile pi-tui-dev
551
635
  ### npm 模式(当前 `next`)
552
636
 
553
637
  当前兼容列车线是 npm 模式:以本 checkout 的 `package.json` 声明、
554
- lockfile 解析的已发布 `dsh-v0.2.0-rc.1` family 为精确验证目标(运行时
555
- peer floor 保持 `>=0.1.7-rc.2`)。隔离的 npm
638
+ lockfile 解析的已发布 `dsh-v0.2.0-rc.2` family 为精确验证目标(运行时
639
+ peer floor 同为 `>=0.2.0-rc.2`)。隔离的 npm
556
640
  驱动从公共 registry 安装该精确 family,并跑完整 build/test/package 路径:
557
641
 
558
642
  ```sh
package/cordis.patch.yml CHANGED
@@ -24,6 +24,18 @@
24
24
  name: '@xmoon76/dsh-pi-tui/builtins'
25
25
  inject: [tuiStartup, piTuiExtensions]
26
26
 
27
+ # The bundle's OWN Host performance projection (plan PR-1): the single
28
+ # authority for the R5 / All model-request output rate and the recent TTFB.
29
+ # It registers the `piTuiPerformance` unit on the official
30
+ # `sessionProjections` seam — the same seam the official `sessionStats` row
31
+ # uses — and then publishes the `piTuiPerformanceReady` gate. Gating on
32
+ # `tuiStartup` keeps `--help` from mounting it; the `sessionProjections`
33
+ # inject makes the row wait for the Host registry instead of registering
34
+ # into a missing seam.
35
+ - id: pi-tui-performance-host
36
+ name: '@xmoon76/dsh-pi-tui/performance-host'
37
+ inject: [tuiStartup, sessionProjections]
38
+
27
39
  - id: tui-app
28
40
  name: '@xmoon76/dsh-pi-tui'
29
41
  # `workspaceRegistry` is injected, not merely looked up: D2.4 Direct fork
@@ -36,7 +48,11 @@
36
48
  # dsh-base layer already mounts it (disabled only without a profile),
37
49
  # so this is an explicit lifecycle ordering dependency, never a second
38
50
  # package-manager row.
39
- inject: [tuiStartup, piTuiExtensions, authorization, workspaceRegistry, pluginManager, jobController]
51
+ # `piTuiPerformanceReady` is the bundle's own Host projection gate: the
52
+ # surface must not mount without its performance authority, so a profile
53
+ # that disables the `pi-tui-performance-host` row fails loudly here
54
+ # instead of silently falling back to a Client-side estimate.
55
+ inject: [tuiStartup, piTuiExtensions, authorization, workspaceRegistry, pluginManager, jobController, piTuiPerformanceReady]
40
56
  config:
41
57
  sessionId: ''
42
58
 
@@ -64,6 +80,19 @@
64
80
  - id: workspace
65
81
  name: '@deepseek-ai/dsh-workspace'
66
82
 
83
+ # The OFFICIAL Host `@`-file reference authority (M3-3A): this row is
84
+ # the same one the official web bundle mounts. It provides
85
+ # `ctx.fileReferences` (the discovery service the Session Controller's
86
+ # `fileReferences/list` Remote already forwards to) AND installs the
87
+ # official per-agent `context:file-reference` system prompt — the model
88
+ # guidance that relative `@` paths resolve from the workspace root.
89
+ # Mounting it aligns the TUI's `@`-mention semantics with the official
90
+ # client contract: the selected mention text goes to the prompt
91
+ # LITERALLY (`@src/foo.ts`), and the Host/model resolves it; the TUI's
92
+ # historical send-time absolute-path rewrite is retired with it.
93
+ - id: file-reference-local
94
+ name: '@deepseek-ai/dsh-file-reference-local'
95
+
67
96
  # The authorization seam (`ctx.authorization`): plugin-owned credential-
68
97
  # obtaining flows, one attempt per key, transport-neutral notices and
69
98
  # prompts. The dsh host does NOT mount it anywhere (the base layer ships
package/dist/builtins.mjs CHANGED
@@ -1,21 +1,17 @@
1
- import { n as TUI_STARTUP_SERVICE } from "./startup-DM-xxzcX.mjs";
2
- import { i as PI_TUI_EXTENSIONS_SERVICE } from "./extensions-Dg1qhjUi.mjs";
3
- import { n as dshVersion } from "./dsh-version-V0exEv9O.mjs";
4
- import { readFileSync } from "node:fs";
5
- import { join } from "node:path";
1
+ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
+ import { n as TUI_STARTUP_SERVICE } from "./startup-CWQl0-0n.mjs";
3
+ import { n as dshVersion, t as bundleVersion } from "./version-a-eF-QER.mjs";
4
+ import { a as PI_TUI_EXTENSIONS_SERVICE } from "./extensions-VuoIE_Jc.mjs";
6
5
  //#region src/builtins.ts
6
+ var builtins_exports = /* @__PURE__ */ __exportAll({
7
+ apply: () => apply,
8
+ inject: () => inject,
9
+ name: () => name
10
+ });
7
11
  /** Stable Cordis plugin name for the builtins row. */
8
12
  const name = "pi-tui-builtins";
9
13
  /** The builtins mount only when the TUI startup flags were parsed. */
10
14
  const inject = [TUI_STARTUP_SERVICE, PI_TUI_EXTENSIONS_SERVICE];
11
- /** The `@xmoon76/dsh-pi-tui` package version (dist/extensions.mjs → ../package.json). */
12
- function packageVersion() {
13
- try {
14
- return JSON.parse(readFileSync(join(import.meta.dirname, "..", "package.json"), "utf8")).version ?? "0.0.0";
15
- } catch {
16
- return "0.0.0";
17
- }
18
- }
19
15
  /**
20
16
  * Register the first-party chrome contributions. The turn/step footer
21
17
  * segment subscribes to the surface state and re-bakes via handle.replace
@@ -34,7 +30,7 @@ function apply(ctx) {
34
30
  order: 1e3,
35
31
  description: "The dsh and bundle versions (first-party builtin)."
36
32
  }, {
37
- text: installedDsh === void 0 ? `tui-v${packageVersion()}` : `dsh-${installedDsh} · tui-v${packageVersion()}`,
33
+ text: installedDsh === void 0 ? `tui-v${bundleVersion()}` : `dsh-${installedDsh} · tui-v${bundleVersion()}`,
38
34
  tone: "info"
39
35
  });
40
36
  const todoDock = service.register("input.dock.item", {
@@ -43,7 +39,7 @@ function apply(ctx) {
43
39
  description: "The todo summary line (first-party builtin)."
44
40
  }, { label: [] });
45
41
  const renderTodoDock = (state) => {
46
- const summary = state.activity.todoSummary;
42
+ const summary = state.session.displaySubject === void 0 ? state.activity.todoSummary : state.session.displaySubject.todoSummary;
47
43
  if (summary === void 0 || summary === "") {
48
44
  todoDock.replace({ label: [] });
49
45
  return;
@@ -62,4 +58,4 @@ function apply(ctx) {
62
58
  });
63
59
  }
64
60
  //#endregion
65
- export { apply, inject, name };
61
+ export { apply, inject, name, builtins_exports as t };