DAG总览 / 组目录 / G06 客户端 UI 包

dsh-client-ui-commands · @deepseek-ai/dsh-client-ui-commands

Layer 15G06L2 web-app
目录:ACP 协议API 网关与控制器附件启动与插件管理客户端运行时客户端 UI 包上下文压缩上下文注入核心运行时凭据与授权交付物文档处理实验特性宿主扩展反馈通道文件系统目标与计划工具守卫Hooks 扩展宿主服务交互命令作业调度LLM 适配LSP 集成MCP 协议规划模式Agent 预设代码执行运行时运行时诊断沙箱定时调度SDK 与协议会话核心会话检索设置Shell 执行技能溢出存储SSH 远程执行存储子代理子进程终端待办类型契约框架 vendorWeb 访问Webhook工作流工作区
依赖链 · 上游(该插件依赖的前驱):
依赖链 · 下游(依赖该插件的节点):
同一拓扑层(Layer 15,层次遍历层序):
↑ Layer 14(7 插件)Layer 15↓ Layer 16(11 插件)

插件信息

包名@deepseek-ai/dsh-client-ui-commands
分组G06 · 客户端 UI 包
拓扑层Layer 15(层次遍历:被依赖方先于依赖方)
源码路径packages/client/ui-commands
来源层L2 web-app bundle(base 之上装配)

① 实现逻辑

以 CommandUiRuntime(Service,注册为 ctx.commandUi) 提供 '/' 命令面:构造时经 ctx.get('inputTriggers').registerSource 注册 trigger '/' 的 source,并建 CommandDirectory 做 capability-keyed 目录缓存、PopupSelectController 做每会话弹层 (src/client/service.ts:76-130)。候选合成把 Host 目录与客户端 contribution 按可用性合并、按 rankByName 排序,host 与 contribution 重名时 fail loud (src/client/service.ts:1-14, 97-128)。apply 注册 command 字典、ctx.plugin(CommandUiRuntime),再把 PopupSelectView 以 order 1 放进 'conversation.input.overlay',注入面按 sessionId 经 sessions.scope 解出该会话 popup (src/client/index.ts:58-75)。

内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件 上游依赖 下游依赖 外部 seam

② 注册/提供(provides)

③ 依赖(depends_on · 上游前驱)

dsh-api-remotesE1+E2
拉取 Host 命令目录并订阅变更
src/client/service.ts:19 + src/client/service.ts:108 ctx.remote.commands.list + src/client/service.ts:129 connection/reset
dsh-api-session-controllerE1+E2
按会话解析 scope 与 using
src/client/index.ts:9 ISessions + src/client/service.ts:98 this.sessions()
dsh-client-localeE1+E2
注册命令字典
src/client/index.ts:15 + src/client/index.ts:59 ctx.locale.register('command')
dsh-client-ui-conversationE2
占据输入浮层槽位
src/client/index.ts:13 SlotMap merge + src/client/index.ts:64 slots.inject('conversation.input.overlay')
dsh-client-ui-input-triggerE1+E2
把 '/' 命令面注册成触发源
src/client/contract.ts:8 + src/client/service.ts:113-115 ctx.get('inputTriggers').registerSource
dsh-client-ui-primitivesE1
命令弹层组件与候选排序函数
src/client/PopupSelectView.tsx:13 import + src/client/service.ts:26 rankByName
dsh-client-ui-rendererE1
引入 slots 服务声明
src/client/index.ts:16 merge
dsh-client-ui-sessionE1
会话 UI 声明合并
src/client/index.ts:17 merge
dsh-commandsE1
命令目录与结果类型
src/client/directory.ts:8-12 + src/client/service.ts:20 CommandResult
dsh-sessionE1
会话标识类型
src/client/directory.ts:9 import SessionId

④ 被依赖(dependents · 下游消费者)

dsh-client-ui-message-feedback
挂 /feedback 命令装饰
src/client/index.ts:18 import type + src/client/index.ts:136 scope.commandUi.decorate
dsh-client-ui-model-selection
注册 /model 命令的 popupSelect 交互
src/client/index.ts:17 import type + src/client/index.ts:145 command.register
dsh-client-ui-permission-presets
装饰 /permission 命令为 popup 选择器
src/client/index.ts:35 import type + src/client/index.ts:176 command.decorate
dsh-session-log-export
订阅 /export 命令执行成功事件以启动浏览器下载
src/client/index.ts:6 import; src/client/index.ts:48 ctx.on('command/executed')