dsh-scratchpad-plus

uinpmMIT

Workspace-free chats that promote real files into their own project workspace - a maintained fork of dsh-scratchpad, kept working on current DSH.

下载量 / Downloads
395

Install

dsh plugin --profile web add dsh-scratchpad-plus

Sandbox test

This plugin has not been tested yet. Submit a test →

README

dsh-scratchpad-plus

Workspace-free free chat for DeepSeek Harness. Start a conversation without

picking a project directory: a button beside the sidebar's new-session button

opens a shared scratchpad workspace, every tool stays available, and sessions

that produce real files are automatically promoted into isolated sibling project

workspaces with a new-session handoff.

This is a maintained fork. It is based on
1264459640/dsh-scratchpad
(MIT), which has had no commits since 2026-08-30 and no longer works on
current DeepSeek Harness. The upstream copyright notice is preserved in
[LICENSE](./LICENSE).

What this fork changes (relative to upstream 0.3.0)

Change · Why

Starts sessions through uiWorkspace.startSession, not workspaces.startSession · startSession moved to the uiWorkspace service; upstream's call site no longer exists, so every click failed silently while the host quietly created blank sessions the sidebar never shows. Falls back to the old location on older harnesses, and reports the missing capability when neither exists.

Icons resolved by candidate name, with a bundled inline-SVG fallback · The primitives package renamed IconXxx16 to IconXxx<Weight><Size>; upstream's icon references resolved to undefined, React threw #130, and the crash took down the whole sidebar entry.

The entry sits beside the shell's new-session button · Two 50% controls in one row instead of a full-width section above the workspace list. Upstream deliberately chose the section layout; this fork prefers the compact one. If the shell button cannot be located, the entry falls back to the section, then to a footer button.

Two test-harness fixes · config-test pinned ~/.dsh (red for anyone running the suite inside a harness) and host-test used an uncanonicalized os.tmpdir() path (red on macOS).

Everything else - the promotion pipeline, the commands, the configuration - is

upstream's work, unchanged.

When you need it

  • You want to try a prompt or prototype a script without deciding which project

directory it belongs to, and without littering the sidebar with one-off folders.

  • You are mid-conversation and the agent needs to write a real file - you do not

want that file to land in a production checkout. Free chats live in a shared

scratchpad; anything worth keeping is promoted into its own workspace.

  • You keep several throwaway conversations open at once and want them in one

place instead of mixed into your project list.

What it does

Capability · How

One-click free chat · A 「自由对话」 button paired with the shell new-session button (56px rail collapse: a single sparkle icon button) calls GET /scratchpad/open, then uiWorkspace.startSession(workspaceId) opens a blank session bound to the shared scratchpad.

Shared default directory · All free chats share ${DSH_HOME:-~/.dsh}/scratchpad/ (mkdir + workspaceRegistry.create at startup, idempotent).

Fully open tools (no stripping) · The plugin never restricts tools - bash, write/edit, web search etc. all work; safety stays with DSH's own sandbox + approval.

Isolated artifact promotion · When a session produces files, its file-set is copied (never moved - the scratchpad is shared) into ${DSH_HOME:-~/.dsh}/projects/<date>-<slug> - a sibling of the scratchpad, never a child - registered as a new workspace, and a banner offers 「在新工作区打开」 (uiWorkspace.startSession(projectWorkspaceId)) so you continue in a fresh session bound to the project.

Detection · Two layers: fs/observed + fs/write-intent events (exact absolute paths, attributed via the acting agent's session) plus a per-turn recursive scratchpad scan that catches files bash/subprocess created (bash emits no fs events). A single global snapshot prevents two sessions from double-claiming a file.

Requirements

  • DSH with the web profile (the host half injects workspaceRegistry from

@deepseek-ai/dsh-workspace, webServer, commands, fs, timer,

sessions, sessionQuery, agents - all shipped in the web profile's

base/web-app bundles; no extra composition rows needed).

  • Dependencies: zod and @deepseek-ai/schemastery (declared in package.json).
  • The client half starts sessions through uiWorkspace.startSession and falls

back to workspaces.startSession on harnesses that still expose the capability

there. When neither exists the click reports the missing capability instead of

silently doing nothing.

  • Checked against the published @deepseek-ai/dsh-client-ui-workspace 0.1.7-rc.2

and 0.2.1-alpha.1, and @deepseek-ai/dsh-client-ui-primitives 0.1.7-rc.2.

Install

# from the npm registry
dsh plugin --profile web add -w dsh-scratchpad-plus

# from a source checkout (development)
dsh plugin --profile web add -w link:/abs/path/to/dsh-scratchpad-plus

Then restart dsh web or the DSH Desktop app. The 「自由对话」 button appears

next to the sidebar's 新会话 button; collapse the sidebar for a single icon button

between the new-session and workspace icons.

Coming from the upstream package

dsh plugin --profile web remove @banana-peeljj12/dsh-scratchpad
dsh plugin --profile web add -w dsh-scratchpad-plus

Install only one of the two: both register the same loader row id (scratchpad)

and the same /scratchpad route prefix. Your data is untouched - this fork uses

the same ${DSH_HOME:-~/.dsh}/scratchpad and projects directories, and existing

scratchpad workspaces keep working.

Configuration

In the web profile'

…(truncated)

Rendered from the README published on npm. Formatted only, not edited.

Versions

Published on npm::1,最后更新 2026-10-04

Links

GitHub · Homepage · npm

Same category