Repository navigation
桌面端 README 的共享清单把「设置」列入,但设置文档实际是各 profile 自己的 cordis.patch.yml #8399
YOUKNOWWHOOO
started this conversation in
General
Replies: 1 comment
|
补一个一手佐证:我们做桌面端适配时正好核对过这条——本机 desktop profile 的 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
现象
apps/desktop/README.zh.md的「已知限制」小节(本次核对为第 470 行)逐字写:英文版
apps/desktop/README.md的「Known limitations」小节(第 468 行)是同一句。这句话枚举的五项里,「设置」与实现不符:设置文档不是数据根下的共享文件,而是当前活动 profile 自己的
cordis.patch.yml,因此设置按 profile 分裂。CLI 的webprofile 与桌面端固定使用的desktopprofile 各持一份,一端在设置页里做的改动,另一端看不到。证据一:官方文档
docs/subsystems/settings.md(文档站路径reference/subsystems/settings.md)首段逐字:本机译文:设置服务从活动 profile 的条目投影易变 Config 字段,配置编辑器通过 Cordis patch 持久化编辑。
证据二:发布产物逐行回读(本机
@deepseek-ai/dsh0.2.0-rc.2,以下位置为包内产物路径,不是仓库源码行号)设置文档的路径:
dsh-settings/lib/index.js第 399 至 408 行该路径的来源:
dsh-config-editor/lib/index.js第 24 至 26 行的get documentPath() { return this.ownerContext.profileContext.patchPath; };写盘在同文件第 123 行的writeFileAtomic(path, String(document), …)。patchPath的定义:dsh-app-boot/lib/index.js第 946 行的const patchPath = join(dir, PROFILE_PATCH_FILENAME);,其中dir是该 profile 的目录、PROFILE_PATCH_FILENAME = "cordis.patch.yml";该值经dsh/lib/profile-boot-*.js第 263 行的patchPath: composed.profile.patchPath进入profileContext。设置的写入通道确实落在同一个服务上:
dsh-settings/lib/index.js第 324 行的static inject = ["configEditor", "profileContext"],写入调用在第 502 至 508 行的this.ownerContext.configEditor.edit(entry, …)。遗留设置文档只被一次性导入,不是活的配置层:
dsh-settings/lib/index.js第 343 至 363 行(其中第 348 行为const path = join(profile.home, "settings.yaml");)。因此设置的实际落点是
$DSH_HOME/profiles/<profile>/cordis.patch.yml:对 CLI 是web,对桌面端是desktop(后者由apps/desktop/src/paths.ts以字面量常量固定)。影响
apps/desktop/README.zh.md第 80 行)写的是「CLI 与 Desktop 共享$DSH_HOME下受支持的产品数据」——这是较宽的表述,与实现不冲突;冲突只出现在第 470 行那处逐项枚举里。webprofile,桌面端使用desktopprofile,因此桌面端看不到 CLI 侧已保存的设置。建议
把第 470 行(英文第 468 行)枚举中的「设置」去掉,或补一句说明:设置按 profile 持久化于该 profile 的
cordis.patch.yml,不跨 profile 共享。环境
@deepseek-ai/dsh0.2.0-rc.2,经 npx 安装,dsh web监听回环地址;profile 组合为@deepseek-ai/dsh-base+@deepseek-ai/dsh-web-app。master的 README 与文档,以及本机安装树的发布产物(逐行回读)。未安装桌面端,未做运行期观测;关于桌面端 profile 名的结论来自apps/desktop/src/paths.ts的源码。All reactions