目录:ACP 协议API 网关与控制器附件启动与插件管理客户端运行时客户端 UI 包上下文压缩上下文注入核心运行时凭据与授权交付物文档处理实验特性宿主扩展反馈通道文件系统目标与计划工具守卫Hooks 扩展宿主服务交互命令作业调度LLM 适配LSP 集成MCP 协议规划模式Agent 预设代码执行运行时运行时诊断沙箱定时调度SDK 与协议会话核心会话检索设置Shell 执行技能溢出存储SSH 远程执行存储子代理子进程终端待办类型契约框架 vendorWeb 访问Webhook工作流工作区
依赖链 · 上游(该插件依赖的前驱):
dsh-agentdsh-api-remotesdsh-api-session-controllerdsh-api-workspace-controllerdsh-client-localedsh-client-shortcutsdsh-client-ui-conversationdsh-client-ui-layoutdsh-client-ui-primitivesdsh-client-ui-rendererdsh-client-ui-sessiondsh-client-ui-sidebardsh-scheduledsh-sessiondsh-subagent
依赖链 · 下游(依赖该插件的节点):
dsh-client-ui-agent-presetdsh-client-ui-chatdsh-client-ui-directory-picker-browsedsh-client-ui-directory-picker-nativedsh-client-ui-scheduledsh-client-ui-subagentdsh-client-ui-workflow-rundsh-experimental-client-ui-agent-team
同一拓扑层(Layer 14,层次遍历层序):
插件信息
| 包名 | @deepseek-ai/dsh-client-ui-workspace |
|---|---|
| 分组 | G06 · 客户端 UI 包 |
| 拓扑层 | Layer 14(层次遍历:被依赖方先于依赖方) |
| 源码路径 | packages/client/ui-workspace |
| 来源层 | L2 web-app bundle(base 之上装配) |
① 实现逻辑
注册工作区浏览区与 Session 行动作:apply 创建 UiWorkspaceService 与视图 store,用 ctx.slots.provideRoot 提供全局 workspaces hook(src/client/index.ts:117-121),向 'sidebar.workspaces' 注册 WorkspaceBrowser 并声明 directoryFlow、会话菜单/行动作、行装饰等子槽(src/client/index.ts:257-277),向 'conversation.hero.workspace' 注册 WorkspacePicker(src/client/index.ts:307-315)。随后把 pin/rename/fork/archive 四个行动作、rename/archive 对话框与 toast 注入对应槽,并安装工作区快捷键(src/client/index.ts:200,282-306)。
内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件
上游依赖
下游依赖
外部 seam
② 注册/提供(provides)
- slot sidebar.workspaces(WorkspaceBrowser)与子槽 directoryFlow/session.menu.item/session.row.action/session.row.leading/session.row.hover
- slot conversation.hero.workspace(WorkspacePicker)与子槽 conversation.hero.workspace.directoryFlow
- slot shell.overlay 的 session-rename / session-archive / row-toast 表面
- ctx.uiWorkspace 服务(会话导航、pin/archive/fork、目录选择与浏览)
- 全局 useWorkspaces hook(slots.provideRoot)与工作区快捷键
③ 依赖(depends_on · 上游前驱)
dsh-api-remotesE1+E2
Host 目录选择器与 $host 事实
src/client/index.ts:19 import + src/client/index.ts:118 ctx.remote.directoryPicker
dsh-api-session-controllerE1+E2
会话列表、rename、search 与引用保留
src/client/index.ts:20 import + src/client/index.ts:106 ctx.get('sessions')
dsh-api-workspace-controllerE1+E2
读写工作区实体与快照(create/rename/delete/pin)
src/client/index.ts:29 import + src/client/index.ts:107 ctx.get('workspaces')
dsh-client-localeE1+E2
注册 workspace 字典
src/client/index.ts:31 + src/client/index.ts:121 ctx.locale.register
dsh-client-shortcutsE1+E2
注册/读取工作区快捷键命令
src/client/contract/slots.ts:53 + src/client/index.ts:249 ctx.shortcuts.catalog
dsh-client-ui-conversationE1
引入 conversation.hero.workspace 槽声明类型
src/client/contract/slots.ts:47 import type
dsh-client-ui-layoutE1+E2
导航取消信号与面板选择
src/client/index.ts:34 import type + src/client/navigation.ts:204 ctx.layout.beginNavigation
dsh-client-ui-primitivesE1
复用菜单项、对话框等原语
src/client/rows/Rows.tsx:24 + src/client/session-actions/RenameSession.tsx:8
④ 被依赖(dependents · 下游消费者)
dsh-client-ui-agent-preset
Creator 模式起草后落到新会话
src/client/index.ts:32-33 ctx.uiWorkspace merge + src/client/index.ts:174 scope.uiWorkspace.startSession()
dsh-client-ui-chat
分叉后打开新会话
src/client/apply.ts:22 + src/client/apply.ts:249 ctx.uiWorkspace.openSession
dsh-client-ui-directory-picker-browse
占据目录流洞并驱动枚举/创建原语
src/client/flow.ts:11 DirectoryFlowOwnerProps + src/client/index.ts:79-80 ctx.uiWorkspace.listDirectory/createDirectory
dsh-client-ui-directory-picker-native
占据目录流洞并驱动 Host OS 选择器
src/client/flow.ts:9 DirectoryFlowOwnerProps + src/client/index.ts:24 ctx.uiWorkspace.pickDirectory
dsh-client-ui-schedule
从任务卡跳转到原始会话
src/client/index.ts:39 import type + src/client/index.ts:137 ctx.uiWorkspace.openSession
dsh-client-ui-subagent
把子代理会话打开为主视图导航
src/client/index.ts:16 import type + src/client/index.ts:62 ctx.uiWorkspace.openSession
dsh-client-ui-workflow-run
从工作流面板导航到成员会话
src/client/index.ts:10 import type + src/client/index.ts:34 ctx.uiWorkspace.openSession
dsh-experimental-client-ui-agent-team
切换/打开成员会话视图
src/client/mount.ts:9 import '@deepseek-ai/dsh-client-ui-workspace/client' + src/client/mount.ts:21 inject 'uiWorkspace' + src/client/mount.ts:42 openSession