dsh-session-cards Plugin Introduction: Spread DSH sessions into a card tablecloth

Introduction

The philosophy of DSH (DeepSeek Harness) is “everything is a plugin,” but the default session view is list-based. Switching back and forth between multiple sessions or hunting for specific tool call results is cumbersome. The client plugin introduced below, tom143tc/dsh-session-card (repository title is dsh-session-cards, maintainer tom143tc), turns sessions into cards laid out on the session details canvas. It supports dragging, resizing, minimizing, maximizing, and popping out any card into a native standalone window. It relies solely on DSH’s public contracts, degrades gracefully based on capabilities, and does not cause white screens or errors.

What is it

One-sentence positioning: Opens a card tablecloth on the session canvas, laying out multiple sessions side-by-side for parallel viewing and quick switching. The plugin is currently version 0.4.3, requires host DSH >= 0.2.1-rc.2, license MIT, and has been tested on macOS + DSH NEXT Desktop (0.2.2) and dsh web (0.2.1-rc.2).

Core Features

Three Layouts

Layout Behavior
Grid Cards occupy 1-4 x 1-4 cells; drag to empty spot to place, drag to occupied cell to swap; drag edges/corners to resize continuously, release to snap to grid.
Masonry Evenly fills: ≤9 items 3x3, 10-12 items 3x4; narrow windows (<720px) drop 2 columns.
Free Absolute positioning, cards can move and overlap arbitrarily; drag four sides/corners to resize (left/top edges grow outward).

Card Content

  • Renders real session records: user bubbles, assistant body (bold, inline code), tool call lines are only shown when the card is maximized.
  • Each card displays title, status dot, workspace, relative time; number of conversation lines changes with card size.
  • Filters out DSH-injected context blocks (runtime context, skill directory, compressed summaries, etc.), does not display injected text as conversation.

Sending Messages Inside Cards

  • By default, only the last line of the input box is shown; the input bar floats up only when the mouse enters the card. Enter sends, Shift+Enter for new line, Chinese input method selection does not trigger sending.
  • Sending uses the plugin host route to call the host’s sessionController.prompt, does not switch the current session; on success, clears draft and refreshes the card’s conversation.

Card Operations

Button Action
− Minimize to canvas bottom dock, restore by clicking
⧉ Pop out as native standalone window
⤢ / ⤡ Maximize to fill canvas / Restore (press Esc to exit when maximized)
✕ Remove from tablecloth (does not delete session)

Native Pop-out Windows

  • The plugin builds its own Electron manager process, communicates only via public webServer/connection, and does not touch desktop private APIs.
  • Native title bar, draggable and resizable; default 520x420, cascades by +28px when opened multiple times.
  • Remembers the position and size of each window; dragging back to the main window automatically retracts; deduplicates same sessions; maximum 8 windows.
  • Not pinned by default, click “📌 Pin” in the pop-out window when needed.

Theme

Supports light/dark/system following host; input bar, buttons, and card text provide light and dark color values.

Installation and Enablement

Desktop / dsh web (GitHub)

Installation commands are as follows, with the two commands corresponding to the desktop profile and web profile respectively:

dsh plugin --profile desktop add github:tom143tc/dsh-session-card
# or
dsh plugin --profile web add github:tom143tc/dsh-session-card

After installation, you need to completely exit and restart DSH NEXT; for those using dsh web, restart the process and refresh the page. This path has been verified on dsh 0.2.1-rc.2 (installing 0.4.3), and Desktop 0.2.2 runs the same code directly.

Local Development Installation

When installing from a local directory, use the following command; the path must be an absolute path:

dsh plugin --profile desktop add file:/absolute/path/to/dsh-session-card

Prerequisites for Native Pop-out Windows

Pop-out windows depend on the locally executable Electron. The plugin searches in the following order:

  1. Executable file pointed to by environment variable DSH_CARDS_ELECTRON
  2. macOS: ~/.dsh/electron/Electron.app/Contents/MacOS/Electron
  3. Windows / Linux: corresponding executable file in the same directory

