You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
【插件作者必读】2026-09-29 Desktop 升级:带设置 UI 的插件会静默失效 —— 迁移指南
变化总览(4 个断点 + 1 个组合拳)
ctx.inject(['settings'], s => s.settings.register(ns, schema))Configschema 即命名空间.volatile(),否则被volatileForm逐个丢弃,丢空后整个命名空间消失ctx.settingsScope.bind({ namespace })读写ctx.configForms.get(ns)(set/unset返回是否落盘)bind()抛 TypeErrorsettings.plugin.itemplugins.item(插件管理面板)与settings.plugins.tab(设置→内置插件分页)经configForms.whileServed([ns])注册dsh.client.inject可不声明ctx.configForms未就位 → apply 根本不执行(零报错)name:的定义行entries()去重把同 id entry 全部剔除迁移清单(照抄即可)
宿主半侧
要点:
apply(ctx, config)第二参读;用户改配置时 cordis 会以新 config重入 apply(volatile 字段不重挂载,其余字段变更会重启 fiber)。
sctx.settings.update(ns, patch)。客户端半侧
要点:
whileServed= 宿主服务该命名空间时挂载、停服自动撤下(官方agent-loop / web-search / shell 伴生包都是这个写法,可直接对照源码:
@deepseek-ai/dsh-client-ui-settings-agent-loop等)。settings.plugins.tab插槽对应「内置插件」分页。package.json(最容易漏的一步)
不声明的话客户端模块虽会被送进浏览器,但加载顺序无保证:
apply 执行时
configForms服务未就位 → apply 根本不执行,且控制台零输出。收尾
cordis.patch.yml:老版本写配置可能留下了带name:的重复定义行,改成纯 config 覆盖行(只有
id+config)。排查技巧(给要定位的人)
settings.describe()的 ns 列表、loader entry 信息塞进响应直接看。宿主记录时间戳——可以区分「没加载 / 加载了没执行 / 执行了没注册」。
configEditor.entries()过滤条件(同 id 去重 + 父树根必须是include)和
volatileForm只投影 volatile 字段,是两个最反直觉的静默剔除点。给官方的两点建议
settings.register这类 API 时,希望至少打一条 deprecation 日志,而不是让旧调用无痕失效。
volatileForm丢弃全部非 volatile 字段导致整个命名空间被跳过时,建议在describe 响应或日志中提示(例如 "ns X has no volatile fields, skipped"),
否则插件作者无从下手。
完整排查记录(含本机诊断过程)见
whalebuddy 仓库 docs/12。
All reactions