dsh-client-ui-quickfill
Terminal-style prompt history & fast completion for the DSH web composer.
Brings the scrollback of a shell to your AI input: recall past prompts,
search them instantly, and fill them with a keystroke.
- Recall —
Alt+↑/Alt+↓ cycle prompt history (even on multiline drafts);
bare ↑/↓ works on single-line drafts. The first ↑ applies zsh's
up-line-or-search: if the draft is a prefix of some entry, jump to the
newest matching one and keep stepping within that prefix only.
- Search —
Ctrl+R (or Cmd+R) opens a fuzzy history-search picker:
typing narrows (subsequence match), ↑/↓ selects, Ctrl+R again jumps to
the next match (reverse-i-search), Enter fills, Esc closes.
- Complete — while typing, the newest entry that starts with the draft is
shown as a gray ghost right after the caret (fish-style autosuggestion);
Tab or → at the end accepts it as an ordinary, undoable draft write.
- Protect — your partially typed draft and caret are restored exactly when
you cycle back to newest (or press
Esc). Consecutive duplicates are
collapsed, empty prompts are never recorded, and IME composition
(Chinese pinyin) passes every key through untouched.
- Optional cross-session pool — an opt-in global history (
localStorage)
extends search, prefix recall and the ghost to prompts from every session,
like zsh's SHARE_HISTORY. Off by default for privacy.
Requirements
- DSH web profile (
dsh --profile web), version 0.1.0-rc.8 line.
- pnpm (
npm install -g pnpm) for dsh plugin management.
Install (community users)
dsh plugin --profile web add dsh-client-ui-quickfill
Then add the bundle to the profile's composite package list
(~/.dsh/profiles/web/package.json):
"dependencies": {
"dsh-client-ui-quickfill": "^0.1.0"
}
Restart the dsh web service — the node side scans bundles at startup,
applies their cordis.patch.yml and bakes the client into the
window.__DSH_BOOT__ boot graph; only a restart activates a new bundle.
The plugin is a self-registering bundle: its patch layer inserts the
ui-quickfill browser roster row automatically. No hand-written
cordis.patch.yml is needed.
Build & test (contributors)
npm install # link peer dependencies
npm test # smoke tests: derivation, matching, prefix walk, ghost, pool
npm pack # inspect the published file set
To test against a live instance, point a web-test profile at this directory:
"dependencies": {
"dsh-client-ui-quickfill": "file:../../dsh-client-ui-quickfill"
}
or symlink it into ~/.dsh/profiles/node_modules and restart.
Data storage (browser-local only, no server)
| localStorage key | Contents |
|---|
dsh-quickfill.global-history | Cross-session prompt pool (globally unique, capped at 500, newest last) |
dsh-quickfill.settings | Toggles (global) |
- The global pool is off by default (privacy: prompts may be sensitive).
It stays in this browser and never leaves the device; session data already
lives in
~/.dsh on disk, so this is a same-trust-domain local cache.
- Enabling it merges the current session's whole history in once, then new
prompts append automatically; session entries always rank first.
- Clear: DevTools → Application → Local Storage → delete the keys.
Known limitations
Cmd+R on macOS doubles as the browser reload shortcut and interception is
not always reliable; Windows/Linux are unaffected.
- History comes from the loaded conversation snapshot;
loadOlder pages load
in on demand.
Ctrl+R is swallowed while a slash command is claimed or a send is in
flight (draft protection); press Esc first, then search.
- Ghost layer mirrors the composer's computed font metrics; unusual theme
font overrides can drift the glow 1–2px. Multiline drafts and empty drafts
disable the ghost intentionally.
- Split composers: textarea lookup is scope-locked to the seat's conversation
(
[data-conversation-scroll]), so split layouts should work — not yet
exercised in a split layout.
License
MIT — see LICENSE.
中文说明
见 README.zh-CN.md。