If not found, the pop-up will return NO_ELECTRON, and the card tablecloth itself will not be affected.

Typical Usage

  1. Open any session and click the Card Tablecloth tab at the top of the canvas.
  2. Click + Current Session to add the current session to the tablecloth (max 12 cards).
  3. You can also add cards by dragging sessions from the left session list into the canvas.
  4. Switch Grid / Masonry / Free to change layout; Auto Arrange reorders by update time/running status priority.
  5. Hover over a card: operation buttons appear in the top-right, input bar floats up at the bottom, allowing you to send messages directly inside the card.
  6. Click ⧉ to pop out a native window; in the pop-out window, click “Back to Canvas” or drag the window back to the main window to retract it.

Data, Privacy, and Degradation

The plugin’s data storage locations are as follows:

Data Location
Tablecloth layout (cards, layout, span/rectangles, maximized) Host localStorage key dsh-session-cards/board/v1
Last manually adjusted card size localStorage key dsh-session-cards/default-span/v1
Pop-out manager info / window position / error logs ~/.dsh/dsh-session-cards/` (JSON permissions `0600`)

Session content is read-only (GET /plugins/dsh-session-cards/transcript), does not write to host storage; sending messages only goes through the host’s public sessionController.prompt. The card limit of 12 is a hard limit at the data layer.

Compatibility degradation levels are five:

Level Trigger Condition Behavior
L0 conversation.view is available Card Tablecloth tab (full functionality)
L1 Tab unavailable, shell.overlay available 560px degraded floating layer on the right
L2 Previous two unavailable, conversation.session.header.actions available Session header buttons open floating layer
L3 Session directory unreadable Read-only mode, drag/send disabled
L4 All of the above unavailable Does not register any UI, writes compat-report.json and explains the reason in settings page

Known Limitations

  • Card limit is 12; Masonry layout drops to 2 columns in narrow windows.
  • Free layout allows card overlapping (this is its purpose, not a bug).
  • Turn/Token summaries are only displayed when the host provides projectionValues.sessionStats, which most sessions do not have.
  • Native pop-out windows have been tested only on macOS; Windows / Linux not verified.
  • Tool call lines are only shown when maximized.

Use Cases and Notes

Suitable for scenarios requiring simultaneous tracking of multiple sessions and parallel viewing and switching on the canvas, especially for users accustomed to the DSH session canvas and looking to extend it into a card-based workspace.

Two points to note: First, the plugin runs with the permissions of the current DSH process; check the source code and license (MIT) before installing. Second, the installation path depends on the dsh plugin command and a network-accessible GitHub repository. The community directory site is an independent site with no official affiliation to DeepSeek / HF, and is not equivalent to the official app store.

Development and Self-testing

Plugin source code is divided into pure function layer and browser side:

src/lib/       Pure functions: layout calculation, board model, capability detection
src/client/    Browser side: ui.js (rendering and interaction), apply.js (detection and mounting)
index.js       Host side: prompt / transcript / popout routing
popout/        Electron manager (native window)
scripts/       build-client.mjs
test/          node:test cases

Local self-testing and packaging commands are as follows:

node --test test/            # Pure function tests (layout / board / caps)
node scripts/build-client.mjs  # Inline src/lib + src/client into client.js
npm pack --dry-run           # Check release content

Conclusion

The value of tom143tc/dsh-session-card lies in transforming multi-session viewing from “switching back and forth” to “a table of cards”: three layouts cover both neat arrangement and free arrangement, messages can be read and sent inside cards, and native windows can be popped out when needed. Current version 0.4.3 (relative to 0.4.2 only changed engines.dsh, code unchanged), 0.4.2 is locked with LOCK.md + releases/0.4.2/SHA256SUMS. For more information, see the directory page and repository:

  • Directory page: https://www.skillhub.cn/plugins/tom143tc/dsh-session-card
  • GitHub: https://github.com/tom143tc/dsh-session-card
羽毛球分组比赛记分
小程序二维码

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

Xiaoye