跳过主要内容
R

dsh-session-palette

rickt34/dsh-session-palette

DSH Web 界面的键盘优先命令面板:输入框为空时按空格打开带实时状态的最近会话和会话命令;可按标题和路径搜索,启用 DSH 全文索引后还能搜索消息正文。

安装

dsh plugin --profile web add github:rickt34/dsh-session-palette

README

Session Palette

A VS Code-style command palette for DeepSeek Harness. Press Space in the chat input to jump to a recent session or run a session command — no mouse, no sidebar hunting.

npm version MIT license DSH

English · 中文

The session palette open over the DSH chat, listing recent sessions with number keys and workspace names

dsh-session-palette adds a keyboard-first quick switcher to the DSH Web UI. It opens like the command palette you already know from VS Code, but the trigger is the spacebar you were about to press anyway: with an empty chat input, Space opens a searchable list of recent sessions and session actions.

Highlights

Press Space, not Ctrl+Shift+P

In VS Code the command palette lives behind Ctrl+Shift+P. Here the shortest path is a single Space.

When the chat composer has focus and its draft is empty — no text, no attachments, no @ references — and no slash command or IME composition is active, Space opens the palette instead of typing a space. Held keys, modified presses, and composition sessions are ignored, so ordinary typing is never interrupted. The behavior is on by default and can be switched off in settings.

Recent sessions in two keystrokes

The palette opens on your recent sessions, newest first. The current session, blank drafts, subagent sessions, and archived sessions are left out. Press 1–9 to open one immediately, or 0 for the tenth. Recent sessions and search results show the live status from DSH: awaiting an answer, approval, or plan review; running; subagent running; completed and unread; or idle.

Search by what you remember

Type part of a session title, a workspace name, or a path. Every whitespace-separated word has to match somewhere in the row, in any order, so palette release finds “Release checklist” inside the palette workspace. Case and full-width characters are normalized.

If no title or workspace metadata matches, the palette searches past user and assistant messages and shows a matching excerpt. Type /s keywords to search message text directly, even when a title matches. Content search uses DSH’s token and phrase matching rather than arbitrary substrings. See Content search to enable it.

Quick actions with /

Type / to list every command, then keep typing to filter:

  • /n [workspace] — pick a workspace and start a new session there.
  • /s keywords — search conversation messages directly.
  • /open — add a workspace without leaving the current session.
  • /r, /pin, /archive, /fork — rename, pin, archive, or fork the current session.
  • /files, /terminal — jump to the Files or Terminal tab.
  • /copy id, /copy markdown — copy the session ID or the whole conversation as Markdown.
  • /settings — open DSH settings.

Commands that need a session act on the session in the foreground. When a non-conversation panel occupies the main area, or there is no saved session, those commands are disabled instead of failing silently. Slash commands typed in the palette are never sent to the chat.

Native and unobtrusive

The palette is a real DSH client plugin: it uses DSH's overlay slot, theme variables, localization, and native actions and dialogs for rename, archive, workspace creation, and settings. It follows light and dark themes, speaks English and Chinese, and ships no production dependencies. Content search uses the DSH host without contacting external services.

Requirements

  • DeepSeek Harness >=0.2.2-rc.5 <0.3.0, Web UI.
  • Installing does not run a build: the browser bundle ships prebuilt.

The range is declared as engines.dsh in package.json, so DSH refuses incompatible versions at install time and at startup.

Install

From the Plugins page

  1. Open DSH Web and select Plugins in the sidebar.
  2. Choose Add plugin.
  3. Enter dsh-session-palette.
  4. Select Install, then Enable now.
  5. If the palette does not appear, refresh the page; restart DSH if the new bundle still is not loaded.

From the CLI

dsh plugin --profile web add dsh-session-palette

Replace web with the profile you actually boot. The bundle is added to the profile immediately and loads on the next start; with HMR enabled, the change can apply without a restart.

Installing from a Git URL does not build the browser bundle, because dist/ is not committed. For a source checkout, run npm ci && npm run build first, then install the directory as shown under Development.

Verify

Focus the chat input with an empty draft and press Space, or press Ctrl+Shift+, (Cmd+Shift+, on macOS). The palette should open over the conversation.

Usage

Opening and closing

InputAction
Ctrl+Shift+; / Cmd+Shift+;Focus the current chat input from within DSH (bind manually on Linux Web)
SpaceOpen the palette when the chat input is focused and empty
Ctrl+Shift+, / Cmd+Shift+,Open or toggle the palette from anywhere
/List all session commands
↑ / ↓Move the selection, wrapping at the ends
1–9, 0Open the corresponding recent session (empty query only)
EnterOpen the selected row, or complete the selected command
EscClose the palette
Click outside the dialogClose the palette

