Repository navigation
Releases
Releases · liumorrisclaw/dsh-composer-input-history
v0.1.2 — keyboard inside a session, three-state ArrowDown ladder
dsh-composer-input-history 0.1.2
Shell-style input history for the DeepSeek Harness Web composer. This release hardens browse mode, restores it inside a live Session, and makes walking down always able to clear the composer.
Fixed
- The keyboard now works inside a running session. The dock entry declares the
uiSessionservice it reads the Session id from; an undeclared scoped-context access used to throw inside the component on every render, so the entry never committed and ↑/↓ stayed dead even in a session.
Changed
- Walking down past the newest message now has three stops: the remembered draft comes back first, and one more ↓ discards it and clears the composer — a paste you changed your mind about can be dropped from the keyboard. An empty starting draft still ends at a blank composer directly, and ↑ after a discard restarts the ladder at the newest message.
- The refill counter-punch (which re-asserts a restored draft when the host re-seeds a stale one) now only yields to genuine text editing — typing, deleting, pasting — not to arrow keys, so rapid up/down walks keep the restored text intact.
- Every handled key re-arms the refill defense for the text it just published, registered before the draft lands: the host re-renders during
setDraft, and the counter must defend the newest publish, not an older restore. - Per-Session history now also persists to
localStorage(capped at 300 entries) and merges with the live Chat store, so messages a compaction pruned stay recallable, including after a restart. - The shipped package turns diagnostics off; set
window.__DSH_INPUT_HISTORY_DEBUG = truebefore the bundle loads to re-enable the status badge.
Tests
- 48 tests (was 27): 40 unit tests over the reader, the navigator, and keystroke arbitration, plus 6 simulated-composer integration tests that mount the real bundle against a stub React host and stub DOM — whole-draft publish, the stale-draft refill and its counter-punch, compaction pruning merged with the persistent record, manual edits, menu yields, and IME declines.
- Verified end-to-end in a real harness Web instance driven over the DevTools protocol: the dock entry mounts in a session composer, ↑ recalls the sent message, walking down lands on the draft and a further ↓ clears it, a typed draft survives rapid up/down walks, and the console stays clean.
Install
dsh plugin --profile web add https://github.com/liumorrisclaw/dsh-composer-input-historyDeveloped and verified against @deepseek-ai/dsh 0.2.0-rc.2.
v0.1.1
dsh-composer-input-history 0.1.1
Fixes the reader bug that made ↑ do nothing in a running composer. 0.1.0 read the Session Chat snapshot's legacy.nodes, which is the token/step usage projection, so it never found message text. 0.1.1 reads the node store the view itself renders (snapshot.nodes, ordered by anchor sequence).
- ↑ recalls the messages already sent in this Session, newest first.
- ↓ walks forward again and, past the newest message, restores the draft that was being written.
- Recall works from an empty draft, a single-line draft, or a caret on the first line.
- Hidden nodes (compacted or interrupted), attachment-only messages, and injected context are skipped.
- The key is watched on a document-level listener and on the shortcuts fixed-input seam; an open slash/reference menu, IME composition, held modifiers, other editable surfaces, and locked composer phases all keep the key.
- 26 unit tests over the history reader and the browse state machine.
Install:
dsh plugin --profile web add https://github.com/liumorrisclaw/dsh-composer-input-historydsh-composer-input-history 0.1.1(中文)
修掉了一个让 ↑ 在运行中的应用里毫无反应的读取 bug。0.1.0 读的是 Chat 快照的 legacy.nodes——那是 token/步骤统计投影,所以永远找不到消息文本。0.1.1 改为读取界面自身渲染用的节点存储(snapshot.nodes,按 anchor 序号排序)。
- ↑ 调回本会话已发送的消息,从最新一条开始。
- ↓ 向后翻,翻过最新一条后恢复你原来正在写的草稿。
- 空草稿、单行草稿、光标在首行都能调回。
- 被隐藏的节点(压缩或中断)、纯附件消息、注入的上下文都会被跳过。
- 键盘走 document 监听与 shortcuts fixed-input 两条通道;斜杠/引用菜单、输入法组合、修饰键、其它可编辑区域、提交/裁决阶段都让开按键。
- 26 项单测覆盖历史读取与浏览状态机。