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

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

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

插件信息

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

① 实现逻辑

客户端 shell 插件:apply 里用一次 ctx.slots.register 把 AppFrame 装进内建 'root' 槽,并同时声明 sidebar/main/rightbar/shell.overlay/shell.leading 五个子槽与布局 store(src/client/index.ts:171-182),同时把 store 实例绑到 LayoutController 暴露 ctx.layout(src/client/index.ts:167-170)。LayoutController 只写 store 声明的动作集,提供主面板选择、右栏轨道/全屏上报与侧栏开关(src/client/service.ts:57-105);AppFrame 用 ResizeObserver + rAF 测量 frame 宽度并解算三栏几何(src/client/AppFrame.tsx:139-163)。另一条 effect 把 ThemePresenter 挂上,用纯 DOM 写入把 ctx.theme 快照投到 document(src/client/index.ts:210-218、src/client/theme-presenter.ts:49-75)。

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

② 注册/提供(provides)

③ 依赖(depends_on · 上游前驱)

dsh-client-localeE2
注册并绑定 shortcuts.layout 文案命名空间
src/client/index.ts:11 import type + src/client/index.ts:152 ctx.locale.register / index.ts:153 ctx.locale.bind
dsh-client-shortcutsE2
注册侧栏切换快捷键命令
src/client/index.ts:20 import type + src/client/index.ts:183 ctx.shortcuts.register
dsh-client-ui-rendererE1+E2
ctx.slots 渲染组合注册表由 ui-renderer 提供,layout 借此注册/查询槽
src/client/index.ts:12 import type + src/client/index.ts:168 ctx.slots.entries('main')
dsh-client-ui-sessionE1
引入 ui-session 的声明合并(Session 标准来源类型面)
src/client/index.ts:13 import type {}
dsh-client-ui-themeE1+E2
读取主题快照并订阅主题变化以投影到 DOM
src/client/index.ts:14 import type + src/client/index.ts:212 ctx.theme.getTheme / index.ts:213 ctx.on('theme/change')

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

dsh-client-ui-chat
Chat 面板布局约束
src/client/apply.ts:18 merge + src/client/contract/slots.ts:15
dsh-client-ui-conversation
会话内容布局约束
src/client/contract/slots.ts:15 import @deepseek-ai/dsh-client-ui-layout/client
dsh-client-ui-open-in-app
读主面板选择以判断当前无全局面板时才有打开目标
src/client/index.ts:11 import type + src/client/index.ts:53 ctx.layout.panelInfo
dsh-client-ui-plugin-manager
注册 main 面板并订阅主面板切换重置视图
src/client/index.ts:15 import type { MainPanelId } + src/client/index.ts:119 ctx.layout.panelInfo
dsh-client-ui-schedule
读主面板选择并复用布局类型
src/client/index.ts:40 import type + src/client/DeleteToast.tsx:13
dsh-client-ui-settings-account
壳层布局类型面
src/client/index.ts:9 import type + src/client/AccountPlatformHost.tsx:2 import
dsh-client-ui-shortcuts
引入 layout 的 Context/SlotMap 合并
src/client/index.ts:7 type-only import
dsh-client-ui-sidebar
经布局服务切换/选择面板并引用面板 id 类型
src/client/index.ts:5 import type MainPanelId + src/client/index.ts:68 ctx.layout.toggleSidebar
dsh-client-ui-sidebar-right
经布局服务开合/全屏右栏面板
src/client/contract/slots.ts:25 import (client) + src/client/index.ts:160 const layout: ILayout = ctx.layout
dsh-client-ui-sidebar-terminal
引入 shell.overlay 槽类型,用于清理失败提示(当前 index 中已注释)
src/client/TerminalCleanup.tsx:6 import type
dsh-client-ui-workspace
导航取消信号与面板选择
src/client/index.ts:34 import type + src/client/navigation.ts:204 ctx.layout.beginNavigation