Introduction¶
DeepSeek Harness (DSH) places conversation management within a “session column + right-side artifact panel” layout, requiring users to scroll up and down in the list to switch between multiple sessions. If you frequently jump between different sessions, this interaction can easily interrupt your flow. This plugin embeds a row of tabs in the DSH window title bar, with one tab per session. It supports drag-to-reorder in the Chrome / Edge style, horizontal scrolling via the mouse wheel, as well as pinning, closing, archiving, and running-status indicators.
Plugin Overview¶
- Plugin name: dsh-session-tabs
- Maintainer: dhshu
- Category: Client
- Core value: Transforms the DSH session area into a browser-style tab bar, saving vertical scrolling and making session switching more intuitive.
Features¶
Tab Bar Layout¶
- The tab bar spans across the “session column + right-side artifact panel,” embedded in the window title bar without consuming additional vertical space in the session content area.
- The active tab uses a white background with left and right borders, visually connecting to the session page below as a single continuous sheet.
- Tab width adapts to the title between 144–180px; when tabs overflow, the tab bar scrolls horizontally on its own. The
+button is always visible.
Drag-to-Reorder (Chrome / Edge Style)¶
- Press and drag a tab left or right. The picked-up tab follows the pointer and lifts slightly (elevation shadow, increased z-index, close button hidden).
- Remaining tabs smoothly shift left or right to make room. The final drop position is visible before you release, with no vertical drop-line indicator.
- Dragging past the divider between pinned and unpinned tabs automatically toggles pin / unpin.
- When the pointer approaches either end of the tab bar, auto horizontal scrolling kicks in (triggers within 36px of the edge, scrolling 16px per frame).
- A horizontal displacement of more than 5px is required before drag mode activates, preventing accidental triggers.
Esc, window blur, or pointer cancellation aborts the drag. - Order is persisted to
localStorageand survives page refresh.
Mouse Wheel Horizontal Scroll¶
- Vertical mouse wheel input on the tab bar is mapped directly to horizontal scrolling; trackpad horizontal gestures still use native scrolling.
- Scrolling to the end won’t carry the session page below along.
Pinned Tabs¶
- Once pinned, a tab shrinks to 40px, showing only the icon and a status dot, separated from regular tabs by a divider line.
- Right-click context menu allows pin / unpin.
Workspace Badge¶
- The top-left corner of each tab displays the owning workspace, color derived from a hash of the workspace identifier. Hover to see the full name.
Sidebar Panels as Tabs¶
- Opening global panels such as “Plugins” or “Automation Tasks” creates or switches to the corresponding tab.
- Clicking back to a session tab collapses the panel; when the panel unloads, its tab is automatically removed.
Close and Archive¶
- Close options:
×on the tab / middle-click / context menu (Close Tab, Close to the Right, Close Others, Close All). - Closing a session with a still-running task prompts a confirmation: “Task is still running. Close the tab? The task will not be stopped” — only the view is closed; the task continues.
- Archiving a running session, after confirmation, triggers the official “Stop and Archive” action.
Status Dots¶
- Blue breathing pulse = running
- Yellow = waiting for your reply
- Green = new completed content available
Keyboard Accessibility¶
Enter/Spaceactivates the focused tab←/→switches to adjacent tabs when a tab is focusedEsccloses the menu or cancels a drag
Theme and Language¶
- All colors are sourced from
--dsw-alias-*theme tokens, following light / dark mode automatically. - UI text is bilingual (Chinese and English via
ctx.locale); other languages fall back to English.
Technical Implementation¶
- Pure front-end: all logic resides in
client.js, loaded directly by the DSH module loader; the host-sideindex.jsretains only an emptyapply(). No build step required. - Relies on official public APIs:
shell.overlayslot,uiWorkspace.openSession / startSession / archiveSession,useSessionStatus,ctx.locale.
Installation & Activation¶
Install Command¶
The unified command is:
dsh plugin --profile <profile> add <package or Git URL>
--profile determines which profile the plugin is installed into: web for the Web GUI, desktop for the desktop version. Arguments after add are passed through to pnpm as-is and executed within that profile’s directory.
Install from GitHub (Recommended)¶
# Web GUI
dsh plugin --profile web add git+https://github.com/dhshu/dsh-session-tabs.git
# Desktop version (fully exit DeepSeek Harness Desktop first, then run the command)
dsh plugin --profile desktop add git+https://github.com/dhshu/dsh-session-tabs.git
On Windows, if dsh is not in your PATH, use the dsh.cmd in the DSH installation directory (<DSH Install Dir>\resources\runtime\cli\bin\dsh.cmd).
Verify dependencies are installed correctly:
dsh plugin --profile desktop why dsh-session-tabs
Restart DSH for the plugin to take effect.
Install from a Local Directory (Development / Offline)¶
git clone https://github.com/dhshu/dsh-session-tabs.git
cd dsh-session-tabs
dsh plugin --profile desktop add .
# Or keep a symlink so code changes take effect immediately:
dsh plugin --profile desktop add link:<absolute path to dsh-session-tabs>
Relative paths are resolved against the directory where the command is executed. The file: / link: forms can also reference local copies.
Other Installation Methods¶
- Have a tool execute it within an Agent conversation:
plugin_manager install_bundle target=<absolute path to dsh-session-tabs>
- Or via the DSH UI: Settings → Plugins → Add Plugin, and select the
dsh-session-tabsdirectory. After installation, refresh the window (macOSCmd+R, Windows / LinuxCtrl+R).
Installing as an npm package (dsh plugin --profile web add dsh-session-tabs or plugin_manager install_bundle target=dsh-session-tabs) will be available once the package is published to npm. For now, please install from GitHub or a local directory.
Typical Usage¶
| Action | Method |
|---|---|
| Switch session | Left-click the tab |
| New session | + to the right of the last tab |
| Close a tab | × on the tab / middle-click / context menu |
| Close a group | Right-click → Close to the Right / Close Others / Close All |
| Reorder | Press and drag a tab left or right |
| Pin / Unpin | Right-click → Pin Tab / Unpin Tab |
| Open a sidebar panel | Click “Plugins”, “Automation Tasks”, etc. in the sidebar; the corresponding tab is created or switched to automatically |
| Archive a session | Right-click → Archive Session (a confirmation to stop the task is shown if one is running) |
| Keyboard navigation | ← / → when a tab is focused |
| Too many tabs | Scroll the mouse wheel over the tab bar, or drag to the edge to trigger auto-scroll |
Data & Persistence¶
Tab order and pin status are stored in the browser localStorage under dsh.sessionTabs.view.v1 ({ tabs: string[], pinned: string[] }). The legacy key dsh.tab.openSessions.v1 is read and migrated.
Compatibility & Limitations¶
- Target platform is the DSH Web client (
dsh.client.platform = webinpackage.json), verified in the DSH desktop version. Title-bar positioning styles are primarily designed for the desktop window; appearance may vary in pure web deployments depending on window chrome. - Relies on official public APIs:
shell.overlayslot,uiWorkspace.openSession / startSession / archiveSession,useSessionStatus,ctx.locale. Major DSH version upgrades with API changes may require corresponding adjustments.
Use Cases & Notes¶
- Ideal for users who need to switch between sessions frequently or run multiple sessions in parallel for development or testing.
- The plugin runs with the current DSH process permissions. It is recommended to review the source code and license before installing.
Conclusion¶
Transforming the DSH session area into a browser-style tab bar reduces vertical scrolling and makes session switching more intuitive. For more details, refer to:
- Plugin directory page: https://www.skillhub.cn/plugins/dhshu/dsh-session-tabs
- GitHub: https://github.com/dhshu/dsh-session-tabs