Back to home

zekdeW

dsh-client-workspace-deep-link

Workspace deep link (?workspace=) client plugin for the DeepSeek Harness web GUI

Stars
1
Language
TypeScript
Created
Aug 14, 2026
Updated
Aug 14, 2026

Introduction

dsh-client-workspace-deep-link

English | 中文

A tiny client plugin for DeepSeek Harness that adds a boot-time workspace deep link to the web GUI: open

http://127.0.0.1:3080/?workspace=<absolute-directory>

and the page seeds a new session with that working directory and selects it, dropping you straight into a directory-scoped conversation. The directory's existing blank session is reused when one is listed, so repeated deep links land in the same conversation. The entry is consumed from the address bar before any network work, so a refresh never seeds a second session.

This makes the GUI launchable from any external tool — Alfred / Raycast / scripts on macOS or Linux, custom buttons, the DeepSeek Finder toolbar app — without touching the harness repository itself.

Install

Requires a working dsh installation (any recent build; the harness is pre-release, so plugin APIs may move).

# 1. install the package into the web profile
dsh plugin --profile web add github:zekdeW/dsh-client-workspace-deep-link

# 2. wire the plugin row into the profile's patch layer
#    edit ~/.dsh/profiles/web/cordis.patch.yml and add:
#    - insert:
#        - id: workspace-deep-link
#          name: '@zekdeW/dsh-client-workspace-deep-link'

# 3. restart the web server
kill $(lsof -ti :3080)
cd ~/dev/deepseek-harness && nohup pnpm dsh web >/tmp/dsh-web.log 2>&1 &

Then open http://127.0.0.1:3080/?workspace=/some/directory and a conversation scoped to that directory starts immediately.

How it works

The plugin's browser half registers on ctx.workspaces / ctx.sessions — the same services the built-in workspace picker drives — and on page load:

  1. reads ?workspace= from the URL and removes it from the address bar (keeping other query entries);
  2. registers the path as a Workspace (workspaces.create, idempotent on the canonical path);
  3. connects its blank session (workspaces.connectWorkspace, which reuses the directory's existing blank session) and selects it (sessions.open).

The seed retries only folded transport failures (internal, the page-load/connection race, bounded at 40 attempts with 250 ms backoff); a Host rejection (an invalid directory) stops it without selecting the failed session.

Development

pnpm install
pnpm tsdown   # emits lib/ (commit the build: git installs do not run build scripts)

License

MIT


dsh-client-workspace-deep-link

English | 中文

DeepSeek Harness Web 界面加启动期 workspace 深链接的 微型客户端插件:打开

http://127.0.0.1:3080/?workspace=<绝对目录>

页面就会新建一个以该目录为工作区的会话并选中它,直接进入限定该目录的对话。该目录已有空白会话时会被复用, 重复深链落在同一个对话里。参数会在任何网络请求前从地址栏移除,刷新页面不会重复创建会话。

装上之后,任何外部工具——Alfred / Raycast / 各种脚本、自定义按钮、 DeepSeek Finder 访达工具栏按钮——都能一键直达以指定目录为工作区的 对话,完全不用改 Harness 仓库本身。

安装

需要可用的 dsh(较新构建即可;Harness 处于 pre-release 阶段,插件 API 可能变动)。

# 1. 把包装进 web profile
dsh plugin --profile web add github:zekdeW/dsh-client-workspace-deep-link

# 2. 把插件行接进 profile 的补丁层
#    编辑 ~/.dsh/profiles/web/cordis.patch.yml,加入:
#    - insert:
#        - id: workspace-deep-link
#          name: '@zekdeW/dsh-client-workspace-deep-link'

# 3. 重启 web 服务
kill $(lsof -ti :3080)
cd ~/dev/deepseek-harness && nohup pnpm dsh web >/tmp/dsh-web.log 2>&1 &

然后打开 http://127.0.0.1:3080/?workspace=/某个目录,以该目录为工作区的对话会立即开始。

原理

插件浏览器侧注册在 ctx.workspaces / ctx.sessions 上——与内置 workspace 选择器驱动的是同一套服务。 页面加载时:

  1. 从 URL 读取 ?workspace= 并从地址栏移除(保留其他查询参数);
  2. 把路径注册为 Workspace(workspaces.create,按规范路径幂等);
  3. 连接其空白会话(workspaces.connectWorkspace,会复用该目录已有的空白会话)并选中(sessions.open)。

种子过程只对折叠的传输失败(internal,页面加载与连接建立的竞态,上限 40 次、间隔 250 ms)重试; Host 拒绝(目录无效)即停止,且不选中失败的会话。

开发

pnpm install
pnpm tsdown   # 产出 lib/(构建产物需提交进仓库:git 安装不会执行构建脚本)

License

MIT