The default shortcut can be rebound in Settings → General → Edit shortcuts; search for “Session palette”. Whether a binding is available depends on DSH's browser-level shortcut rules. The Space trigger has its own switch, described below.

Switching sessions

The first section lists recent sessions. Number keys are shown beside the first ten rows; pressing one opens that session without confirmation. Typing filters the list, and the digits become ordinary text again, so you can search for titles that start with a number. Matching ignores the current session, so the list never offers to reopen what you are already looking at.

Session commands

CommandActionNeeds a session
/n [workspace]Filter workspaces and start a new session in the selected one. Enter lands in the native new-session view; no message is sent.No
/openOpen the native Add workspace flow. The sidebar is expanded first if it is collapsed.No
/rRename the current session in the native dialog.Yes
/pinPin or unpin the current session.Yes
/archiveArchive the current session. Archiving a running session keeps the native confirmation.Yes
/forkFork the current session at its last completed turn.Yes
/filesOpen the Files tab, reusing one that is already open.Yes
/terminalOpen the Terminal tab, reusing a running terminal when possible.Yes
/copy idCopy the current session ID.Yes
/copy markdownCopy the current session as Markdown.Yes
/settingsOpen DSH settings.No

Commands are matched by token prefix, then by words in the token, label, and aliases, so /term and terminal both find /terminal.

Settings

Space to open

Settings → General includes “Space opens the session palette in an empty chat input”. The switch is on by default and is stored per browser in localStorage; it is shared by every tab in that browser and does not affect other browsers or machines.

DSH Web disables full-text indexing by default. Title and workspace searches still work; the palette shows setup guidance only when it needs to search the conversation text. To enable it, add or update this entry in your Web profile’s cordis.patch.yml:

- id: session-query-sqlite
  config:
    path: ':memory:'
    openAt: first-search

Keep the existing path and other settings if you already use an on-disk index. first-search opens the index on the first content query, which may take longer. Queries go through the DSH host and are not sent to a model.

Shortcuts

In Settings → General → Edit shortcuts, search for “Focus chat input” or “Session palette” to rebind or clear either shortcut. The focus shortcut returns from a terminal or text editor in the same DSH page without changing the draft. It does not take over dialogs or iframes that do not forward keystrokes. Tab and Shift+Tab keep their normal behavior.

The focus shortcut defaults to Ctrl+Shift+; on Windows and Cmd+Shift+; on macOS. Linux Web has a shorter list of accepted bindings, so the command is unbound by default. To assign Ctrl+Shift+. on Linux Web, clear or change the Inspector binding first if the shortcut editor reports a conflict.

Screenshots

The screenshots come from an independent DSH instance with fictional sessions and workspaces. The UI is localized; the Chinese locale is shown here.

Switching sessions — the palette opens on recent sessions. Press a number to jump, or type to filter.

Recent sessions with number key hints

Quick commands — type / to browse. Use /open to add a workspace, /n to start a session, or /r to open the native rename dialog.

The session command list after typing a slash

How it works

dsh-session-palette is a DSH client bundle. package.json declares dsh.bundle.patch and dsh.client. The patch adds the package to the profile, and the package's dsh.client manifest mounts dist/client.js, a prebuilt browser module that registers:

  • an overlay slot containing the palette dialog,
  • a General settings row for the Space switch,
  • the rebindable shortcut.

React is provided by DSH's module loader, styling uses DSH theme CSS variables, and session/workspace data comes from the client services DSH already provides (sessions, workspaces, layout, contextMenus, remoteAccess, and others). There is no host-side runtime code and no network access.

Development

git clone https://github.com/RickT34/dsh-session-palette.git
cd dsh-session-palette
npm ci
npm test
npm run build

npm test runs the Node test suite (node --test). npm run build bundles src/ into dist/client.js; dist/ is gitignored and rebuilt by prepack whenever the package is packed or published.

To load the checkout into a profile:

dsh plugin --profile web add "$PWD"

You can also use Plugins → Add plugin with the absolute path. After changing client code, run npm run build and reload the page; if the old bundle stays loaded, restart DSH.

Release

For maintainers:

npm login
npm test
npm pack --dry-run   # inspect the files that will be published
npm publish
git tag v0.1.0
git push origin main --tags

prepack builds dist/client.js, so the published tarball always contains the browser bundle even though dist/ is not committed.

License

MIT © 2026 RickT34

Issues and pull requests are welcome at github.com/RickT34/dsh-session-palette.

相关插件