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

dsh-client-ui-model-selection · @deepseek-ai/dsh-client-ui-model-selection

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

插件信息

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

① 实现逻辑

先 ctx.plugin(ModelDirectoryResolver) 挂上 ctx.modelDirectories(src/client/index.ts:138),该服务用 WeakMap-with-values 为每个 Session 惰性建一个 ModelDirectory,并订阅 connection/reset 与 llm/adapters-updated 等事件刷新进程级目录(src/client/service.ts:46-73)。apply 再用同一目录注册两个入口:/model 的 commandUi popupSelect 装饰(src/client/index.ts:145)与 composer 的 conversation.input.model 座位(src/client/index.ts:182)。popup 选项由 optionsOf 拍平目录(失败组列出但不可选,src/client/index.ts:75-101),选择经 selectionOf 反解并按 session/selectModel 提交(src/client/index.ts:116-131)。

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

② 注册/提供(provides)

③ 依赖(depends_on · 上游前驱)

dsh-api-remotesE1+E2
读模型目录 Remote 与转发事件
src/client/catalog.ts:4 import + src/client/service.ts:53 ctx.remote.$on
dsh-api-session-controllerE1+E2
Session 绑定/投影与 session Remote 控制器面
src/client/index.ts:14-15 import + src/client/service.ts:17-18 import
dsh-client-localeE2
注册 model 文案命名空间
src/client/index.ts:21 import type + src/client/index.ts:132 ctx.locale.register(NS)
dsh-client-ui-commandsE2
注册 /model 命令的 popupSelect 交互
src/client/index.ts:17 import type + src/client/index.ts:145 command.register
dsh-client-ui-conversationE2
使用 ui-conversation 声明的 input.model 座位
src/client/index.ts:19 import type + src/client/index.ts:182 scope.slots.inject('conversation.input.model')
dsh-client-ui-primitivesE1
复用图标与 MenuSurface 控件
src/client/index.ts:25 import { IconDataOutlineRegular } + src/client/ModelSelect.tsx:22
dsh-client-ui-rendererE1+E2
ctx.slots 槽注册表
src/client/index.ts:22 import type + src/client/index.ts:123 inject 'slots'
dsh-client-ui-sessionE1
Session 标准来源类型面
src/client/index.ts:23 import type {}
dsh-sessionE1
会话身份类型
src/client/service.ts:18 import type { SessionId }

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

无下游(叶子/被消费端)