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

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

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

插件信息

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

① 实现逻辑

浏览器主题注册表:ThemeRuntime 持有 light/dark/system 偏好、字号与 token 覆盖层,用 prefers-color-scheme 解析 system,发布不可变 ThemeSnapshot 并 emit 'theme/change'(src/client/index.ts:159-360)。apply 安装全局 --dsw-* 样式表、创建 ThemeRuntime 并 ctx.provide('theme'),再向 settings.general.item 注册 appearance 与 font-size 两行(src/client/index.ts:429-478)。Host 半 src/index.ts 通过 webserver/index-inject 注入 boot 调色板与字号脚本,避免首屏闪色(src/index.ts:39-43)。

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

② 注册/提供(provides)

③ 依赖(depends_on · 上游前驱)

dsh-client-localeE1+E2
注册 settings.theme 字典
src/client/index.ts:16 + src/client/index.ts:435 ctx.locale.register
dsh-client-ui-rendererE1
拉入 SlotRegistry 服务合并类型
src/client/index.ts:18 import type
dsh-client-ui-settingsE1+E2
读取/持久化主题偏好并注册 settings.general.item 槽
src/client/index.ts:14 import type + src/client/index.ts:431 ctx.configForms.get
dsh-host-webserverE1+E2
向 HTML index 注入 boot 主题样式与脚本
src/index.ts:9 import type + src/index.ts:41 ctx.on('webserver/index-inject')
dsh-settingsE1+E2
Host 侧设置作用域配置(关闭自动保存)
src/index.ts:2 import type + src/index.ts:40 child.settings.configure

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

dsh-client-ui-layout
读取主题快照并订阅主题变化以投影到 DOM
src/client/index.ts:14 import type + src/client/index.ts:212 ctx.theme.getTheme / index.ts:213 ctx.on('theme/change')
dsh-client-ui-settings-account
主题区分账户界面外观
src/client/AccountSection.tsx:7 import + src/client/index.ts:180 ctx.theme.getTheme
dsh-client-ui-sidebar-terminal
终端配色跟随全局主题快照,订阅 theme/change
src/client/index.ts:12 import type + src/client/index.ts:83-84 ctx.theme.getTheme
dsh-cordis-client-runner
动态半渲染时读取主题令牌
src/client/guard.ts:19 import + src/client/providers.ts:6 import