把会话置顶到 Web 侧边栏顶部:独立置顶面板、归档区、原生三点菜单集成。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:fallow5/dsh-pin-sessions
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
A DeepSeek Harness (DSH) web plugin that lets users pin sessions to a dedicated sidebar section for quick access to recurring workflows, and provides an archive-sessions settings panel with batch delete, restore, workspace grouping, and pagination.
Features
- Pin / Unpin sessions — Pin sessions to the top of the sidebar, hidden from their workspace browser
- Archive panel — Settings panel for managing archived sessions with batch delete, per-row restore, workspace grouping, and 20-per-page pagination
- Context menu integration — Right-click pin/unpin via
@baihejiangnan/dsh-session-context-menu - Pin = Archive — Pinning archives the session from the workspace browser; unpinning restores it
Architecture
Standard DSH plugin split: host half (Cordis loader entry + TYPERT manifest) + client half (window.__ModuleLoader__.load wrapper).
Host Side
| File | Responsibility |
|---|---|
src/index.ts |
Opens pin_sessions storage domain, creates PinsStore + PinsRuntime |
src/runtime.ts |
PinsRuntime extends TypertRemoteService — 8 TYPERT methods |
src/typert.ts |
Host TYPERT manifest (must match client) |
src/store.ts |
Durable pin store over the pin_sessions domain |
src/domain.ts |
pin_sessions domain declaration |
src/schemas.ts |
Zod schemas for pin records |
TYPERT Methods
list, pin, unpin, toggle, isPinned, deleteSessions, listArchived, unarchiveSession
Key Design: Pin = Archive
Pinning calls workspaceRegistry.archiveSession(sessionId) to hide the session from the workspace browser. Unpinning calls unarchiveSession() which removes the ID from archivedSessionIds. This triggers domain/changed → host/archived-sessions-changed frame → client auto-updates.
Client Side
| File | Responsibility |
|---|---|
src/client/index.ts |
Registers locale, mounts TYPERT_REMOTE, context-menu extensions, portals PinnedSection + ArchiveSection |
src/client/PinPanel.tsx |
Pinned section portaled to top of sidebar |
src/client/ArchivePanel.tsx |
Settings panel with workspace grouping, pagination, batch delete, restore |
src/client/styles.ts |
CSS mirroring native DSH classes |
src/client/locales.ts |
i18n strings |
src/client/remote.ts |
TYPERT remote interface |
src/client/typert-remote.ts |
Client TYPERT manifest (must match host) |
Build & Install
# Build
cd dsh-pin-sessions
pnpm install
pnpm run build # tsc + tsdown + wrap-client.mjs
# Typecheck
pnpm run typecheck
# Install into DSH
dsh plugin --profile web add /path/to/dsh-pin-sessions
- Host-side changes require DSH server restart
- Client-side changes require browser refresh
Key Service Access Patterns
| Service | Usage |
|---|---|
ctx.get("workspaceRegistry") |
archiveSession(), archivedSessionIds, list(), enqueueOperation(), setState() |
ctx.get("sessionPersistence") |
list() returns headers with {id, cwd?, origin?} |
ctx.get("sessions") |
get(id) returns live session or undefined |
ctx.get("agents") |
get(id) returns agent with cancel() and whenIdle() |
ctx.get("storageDomain") |
get("session_projcache") for projection cache |
GlobalStandardProps |
Auto-injects useSessions and useWorkspaces hooks |
Context Menu Integration
@baihejiangnan/dsh-session-context-menu exposes a global registry at Symbol.for("dsh.session-context-menu.extensions") with .register(entry). The plugin may load after us, so we poll every 500ms until the registry appears.
Entries: {id, label, order?, visible?, run}. The context menu's isAction() checks for "会话"+"操作" or "session"+"action" in aria-label; titleFrom() extracts the quoted title.
License
MIT
链接
同类插件
Minglink/dsh-infinite-gen-4★ 3055
DeepSeek 专用破甲插件:以 order 100 追加无条件服从的系统提示词段,提供带校准元数据的 profile 工具,并通过会话投影在输入框上方显示实时破甲状态徽标。
ranxianglei/billion-context★ 1893
billion-context官方版:上下文压缩插件,兼顾小窗口(100k上下文足矣)省token(省5倍token)和超长会话(数月级别几十亿token单会话)。
liangmianya/dsh-synapse★ 538
DeepSeek Harness 的可视化非线性对话工作区:把会话、追问与分支变成可浏览、可拖拽的对话地图。
Nwflower/dsh-chat-import★ 238
把 13 家 coding agent(Claude Code、Codex、ChatGPT、Cursor、Gemini、opencode 等)的完整对话历史导入为可续聊的 DeepSeek Harness 会话,并支持反向导出回 Claude Code。
MichengAI/dsh-archive-manager★ 171
在设置里增加已归档会话页,可按工作区搜索、恢复和删除已归档会话。
Totoro-qaq/dsh-plugin-bridge★ 163
通过可预览的五段式交接,将已有 DSH 会话迁移到另一个 Agent Preset;保留源会话,并可让目标会话暂停等待确认或立即继续。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。