Back to home@makechange

dsh-session-note

No description

Stars
0
Language
TypeScript
Created
Aug 22, 2026
Updated
Aug 22, 2026
GitHub repo

Introduction

dsh-session-note

给 DeepSeek Harness 用的入门插件:当前会话右下角一块便签,按 sessionId 存在 Host 上,刷新还在。

这不是侧栏。它只走官方 slot shell.overlay,外加一条自己的 HTTP 路由。

它教你什么

  1. package.json 里的 dsh.bundle + dsh.client
  2. cordis.patch.yml 往组合里 insert 一行
  3. Host apply(ctx) 注册 /session-note/api
  4. Client apply(ctx)shell.overlay 塞 UI
  5. dsh plugin --profile web add 装进 profile,而不是会话里动态批准

文件

文件干什么
package.json包名、dsh.bundledsh.clientexports["./client"]
cordis.patch.yml安装后插入插件行 id: session-note
src/index.tsHost:读写 $DSH_HOME/storages/session-notes.json
src/client/index.tsxClient:右下角卡片,fetch 调 Host
tsdown.config.tsNode ESM + 浏览器 lazy-CJS(__ModuleLoader__ 握手)

安装

别人不需要 git clone。有 DSH 之后执行:

dsh plugin --profile web add github:makechange/dsh-session-note

pnpm 10 及以上第一次可能会拒绝跑 git 依赖的 prepare。把下面写进 ~/.dsh/profiles/web/pnpm-workspace.yaml,再执行一次同样的 add

allowBuilds:
  dsh-session-note: true

然后重启 dsh web。打开一个会话,右下角应出现「会话便签」。拖标题栏可以挪开;点 × 会收成「便签」小按钮,再点小按钮展开。位置和收起状态记在浏览器里,刷新还在。保存后看:

  • ~/.dsh/profiles/web/package.jsondsh.profile.bundles 多了 dsh-session-note
  • ~/.dsh/storages/session-notes.json 有对应 sessionId

更新:

dsh plugin --profile web update dsh-session-note

卸载:

dsh plugin --profile web remove dsh-session-note

本地改源码(你自己开发)仍然可以链本地目录:

pnpm install
pnpm build
dsh plugin --profile web add /path/to/dsh-session-note

刻意没做的

  • 不 portal、不挤开对话区
  • 不包装 workspaces.openPath
  • 不给模型注册 tool(下一步可以加 note_set / note_get