dsh-archived-sessions
其他 活跃维护

dsh-archived-sessions

hashdiana/dsh-archived-sessions

在工具设置页新增归档会话入口,支持一键找回侧边栏自动隐藏的历史会话,无需手动翻找,轻量无冗余配置,安装后即可直接使用。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
79 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:hashdiana/dsh-archived-sessions
git clone https://github.com/hashdiana/dsh-archived-sessions.git
git clone git@github.com:hashdiana/dsh-archived-sessions.git
README.md main
# dsh-archived-sessions **An "Archived sessions" page in the DeepSeek Harness settings — reopen the sessions the sidebar hides.** [![GitHub stars](https://img.shields.io/github/stars/hashdiana/dsh-archived-sessions?style=flat-square&logo=github)](https://github.com/hashdiana/dsh-archived-sessions/stargazers) [![License: MIT](https://img.shields.io/github/license/hashdiana/dsh-archived-sessions?style=flat-square&color=4EAA25)](https://github.com/hashdiana/dsh-archived-sessions/blob/main/LICENSE) [![DSH Plugin](https://img.shields.io/badge/DSH%20Plugin-topic-3178C6?style=flat-square)](https://github.com/topics/dsh-plugin) 🌐 [中文](https://github.com/hashdiana/dsh-archived-sessions/blob/main/README_CN.md) · English

A DSH plugin adding an Archived sessions page to the Settings panel: it lists every session in the registry-global archive set (normally hidden from the sidebar grouping surfaces and search), and clicking a row reopens that session and closes the settings panel.

🎯 Archiving shouldn't be a one-way door — every archived session stays one click away.

Contents - [Why](#why) - [Install](#install) - [Develop](#develop) - [Architecture](#architecture) - [Verification matrix](#verification-matrix) - [License](#license)

Why

In DSH 0.1.0-rc.6 archiving is one-way: workspace.archiveSession moves a
session into the registry-global archive set, all grouping surfaces and search
hide it, and this version ships no unarchive API. This plugin closes that
gap — session logs and workspace accounting survive archiving, so an archived
session can always be reopened from here.

Install

From GitHub (recommended):

npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hashdiana/dsh-archived-sessions

From a local checkout:

npx -p @deepseek-ai/dsh dsh plugin --profile web add <path-to-this-repo>

Restart the target profile afterwards. The plugin is a pure client plugin: an
empty host half plus a browser half registering one settings.section entry.
(lib/ build artifacts are committed, so Git installs never build.)

Develop

pnpm install
pnpm typecheck   # tsc -b
pnpm build       # tsc -b && tsdown → lib/index.js (host) + lib/client.js (browser)
pnpm test        # vitest run --pool=threads
  • The client bundle is emitted as window.__ModuleLoader__.load({id, factory})
    by tsdown; CSS Modules go through lightningcss hashing plus
    <style data-plugin> injection.
  • After changing sources, run pnpm build and commit lib/ (Git installs use
    the committed artifacts; they do not build).

Architecture

  • Seam: settings.section (list slot; typed by dsh-client-ui-settings,
    declared at runtime by ui-settings-general), entry id=archived-sessions,
    order=100, thunked label: () => t('nav') — the shell re-resolves it on
    every locale revision, so language switches apply automatically.
  • Data: ctx.workspaces.list (WorkspaceListState.archivedSessionIds, in
    archive order) and ctx.sessions.list (SessionListState.byId for titles,
    timestamps, running state), passed into the component through the register
    inject factory and subscribed via useSyncExternalStore.
  • Behavior: clicking a row calls ctx.sessions.open(id) plus the section
    owner's close(); archived sessions stay in the session list store, so they
    open directly.

Verification matrix

  • pnpm typecheck / pnpm build / pnpm test
  • Fresh scratch profile: dsh plugin --profile <scratch> add github:hashdiana/dsh-archived-sessions →
    dsh --profile <scratch> --dump-config must show the dsh-archived-sessions
    layer
  • GUI: open Settings in a web profile → the nav shows Archived sessions →
    archive a session and it appears in the list → click to reopen

License

MIT