DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-plugin-composer-history

D

dsh-plugin-composer-history

Manifest valid★ 1

Shell-style prompt history for the DeepSeek Harness composer: ArrowUp walks back through the messages you already sent, ArrowDown walks forward and restores your draft.

UI (client)hasBundlePatch

dsh-plugin-composer-history

npm license dsh

在输入框中按 ↑ / ↓ 逐条回溯本会话已发送的消息,并回填为草稿。


效果

输入框为空时按 ↑ 从最近一条开始向前回溯,↓ 向前返回。回溯时右下角显示位置:

3/19        ← 当前第 3 条(由新到旧),共 19 条

↑  然后再开发一个插件 就是在输入框按上下键 能按顺序回填之前发过的消息
↑  换
↓  换
↓  (恢复原草稿)

越过最新一条后,恢复开始回溯前的草稿。手动编辑即退出回溯。


安装

市场索引

https://raw.githubusercontent.com/Dogtiti/dsh-plugin-composer-predict/main/market-index.json

设置 → 插件 → 启用实验性市场 bundle → Discover → 添加上面的地址 → 安装 dsh-plugin-composer-history。

npm

npm i dsh-plugin-composer-history

在 Plugins 页用「添加」填写包名。

本地目录

git clone https://github.com/Dogtiti/dsh-plugin-composer-history

Plugins → 添加 → 选择该目录。


行为

按键行为
↑输入框为空时开始回溯,从最近一条向前;到达最旧一条后停止
↓向前返回;越过最新一条时恢复原草稿

不接管的情况:

条件行为
输入框已有内容或附件↑ 保留给编辑器的光标与选区移动
焦点不在该输入框不处理
带 Alt / Ctrl / Cmd / Shift不处理
/ 或 @ 菜单已认领输入方向键归菜单

配置

- insert:
    - id: composer-history
      name: 'dsh-plugin-composer-history'
      config:
        limit: 50
键默认说明
enabledtrue总开关;关闭后路由返回 503,客户端不接管按键
limit200保留的历史条数(取最近)
maxChars2000单条消息最大字符数(保留头尾)
cacheTtlMs30000相同会话事件序号下的缓存时间

实现

┌──────────────── 浏览器 ────────────────┐        ┌───────────── Host ─────────────┐
│ conversation.composer.dock             │        │ POST /api/composer.history     │
│  · 捕获阶段拦截 ↑ / ↓                    │  HTTP  │  · sessions.get(id)            │
│  · 状态机:index = -1 表示未回溯          │ ─────► │  · session.deriveMessages()    │
│  · setDraft(items[index])               │ ◄───── │  · 按 source kind 过滤          │
│  · 位置计数,编辑后退出                    │  JSON  │  · 按 seq 缓存 30s             │
└────────────────────────────────────────┘        └────────────────────────────────┘

历史来自会话日志。Host 侧仅保留 role: user 且 source.kind === 'user' 的文本,其余按来源排除:

{ "kind": "user" }             // 用户输入,计入历史
{ "kind": "runtime-context" }  // 运行时上下文快照,排除
{ "kind": "skill-catalog" }    // 技能目录,排除
{ "kind": "time-context" }     // 时间戳提示,排除
{ "kind": "user-approval" }    // 审批策略通知,排除

相邻重复消息合并为一条。结果按会话事件序号缓存 30 秒。

回填使用 inputActions.setDraft(),与手动输入共用同一条草稿链路(可撤销、按会话持久化),不直接操作 DOM。


兼容性

  • DSH ^0.2.1-0(engines.dsh)。
  • 依赖公开的 inputActions.setDraft()。

开发

node --test "test/*.test.mjs"

11 项:提取顺序、注入内容过滤、相邻去重、数量与长度限制、缓存失效、开关、槽位注册形状、计数渲染、缺少 hooks 时不渲染。


相关插件

插件说明
dsh-plugin-composer-predict预测下一条指令并显示为占位文字,Tab 采纳
dsh-plugin-composer-history(本仓库)输入框中按 ↑ / ↓ 回填历史消息
dsh-plugin-subagent-bridge让 Codex 通过本机 MCP 把 DSH 当 subagent 用(spawn / wait / followup),反向也能把任务派给 Codex

许可

MIT © Dogtiti

Comments

Loading…

From the same category

awesome-dsh-plugin

by awesome-dsh-plugin

A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表

Development & Infrastructure

★ 20.2k

CC0-1.0

Python

Oct 23, 2026

Index only — not installable

by 0xsline

DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.

Development & Infrastructure

★ 1.2k

CC0-1.0

Python

Oct 16, 2026

Index only — not installable

by pax-beehive

Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub

Development & Infrastructure

★ 277

MIT

TypeScript

Oct 20, 2026

Index only — not installable

by xiajiajun516

DeepSeek Harness (DSH) backup & restore plugin — export, import, migrate and sync your complete DSH configuration, plugins, MCP servers, skills and workspace. One-click migration to another machine.

Development & InfrastructureManifest valid

★ 227

MIT

TypeScript

Oct 22, 2026

dsh plugin --profile web add dsh-config-manager

by yjh051108

推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。

Development & InfrastructureManifest valid

★ 166

TypeScript

Oct 16, 2026

dsh plugin --profile web add @dsh-external/dsh-super-injector

by jigjoy-ai

A CLI that turns a goal into a pull request - and a sandbox for testing concurrent AI coding agents on the Mozaik runtime.

Development & Infrastructure

★ 125

MIT

TypeScript

Oct 22, 2026

Index only — not installable