All plugins

DSH / BUNDLE / CLIENT-UI

@huanlin/dsh-plugin-input-history

v0.3.1HuanLinOTO / dsh-plugin-input-history0d12ae64f5

InstallableBundlesUI & client pluginsCommunity · Topic auto-analysisWeb UI

Overview

@huanlin/dsh-plugin-input-history

在 DSH prompt 输入框按上/下方向键切换最近发送过的消息(终端式历史导航),跨会话持久化。 | Terminal-style prompt history navigation for the DSH composer: ArrowUp/ArrowDown cycles through recently sent messages, persisted across sessions.

README / EN

Package documentation

Registry summary

在 DSH prompt 输入框按上/下方向键切换最近发送过的消息(终端式历史导航),跨会话持久化。 | Terminal-style prompt history navigation for the DSH composer: ArrowUp/ArrowDown cycles through recently sent messages, persisted across sessions.

dsh.pub verifies the pinned bundle contract, runtime facts, and distribution semantics. The complete README remains in the source repository.

Read the full README on GitHub

LIMITATIONS

Known limitations

- **Capacity 硬编码。** 历史上限固定为 500 条(`DEFAULT_CAPACITY` in `src/client/history.ts`)。改为 `Config` 字段需要 host-client 间 RPC 通道(client bundle 与 host bundle 是独立的模块作用域,无法直接共享 Config)。如需调整,编辑源码后重建 `lib/`。 - **DOM 标记是上游内部属性。** 插件通过 `[data-composer-card]` / `[data-composer-input]` / `[data-trigger-menu]` 定位 composer 卡片、Lexical editable 与触发菜单。这些属性是 `ui-conversation` / `ui-input-trigger` 包的内部实现,目前稳定但无文档保证;上游若改名,定位器需要更新(单点:`src/client/dom.ts`)。 - **hero / blank session 下休眠。** DSH 把 blank session 当作 hero 渲染,`conversation.composer.dock` 不挂载,插件的收集与监听都随 dock 休眠。且 hero 模式本就没有当前 session 的 input machine(`inputActions` 不存在),导航无处落地。会话激活后(发出第一条消息)恢复正常。 - **含 chip 的草稿按纯文本恢复。** 导航保存的"在途草稿"是 `input.draft`(clipboard 投影):恢复时引用 chip 会变回 `/name` 纯文本形式。历史条目本身也始终是纯文本。 - **无跨 tab 同步。** 多窗口同时发消息时 localStorage 写竞争通过 try/catch 容错;最坏丢一条,下次 append 会纠正。 - **历史范围全局共享。** 不区分 workspace / session,所有 `user` + `steering` 消息进同一历史。如需按 workspace 隔离,需要扩展 `HistoryStore` 的 key 命名空间。