dshbase

Plugin directory / Developer / dsh-read-history

dsh-read-history

Verified · install-tested on dsh Slowdownnn

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

1Stars
0Forks
0Open issues
JavaScriptLanguage
2026-08-15Last push
Cross-platformPlatform

What it does

Migrate claude/codex conversation history to dsh

✅
Our take
Works — verified, early-stage project

Migrate claude/codex conversation history to dsh It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-read-history

把 Claude Code 与 Codex CLI 的历史对话导入 DeepSeek Harness (DSH): - **每个历史会话 → 一个原生 DSH 会话**:出现在左侧对应工作区的会话列表里(与现有会话并列), 点击即可查看完整历史(用户/助手消息、轮次结构、标题),就像它们本来就是 DSH 的会话。 - **入口在「设置」页**:新增「对话历史导入」设置区块(settings.section 插槽), 提供导入按钮、导入状态与已导入会话列表。

安装

从 npm 安装(发布后)

``sh

安装到 web profile(pnpm 通过 corepack 提供)

dsh plugin --profile web add dsh-read-history
`

本地开发 / 从源码安装

`sh

本地路径安装(用于开发调试)

dsh plugin --profile web add D:\code\dsh-read-history
` 安装后在 %USERPROFILE%\.dsh\profiles\web\cordis.patch.yml 注册: cordis.patch.yml: `yaml - insert: - id: read-history name: 'dsh-read-history' config: claudeRoot: '' # 默认 ~/.claude/projects codexRoot: '' # 默认 ~/.codex/sessions includeThinking: false autoImport: false # 不开启自动导入(幂等) ` > ⚠️ host 端代码(lib/index.js、lib/convert.js)改动需要**重启** dsh web; > client 端(lib/client.js)no-cache 实时服务,**刷新浏览器**即可。

使用方法(通过设置页导入)

安装并重启
dsh web 后,按下面的步骤导入历史会话: 1. **打开 DSH Web 界面**(默认 http://127.0.0.1:3080)。 2. 点击左侧边栏底部的 **「设置」** 图标,进入设置页。 3. 在设置页里找到 **「对话历史导入」** 区块(标题下方有说明文字)。 4. 点击 **「导入 Claude」** 或 **「导入 Codex」** 按钮,分别导入对应工具的历史会话: - 只导 Claude Code 的历史 → 点 **「导入 Claude」** - 只导 Codex CLI 的历史 → 点 **「导入 Codex」** - 两个按钮各自独立,导入期间按钮会显示「导入中…」并暂时禁用。 5. 等待导入完成,区块里会显示结果: - **成功卡片**:显示本次创建了多少个 DSH 会话(如「导入完成:创建 12 个 DSH 会话」)。 - **统计行**:上次导入时间、累计创建/跳过/失败会话数。 - **已创建的会话列表**:每个会话显示标题、所属工作区、轮次数与 DSH 会话 id。 6. 回到左侧边栏,**在对应的工作区下就能看到导入的会话**(与现有会话并列),点击即可查看完整历史(用户/助手消息、轮次结构、标题)。 > 提示: > - 导入是**幂等**的——同一个会话重复导入会自动跳过,不会产生重复。 > - 导入的会话会出现在与其原始工作目录(cwd)匹配的工作区里,而不是「未分组」。 > - 想同时清掉某次的导入?没有内置「撤销」,但可以直接删除对应工作区下的会话。

工作原理

1. **扫描解析**:读取
~/.claude/projects/**/*.jsonl、~/.codex/sessions/**/*.jsonl。 2. **转换为 DSH 会话**(lib/convert.js):每个历史会话先 sessions.prepare() 构造、直接写入持久化(sessionPersistence.create + append),**不进入实时 store**,因此不占内存、重启不会复活;标题以 session/title 事件写进日志; workspaceRegistry.create(cwd)(按 cwd 复用或新建工作区)+ attachSession() 挂到对应工作区, 因此每个历史会话都会出现在与其 cwd 相同的工作区里,而不是落到「未分组」。 幂等:按派生 id(session-<源会话id>)查重(一次 sessionPersistence.list() 缓存成集合,O(n) 而非逐行 O(n²)),重复导入自动跳过。 3. **内容清洗**(lib/parse.js):过滤 Claude/Codex 注入的噪声——斜杠命令(/clear、/compact 等)、 <command-name>/<local-command-*>/<bash-*>/<system-reminder>/<environment_context>/<instructions>/ AGENTS.md 与 Codex Desktop 审批脚手架(TRANSCRIPT DELTA、APPROVAL REQUEST 等),只保留真实的人机对话。

API(同源,设置面板调用)

| 方法 | 路径 | 说明 | |---|---|---| | GET |
/dsh-history/api/status | 状态(目录、上次导入时间、统计) | | POST | /dsh-history/api/import | 执行导入(幂等;body 可带 {"tool":"claude"|"codex"} 只导入单一来源) | | GET | /dsh-history/api/imported` | 累积已导入会话清单 |

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-read-history for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

Web profile:

dsh plugin --profile web add dsh-read-history

Headless (CLI) profile:

dsh plugin --profile headless add dsh-read-history

Package

npm: dsh-read-history · version — · tested on dsh 0.1.0-rc.6

Test report

Verified end-to-end: L1 install + L2 load + L3 runtime Q&A on dsh 0.1.0-rc.6.

When to use it

Extend the agent's coding surface — give it a new tool, workflow, or integration so it handles a dev task it couldn't before.

Who it's for

Developers who want dsh to behave like a teammate on real codebases — editing, running, and verifying changes rather than just answering.

For developers — extending it

The tool/command surface is the seam: expose more of the SDK, add smarter context wiring, or tighten the loop between code changes and verification.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7797 plugins →