feat(model-picker): 模型选择器 B 面功率轨 + 全仓审查修正 (0.6.0) - #2
Merged
Merged
Conversation
⑳ 模型选择器 B 面(src/model-picker.js + skins/codex-ink/model-picker.css) - DOM 顶替席位,不寄生宿主菜单:自建触发器追加进 conversation.input.model 席位, 一条直接子代 :has() 隐藏宿主那一格(不打标记,React 换子节点也不闪回) - 数据与提交只走 ctx.modelDirectories(ctx.inject 等服务,缺席不阻塞皮肤); 会话 id 取席位祖先 data-conversation-session,退到 uiSession - 功率轨按 Codex 源码逐字:轨 24 / 档位点 4 / 拇指 28,.3s cubic-bezier(.23,1,.32,1), 弹层 254px、入场 .32s 30ms;真拖拽(拖动不提交、松手对齐提交一次)、←/→/Home/End - 往返期间列表不清空、轨与触发器按 pending 乐观显示并转圈;失败给宿主同款提示 - 设置卡新增「Codex 模型选择器」开关(modelPicker,默认开),关掉即交回宿主原生菜单 - 注:606faea 的 0.6.0 只提交了生成物、随即 revert;本次源码、构建与验收一起入库 审查修正 - 删掉 patches.css 里输入卡的第二个阴影真源 - --dsw-elevation-soft 不再自造(交还宿主值);stroke 改引用 stroke-color - skin.css 逐字声明字体栈;--dsw-focus-ring-color 接到 Codex 焦点色,皮肤的环也读它 - SKIN_DEFAULTS.dark.surface #181818 → #111111(0.5.6 起设置卡深色默认值就是错的) - .cx-error 读了不存在的令牌;isFontStack 挡反斜杠、注释、控制字符与不成对引号 - install-plugin 在新 profile 的流式空列表 [] 后追加 insert 会写坏 YAML - theme.css / client.js 里带着本机路径;体检扩到样式与文档(含 JSON 转义形式) 验收 - 新增 scripts/power-rail-verify.mjs(47 项)与 scripts/pack-host-asar.mjs - hero-verify 徽标圆角改为从宿主源码取期望值(rc.2 已是 var(--dsw-radius-xs)) - live-gui-probe 先关引导弹层、支持 B 面、A 面 pending 用 --latency 拉长往返 - settings-page-verify 9 行、深色底色 #111111、开关断言 - 全套(npm @deepseek-ai/dsh@0.1.7-rc.2 + 打包 asar + Edge 153,真 GUI 同版本 dsh web): check-repo 23/23 · audit 36/36 · elevation 19 · composer-shadow 23 · model-picker 20 · power-rail 47 · rightbar 42 · hero 25 · sidebar-align 6 · sidebar-surface 13 · live-gui-probe B 面 14 / A 面 10 · settings-page-verify 29 · theme-flash-probe 0 异常帧
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
补上复刻规格第六节的 B 面功率轨(交付物 7),并对照规格把全仓审查了一遍,修掉查实的问题。版本 0.5.10 → 0.6.0。
(真
dsh web0.1.7-rc.2 实例截图)⑳ 模型选择器 B 面(
src/model-picker.js+skins/codex-ink/model-picker.css)[data-slot="conversation.input.model"],弹层挂document.body。席位里有我们的触发器时,一条直接子代:has()把宿主那一格display:none(仍在 React 树里)。不打标记属性 —— React 换掉宿主子节点时标记会丢、宿主控件闪回。样式只画.codex-mp-*,check-repo有一条断言守着「不挂宿主菜单、:has()只有这一条」。ctx.inject(['modelDirectories'], …)等服务(与宿主自己挂模型位同一个口子;服务缺席不阻塞皮肤激活),directoryFor(会话).store订阅、select()提交。会话 id 取席位祖先的data-conversation-session(右栏侧边聊天有自己的席位),退到uiSession。inset .5px;档位点 4px(热区 16px);拇指 28px 白片 /.5px强描边 /0 0 2px;.3s cubic-bezier(.23,1,.32,1),拇指首帧 0s、16ms 后抬到 .3s;弹层 254px,入场.32s … 30ms。定位照宿主place()。touch-action: none、←/→/Home/End、焦点环画在拇指上、Escape;换模型连带默认档。modelPicker,默认开),关掉即交回宿主原生菜单(⑫ A 面)。Config是 12 个字段(规格第七节写的是 11 个)。审查修正
patches.css⑧ 还给[data-composer-card]写了一条阴影,与composer.css⑭ 构成双真源--dsw-elevation-soft是自造值(10% 墨大影,暗色 55% 黑),落在宿主SegmentedControl上--dsw-elevation-stroke写死字面值--dsw-elevation-stroke-color(计算值不变)skin.css逐字声明(与宿主 rc.2 一致)--dsw-focus-ring-color未定义:10 条 box-shadow 焦点环是墨色;皮肤的环绕过了宿主「指针操作不出环」的约定--dsw-codex-focus,皮肤的环也读它SKIN_DEFAULTS.dark.surface仍是#181818(0.5.6 起深色背景是#111111),设置卡色块显示错的默认值check-repo加逐字段对账.cx-error读不存在的令牌,错误提示是普通文字色error-primaryisFontStack可被绕过:Arial /*吞掉深色覆盖块,u\72l(即url([]后追加- insert:,写出非法 YAML,dsh web起不来[]先摘掉,非空流式列表拒绝composer.css注释里的本机路径被拼进theme.css/client.js发出;体检只扫 JS 且认不出 JSON 转义另有一批过期注释(卡片 10px、链接=墨、100ms、14px、行圆角 8、
install-plugin.mjs的 scopeCss、「五份样式」)与皮肤 README 的文件表。验收
新增
scripts/power-rail-verify.mjs(47 项,只要 Chromium;假目录把select()往返放慢到 600ms,pending 行为才量得到)与scripts/pack-host-asar.mjs(没有桌面壳时,用 npm 装的同一批宿主包拼夹具能读的 asar)。既有脚本的修正:
hero-verify:「徽标圆角保持官方 6px」写死 rc.1 字面量,rc.2 是var(--dsw-radius-xs)= 4px,在 rc.2 上必然 FAIL → 期望值改为从宿主源码现取。live-gui-probe:新 profile 的引导弹层挡住点击,右栏三条断言「实测 none」就是这么来的 → 先关弹层;新增 B 面 7 条;A 面 pending 用--latency(默认 800ms)拉长往返(本机 <60ms 采不到窗口);改档后改回。settings-page-verify:9 行;深色底色断言仍是 0.5.6 之前的#181818→#111111;新增开关 5 条。环境:npm
@deepseek-ai/dsh@0.1.7-rc.2+ 由它打包的 asar + Edge/Chromium 153;真 GUI 为同版本dsh web。本机没有桌面壳,桌面app.asar与 macOS 未实测。npm run check/build.mjs --checkaudit-codex-inkelevation-verify/composer-shadow-verifymodel-picker-verify(A 面) /power-rail-verify(B 面)rightbar-verify/hero-verifysidebar-align-verify/sidebar-surface-verifylive-gui-probesettings-page-verifytheme-flash-probe升级提示
index.js的Config多了modelPicker字段 —— 宿主半在启动时加载,装完要重启一次 dsh / 桌面应用,否则设置卡里这个开关写不进去。