説明
以下はプラグイン作者による原文です。
Workspace Session Filter
English · 简体中文
dsh-workspace-session-filter · MIT License · Repository: https://github.com/shijiewang/dsh-workspace-session-filter
A DeepSeek Harness (DSH) plugin that puts session triage where you already look: one filter row at the foot of the sidebar, plus a full panel for searching, exporting and cleaning up old sessions.

What you get
- A filter row at the bottom of the sidebar (one whole row above Settings, not sharing a line with
other footer entries):
Running N/Awaiting N/Unread N/Today N, each with its own hit count, followed by a DeepSeek status lamp. Clicking a chip opens a workspace-grouped session list above the row; clicking a row opens that session. - "Today" dimension: sessions whose
updatedAtis after local midnight. - The full panel (optional sidebar icon, off by default) with
All / Running / Awaiting confirmation / Unread / Today / Favorites / More, whereMoreholds the time windowsLast day / 3 days / Week / Month(plusAny time). - Manage old sessions: multi-select, search by title or path, export a Markdown digest, move to trash, or delete permanently — always after writing the digest.
- Digest column: a resizable, full-screenable right column that lists every exported digest and renders the Markdown of the selected one in place.
- DeepSeek status lamp: green / yellow / red / grey dot driven by
status.deepseek.com, with a hover card (current conclusion, up to three recent incidents, last successful refresh) and a click through to the status site.
Screenshots
The pictures below are rendered with the plugin's own client module and sample session data — no real account data is shown.
| Filter row + popover | Status card |
|---|---|
![]() | ![]() |
![]() | ![]() |
Install
From the app's plugin manager
Point install_bundle at the absolute path of this directory:
plugin_manager({ action: "install_bundle", target: "/absolute/path/to/dsh-workspace-session-filter" })
The profile then depends on it through a link: entry
(~/.dsh_desktop/profiles/desktop/package.json), so editing files here takes effect after a page
reload (⌘R). Only changes to package.json#dsh.client.inject, cordis.patch.yml or index.js need a
reinstall.
With the dsh CLI
sole plugin forwards everything to pnpm inside the profile directory and then registers the package in
dsh.profile.bundles (it reads dsh.bundle.patch from the package, so you never edit the profile's
package.json by hand):
# from the npm registry (available since 1.0.1 — easiest)
sole plugin --profile desktop add dsh-workspace-session-filter
# from GitHub (pnpm pins the resolved commit)
sole plugin --profile desktop add github:shijiewang/dsh-workspace-session-filter
# pinned to a tag
sole plugin --profile desktop add github:shijiewang/dsh-workspace-session-filter#v1.5.1
# straight from a local checkout (installs as a link: dependency)
sole plugin --profile desktop add /absolute/path/to/dsh-workspace-session-filter
# uninstall
sole plugin --profile desktop remove dsh-workspace-session-filter
Prerequisites:
- The desktop app ships this command:
/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh(use that absolute path whenwhich dshfinds nothing). It bundles its own pnpm. - The
desktopprofile must have been started once (profiles/desktop/package.jsonmust exist), and the app should be quit while you install, so nothing races for the profile lock. add github:...pins the commit it resolved;addagain to pick up updates, oraddthe local path to switch back to live-edit mode.
After installing
- The sidebar footer gains one row:
Running N/Awaiting N/Unread N/Today Nand the status lamp. - No sidebar icon appears by default. For the full panel, open
Settings → Session filter(also underSettings → Plugins → Session filter, and in the footer of the popover) and switch on Show in the left navigation; the same page has an Open panel button, so you can reach the panel without the icon. The switch is stored locally and survives reloads.
Uninstall: plugin_manager({ action: "remove_bundle", target: "dsh-workspace-session-filter" }).
Usage examples
Triage in the morning. Click Running 4 in the sidebar footer to see what is still working; open
the ones you care about. Awaiting 1 is a session that stopped to ask you something (approval, plan
review or a question), so it never gets forgotten in a background tab.
Catch up without reading everything. Unread 2 counts two different things: sessions that finished
while you were away (the built-in completionUnread signal, the same one the shipped list paints as a
completion dot), and sessions whose updatedAt is newer than the last time you looked at them (tracked
locally). Opening a session — from either list — marks it read.
Find one session among hundreds. Turn on Show in the left navigation, open the panel, and use the
status tabs plus More → Last week. Clear filters resets everything.
Clean up month-old experiments. In the panel press Select & delete, search for e.g. scratch,
tick the rows (the session you are currently looking at is locked and cannot be deleted), then:
Export Markdown— writesdsh-session-digest-<date>-<time>.mdintosession-digests/of your data home, containing an index table (title, workspace, last activity, message count, top tools) and one section per session with its user/assistant turns and tool calls;Move to trash— writes the digest first, then moves each session directory tosessions/.trash/<timestamp>/<workspace>/;Delete permanently— writes the digest first, then removes the directories (rm -rf, no trash).
Both destructive actions require ticking an acknowledgement in the confirmation dialog. The list refreshes immediately: the plugin re-checks which session directories still exist on disk instead of waiting for the host to rescan.
Read a digest without leaving DSH. Press Digests in the panel's filter row: the panel splits into
two columns, listing every dsh-session-digest-*.md with name, size and time. Click one to render it
(title, tables and lists are rendered as Markdown). Back to list, Refresh and × are in the column
header; the four-arrow button expands the column to the whole panel (Exit full screen restores it), and
dragging the vertical line between the columns resizes it between 240 and 760 px — the width is saved
locally.
Check DeepSeek before blaming yourself. Hover the lamp in the footer: green means normal, yellow means
degraded components or maintenance, red means an ongoing incident, grey means the plugin cannot learn the
state (it also says why: no relay, HTTP error, or a blocked fetch). The card lists up to three recent
incidents with their state and time, and a click opens https://status.deepseek.com/.
Data and privacy
- Everything runs locally. The plugin keeps no copy of your conversations; the panel reads the same in-memory snapshots the shipped sidebar uses.
- The only files it writes are Markdown digests under
<data home>/session-digests/, plus the trash directories (.trash/) when you ask for them. - Preferences (seen timestamps, favorites, sidebar-icon switch, digest column width) live in
localStorage. - The status lamp needs a network call that the browser cannot make (the feed sends no CORS headers),
so the plugin's host half starts a read-only HTTP relay on
127.0.0.1:47100–47105. It binds to loopback only, answersGET /status,/status.js,/sessions,/digests,/digest,/health, rejects non-localOrigins, and requiresx-dsh-relay: 1onPOST /export,/trash,/purge. - Session deletion is not exposed by the DSH service API; the host half moves or removes session directories on disk (see above), which is why both actions write a digest first.
Structure
| File | Purpose |
|---|---|
client.js | All UI: dictionaries, glyphs, the footer bar / panel / settings registrations, the dynamically registered sidebar icon, inline styles |
index.js | Host half: loopback relay for the status feed, session digests, trash and purge |
cordis.patch.yml | Inserts the session-filter entry into the profile composition |
package.json | Package metadata plus the dsh.client / dsh.bundle declarations |
locale/zh.json, locale/en.json | Name and description shown in the plugin manager |
icon.svg | Plugin icon |
docs/images/ | Screenshots used by this README |
test/smoke.cjs | Headless smoke test (mini React harness) over the panel, footer bar and settings page |
Profiles
The relay scans the sessions/ directory of every DSH data home it can find — $DSH_HOME, the
grandparent of $DSH_PROFILE_DIR, ~/.dsh and ~/.dsh_desktop — so the desktop app and dsh web are
both visible to one relay. The UI adds a safety net: the ids found on disk are only used to filter the
list when they intersect the sessions this window can see, otherwise the relay is treated as "another
profile" and ignored (that mismatch used to empty the list in dsh web).
Implementation notes
- Panel seat: the
sidebar.panellistidand themainkeyare the same string (session-filter), which is what makes the icon select this panel;order: 30places it after plugins, schedules and context. - Optional icon: the sidebar icon is registered and unregistered as the switch flips, so turning it off leaves no empty cell behind.
- Footer seat: registered in
sidebar.footer.actionand forced onto its own row ([data-slot="sidebar.footer.action"]getsdisplay: flex !importantbecause the slot outlet carries an inlinedisplay: contents). The popover isposition: fixedabove the chips, because the sidebar container clips absolutely positioned children. - Data: the standard slot props
useSessions,useWorkspacesanduseSessionStatus— allSnapshotSelectorHooks, so a selector must be passed. - Popover: at most 360 px wide, clamped into the viewport; a capture-phase geometric hit test keeps the chips clickable even if a transparent overlay covers them.
- Styling: only
--dsw-alias-*/--dsw-*design tokens, numbers aligned with the shipped list page (960 px measure,clamp(24px,4vw,48px)gutters, 28 px chips, 32 px rows, menus with 4 px padding and--dsw-elevation-prominent); class names are prefixed withdwsf-. - Why the status lamp detours through a relay:
status.deepseek.comsends no CORS headers, and a bundle's client half cannot usehost.call(that bridge belongs to dynamic packages), so the host half serves a cached copy over loopback. The feed supports conditional GET, so the relay sendsIf-None-Matchon its once-a-minute poll and reuses the last parse on304. When the system DNS answers with a block page, the relay retries over DNS-over-HTTPS (1.1.1.1,8.8.8.8,223.5.5.5) with a proper SNI. If several relays are alive (an olddsh web, say), the client tells the contracts apart bypending/fails/lastSuccessand picks the current one. - Unread:
completionUnreadfrom the status map, or anupdatedAtnewer than the locally stored "last seen" timestamp. The current session refreshes its timestamp on every render, opening any row counts as reading it, and a session seen for the first time only gets a baseline (so a fresh install is not a wall of unread). - Fault isolation: the panel and the footer bar each have an error boundary, so a render failure degrades to an empty state (or to nothing) instead of blanking the centre column or tearing down the sidebar.
Verification
node --check client.js, node --check index.js and npm test (a headless smoke test that renders the
real components through a mini React harness and drives the chips, the popover, the panel, the manage
flow and the settings page) pass. After installing, the DSH slot inspector shows session-filter in
sidebar.footer.action, sidebar.panellist and main.
The agent-side tooling has no renderer, so the screenshots in docs/images/ were produced by rendering
the plugin's own client module in a plain browser page with the real design tokens and sample data.
Pixel-level appearance in your window is worth a glance — the layout copies the shipped list page, but
font rendering differs per platform.
License
MIT — see LICENSE.
バージョン履歴
- 1.5.12026/11/29 · 971 KB


