dsh-plugin-session-palette: Open Spotlight-style session panel with ⌘K

Introduction

Switching sessions in the DSH Web client follows a default path involving ⌘K: expand the sidebar, expand the search box, wait for the sidebar to slide out if necessary, and then focus on the input box in the bottom left corner. The main content is in the center, but the eyes have to find the search in the corner—the cost is high for high-frequency switching. Tools like VS Code, Sublime, and macOS Spotlight handle this by popping up a floating layer where your eyes are, rather than dragging the user to a fixed control.

dsh-plugin-session-palette follows this path: it takes over ⌘K and pops up a session panel at the top of the screen. The list, preview, rename, and tags are all completed within the same layer. Below is an explanation following the structure of “What it is → What it can do → How to install → How to use → What to note”.

What is this

An DSH Client Plugin (Category: Client) open-sourced on GitHub by the maintainer kjx-talesofai. In one sentence: A session switcher for DSH Web—pressing ⌘K pops up a Spotlight-style panel instead of focusing the sidebar search box.

The plugin requires DSH ≥ 0.2.0-rc.1 (engines.dsh in package.json is >=0.2.0-rc.1 <0.3.0-0). The current release reference is v0.8.1, and the license is MIT. It is not published to npm; installation is done via the DSH built-in “Add Plugin” dialog, not npm install.

Core Features

Session Panel and Sorting

When opening the panel, you can browse sessions without typing first; use arrow keys to select and Enter to join. The list is grouped by status and time, rather than just following the host’s default updatedAt (the time of the last user input; model replies do not advance it). The panel prioritizes “live status”: items requiring your action, currently running, or recently ended but unread, falling back to time buckets like “Today / Yesterday / Past 7 Days / Past 30 Days / Earlier”.

The preview on the right highlights the last turn of the session (your question and the model’s reply). The projection for older sessions may not be cached; highlighting stays for about 0.2 seconds before fetching, so quick scrolling will not trigger concurrent requests.

Four Views

Use Tab / ⇧Tab to cycle through views. Each view answers a different question:

View Function
Recent (Default) What is happening now: All sessions, grouped by activity and time
Workspaces Only remember the directory, not the title: Grouped by workspace directory, recently touched groups first
Pinned What you actively kept: Ordered by pinning sequence, most recently pinned first
Archived What has been put away: Lines dimmed, sorted by recent activity

Pinning is not “lifting to the top of the Recent list”. Pinned and Archived have their own views with counts, reminding you there are sessions inside; they do not occupy the first screen of “Recent” like pinning to the top of the “Today” group. In the “Recent” view, a line falls into only one most urgent group (e.g., “Needs You”, “Active”, then date buckets); a running pinned session falls into the “Active” category, rather than occupying a separate “Pinned” group in “Recent”.

Search Scope

The input at the top of the panel is for filtering sessions: matching session titles, workspace names, and workspace directory paths (can still search by directory after renaming the workspace). It does not perform full-text search of message bodies; to find historical conversations by topic, you still need to use the sidebar search.

In-place Rename

Two methods:

  1. In the panel, highlight a line and press ⌘⇧R: The top search box turns into a title edit box in-place; Enter saves, esc cancels. Failure reasons are displayed below the input box, and success prompts allow undo.
  2. If already in an open session, double-click the top title to rename (depends on the host title element class name crumbCurrent; if the upstream changes the DOM, this method may silently fail, ⌘⇧R is unaffected).

The title length is subject to DSH default limits (approx. 80 bytes, about 26 Chinese characters); if exceeded, the host will truncate it, and the prompt will reflect the actual stored title.

Tags (Max 3 per session)

⌘⇧T opens the tag selector (in the right column, separate from the session search input). Tags consist of text + optional emoji + color (color uses theme tokens). Data is written to the volatile field of the plugin Config, stored in the profile’s cordis.patch.yml, and persists after restart. Restarting DSH is required the first time tag-related storage is enabled (the host only reads fields at startup); if not restarted, the selector will prompt for a restart and will not perform fake saves.

Clicking tags in the panel filters (multiple tags act as “any match”); deleting tags triggers a confirmation explaining the number of affected sessions and supports undo.

Other Shortcuts (Inside Panel)

  • ⌘⇧P: Pin / Unpin
  • ⌘⇧⌫: Archive / Restore
  • ⌘↑ / ⌘↓: First / Last item
  • PgUp / PgDn: Scroll one screen
  • esc: Close panel

The floating window is approx. 1180px wide and 88vh high (left list approx. 60%, right preview approx. 40%). Group titles stick to the top, and the footer displays the current position (e.g., 37 / 340); lines older than 7 days show specific dates (e.g., Sep 12).

Installation and Activation

In DSH “Add Plugin”, fill in one of the following (No npm account needed, no need to publish to npm):

github:kjx-talesofai/dsh-plugin-session-palette#v0.8.1

Or use the absolute path of a local clone directory, for example:

/path/to/dsh-plugin-session-palette

Restart the DSH Desktop client after installation (the host half only loads plugins at startup; the browser half reloads with the page).

Uninstallation: Remove dsh-plugin-session-palette from the plugin list and restart, or use “Restore All” to restore default shortcut values; the README states no additional preference cleanup is needed.

Typical Usage

  1. Daily switching: Press ⌘K to open the panel → ↑ / ↓ to select session → ⏎ to enter. The search button in the sidebar is still usable (mouse), but ⌘K is handed over to the panel.
  2. Find by directory: Tab to switch to the Workspaces view, find within groups by recent order.
  3. Long-term tracking: ⌘⇧P to pin, open in the Pinned view by pinning order; if not needed temporarily, ⌘⇧⌫ to archive, restore in the Archived view.
  4. Organize titles and tags: ⌘⇧R to rename in the list, or double-click the top title after opening the session; ⌘⇧T to tag, click tags to filter a batch of related sessions.

Scenarios and Notes

Who it is for: Developers running many DSH sessions simultaneously, frequently jumping between “Waiting for you / Running / Just Ended”, and hoping to rename or lightly categorize without leaving the current line of sight.

Permissions and Trust: The plugin runs under the current DSH process permissions and takes over the fixed keybinding ⌘K (via the official “fixed keybinding” channel; disabling the plugin restores it without rewriting your keybinding preference file). Before installation, you should read the source code and the MIT license on GitHub to judge whether to include it in your workflow.

Compatibility: The README states end-to-end testing was primarily conducted on macOS (Apple Silicon) + DSH Desktop 0.2.1-rc.2; Windows / Linux are untested. Host contracts may change after DSH upgrades; it is recommended to check the Compatibility section of the repository README before and after upgrading.

Differences from Host Behavior: The preview time text emphasizes “You spoke X ago” because updatedAt does not update with model replies. Double-clicking the title is the only interaction point that significantly depends on the host DOM.

Links

If you are already using the DSH “Everything is a Plugin” ecosystem, this plugin moves high-frequency session switching from the sidebar corner to a floating layer in the center of the screen, adding sorting by status, last-turn preview, renaming, and lightweight tagging—shortening the path from “remembering” to “switching back” without replacing full-text search.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye