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

dsh-client-ui-agent-preset · @deepseek-ai/dsh-client-ui-agent-preset

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-agent-preset
分组G06 · 客户端 UI 包
拓扑层Layer 15(层次遍历:被依赖方先于依赖方)
源码路径packages/client/ui-agent-preset
来源层L2 web-app bundle(base 之上装配)

① 实现逻辑

浏览器半用 AgentPresetSettingsController/AgentPresetSectionController/AgentPresetSeatController 三个控制器驱动同一份 preset 名册:apply 先把 ctx.configForms.developerTools 作为唯一门控(关闭时清空暂存并重算所有 seat)(src/client/index.ts:104-111),再经 ctx.inject(['slots','conversation','sessions','uiWorkspace']) 向 'conversation.hero.agentPreset' 注册新会话 chip、向 'conversation.session.header.actions' 以 order -10 注册会话头只读标签 (src/client/index.ts:153-196),最后以 order 20 向 'settings.section' 注册名册设置段 (src/client/index.ts:223-230)。名册与默认值经 ctx.remote 读取 settings、并在 settings/document-updated 与 connection/reset 时统一 refresh (src/client/index.ts:127-145)。宿主半为空 apply,仅让插件出现在 Loader (src/index.ts:9)。

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

② 注册/提供(provides)

③ 依赖(depends_on · 上游前驱)

dsh-agent-preset-registryE1
消费 preset 组合类型与 display 文案
src/client/AgentPresetLabel.tsx:17 import @deepseek-ai/dsh-agent-preset-registry/types + src/client/locales.ts:114-115
dsh-api-remotesE1+E2
读取 preset 名册并订阅设置文档变更
src/client/index.ts:26-28 ctx.remote merge + src/client/index.ts:136 ctx.remote.$on('settings/document-updated')
dsh-api-session-controllerE1+E2
按会话解析 binding 与保留态以决定 seat 归属
src/client/index.ts:20-21 SessionBinding 类型 + src/client/index.ts:83-86 ctx.sessions.binding/retainInfo
dsh-client-localeE1+E2
注册并绑定 settings.agentPreset 字典
src/client/index.ts:24-25 ctx.locale merge + src/client/index.ts:122 ctx.locale.register('settings.agentPreset')
dsh-client-ui-conversationE1+E2
获取 conversation.hero.*/session.header.actions 槽声明与 conversation 作用域
src/client/AgentPresetLabel.tsx:16 import @deepseek-ai/dsh-client-ui-conversation/client + src/client/index.ts:153 ctx.inject(['slots','conversation',...])
dsh-client-ui-primitivesE1
复用基础 UI 组件渲染 chip 与设置行
src/client/AgentPresetLabel.tsx:14 import @deepseek-ai/dsh-client-ui-primitives
dsh-client-ui-rendererE1
引入 ctx.slots 服务声明
src/client/index.ts:31 import @deepseek-ai/dsh-client-ui-renderer/client
dsh-client-ui-settingsE1+E2
向设置壳注册 agent-presets 段
src/client/index.ts:30 SlotMap merge + src/client/index.ts:223 ctx.slots.inject('settings.section')
dsh-client-ui-workspaceE1+E2
Creator 模式起草后落到新会话
src/client/index.ts:32-33 ctx.uiWorkspace merge + src/client/index.ts:174 scope.uiWorkspace.startSession()
dsh-sessionE1
会话标识类型
src/client/index.ts:22 import SessionId from @deepseek-ai/dsh-session/types

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

dsh-client-ui-settings-plugin-inventory
借用预设字典解析内置 agent 预设显示名
src/client/index.ts:10 type-only import + src/client/index.ts:46 ctx.locale.bind('settings.agentPreset')