<div align="center">

# No Workspace for DSH

**Let a conversation stand on its own instead of forcing it into a folder.**

English · [简体中文](README.md)

[![npm](https://img.shields.io/npm/v/dsh-plugin-no-workspace?style=flat-square&color=cb3837)](https://www.npmjs.com/package/dsh-plugin-no-workspace)
[![CI](https://github.com/SpookySandwich/dsh-plugin-no-workspace/actions/workflows/ci.yml/badge.svg)](https://github.com/SpookySandwich/dsh-plugin-no-workspace/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/SpookySandwich/dsh-plugin-no-workspace?style=flat-square)](https://github.com/SpookySandwich/dsh-plugin-no-workspace/releases/latest)
[![DSH](https://img.shields.io/badge/DSH-0.2.1--rc.5-23272f?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
[![License](https://img.shields.io/badge/license-MIT-f0b429?style=flat-square)](LICENSE)

True first-class workspace-free conversations for DeepSeek Harness, without replacing its native workspace experience.

![No Workspace demo](assets/no-workspace-demo.gif)

*Choose “No Workspace”, then collapse the real workspace—the standalone conversation remains directly in the sidebar.*

</div>

## What it fixes

DSH normally places every conversation in a workspace, or renders unassigned conversations under an extra “Ungrouped” folder. This plugin makes “not attached to a workspace” a real first-class state: standalone conversations appear directly in the sidebar, without a synthetic folder and without silently inheriting the active workspace.

| Scenario | With this plugin |
| --- | --- |
| Click the global **New Session** button | Creates a standalone conversation without inheriting a workspace |
| Choose **No Workspace** in the native picker | Detaches the current conversation without losing history |
| Collapse a real workspace | Standalone conversations remain visible at the top level |
| Open an empty standalone conversation | Composer, model picker, attachments, and send are immediately available |
| Use native workspace features | Search, menus, drag-and-drop, sorting, archive, and directory selection remain intact |

## Install

```bash
dsh plugin --profile desktop add dsh-plugin-no-workspace
```

Install from a local checkout or package:

```bash
dsh plugin --profile desktop add ./dsh-plugin-no-workspace
# or
dsh plugin --profile desktop add ./dsh-plugin-no-workspace-1.4.0.tgz
```

Restart DSH after installing or upgrading so both host and client code reload.

## Design principles

- **Keep the native sidebar** — adapt the shared creation action while retaining DSH's components and shortcut dispatch.
- **Never invent a folder** — hide only the synthetic “Ungrouped” container while separating standalone conversations from workspaces above with a subtle divider and localized “No Workspace” / “无工作区” heading; real workspaces retain their native structure.
- **Preserve conversation data** — detaching updates only workspace indexes, keeping events, drafts, and context intact.
- **Use a neutral working directory** — new standalone conversations start from the user's home directory.
- **Respect the current language** — the UI follows DSH with “No Workspace” or “无工作区”.

## How it works

The host adds small endpoints for standalone creation and lossless detaching. The client changes only three behaviors: global session creation, the composer gate for standalone sessions, and the native workspace picker. Icons, disclosure arrows, menu placement, and session rows continue to use DSH's native layout and interactions.

## Verification

```bash
npm ci
npm test
npm run check:package
```

Automated tests cover host behavior, the DSH 0.2 navigation contract, and persistence. `npm run test:e2e` creates and removes its own temporary Web profile and headless browser. It checks real session creation, Agent Preset Creator and draft-initialization options, the native Web shortcut, explicit workspace selection, draft transfer, detachment, and the standalone sidebar section's separator and localized Chinese/English heading. Set `DSH_QA_MODULES` to an official DSH `0.2.1-rc.5` (or `0.2.1-rc.2` / `0.2.0-rc.2`) node_modules directory if it is outside this checkout; set `DSH_QA_BROWSER` to a Chromium/Edge executable if needed. Windows CI runs this test. Results are written to `scratch/e2e-current/`. No existing DSH profile is used.

## Compatibility

Version `1.4.0` (current source): Official compatibility with DSH `0.2.1-rc.5` (retaining full support for `0.2.1-rc.2` and `0.2.0-rc.2`). Adds explicit `0.2.1-rc.5` peer/engines admission to satisfy default npm resolution for prerelease versions. Forwards `DraftInitializationOptions.whenDraftExists` (`keep`, `append`, `replace`) with full policy precedence and promptless replacement support, incorporating the policy into concurrent request deduplication. Settings Agent Preset Creator reuses only the currently selected standalone blank if its preset matches (or is not yet known), safely preserving existing drafts of other presets without changing their mode; unlike native navigation which can search and reuse other matching workspace blanks across the workspace, the plugin intentionally checks the current selected blank only to prevent unexpected jumps to background standalone sessions. Plain no-options **New Session** continues to create a fresh default-preset standalone session (in rc.5 native workspace navigation reuses existing workspace blanks, but the plugin's intentional standalone policy keeps standalone chats fresh to prevent unexpected state reuse or leftover drafts).

Version `1.3.1`: Add a top separator and live-localized “No Workspace” / “无工作区” section heading to the standalone sidebar block after hiding the native “Ungrouped” project row (fixes [#5](https://github.com/SpookySandwich/dsh-plugin-no-workspace/issues/5), preventing standalone conversations from visually running into the last workspace above). Identify the standalone bucket via the native `data-row-key="workspace:"` attribute instead of row text so real workspaces named “Ungrouped” or “未分组” are never hidden, and clean up section attributes on disposal or row reuse.

Version `1.3.0`: Admit official dsh `0.2.1-rc.2` in declared compatibility ranges while retaining `0.2.0-rc.2` support. Keep untargeted `uiWorkspace.startSession` calls with `agentPreset`, `prompt`, and `clearPreviousDraft` options standalone instead of inheriting a workspace: reuse only the currently selected eligible standalone blank for preset creation (such as the Settings Agent Preset Creator flow) via host `/create` with `sessionId`, `agentPreset`, and `cwd` while respecting the returned session ID, coalesce identical concurrent option requests, and route standalone draft preparation through `conversation.input.requestDraftInitialization` with localized Chinese/English blocked-draft notices. Plain no-options **New Session** now always creates a fresh default-preset standalone blank (matching native DSH `0.2.1-rc.2` and avoiding leftover Creator-mode blanks; on `0.2.0-rc.2`, repeated plain **New Session** presses also create new empty standalone sessions rather than reusing an existing blank; programmatic draft-only global calls without `agentPreset` reuse the current eligible standalone blank as-is, retaining its existing preset if a leftover Creator-mode blank is still selected).

Version `1.2.1`: Adapt shared `uiWorkspace.startSession` for sidebar, title-bar, and native shortcut actions. Resolve the current conversation from main-view retention and restore native navigation when the plugin unloads.

Version `1.2.0`: Update the declared host target to official dsh `0.2.0-rc.2`. Session creation still goes through the native Session Controller, and detach still calls `workspace.detachSession`.

Version `1.1.0`: Create durable standalone chats through the native Session Controller. Adapt sidebar component props instead of cached injection results, including the split workspace sidebar.

The declared host range is `>=0.2.0-rc.2 <0.3.0-0 || 0.2.1-rc.2 || 0.2.1-rc.5`; official dsh `0.2.0-rc.2`, `0.2.1-rc.2`, and `0.2.1-rc.5` satisfy it. Keep the previous plugin release on older DSH. [Validation record](.github/reviews/dsh-0.2.1-rc.5.md).

Install published versions from [npm](https://www.npmjs.com/package/dsh-plugin-no-workspace). To test the current source, run `npm ci` and `npm pack`, then `dsh plugin --profile desktop add ./dsh-plugin-no-workspace-1.4.0.tgz`. See the [release procedure](.github/RELEASING.md) for publication checks.

This release targets DSH `0.2.1-rc.5` (compatible with `0.2.1-rc.2` and `0.2.0-rc.2`). Run `npm ci`, `npm test`, and `npm run check:package` to verify the build and package. Restart DSH after updating.


Version `1.1.0` checked standalone persistence and workspace detachment on DSH `0.1.5-rc.2`. Automated tests cover client loading.

## License

[MIT](LICENSE) © SpookySandwich
