@aiwayds/dsh-tui-pi 2.6.0 → 2.7.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.md +31 -6
- package/README.zh-CN.md +31 -6
- package/lib/history-fork.d.ts +83 -0
- package/lib/history-fork.js +182 -0
- package/lib/history-fork.js.map +1 -0
- package/lib/history-turns.d.ts +14 -0
- package/lib/history-turns.js +16 -0
- package/lib/history-turns.js.map +1 -1
- package/lib/history.d.ts +47 -2
- package/lib/history.js +102 -14
- package/lib/history.js.map +1 -1
- package/lib/hotkeys.d.ts +1 -1
- package/lib/hotkeys.js +2 -3
- package/lib/hotkeys.js.map +1 -1
- package/lib/index.js +182 -50
- package/lib/index.js.map +1 -1
- package/lib/keymap.d.ts +0 -5
- package/lib/keymap.js +3 -8
- package/lib/keymap.js.map +1 -1
- package/lib/panels.d.ts +9 -0
- package/lib/panels.js +11 -0
- package/lib/panels.js.map +1 -1
- package/lib/preset-dialog.d.ts +152 -0
- package/lib/preset-dialog.js +254 -0
- package/lib/preset-dialog.js.map +1 -0
- package/lib/preset.d.ts +16 -9
- package/lib/preset.js +18 -11
- package/lib/preset.js.map +1 -1
- package/lib/session.d.ts +41 -0
- package/lib/session.js +83 -25
- package/lib/session.js.map +1 -1
- package/lib/tui.js +1 -1
- package/lib/tui.js.map +1 -1
- package/package.json +2 -2
- package/scripts/smoke-boot.mjs +30 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiwayds/dsh-tui-pi",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "pi-style terminal UI for DeepSeek Harness (dsh) —
|
|
3
|
+
"version": "2.7.1",
|
|
4
|
+
"description": "A fully-featured pi-style terminal UI for DeepSeek Harness (dsh) — history look-back & fork-at-turn, guided preset switching, live subagent steering, model profiles & themes",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/fan56/dsh-tui-pi.git"
|
package/scripts/smoke-boot.mjs
CHANGED
|
@@ -17,13 +17,17 @@
|
|
|
17
17
|
// loader error (a healthy boot is silent and survives to the kill
|
|
18
18
|
// signal; a broken plugin dies within ~1s with the loader error), and
|
|
19
19
|
// the seeded record must come out backfilled + backed up
|
|
20
|
+
// 7. `dsh plugin --profile smoke remove` must reconcile the profile back
|
|
21
|
+
// to stock: the bundles entry spliced and the patch layer dropped —
|
|
22
|
+
// the post-removal dump shows no tui-pi entries and the stock
|
|
23
|
+
// projection-cache row re-enabled
|
|
20
24
|
//
|
|
21
25
|
// The boot runs piped (no TTY). Verified empirically: the TUI plugin's
|
|
22
26
|
// apply() tolerates a non-terminal (pi-tui guards raw mode), so the piped
|
|
23
27
|
// boot is a valid load proof without dragging a pty shim into CI.
|
|
24
28
|
//
|
|
25
|
-
// Exit 0 = mounted and
|
|
26
|
-
// removed on success.
|
|
29
|
+
// Exit 0 = mounted, boots and removes clean. Temp dir is kept and printed on
|
|
30
|
+
// failure, removed on success.
|
|
27
31
|
|
|
28
32
|
import { spawnSync } from 'node:child_process'
|
|
29
33
|
import { mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs'
|
|
@@ -163,5 +167,28 @@ if (migrated.identity?.isSeeded !== false || migrated.identity?.inheritedEventCo
|
|
|
163
167
|
fail('the seeded legacy record survived the boot without being backfilled', JSON.stringify(migrated.identity))
|
|
164
168
|
}
|
|
165
169
|
|
|
166
|
-
|
|
170
|
+
// Phase 4 — uninstall proof: `dsh plugin remove` must reconcile the profile
|
|
171
|
+
// back to stock — the bundles entry spliced and every patch effect gone (the
|
|
172
|
+
// stock projection-cache row re-enabled, the wrapper and tool inserts
|
|
173
|
+
// dropped).
|
|
174
|
+
const remove = spawnSync('dsh', ['plugin', '--profile', 'smoke', 'remove', ownName], { cwd: profile, encoding: 'utf8', env: dshEnv })
|
|
175
|
+
if (remove.status !== 0 || remove.error) fail('dsh plugin remove failed', `${remove.stdout}\n${remove.stderr}`)
|
|
176
|
+
const dumpAfter = spawnSync('dsh', ['--profile', 'smoke', '--dump-config'], { cwd: profile, encoding: 'utf8', env: dshEnv })
|
|
177
|
+
if (dumpAfter.status !== 0 || dumpAfter.error) fail('dsh --dump-config failed after removal', `${dumpAfter.stdout}\n${dumpAfter.stderr}`)
|
|
178
|
+
if (dumpAfter.stdout.includes('tui-pi')) {
|
|
179
|
+
fail('the composed tree still contains tui-pi entries after removal (bundles entry not spliced / patch layer not dropped)', dumpAfter.stdout)
|
|
180
|
+
}
|
|
181
|
+
// The stock row must still be composed (it comes from dsh-base) but enabled
|
|
182
|
+
// again — `disabled: true` may not appear anywhere inside its own entry
|
|
183
|
+
// block (the row carries indented config fields, so the check is scoped to
|
|
184
|
+
// the block ending at the next top-level entry).
|
|
185
|
+
const stockRowAfter = /- id: session-projection-cache[\s\S]*?(?=\n- id:|\n#|$)/.exec(dumpAfter.stdout)?.[0] ?? ''
|
|
186
|
+
if (!stockRowAfter) {
|
|
187
|
+
fail('the stock session-projection-cache row vanished from the composed tree after removal', dumpAfter.stdout)
|
|
188
|
+
}
|
|
189
|
+
if (stockRowAfter.includes('disabled: true')) {
|
|
190
|
+
fail('the stock session-projection-cache row is still disabled after removal', stockRowAfter)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
console.log(`smoke-boot: PASS — ${ownName} composed into the scratch profile tree and booted clean in real dsh (${survived ? `survived the ${bootSeconds}s boot window` : `exited ${boot.status}`}); the seeded legacy projection-cache record was migrated with a backup; removal restored the stock tree`)
|
|
167
194
|
rmSync(work, { recursive: true, force: true })
|