跳到正文
DEV Community· 啦啦啦种太阳·· 6 小時前AI 評分42

DeepSeek Harness Web UI 的 Session Composer 為何呈灰色?

Why the Session Composer Is Greyed Out in the DeepSeek Harness Web UI

AI 導讀

DeepSeek Harness Web UI 的 Session Composer 呈灰色,是因為介面尚未選取工作區;即使 dsh 程序已有預設工作目錄,瀏覽器仍要求明確選取專案目錄,才可建立工作階段。工作區會記錄目錄的標準路徑及相關工作階段;目錄不存在或只新增但未選取時,建立流程仍可能無法繼續。

正文

You open the DeepSeek Harness Web UI, the page loads, and the box where you type your first task is greyed out. On a fresh install this is not a bug and not a permission problem: the UI wants a project directory selected first, and it will not open the session composer until you pick one.

This post covers what that selection registers, why the terminal already has a working directory while the browser still asks for one, and the situations that make the workspace step look broken when it is not.

DeepSeek Harness: the composer is waiting for a workspace, not for a model

A freshly opened Web UI has no selected workspace until you add one, even though the dsh process uses its invoking directory as the default filesystem location. Those are two different facts answering two different questions, and conflating them is where most of the confusion starts. A process always has some default place to work. The UI needs an explicit selection before it can attach a session to anything.

The quickstart says exactly this: choose and select the project directory, and until you do, the session composer stays unavailable. It is a UI workflow requirement. It is not a claim that every possible way of creating a session goes through the workspace registry.

DeepSeek Harness: what does selecting a directory actually register?

A workspace is a persistent record for a directory. It carries an identifier, a canonical path, a display title, and an ordered account of sessions. The workspace reference describes what happens next: the API gateway takes the chosen workspace path as the new session's working directory, then attaches the session to the record.

That is what gives the interface a way to group work by project. Note what it is not. The workspace record is not an agent, and it is not an instruction to the model. It is host-side bookkeeping that happens to sit in the path of session creation.

Selecting a directory creates a workspace context for a session

DeepSeek Harness: the five steps that get you from greyed out to working

  1. Start the Web UI by the project's documented startup instructions and open the URL the process prints. A separate note covers starting it without auto-opening a browser.
  2. Open Settings → Models, enter and save a DeepSeek API key if the model is not configured yet. The quickstart says the route becomes usable immediately, with no server restart.
  3. Click Choose workspace, add the project directory where you started dsh, and select it. Confirm this is the directory you actually want the agent working in.
  4. Start a session once the composer comes available. A good first task is asking for a repository summary and its main packages, which is the example the quickstart uses.
  5. Review any approval the agent asks for, and the work that follows. Selection supplies context; it does not decide later actions for you.

Still greyed out? Check the boring things: was the directory selected after being added rather than merely listed, and does it exist as a directory? The registry requires an absolute path and resolves it to a canonical path on registration; a nonexistent path or a non-directory is rejected, and the docs prescribe no universal UI error for every such failure, so a silent no-op is within spec.

DeepSeek Harness: why two names can be the same workspace, and two workspaces can share a name

The registry normalizes with filesystem realpath semantics, resolving symlinks, trailing slashes and ... Two strings that resolve to the same directory are the same canonical path, and registering it again returns the existing record instead of a twin.

The reverse catches people more often: two distinct paths can share a display title. The title is a label initially derived from the path, not a unique identifier, so when an entry looks ambiguous read the path.

Concept What it identifies What it does not establish
Process invoking directory The default filesystem location of dsh A selected workspace in a fresh Web UI
Workspace A stable record over a canonical directory path A separate copy of the directory
Session Interaction history with a recorded working directory A workspace, just because its path looks similar
Display title A human-readable label, initially derived from the path A unique identifier

One asymmetry is worth internalizing early: new sessions join a workspace's account only after their recorded working directory is checked against the workspace path, and a mismatch is rejected — but the registry does not set that directory itself. The creator does. In the UI flow the gateway takes the selected path, creates the session, attaches it; elsewhere it can fall back to an explicit or default directory. The capability is optional on the host and not part of the agent loop's core.

DeepSeek Harness: the directory moved, and the history looks wrong

A workspace stores its canonical path and does not rewrite it when the directory disappears. Its status can report a missing directory without deleting the record, and accounted sessions whose working directory is gone are preserved under the documented missing-directory exception. That is a preservation rule, not a repair: it does not recreate the directory or let a new session attach to a missing path. Restore or locate the directory before starting new work; a familiar title is not proof the path is reachable.

On its first successful start the registry bootstraps history from persisted session headers, grouping sessions with valid canonical working directories; legacy sessions without one stay ungrouped, and everything later joins by explicit attachment. Sessions and agents map onto each other more loosely than the wording suggests.

Removing a registration removes its account and ordering entry but does not delete the directory, user files, live sessions or stored logs — those sessions simply become ungrouped. Unregistering is therefore neither a backup step nor a deletion step, which matters the moment you clean up a list.

Ordering is manual: a newly attached session is prepended, and activity alone does not reorder it. A session missing from where you expect it is better investigated through its attachment and recorded directory than through its last active time. The reference also describes a pending-plugin state when the registry's required storage or session-persistence peer is unavailable; treat that as unavailable, not as empty history, and consult startup diagnostics when the capability itself is down.

DeepSeek Harness: what the workspace step does not protect you from

The registry is host-side bookkeeping. It exposes no model tool and adds no prompt text. Nothing says selecting a workspace confines all access to that directory, and the quickstart explicitly says an agent can read and edit files and run commands; the UI asks before operations that need approval under the active policy.

Review the action and the policy in force, especially in a sensitive directory. A title, a registration or a selected row is not a safety guarantee. Starting a first task in the Web UI covers what approval actually gates.

The documentation describes canonical paths and session attachment. It does not promise that every deployment ships the same UI or the same permissions. A configured model, a reachable directory, and a selected workspace solve three separate prerequisites. When one of them fails, changing the others blindly tends to bury the cause instead of surfacing it.

DeepSeek Harness: terms, briefly

  • Workspace: a persistent directory record plus its ordered session account.
  • Canonical path: the resolved directory path used for uniqueness and membership checks.
  • Session header: metadata including the session's working directory.
  • Ungrouped: a session not currently accounted for by any workspace.
  • Composer: the Web UI area where you start a session and send a task.

Originally published at https://dsh-plugin.com/blog/select-workspace-before-session

來源:DEV Community · dev.to