Back to home@masknull

dsh-workspace-default-path

DSH 插件:添加工作区时记住上次使用的目录,下次打开浏览对话框直接定位(预填+自动记忆,官方流程不动)。DSH plugin: remember the last used workspace directory for Add workspace - prefill + auto-memory over the official flow.

Stars
0
Language
JavaScript
Created
Aug 29, 2026
Updated
Aug 29, 2026
GitHub repo

Introduction

dsh-workspace-default-path

中文版:README.zh.md · DSH (DeepSeek Harness) plugin

Remember the last used workspace directory for the Add workspace flow (sidebar / conversation empty-state). Two lightweight hooks over the official flow — nothing is replaced, and the whole thing is a single on/off toggle in Settings → General.

Features

  • Remember — every workspace you add (from the browse dialog, the system dialog, or any other entry) is recorded automatically.
  • Prefill — with a remembered path, the official "Add workspace" browse dialog opens directly on the last used directory, breadcrumb path bar included; all browsing, editing and confirm interactions stay 100% official.
  • Off = stock — with the toggle off, both hooks are inert: no redirection, no recording, identical to an uninstalled plugin.
  • Hot-reloadable — the toggle persists to $DSH_HOME/settings.yaml (dsh-workspace-default-path.rememberLast / .lastPath) and applies immediately, no restart.

Install

From GitHub (standard, same as any other dsh plugin dependency):

dsh plugin --profile web add github:masknull/dsh-workspace-default-path

The package declares dsh.bundle, so the command also activates it (adds it to the profile's dsh.profile.bundles). If it is not auto-added, append "dsh-workspace-default-path" to that list in $DSH_HOME/profiles/web/package.json manually.

Runtime deps of the node half (@deepseek-ai/schemastery + cosmokit + @standard-schema/spec) are declared in dependencies, so pnpm resolves them into the profile's hoisted node_modules automatically — no manual copying.

Verify:

dsh --profile web --dump-config | grep workspace-default-path

Restart the web service after install or any code update (client HMR is disabled in the current web composition). Local development works the same way: dsh plugin --profile web add '<local-path>'.

Usage

  1. Open Settings → General → "Remember last workspace" → On.
  2. Add a workspace as usual (any method). Its path is remembered.
  3. Next time you click Add workspace, the dialog opens on that directory.
  4. Toggle Off anytime to restore the default behavior.

How it works

All over official seams; no official interaction is replaced.

HookMechanism
Remember (write)Subscribes to ctx.workspaces.list; any newly appearing workspace's path is written to lastPath
Prefill (read)The browse dialog opens with listDirectory(undefined) (host home). When remembering is on and lastPath exists, that initial call is redirected to listDirectory(lastPath); all other calls pass through untouched

Dependencies

  • Node half (lib/index.js): @deepseek-ai/schemastery (+ @deepseek-ai/cosmokit, @standard-schema/spec) — declared in dependencies, installed by pnpm on add.
  • Browser half: only official frozen-module-table entries (react, @deepseek-ai/dsh-client-runtime/client, @deepseek-ai/dsh-client-ui-primitives).

License

MIT.