dsh-claude-style 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +123 -91
  2. package/LICENSE +16 -5
  3. package/README.en.md +8 -7
  4. package/README.md +9 -7
  5. package/docs/STYLE.md +37 -1
  6. package/fonts/AUTHORS.txt +10 -0
  7. package/fonts/JetBrainsMonoItalicVariable.ttf +0 -0
  8. package/fonts/JetBrainsMonoVariable.ttf +0 -0
  9. package/fonts/OFL.txt +93 -0
  10. package/lib/client.js +2251 -69
  11. package/lib/icons/providers/ClaudeApi.png +0 -0
  12. package/lib/icons/providers/README.md +13 -0
  13. package/lib/icons/providers/TeamoRouter-icon-dark.png +0 -0
  14. package/lib/icons/providers/a6-icon.png +0 -0
  15. package/lib/icons/providers/aicodemirror.svg +19 -0
  16. package/lib/icons/providers/aicoding.svg +20 -0
  17. package/lib/icons/providers/aihubmix-color.svg +1 -0
  18. package/lib/icons/providers/algocode.svg +51 -0
  19. package/lib/icons/providers/alibaba.svg +1 -0
  20. package/lib/icons/providers/amuxapi-icon.svg +13 -0
  21. package/lib/icons/providers/anthropic.svg +1 -0
  22. package/lib/icons/providers/apikeyfun.png +0 -0
  23. package/lib/icons/providers/apinebula_icon.png +0 -0
  24. package/lib/icons/providers/atlascloud_icon.png +0 -0
  25. package/lib/icons/providers/aws.svg +1 -0
  26. package/lib/icons/providers/azure.svg +1 -0
  27. package/lib/icons/providers/baidu.svg +1 -0
  28. package/lib/icons/providers/bailian.svg +1 -0
  29. package/lib/icons/providers/bytedance.svg +1 -0
  30. package/lib/icons/providers/byteplus.png +0 -0
  31. package/lib/icons/providers/catcoder.svg +1 -0
  32. package/lib/icons/providers/ccsub.svg +4 -0
  33. package/lib/icons/providers/chatglm.svg +1 -0
  34. package/lib/icons/providers/cherryin.png +0 -0
  35. package/lib/icons/providers/claude.svg +1 -0
  36. package/lib/icons/providers/claudecn.png +0 -0
  37. package/lib/icons/providers/claw.svg +22 -0
  38. package/lib/icons/providers/cloudflare.svg +1 -0
  39. package/lib/icons/providers/code0.png +0 -0
  40. package/lib/icons/providers/cohere.svg +1 -0
  41. package/lib/icons/providers/copilot.svg +1 -0
  42. package/lib/icons/providers/crazyrouter.svg +1 -0
  43. package/lib/icons/providers/cubence.svg +9 -0
  44. package/lib/icons/providers/deepseek.svg +1 -0
  45. package/lib/icons/providers/doubao.svg +1 -0
  46. package/lib/icons/providers/eflowcode.png +0 -0
  47. package/lib/icons/providers/etok.png +0 -0
  48. package/lib/icons/providers/fenno-icon.webp +0 -0
  49. package/lib/icons/providers/gemini.svg +1 -0
  50. package/lib/icons/providers/gemma.svg +1 -0
  51. package/lib/icons/providers/github.svg +1 -0
  52. package/lib/icons/providers/githubcopilot.svg +1 -0
  53. package/lib/icons/providers/google.svg +1 -0
  54. package/lib/icons/providers/googlecloud.svg +1 -0
  55. package/lib/icons/providers/grok.svg +1 -0
  56. package/lib/icons/providers/hermes.png +0 -0
  57. package/lib/icons/providers/huawei.svg +1 -0
  58. package/lib/icons/providers/huggingface.svg +1 -0
  59. package/lib/icons/providers/hunyuan.svg +1 -0
  60. package/lib/icons/providers/huoshan.png +0 -0
  61. package/lib/icons/providers/kimi.svg +1 -0
  62. package/lib/icons/providers/lioncc.svg +6 -0
  63. package/lib/icons/providers/longcat-color.svg +1 -0
  64. package/lib/icons/providers/mcp.svg +1 -0
  65. package/lib/icons/providers/meta.svg +1 -0
  66. package/lib/icons/providers/micu.svg +23 -0
  67. package/lib/icons/providers/midjourney.svg +1 -0
  68. package/lib/icons/providers/minimax.svg +1 -0
  69. package/lib/icons/providers/mistral.svg +1 -0
  70. package/lib/icons/providers/modelscope-color.svg +1 -0
  71. package/lib/icons/providers/nekocode-icon.png +0 -0
  72. package/lib/icons/providers/newapi.svg +1 -0
  73. package/lib/icons/providers/notion.svg +1 -0
  74. package/lib/icons/providers/novita.svg +11 -0
  75. package/lib/icons/providers/nvidia.svg +1 -0
  76. package/lib/icons/providers/ollama.svg +1 -0
  77. package/lib/icons/providers/openai.svg +1 -0
  78. package/lib/icons/providers/opencode-logo-light.svg +1 -0
  79. package/lib/icons/providers/openrouter.svg +1 -0
  80. package/lib/icons/providers/packycode.svg +1 -0
  81. package/lib/icons/providers/palm.svg +1 -0
  82. package/lib/icons/providers/pateway.jpg +0 -0
  83. package/lib/icons/providers/perplexity.svg +1 -0
  84. package/lib/icons/providers/pipellm.png +0 -0
  85. package/lib/icons/providers/ppio.svg +1 -0
  86. package/lib/icons/providers/qianwenai.svg +1 -0
  87. package/lib/icons/providers/qiniu.png +0 -0
  88. package/lib/icons/providers/qwen.svg +1 -0
  89. package/lib/icons/providers/qwencloud.svg +1 -0
  90. package/lib/icons/providers/rc.svg +1 -0
  91. package/lib/icons/providers/relaxcode.png +0 -0
  92. package/lib/icons/providers/runapi.jpg +0 -0
  93. package/lib/icons/providers/shengsuanyun.svg +4 -0
  94. package/lib/icons/providers/siliconflow.svg +1 -0
  95. package/lib/icons/providers/sssaicode.svg +73 -0
  96. package/lib/icons/providers/stability.svg +1 -0
  97. package/lib/icons/providers/stepfun.svg +10 -0
  98. package/lib/icons/providers/subrouter.svg +30 -0
  99. package/lib/icons/providers/sudocode-us.png +0 -0
  100. package/lib/icons/providers/sudocode.png +0 -0
  101. package/lib/icons/providers/tencent.svg +1 -0
  102. package/lib/icons/providers/ucloud.svg +1 -0
  103. package/lib/icons/providers/unity2.png +0 -0
  104. package/lib/icons/providers/vercel.svg +1 -0
  105. package/lib/icons/providers/wenxin.svg +1 -0
  106. package/lib/icons/providers/xai.svg +1 -0
  107. package/lib/icons/providers/xiaomimimo.svg +1 -0
  108. package/lib/icons/providers/xycai-icon.png +0 -0
  109. package/lib/icons/providers/yi.svg +1 -0
  110. package/lib/icons/providers/zeroone.svg +1 -0
  111. package/lib/icons/providers/zetaapi-icon.png +0 -0
  112. package/lib/icons/providers/zhipu.svg +1 -0
  113. package/lib/index.js +125 -10
  114. package/lib/model-descriptions.json +150 -1
  115. package/package.json +6 -2
package/CHANGELOG.md CHANGED
@@ -1,92 +1,124 @@
1
- # Changelog
2
-
3
- ## [0.2.5] - 2026-09-20
4
-
5
- ### Added
6
- - **模型文案改为运行时读取的数据文件**:文案表迁出 bundle,落到 `src/model-descriptions.json`(构建时校验后随包发布为 `lib/model-descriptions.json`);宿主半边新增 `/dsh-claude-style/model-descriptions.json` 路由按请求读取该文件,浏览器半边在首次绘制模型选择器时 fetch 并按需缓存。此后扩充文案表无需重新构建、也不进 bundle(产物内已无任何模型文案)。解析按「精确条目 家族规则 档位规则 目录自带文本」逐级降级;精确条目按**归一化模型 id** 建键,同一模型被多个 provider 转售(`deepseek-v4-flash` 同时在 deepseek-official opencode-go)折叠为一条;家族规则有序且锚定,且**一律不带最高级**——「最强/旗舰」只写在钉住版本的精确条目里,否则旧版本(如 `gemini-1.5-pro`)会被误称旗舰。取不到文档时静默回退目录自带文本,不影响选择器可用。
7
- - **补充新模型线文案**:为 Artificial Analysis 榜单上此前未收录的模型线补写家族规则——Meta Muse Spark(Agent 与编码线,与 Llama 开源线区分)、Celeris-1 与 Inception Labs Mercury 2(扩散式 LLM,措辞按延迟而非能力展开)、Apodex(复杂专业工作的 Agent)、Motif 3(韩国 Motif Technologies 全自研开源权重 MoE,314B 总参 / 13.2B 激活)。榜单头部 40 个模型现已 100% 命中;仍未收录的新模型线按设计回退到目录自带文本,不编造文案。
8
-
9
- ### Fixed
10
- - **模型文案的两处误判**:其一,参数量档位规则 `\d+b` 未锚定,把 MoE 命名里的激活参数当成总参——`qwen3.8-2.4t-a95b`(2.4T 总参)与 `k2-horizon-375b-a23b` 都被读成「小尺寸稠密模型」;现拆出 `a\d+b` 激活参数规则并让稠密规则要求数字前有分隔符。其二,provider 兜底对多产品线厂商过于宽松,`north-mini-code` 被按 provider 名匹配成 Cohere Command;现补 `north` 家族规则。另补 `gpt-oss` 开源权重系列规则,并去掉家族规则里的最高级表述(见上)。
11
-
12
- ### Changed
1
+ # Changelog
2
+
3
+ ## [0.2.7] - 2026-09-20
4
+
5
+ ### Added
6
+ - **模型选择器厂商标识**:模型行显示**模型所属厂商**的标识(而非转售该模型的 provider),「更多模型」的 provider 分组标题显示该 provider 的标识。标识取自 [Lobe Icons](https://lobehub.com/icons) 的静态 SVG(`@lobehub/icons-static-svg`,MIT),按仓库既有架构在构建期内联进 bundle——`@lobehub/icons` React 组件包,装它就要破坏「零依赖、零打包器、单文件产物」这条约束。用单色字形(`fill="currentColor"`)随主题文字色绘制,亮暗两画布都清晰,也不与「陶烬橙唯一强调色」冲突;彩色变体不做——OpenAI、Anthropic、xAI、Moonshot、Z.ai、Vercel、Groq 12 家上游本就没有彩色版,且部分厂商色在 `#141413` 画布上不可见。绑定关系仍是数据:`model-descriptions.json` `brands.providers` / `brands.models`,构建期校验引用的标识都已 vendored,写错即构建失败。
7
+
8
+ ### Changed
9
+ - **文本选区改为实色两态**:选中文字不再用半透明陶烬橙,改为平台式实色——窗口聚焦时蓝底白字(`#3366D0` / `#FFFFFF`),窗口失焦时灰底黑字(`#C7C7C6` / `#000000`),亮暗两画布一致。选区是瞬时操作而非界面表层,因此不跟随主题;两态都是实色且带 `!important`,覆盖底下的链接色、行内代码色与语法高亮色,避免"蓝底上保留原文字色"导致读不清。CSS 无法读取窗口焦点(Chromium 走内部 `-internal-inactive-selection-*`),故由新增的 `src/overrides/selection.js` 把焦点态镜像到文档属性上,样式表据此切换;失焦时选区本身保留,不消失。
10
+ - **接入 cc-switch 全量供应商图标**:`src/assets/icons/providers` 引入其 107 个图标,build 解析 `index.ts` / `metadata.ts` 生成 `PROVIDER_ICONS` / `PROVIDER_ICON_METADATA`,宿主新增 `/dsh-claude-style/icons/providers/*` 路由;模型选择器优先用 cc-switch 图标,缺失时回退 Lobe。
11
+ - **更多模型供应商标签改为推挤式 sticky**:每个供应商包成 section,滚动时上一个标签被下一个 section 往上推,而不是直接覆盖。
12
+ - **附件输入框接缝优化**:移除附件轨 focus 时 1px 内圈阴影,消除图片区与文字区之间的分界线和阴影。
13
+ - **更多模型子弹层**:适当提高弹层高度;供应商标签改为 sticky 顶部条,滚动时由下一个供应商标签替换。
14
+ - **更多模型 provider 标签强化**:provider 分组标题改为黑底白字圆角矩形;深色模式为白底黑字。
15
+ - **模型触发器 hover 去重**:删除 trailing 下针对 trigger/model 的额外 hover 规则,只保留模型触发器自身一层背景。
16
+ - **标题中文回退改为黑体**:SERIF 栈移除 CJK 衬线回退,中文落到 Noto Sans SC / 微软雅黑等黑体;西文仍保持 Anthropic Serif / Georgia / Times。
17
+ - **统计弹层合并**:统计行允许收缩省略(如 20轮...);隐藏宿主两个独立弹层,改为一个自定义弹层:上下两个区块(会话统计 / Token 用量),每块 2×2 网格,无总标题,风格与权限弹层一致,内容字号加大。
18
+ - **统计区交互**:统计弹层改为 hover 打开;统计控件仅在鼠标位于整个对话窗口内时显示。 统计行占据中间剩余空间并居中,使到左侧按钮组和右侧模型选择器的距离一致。
19
+ - **输入区统计合并重绘**:会话统计与 token 统计合并为一条居中的紧凑文本(如 23轮439步 · 130tok/s · 125M tok · 99% Cache),隐藏宿主图标与原始标签,两个统计弹层同步重绘为同一套字体/圆角/边框。
20
+ - **模型选择器补充当前非官方模型**:当前选中模型不属于 DeepSeek 官方服务时,在官方模型与更多模型之间用横线分隔并额外显示一行 provider/model。 触发器同时去掉向下箭头,hover 背景只保留在整个触发器上。
21
+
22
+ ## [0.2.6] - 2026-09-20
23
+
24
+ ### Added
25
+ - **JetBrains Mono 免安装生效**:代码字体此前虽随包分发,但只在用户把字体装进系统后才解析;现由宿主半边新增 `/dsh-claude-style/fonts/*` 路由直接随包提供字体文件,浏览器半边以 `@font-face`(`font-display: swap`)注册为 webfont——未安装 JetBrains Mono 的系统上代码字体也立即生效,路由缺失时静默回退原系统字体栈。
26
+ - **Anthropic 字体可选免安装**:`fonts/*` 路由同时放行 `AnthropicSansWebText.ttf` / `AnthropicSerifWebText.ttf`(均不进 npm 包,版权仍属 Anthropic)。用户把这两个文件放进插件包的 `fonts/` 目录后,宿主即以 webfont 提供,与系统安装效果一致;文件缺失时路由 404,字体栈回退到系统安装的副本,不影响未放置字体的用户。
27
+
28
+ ### Changed
29
+ - **代码块与表格样式对齐 Claude**:行内代码与代码块字号 -1px;代码块边框移到外层容器,语言标签与代码共用同一圆角边框;Markdown 表格字号提升一档(13px → 14px)、表头 #F0F0EF 背景、12px 圆角,并使用与内部横线一致的 0.5px 线条加外边框。
30
+ - **设置页支持自定义用户名**:新增用户名输入框,输入停顿后自动保存;默认用户名由宿主 OS 用户解析一次并缓存,不再解析工作区路径或轮询;宿主半边未重载时浏览器本地回退保留自定义值。
31
+ - **链接与行内代码样式对齐 Claude**:Markdown 链接下划线静止态 60% 不透明度、hover/focus-visible 恢复 100%,下划线加粗到 1.5px 并保留下划线避让;行内代码与代码块均改用 JetBrains Mono、字号强制与正文一致,并 +1 字重;代码字体栈补上正文 CJK 回退。行内代码背景矩形 padding 缩到 1px、背景色进一步减淡,边框与 composer 输入卡片非焦点态一致(1px solid --dsw-alias-border-l1);Markdown 正文行高 -1px、段落间距 -4px,代码块外边距与行高同步对齐正文。新对话页 composer 卡片保留纯白填充与真实投影,仅移除背景色光晕阴影。排队消息、后台任务、目标栏提升到消息层之上,避免被消息卡片遮挡;排队 dock 上移 3px,使其下沿对齐输入卡片边框。
32
+ - **代码字体从 Anthropic Mono Variable 替换为 JetBrains Mono Variable**:选用 JetBrains Mono 可变字体(含 Italic)作为代码字体,随插件库一并分发,并保留 SIL OFL 许可证。
33
+ - **权限弹层改为 hover 态打开**:权限分段按钮悬停时打开权限弹层,移入弹层取消关闭,移出后延迟关闭;`autoPopover` 关闭时仍保持点击打开/关闭。
34
+
35
+ ## [0.2.5] - 2026-09-20
36
+
37
+ ### Added
38
+ - **模型文案改为运行时读取的数据文件**:文案表迁出 bundle,落到 `src/model-descriptions.json`(构建时校验后随包发布为 `lib/model-descriptions.json`);宿主半边新增 `/dsh-claude-style/model-descriptions.json` 路由按请求读取该文件,浏览器半边在首次绘制模型选择器时 fetch 并按需缓存。此后扩充文案表无需重新构建、也不进 bundle(产物内已无任何模型文案)。解析按「精确条目 → 家族规则 → 档位规则 → 目录自带文本」逐级降级;精确条目按**归一化模型 id** 建键,同一模型被多个 provider 转售(`deepseek-v4-flash` 同时在 deepseek-official 与 opencode-go)折叠为一条;家族规则有序且锚定,且**一律不带最高级**——「最强/旗舰」只写在钉住版本的精确条目里,否则旧版本(如 `gemini-1.5-pro`)会被误称旗舰。取不到文档时静默回退目录自带文本,不影响选择器可用。
39
+ - **补充新模型线文案**:为 Artificial Analysis 榜单上此前未收录的模型线补写家族规则——Meta Muse Spark(Agent 与编码线,与 Llama 开源线区分)、Celeris-1 与 Inception Labs Mercury 2(扩散式 LLM,措辞按延迟而非能力展开)、Apodex(复杂专业工作的 Agent)、Motif 3(韩国 Motif Technologies 全自研开源权重 MoE,314B 总参 / 13.2B 激活)。榜单头部 40 个模型现已 100% 命中;仍未收录的新模型线按设计回退到目录自带文本,不编造文案。
40
+
41
+ ### Fixed
42
+ - **模型文案的两处误判**:其一,参数量档位规则 `\d+b` 未锚定,把 MoE 命名里的激活参数当成总参——`qwen3.8-2.4t-a95b`(2.4T 总参)与 `k2-horizon-375b-a23b` 都被读成「小尺寸稠密模型」;现拆出 `a\d+b` 激活参数规则并让稠密规则要求数字前有分隔符。其二,provider 兜底对多产品线厂商过于宽松,`north-mini-code` 被按 provider 名匹配成 Cohere Command;现补 `north` 家族规则。另补 `gpt-oss` 开源权重系列规则,并去掉家族规则里的最高级表述(见上)。
43
+
44
+ ### Changed
13
45
  - **源码按特性级分片重构**:`src/overrides.js` 拆为 `overrides/*.js`(copy / permissions / model-picker / account-footer / scheduler + 共享 popover-utils),`src/context.js` 拆为 `context/*.js`(host / prefs / model-copy / i18n),CSS 按 composer 与 components 拆为独立文件;build.mjs 改为清单驱动并新增碎片守门(禁 import/export、强制 4 空格缩进)。调度器不再读取特性闭包变量,改为通过 `ui` 句柄注册表调用各特性的 sync/close/owns/reposition/invalidateCopy 等接口;`settings.js` 不再重复调用 `loadPrefs()`。构建产物 `lib/client.js` 仍为单文件,不引入新依赖。
14
- - **模型文案跟随全局语言、单行显示**:描述按 shell 自身的 `locale` 服务取当前语言(`zh` / `en`),每行只渲染一条,不再中英两行叠加;并订阅 locale 变更,切换语言时已渲染的弹层即时重绘。选择器自身的 UI 文案(触发按钮 aria、加载中、空目录、推理等级、More models)走同一路径,bundle 内只保留取不到文档时的中性英文兜底。
15
-
16
- ### Fixed
17
- - **塌缩态底栏插件控件压住 Claude 标**:皮肤把 `settingsArea` 压成零尺寸(保留 `overflow: visible` 让浮层可画),展开态下这足以把条目挤成 4px 细条;但设置插件带了自己的 rail 变体(`…_rail`),塌缩时拿到固定 36×36 并逃出零尺寸盒子,正好压在账户控件的 Claude 标上。现于塌缩态隐藏 `settingsArea` 内的按钮与 `triggerRow`;可达性不受影响——弹层镜像项用 `realTrigger.click()` 驱动真实触发器,`display:none` 不阻断。
18
- - **塌缩态账户弹层被侧栏容器裁掉**:侧栏列宽 56px 且 `overflow: hidden`,弹层原本 `position: absolute` 锚在轨道右侧,越过轨道边缘即被整块裁掉(同时基础规则的百分比 `max-width` 以 59px 页脚为基准把它压成 43px 宽)。现塌缩态改为 `position: fixed`(祖先链无 `transform`/`contain`,故不受该 `overflow` 裁剪),坐标由 `positionAccountPopover()` 解析(内联 `!important`,因为样式表侧同样用 `!important` 锚定);过渡桥同步由「朝下」转为「朝侧」。
19
- - **修复设置页(含 SubAgent 分页)文字整页消失**:皮肤为隐藏侧栏底栏原按钮,把 `footArea` 下的 `settingsArea`/`footerActions` 容器压成零尺寸并写了 `font-size: 0 !important; line-height: 0 !important`(保留 `overflow: visible` 让浮层可画)。但宿主设置弹窗是**就地渲染**在 `settingsArea` 子树里的(弹窗 overlay 是触发行的兄弟节点,没有 portal),零字号/零行高沿子树继承——官方组件只给文本行设了 `font-size`、没设 `line-height`,继承到 0px 行高的行盒直接塌成 0 高,整页文字"消失"。现把两个容器的折叠拆开:`settingsArea` 只保留几何折叠(零宽高 + `overflow: visible`),字体度量恢复自然继承——它除了被 `display: none` 的触发行就只剩就地弹窗,无需零字号兜底;`footerActions` 仍托管着会被镜像改道的插件原始条目,散落的行内文字仍需零字号压住,维持完整折叠。
20
-
21
- ## [0.2.4] - 2026-09-19
22
-
23
- ### Changed
24
- - **深色模式输入框焦点由"加深"改为"提亮"**:近黑画布上黑边毫无辨识度,深色焦点描边与 1px 晕边从纯黑改为亮象牙(`#faf9f5`,描边 45% / 晕边 18%),输入框聚焦时明显亮起,底栏托盘与键盘 `:focus-visible` 外框同步改为亮象牙;暗色投影保留作真实阴影深度。
25
- - **权限弹层列表间距加宽**:Read / Edit / Auto 预设行为两行行(标签 + 说明),原先 2px 的行间距糊成整块;行间距加宽 4px 至 6px,弹层不再拥挤。
26
- - **会话统计并入输入框工具栏同一行**:轮次/速率与 token/缓存两组统计 pill 原先在输入框下方独占一行,现移入工具栏行、居于左侧控件与右侧模型/状态组之间(行布局 space-between 自然居中),输入框区域由三行压为两行;宿主把 pill 放回原位时每轮同步自动归位,窄屏(≤820px)仍整体隐藏;host 全宽行依赖的 width/padding/margin 在行内规则中全部重置。
27
- - **统计 pill 改为悬停出现**:两组统计平时隐藏(保留占位、无重排),鼠标移入对话窗口(composer)时淡入;pill 位于卡片内,悬停即保持可见可点。
28
- - **附件轨与输入框之间的分界线消除**:有图片时卡片 8px flex 间隙会把画布透成一条接缝线;以负外边距闭合间隙并把 8px 移入输入框顶部内边距——文字与图片的距离、卡片总高均不变;附件态聚焦环改由附件轨独自承载,接缝不再出现第二条线。
29
- - **非对话页隐藏整个底部输入区**:宿主把 composer 挂在会话根下、轨迹/上下文页同样渲染(还为其预留了底部空间);现在仅对话页签激活时显示,其余页签隐藏整个 seat(宿主 `--dsh-composer-height` 随之归零,轨迹 ledger 的底部留白一起收起)。页签检测限定在会话根的 tablist(对话视图 order 0 恒为首个 tab,与语言无关)。
30
- - **模型选择控件按 Claude 效果重构**:触发器去掉数据库图标、只保留模型名(+ 推理等级)与箭头,整体单一 hover 背景(不再是多块背景矩形叠加);弹层不再两段 drilling,一级直接列出 DeepSeek 官方服务模型(名 + 描述 + 勾选),其下分界线、推理等级行(如有)与 More models 行;后两者唤出二级弹层并排在一级旁侧(视口不够自动翻到左侧)。整弹层改为悬停即开(与账户控件一致,带 180ms 跨窗宽容),列表字体/行高/间距/圆角/悬停与权限弹层完全一致。数据与提交直连宿主 `ctx.modelDirectories` 的每会话 ModelDirectory(与宿主菜单、`/model` 命令同源),选中态、目录与错误实时同步;宿主原座椅节点标记隐藏,React 换节点后自动重标记。
31
-
32
- ### Fixed
33
- - **修复权限切换在 dsh 0.2+ 上完全失效**:当前会话选中态已移出 Session Controller(`sessions.list` 快照不再有 `current` 字段,改由 `uiSession` 服务以主视图绑定投影),`currentSession` 恒返回 null,点击权限菜单任意选项都静默无效、按钮标签永远停留在 `Accept edits`,而原生触发器被皮肤隐藏,GUI 内没有任何可用的切换入口。改为优先从 `uiSession` 主视图绑定读取当前会话 id,旧版宿主回退到 `list.current`;同时兼容 `permissions` 投影在 0.2+ 直接返回裸值(旧版包一层 `{ currentValue }`)的差异。
34
- - **亮色用户消息气泡由蓝改灰**:宿主亮色气泡底色 token(`--dsw-specific-bubble`)是 DeepSeek 蓝(`deepseek-50`),皮肤此前未覆盖,故亮色下用户消息呈蓝色;现改取皮肤的按钮悬停灰(`--dsh-claude-hover-bg`,亮色 `rgba(0,0,0,0.08)`)。深色气泡宿主本就是中性灰,保持不变。
35
- - **修复模型选择弹层永远停在「正在加载模型…」**:根因是把 store 的方法调在了实例上——宿主持有的每会话 `ModelDirectory` 实例只有 `load()` / `select()` 等,其响应式状态挂在它的 `.store`(快照 store)字段上(宿主给自家菜单注入的就是 `directory.store`)。皮肤却调用 `modelDir.subscribe()` / `modelDir.getSnapshot()`,前者抛 TypeError 被 catch 吞掉后还把刚取到的 directory 置回 null,后者恒失败 → 快照永远是 null → 触发器回落「选择模型」、弹层渲染 loading 行。现全部改走 `modelDir.store`;`load()`/`select()` 的异步 rejection 也按宿主做法补 `.catch()`。另外会话 id 读取改走 context.js 共享的 `currentSessionId()`(`uiSession` 投影优先、旧 `list.current` 回退),与权限切换同源、对新旧宿主都成立。
36
- - **深色强调色回到陶烬橙**:皮肤的深色 token 块声明在 `body[data-dsh-claude-style]` 上,与宿主的 `body[data-ds-dark-theme]` 同为 (0,1,1) 权重;宿主主题样式表若排在皮肤之后,其蓝色强调(`--dsw-alias-state-business-primary`、`--dsw-alias-button-info-fill`、`--dsw-alias-link` 与品牌 "new color")就会盖掉暖色盘。现把深色盘限定到 `[data-ds-dark-theme]`((0,2,1),与样式表顺序无关),并补上此前缺失的 `--dsw-alias-link` 与品牌 "new color" 两个强调 token;亮色盘补齐原先从深色基块继承的四个 token,外观不变。
37
-
38
- ## [0.2.3] - 2026-09-19
39
-
40
- ### Fixed
41
- - 修复账户抽屉弹层在后台持续刷新时 hover / 点击失效的问题:弹层打开期间镜像内容保持静止,点击目标改为在点击瞬间实时解析。
42
-
43
- ## [0.2.2] - 2026-09-19
44
-
45
- ### Added
46
- - **对话内输入框重设计**:在已有对话中,输入框压缩为紧凑的单行卡片,随内容自然向下撑高(支持平滑滚动);右侧内置回车符号(`↵`)发送按钮,回车直接发送、Shift+Enter 换行,支持中文等 IME 正常选词;权限控制组件、指令 / 附件按钮与模型选择器合并到输入框下方同一行,自适应排列不重叠,权限弹出菜单支持 `Read only` / `Accept edits` / `Full access` 快捷切换与勾选;有附件时附件轨与输入框平滑连接为一体化卡片并撑高文本区,无附件时附件轨完全隐藏;宽度自适应,杜绝 Windows 系统及缩放比例下的异常横向滚动条;对话内占位符为 `Type / for commands`,点击卡片空白处即可聚焦。新会话页保持经典双层分段设计。
47
- - **输入框焦点样式**:获得焦点时描边转为与输入框自身阴影一致的中性色细线(亮色为暖黑,暗色为纯黑),外扩 1px 同色晕边并加深投影,形成发光感;底栏托盘同步跟随,整体轮廓一体。深浅主题分别调校。
48
- - **分时段首页欢迎语**:新会话页欢迎语随本地时间自动轮换——6–8 点 `Good morning, {用户名}!`(用户名取工作区路径,失败回退为 `User`)、8–9 点 `Happy {星期几}.`、9–12 点 `What are you working on?`、12–14 点 `What’s on the agenda today?`、14–18 点 `Coffee and Claude time?`、18–24 点 `Evening, how are things?`、0–6 点 `You are here!`;应用保持打开跨过整点时每 60 秒自动刷新手写欢迎语。
49
- - **模型思考状态重塑**:收录 Claude Code 的 185 种思考动词(如 `Smooshing...`、`Boogieing...`、`Clauding...`、`Noodling...`),每轮思考随机抽取一个动词稳定展示;扫光从 DeepSeek 蓝渐变换为陶土橙与蜜桃暖色高光。
50
- - **工作区运行中状态重塑**:会话运行时,侧栏会话状态加载动画从 DeepSeek 方形蓝色 LED 矩阵替换为 Windows 11 Fluent 风格的圆形圆弧旋转,深浅主题自适应。
51
- - **可切换品牌标识**:设置页新增「Claude Style」分区,用分段控件在 Claude(默认,官方星芒)与 Anthropic(`A\` + ANTHROPIC 字标)两套品牌标识间切换,新会话页品牌标识随之切换并保持陶烬橙填充;选择保存在本地,重启应用后保持。
52
-
53
- ### Changed
54
- - **源码拆分与构建化**:`lib/client.js` 改为构建产物(勿手改),源码拆分至 `src/`(五个 JS 片段 + `src/styles/` 六个纯 CSS 文件);`npm run build` 内联拼装并做语法与令牌自检,发布前自动构建。新增 `scripts/probe.cjs` 无头浏览器回归探针,断言输入框吸底、单行起步、随内容增长等关键不变量(`npm run probe -- --token <launch-token>`)。
55
- - **Anthropic 字体入仓库**:`fonts/` 提供 Anthropic Sans Web Text / Serif Web Text / Mono Variable 三个字体文件,随 Git 仓库分发、**不随 npm 包分发**(`files` 白名单排除);安装到系统后皮肤字体栈即可生效——版权归 Anthropic,仅供个人使用,不适用 MIT 许可(见 LICENSE 字体声明)。
56
-
57
- ### Fixed
58
- - 修复对话内输入框的多处布局问题:偏离底部不随消息流吸附、被固定为单行无法随内容增高、以及含图片附件时附件区出现双层边框。
59
- - 修复上下文用量弹层被误压缩导致排版错乱的问题。
60
- - 修复账户抽屉多项问题:侧栏底部非按钮控件未收纳进抽屉、插件条目被折叠成一项致按钮显示不全、条目图标与文本错位、条目随宿主重排后顺序错乱或点击错位、以及余额 / 配额等富控件型条目不显示或其内嵌按钮点击位置不符。
61
- - 修复 dsh-agy-link 的 run_code 工具卡片头部与代码预览排版异常的问题。
62
-
63
- ## [0.2.1] - 2026-09-19
64
-
65
- ### Added
66
- - 账户抽屉支持悬停展开与延迟关闭,移入弹层不打断浏览。
67
-
68
- ### Changed
69
- - 权限控制器首段从 Plan 改名为 Read,与它映射的只读预设(read-only)名称一致。
70
- - 新会话按钮改为与会话行同高的窄条:左对齐加号图标、常驻悬停底色。
71
- - 会话行标题默认为次级灰,悬停或选中时回到主文字色。
72
- - 账户底栏改为贯通侧栏的全宽分割线布局。
73
-
74
- ### Fixed
75
- - 补齐 LICENSE 版权署名;修正 README 中无效的手工 patch 配置示例。
76
-
77
- ## [0.2.0] - 2026-09-19
78
-
79
- ### Added
80
- - **Claude Code Desktop Theme**: 重构,从配色皮肤升级为完整的 Claude Code Desktop 视觉与交互复刻主题。
81
- - **Plan / Edit / Auto 分段权限控制**:行内三段式控制器,支持快捷切换会话权限(Plan 只读、Edit 写入、Auto 完全权限并带安全确认)。
82
- - **侧栏账户抽屉**:侧栏底部集成账户按钮与弹出菜单,支持一键打开设置(`Ctrl+,`)与管理插件。
83
- - **视觉与文案重塑**:专属问候语、输入框引导文案与品牌星芒标识。
84
-
85
- ### Changed
86
- - 项目重命名为 `dsh-claude-style`,与上游 `claude-style-skin` 区分。
87
- - 优化亮色画布色值(`#FCFCFB`)与侧栏色值(`#FBFBF9`)。
88
-
89
- ## [0.1.0] - 2026-08-22
90
-
91
- ### Added
92
- - 初始版本:暖调象牙白/暖黑双画布与陶烬橙强调色。
46
+ - **模型文案跟随全局语言、单行显示**:描述按 shell 自身的 `locale` 服务取当前语言(`zh` / `en`),每行只渲染一条,不再中英两行叠加;并订阅 locale 变更,切换语言时已渲染的弹层即时重绘。选择器自身的 UI 文案(触发按钮 aria、加载中、空目录、推理等级、More models)走同一路径,bundle 内只保留取不到文档时的中性英文兜底。
47
+
48
+ ### Fixed
49
+ - **塌缩态底栏插件控件压住 Claude 标**:皮肤把 `settingsArea` 压成零尺寸(保留 `overflow: visible` 让浮层可画),展开态下这足以把条目挤成 4px 细条;但设置插件带了自己的 rail 变体(`…_rail`),塌缩时拿到固定 36×36 并逃出零尺寸盒子,正好压在账户控件的 Claude 标上。现于塌缩态隐藏 `settingsArea` 内的按钮与 `triggerRow`;可达性不受影响——弹层镜像项用 `realTrigger.click()` 驱动真实触发器,`display:none` 不阻断。
50
+ - **塌缩态账户弹层被侧栏容器裁掉**:侧栏列宽 56px 且 `overflow: hidden`,弹层原本 `position: absolute` 锚在轨道右侧,越过轨道边缘即被整块裁掉(同时基础规则的百分比 `max-width` 以 59px 页脚为基准把它压成 43px 宽)。现塌缩态改为 `position: fixed`(祖先链无 `transform`/`contain`,故不受该 `overflow` 裁剪),坐标由 `positionAccountPopover()` 解析(内联 `!important`,因为样式表侧同样用 `!important` 锚定);过渡桥同步由「朝下」转为「朝侧」。
51
+ - **修复设置页(含 SubAgent 分页)文字整页消失**:皮肤为隐藏侧栏底栏原按钮,把 `footArea` 下的 `settingsArea`/`footerActions` 容器压成零尺寸并写了 `font-size: 0 !important; line-height: 0 !important`(保留 `overflow: visible` 让浮层可画)。但宿主设置弹窗是**就地渲染**在 `settingsArea` 子树里的(弹窗 overlay 是触发行的兄弟节点,没有 portal),零字号/零行高沿子树继承——官方组件只给文本行设了 `font-size`、没设 `line-height`,继承到 0px 行高的行盒直接塌成 0 高,整页文字"消失"。现把两个容器的折叠拆开:`settingsArea` 只保留几何折叠(零宽高 + `overflow: visible`),字体度量恢复自然继承——它除了被 `display: none` 的触发行就只剩就地弹窗,无需零字号兜底;`footerActions` 仍托管着会被镜像改道的插件原始条目,散落的行内文字仍需零字号压住,维持完整折叠。
52
+
53
+ ## [0.2.4] - 2026-09-19
54
+
55
+ ### Changed
56
+ - **深色模式输入框焦点由"加深"改为"提亮"**:近黑画布上黑边毫无辨识度,深色焦点描边与 1px 晕边从纯黑改为亮象牙(`#faf9f5`,描边 45% / 晕边 18%),输入框聚焦时明显亮起,底栏托盘与键盘 `:focus-visible` 外框同步改为亮象牙;暗色投影保留作真实阴影深度。
57
+ - **权限弹层列表间距加宽**:Read / Edit / Auto 预设行为两行行(标签 + 说明),原先 2px 的行间距糊成整块;行间距加宽 4px 至 6px,弹层不再拥挤。
58
+ - **会话统计并入输入框工具栏同一行**:轮次/速率与 token/缓存两组统计 pill 原先在输入框下方独占一行,现移入工具栏行、居于左侧控件与右侧模型/状态组之间(行布局 space-between 自然居中),输入框区域由三行压为两行;宿主把 pill 放回原位时每轮同步自动归位,窄屏(≤820px)仍整体隐藏;host 全宽行依赖的 width/padding/margin 在行内规则中全部重置。
59
+ - **统计 pill 改为悬停出现**:两组统计平时隐藏(保留占位、无重排),鼠标移入对话窗口(composer)时淡入;pill 位于卡片内,悬停即保持可见可点。
60
+ - **附件轨与输入框之间的分界线消除**:有图片时卡片 8px flex 间隙会把画布透成一条接缝线;以负外边距闭合间隙并把 8px 移入输入框顶部内边距——文字与图片的距离、卡片总高均不变;附件态聚焦环改由附件轨独自承载,接缝不再出现第二条线。
61
+ - **非对话页隐藏整个底部输入区**:宿主把 composer 挂在会话根下、轨迹/上下文页同样渲染(还为其预留了底部空间);现在仅对话页签激活时显示,其余页签隐藏整个 seat(宿主 `--dsh-composer-height` 随之归零,轨迹 ledger 的底部留白一起收起)。页签检测限定在会话根的 tablist(对话视图 order 0 恒为首个 tab,与语言无关)。
62
+ - **模型选择控件按 Claude 效果重构**:触发器去掉数据库图标、只保留模型名(+ 推理等级)与箭头,整体单一 hover 背景(不再是多块背景矩形叠加);弹层不再两段 drilling,一级直接列出 DeepSeek 官方服务模型(名 + 描述 + 勾选),其下分界线、推理等级行(如有)与 More models 行;后两者唤出二级弹层并排在一级旁侧(视口不够自动翻到左侧)。整弹层改为悬停即开(与账户控件一致,带 180ms 跨窗宽容),列表字体/行高/间距/圆角/悬停与权限弹层完全一致。数据与提交直连宿主 `ctx.modelDirectories` 的每会话 ModelDirectory(与宿主菜单、`/model` 命令同源),选中态、目录与错误实时同步;宿主原座椅节点标记隐藏,React 换节点后自动重标记。
63
+
64
+ ### Fixed
65
+ - **修复权限切换在 dsh 0.2+ 上完全失效**:当前会话选中态已移出 Session Controller(`sessions.list` 快照不再有 `current` 字段,改由 `uiSession` 服务以主视图绑定投影),`currentSession` 恒返回 null,点击权限菜单任意选项都静默无效、按钮标签永远停留在 `Accept edits`,而原生触发器被皮肤隐藏,GUI 内没有任何可用的切换入口。改为优先从 `uiSession` 主视图绑定读取当前会话 id,旧版宿主回退到 `list.current`;同时兼容 `permissions` 投影在 0.2+ 直接返回裸值(旧版包一层 `{ currentValue }`)的差异。
66
+ - **亮色用户消息气泡由蓝改灰**:宿主亮色气泡底色 token(`--dsw-specific-bubble`)是 DeepSeek 蓝(`deepseek-50`),皮肤此前未覆盖,故亮色下用户消息呈蓝色;现改取皮肤的按钮悬停灰(`--dsh-claude-hover-bg`,亮色 `rgba(0,0,0,0.08)`)。深色气泡宿主本就是中性灰,保持不变。
67
+ - **修复模型选择弹层永远停在「正在加载模型…」**:根因是把 store 的方法调在了实例上——宿主持有的每会话 `ModelDirectory` 实例只有 `load()` / `select()` 等,其响应式状态挂在它的 `.store`(快照 store)字段上(宿主给自家菜单注入的就是 `directory.store`)。皮肤却调用 `modelDir.subscribe()` / `modelDir.getSnapshot()`,前者抛 TypeError 被 catch 吞掉后还把刚取到的 directory 置回 null,后者恒失败 → 快照永远是 null → 触发器回落「选择模型」、弹层渲染 loading 行。现全部改走 `modelDir.store`;`load()`/`select()` 的异步 rejection 也按宿主做法补 `.catch()`。另外会话 id 读取改走 context.js 共享的 `currentSessionId()`(`uiSession` 投影优先、旧 `list.current` 回退),与权限切换同源、对新旧宿主都成立。
68
+ - **深色强调色回到陶烬橙**:皮肤的深色 token 块声明在 `body[data-dsh-claude-style]` 上,与宿主的 `body[data-ds-dark-theme]` 同为 (0,1,1) 权重;宿主主题样式表若排在皮肤之后,其蓝色强调(`--dsw-alias-state-business-primary`、`--dsw-alias-button-info-fill`、`--dsw-alias-link` 与品牌 "new color")就会盖掉暖色盘。现把深色盘限定到 `[data-ds-dark-theme]`((0,2,1),与样式表顺序无关),并补上此前缺失的 `--dsw-alias-link` 与品牌 "new color" 两个强调 token;亮色盘补齐原先从深色基块继承的四个 token,外观不变。
69
+
70
+ ## [0.2.3] - 2026-09-19
71
+
72
+ ### Fixed
73
+ - 修复账户抽屉弹层在后台持续刷新时 hover / 点击失效的问题:弹层打开期间镜像内容保持静止,点击目标改为在点击瞬间实时解析。
74
+
75
+ ## [0.2.2] - 2026-09-19
76
+
77
+ ### Added
78
+ - **对话内输入框重设计**:在已有对话中,输入框压缩为紧凑的单行卡片,随内容自然向下撑高(支持平滑滚动);右侧内置回车符号(`↵`)发送按钮,回车直接发送、Shift+Enter 换行,支持中文等 IME 正常选词;权限控制组件、指令 / 附件按钮与模型选择器合并到输入框下方同一行,自适应排列不重叠,权限弹出菜单支持 `Read only` / `Accept edits` / `Full access` 快捷切换与勾选;有附件时附件轨与输入框平滑连接为一体化卡片并撑高文本区,无附件时附件轨完全隐藏;宽度自适应,杜绝 Windows 系统及缩放比例下的异常横向滚动条;对话内占位符为 `Type / for commands`,点击卡片空白处即可聚焦。新会话页保持经典双层分段设计。
79
+ - **输入框焦点样式**:获得焦点时描边转为与输入框自身阴影一致的中性色细线(亮色为暖黑,暗色为纯黑),外扩 1px 同色晕边并加深投影,形成发光感;底栏托盘同步跟随,整体轮廓一体。深浅主题分别调校。
80
+ - **分时段首页欢迎语**:新会话页欢迎语随本地时间自动轮换——6–8 点 `Good morning, {用户名}!`(用户名取工作区路径,失败回退为 `User`)、8–9 点 `Happy {星期几}.`、9–12 点 `What are you working on?`、12–14 点 `What’s on the agenda today?`、14–18 点 `Coffee and Claude time?`、18–24 点 `Evening, how are things?`、0–6 点 `You are here!`;应用保持打开跨过整点时每 60 秒自动刷新手写欢迎语。
81
+ - **模型思考状态重塑**:收录 Claude Code 的 185 种思考动词(如 `Smooshing...`、`Boogieing...`、`Clauding...`、`Noodling...`),每轮思考随机抽取一个动词稳定展示;扫光从 DeepSeek 蓝渐变换为陶土橙与蜜桃暖色高光。
82
+ - **工作区运行中状态重塑**:会话运行时,侧栏会话状态加载动画从 DeepSeek 方形蓝色 LED 矩阵替换为 Windows 11 Fluent 风格的圆形圆弧旋转,深浅主题自适应。
83
+ - **可切换品牌标识**:设置页新增「Claude Style」分区,用分段控件在 Claude(默认,官方星芒)与 Anthropic(`A\` + ANTHROPIC 字标)两套品牌标识间切换,新会话页品牌标识随之切换并保持陶烬橙填充;选择保存在本地,重启应用后保持。
84
+
85
+ ### Changed
86
+ - **源码拆分与构建化**:`lib/client.js` 改为构建产物(勿手改),源码拆分至 `src/`(五个 JS 片段 + `src/styles/` 六个纯 CSS 文件);`npm run build` 内联拼装并做语法与令牌自检,发布前自动构建。新增 `scripts/probe.cjs` 无头浏览器回归探针,断言输入框吸底、单行起步、随内容增长等关键不变量(`npm run probe -- --token <launch-token>`)。
87
+ - **Anthropic 字体入仓库**:`fonts/` 提供 Anthropic Sans Web Text / Serif Web Text / Mono Variable 三个字体文件,随 Git 仓库分发、**不随 npm 包分发**(`files` 白名单排除);安装到系统后皮肤字体栈即可生效——版权归 Anthropic,仅供个人使用,不适用 MIT 许可(见 LICENSE 字体声明)。
88
+
89
+ ### Fixed
90
+ - 修复对话内输入框的多处布局问题:偏离底部不随消息流吸附、被固定为单行无法随内容增高、以及含图片附件时附件区出现双层边框。
91
+ - 修复上下文用量弹层被误压缩导致排版错乱的问题。
92
+ - 修复账户抽屉多项问题:侧栏底部非按钮控件未收纳进抽屉、插件条目被折叠成一项致按钮显示不全、条目图标与文本错位、条目随宿主重排后顺序错乱或点击错位、以及余额 / 配额等富控件型条目不显示或其内嵌按钮点击位置不符。
93
+ - 修复 dsh-agy-link 的 run_code 工具卡片头部与代码预览排版异常的问题。
94
+
95
+ ## [0.2.1] - 2026-09-19
96
+
97
+ ### Added
98
+ - 账户抽屉支持悬停展开与延迟关闭,移入弹层不打断浏览。
99
+
100
+ ### Changed
101
+ - 权限控制器首段从 Plan 改名为 Read,与它映射的只读预设(read-only)名称一致。
102
+ - 新会话按钮改为与会话行同高的窄条:左对齐加号图标、常驻悬停底色。
103
+ - 会话行标题默认为次级灰,悬停或选中时回到主文字色。
104
+ - 账户底栏改为贯通侧栏的全宽分割线布局。
105
+
106
+ ### Fixed
107
+ - 补齐 LICENSE 版权署名;修正 README 中无效的手工 patch 配置示例。
108
+
109
+ ## [0.2.0] - 2026-09-19
110
+
111
+ ### Added
112
+ - **Claude Code Desktop Theme**: 重构,从配色皮肤升级为完整的 Claude Code Desktop 视觉与交互复刻主题。
113
+ - **Plan / Edit / Auto 分段权限控制**:行内三段式控制器,支持快捷切换会话权限(Plan 只读、Edit 写入、Auto 完全权限并带安全确认)。
114
+ - **侧栏账户抽屉**:侧栏底部集成账户按钮与弹出菜单,支持一键打开设置(`Ctrl+,`)与管理插件。
115
+ - **视觉与文案重塑**:专属问候语、输入框引导文案与品牌星芒标识。
116
+
117
+ ### Changed
118
+ - 项目重命名为 `dsh-claude-style`,与上游 `claude-style-skin` 区分。
119
+ - 优化亮色画布色值(`#FCFCFB`)与侧栏色值(`#FBFBF9`)。
120
+
121
+ ## [0.1.0] - 2026-08-22
122
+
123
+ ### Added
124
+ - 初始版本:暖调象牙白/暖黑双画布与陶烬橙强调色。
package/LICENSE CHANGED
@@ -22,9 +22,20 @@ SOFTWARE.
22
22
 
23
23
  ---
24
24
 
25
- Font files notice: `fonts/AnthropicSansWebText.ttf`, `fonts/AnthropicSerifWebText.ttf`
26
- and `fonts/AnthropicMonoVariable.ttf` are proprietary typefaces of Anthropic,
27
- extracted from Anthropic's web products. They are included in this repository
28
- for personal use only and are **not** covered by the MIT license above; all
29
- rights remain with Anthropic. The npm package does not ship these files.
25
+ Font files notice:
26
+
27
+ - `fonts/AnthropicSansWebText.ttf` and `fonts/AnthropicSerifWebText.ttf` are
28
+ proprietary typefaces of Anthropic, extracted from Anthropic's web products.
29
+ They are included in this repository for personal use only and are **not**
30
+ covered by the MIT license above; all rights remain with Anthropic. The npm
31
+ package does not ship these files.
32
+ Provider icon notice: the files under `src/assets/icons/providers/` (and their
33
+ `lib/icons/providers/` build copy) are vendored from farion1231/cc-switch
34
+ (MIT License, Copyright (c) 2025 Jason Young). They are redistributed under
35
+ the MIT License; brand names and logos remain trademarks of their respective
36
+ owners.
37
+
38
+ - `fonts/JetBrainsMonoVariable.ttf` and `fonts/JetBrainsMonoItalicVariable.ttf`
39
+ are JetBrains Mono, distributed under the SIL Open Font License
40
+ (`fonts/OFL.txt`). They may be redistributed with this plugin.
30
41
 
package/README.en.md CHANGED
@@ -25,17 +25,17 @@
25
25
 
26
26
  ## Fonts
27
27
 
28
- > **Important: the npm package does NOT ship the font files.** They live in the repository's [`fonts/`](fonts/) folder for download; the skin's font stack (Anthropic Sans UI / Serif body / Mono code) only takes effect once the fonts are installed into the system, then refresh / restart the web GUI.
28
+ > **Important: the JetBrains Mono code font ships with the plugin and is served to the browser as a webfont by the plugin host — no installation needed. The Anthropic Sans/Serif fonts are NOT shipped with the npm package**; they remain in the repository [`fonts/`](fonts/) for download. You can either install them on the system, or skip installation entirely: drop the two `.ttf` files into the plugin package's `fonts/` directory and the host serves them as webfonts the same way (identical files, identical result). Either way, refresh / restart web afterwards.
29
29
 
30
30
  | Font | Used for | File |
31
31
  |---|---|---|
32
32
  | Anthropic Sans Web Text | UI chrome | [`fonts/AnthropicSansWebText.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicSansWebText.ttf) |
33
33
  | Anthropic Serif Web Text | Conversation body / markdown | [`fonts/AnthropicSerifWebText.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicSerifWebText.ttf) |
34
- | Anthropic Mono Variable | Code / code blocks | [`fonts/AnthropicMonoVariable.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicMonoVariable.ttf) |
34
+ | JetBrains Mono Variable | Code / code blocks | [`fonts/JetBrainsMonoVariable.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/JetBrainsMonoVariable.ttf), [`fonts/JetBrainsMonoItalicVariable.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/JetBrainsMonoItalicVariable.ttf) |
35
35
 
36
- Install: double-click the `.ttf` on Windows → *Install*; on macOS import via *Font Book*. Refresh the page afterwards.
36
+ Enabling the Anthropic faces (pick one): ① install on the system — double-click the `.ttf` on Windows → *Install*, or import via *Font Book* on macOS; ② no-install — copy the `.ttf` files into the plugin package's `fonts/` directory (next to `JetBrainsMonoVariable.ttf`). Refresh the page afterwards.
37
37
 
38
- > The typefaces are Anthropic's property, provided for personal use only and not covered by the MIT license above (see the font notice in [LICENSE](LICENSE)).
38
+ > JetBrains Mono is distributed under the [SIL Open Font License](fonts/OFL.txt). The Anthropic Sans/Serif typefaces are Anthropic's property, provided for personal use only and not covered by the MIT license above. See [LICENSE](LICENSE) for the font notice.
39
39
 
40
40
  ## Install
41
41
 
@@ -56,9 +56,10 @@ Only one theme should be active at a time. After installing, **restart `dsh web`
56
56
 
57
57
  1. **Theme** — applies the whole canvas automatically after install; no configuration needed. Light and dark follow the system color scheme.
58
58
  2. **Permission segments** — the composer gets a Read | Edit | Auto segmented control replacing the shipped access-mode menu: read-only, workspace write, and full access (Auto is switched through the shipped risk-confirmation dialog).
59
- 3. **Brand switch** — Settings (`Ctrl+,`) **Claude Style**: the sidebar brand flips between the Claude starburst + the official Claude wordmark and Anthropic (`A\` + ANTHROPIC wordmark); the hero mark follows the choice with the clay fill. The choice persists in the browser; `claude` is the default.
60
- 4. **Account drawer** — the sidebar footer button opens a hover popover with quick access to Settings (`Ctrl+,`) and plugin management.
61
- 5. **Status polish** — thinking turns pick one of Claude Code's 185 spinner verbs per turn; the workspace loading state uses a Fluent-style circular indicator.
59
+ 3. **Model picker** — the composer's model seat becomes a two-level Claude-style menu: the first level lists DeepSeek's official models, a divider, the reasoning-effort row and "More models", and the second opens beside it. Every model row carries the mark of the **vendor that made the model** (not the provider reselling it), and the "More models" group headers carry the provider's mark. The marks are [Lobe Icons](https://lobehub.com/icons) mono glyphs painted in the theme's own text colour, so they stay legible on both canvases — no React dependency, and no full-colour logos.
60
+ 4. **Brand switch** — Settings (`Ctrl+,`) → **Claude Style**: the sidebar brand flips between the Claude starburst + the official Claude wordmark and Anthropic (`A\` + ANTHROPIC wordmark); the hero mark follows the choice with the clay fill. The choice persists in the browser; `claude` is the default.
61
+ 5. **Account drawer** — the sidebar footer button opens a hover popover with quick access to Settings (`Ctrl+,`) and plugin management.
62
+ 6. **Status polish** — thinking turns pick one of Claude Code's 185 spinner verbs per turn; the workspace loading state uses a Fluent-style circular indicator.
62
63
 
63
64
  ## Disable & Uninstall
64
65
 
package/README.md CHANGED
@@ -26,17 +26,17 @@
26
26
 
27
27
  ## 字体
28
28
 
29
- > **重要:npm 包不随包分发字体文件。** 字体文件放在仓库 [`fonts/`](fonts/) 供下载;安装到系统后皮肤的字体栈(Anthropic Sans UI / Serif 正文 / Mono 代码)才会生效,安装后刷新 / 重启 web。
29
+ > **重要:JetBrains Mono 代码字体随插件库分发,由插件宿主以 webfont 形式直接提供给浏览器,无需安装。Anthropic 字体(Sans/Serif)不随 npm 包分发,仅在仓库 [`fonts/`](fonts/) 供下载**——既可以直接安装到系统,也可以免安装:把两个 `.ttf` 放进插件包的 `fonts/` 目录,宿主会以同样的 webfont 方式提供它们(两种方式的字体文件完全一致,效果相同)。生效均需刷新 / 重启 web。
30
30
 
31
31
  | 字体 | 用途 | 文件 |
32
32
  |---|---|---|
33
33
  | Anthropic Sans Web Text | 界面 / UI | [`fonts/AnthropicSansWebText.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicSansWebText.ttf) |
34
34
  | Anthropic Serif Web Text | 对话正文 / Markdown | [`fonts/AnthropicSerifWebText.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicSerifWebText.ttf) |
35
- | Anthropic Mono Variable | 代码 / 代码块 | [`fonts/AnthropicMonoVariable.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicMonoVariable.ttf) |
35
+ | JetBrains Mono Variable | 代码 / 代码块 | [`fonts/JetBrainsMonoVariable.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/JetBrainsMonoVariable.ttf)、[`fonts/JetBrainsMonoItalicVariable.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/JetBrainsMonoItalicVariable.ttf) |
36
36
 
37
- 安装:Windows 双击 `.ttf` → 「安装」;macOS 用「字体册」导入。安装后刷新页面生效。
37
+ Anthropic 字体启用(二选一):① 安装到系统——Windows 双击 `.ttf` → 「安装」,macOS 用「字体册」导入;② 免安装——把 `.ttf` 复制到插件包的 `fonts/` 目录(与 `JetBrainsMonoVariable.ttf` 同目录)。完成后刷新页面生效。
38
38
 
39
- > 字体版权归 Anthropic 所有,仅供个人使用,不适用 MIT 许可(详见 [LICENSE](LICENSE) 字体声明)。
39
+ > JetBrains Mono 以 [SIL Open Font License](fonts/OFL.txt) 分发;Anthropic Sans/Serif 字体版权归 Anthropic 所有,仅供个人使用,不适用 MIT 许可(详见 [LICENSE](LICENSE) 字体声明)。
40
40
 
41
41
  ## 安装
42
42
 
@@ -57,9 +57,10 @@ dsh plugin --profile web add Nwflower/dsh-claude-style # GitHub 源
57
57
 
58
58
  1. **主题** —— 安装即全局生效,无需配置;亮暗跟随系统颜色模式。
59
59
  2. **权限分段** —— 输入框以 Read | Edit | Auto 三段式控制器替换原生的访问模式菜单:只读、工作区写入与完全权限(Auto 经宿主的安全确认弹窗切换)。
60
- 3. **品牌切换** —— 设置(`Ctrl+,`)→ **Claude Style**:侧栏品牌在 Claude(官方星芒 + Claude 字标)与 Anthropic(`A\` + ANTHROPIC 字标)之间切换,新会话页标识随所选品牌保持陶烬橙星芒;选择保存在浏览器本地,默认 Claude
61
- 4. **账户抽屉** —— 侧栏底栏的账户按钮悬停展开弹层,一键打开设置(`Ctrl+,`)与管理插件。
62
- 5. **状态细节** —— 思考状态每轮从 Claude Code 的 185 个思考动词随机抽取一个稳定展示;工作区运行中状态使用 Fluent 风格的圆形加载动画。
60
+ 3. **模型选择器** —— 输入框的模型席位换成 Claude 风格的两级弹层:一级列出 DeepSeek 官方模型、分隔线、推理等级与「更多模型」,二级在右侧展开。每个模型行显示**所属厂商**的标识(不是转售该模型的 provider),「更多模型」的分组标题显示 provider 的标识。标识取自 [Lobe Icons](https://lobehub.com/icons) 的单色字形,跟随主题文字色绘制,因此亮暗两套画布都清晰;不引入 React 组件依赖,也不使用彩色 logo
61
+ 4. **品牌切换** —— 设置(`Ctrl+,`)→ **Claude Style**:侧栏品牌在 Claude(官方星芒 + Claude 字标)与 Anthropic(`A\` + ANTHROPIC 字标)之间切换,新会话页标识随所选品牌保持陶烬橙星芒;选择保存在浏览器本地,默认 Claude。
62
+ 5. **账户抽屉** —— 侧栏底栏的账户按钮悬停展开弹层,一键打开设置(`Ctrl+,`)与管理插件。
63
+ 6. **状态细节** —— 思考状态每轮从 Claude Code 的 185 个思考动词随机抽取一个稳定展示;工作区运行中状态使用 Fluent 风格的圆形加载动画。
63
64
 
64
65
  ## 停用与卸载
65
66
 
@@ -84,6 +85,7 @@ dsh plugin --profile web remove dsh-claude-style # 卸载
84
85
  | --- | --- | --- |
85
86
  | Claude 视觉 | 全局 | 象牙白/暖黑双画布、陶烬橙唯一强调色、衬线展示标题 + 无衬线界面 + 等宽代码三字体分工 |
86
87
  | 权限控制器 | 输入框浮层 / 新会话分段 | Read · Edit · Auto 三段切换会话权限,Auto 走宿主安全确认 |
88
+ | 模型选择器 | 输入框模型席位 | 两级弹层(官方模型 / 推理等级 / 更多模型);模型行按厂商、分组标题按 provider 显示单色品牌标识 |
87
89
  | 品牌切换 | 设置 → Claude Style | Claude(星芒 + Claude 字标)与 Anthropic(`A\`)双标识,选择持久化 |
88
90
  | 状态动画 | 会话运行中 | 185 个思考动词随机展示;Windows 11 Fluent 风格圆形加载器 |
89
91
  | 账户抽屉 | 侧栏底栏 | 悬停展开弹层,直达设置与管理插件 |
package/docs/STYLE.md CHANGED
@@ -40,6 +40,25 @@ Rules:
40
40
  follows the same hairline so the two tiers stay one outline. Accent is never
41
41
  used for focus strokes.
42
42
 
43
+ ## Text selection
44
+
45
+ Selection is the one surface that leaves the palette on purpose — it is a
46
+ transient gesture, not part of the interface, so it uses the platform's two
47
+ solid paints and looks the same on both canvases:
48
+
49
+ | State | Background | Text |
50
+ |---|---|---|
51
+ | Window focused | `#3366D0` | `#FFFFFF` |
52
+ | Window unfocused | `#C7C7C6` | `#000000` |
53
+
54
+ Both are solid (never translucent) and `!important`, so they override whatever
55
+ colour the text underneath carries — links, inline code, syntax tokens. CSS
56
+ cannot read window focus: Chromium reaches the inactive paint through its own
57
+ internal `-internal-inactive-selection-*` properties, which a stylesheet cannot
58
+ address. `src/overrides/selection.js` therefore mirrors `document.hasFocus()`
59
+ onto `data-dsh-window-blur` and the stylesheet switches on that attribute; the
60
+ selection itself survives the blur.
61
+
43
62
  ## Implementation notes
44
63
 
45
64
  - Every rule is scoped under `body[data-dsh-claude-style]`.
@@ -54,7 +73,9 @@ assembles the bundle:
54
73
  | Source | Content |
55
74
  |---|---|
56
75
  | `src/constants.js` | constants, spinner verbs, shared token values (evaluated at build time to fill `%%TOKEN%%` placeholders) |
57
- | `src/assets/*.svg` | brand marks, inlined as CSS `url()` data URIs at build time (the loader exposes no asset URLs) |
76
+ | `src/assets/brand/*.svg` | brand marks, inlined as CSS `url()` data URIs at build time (the loader exposes no asset URLs) |
77
+ | `src/assets/icons/lobe/*.svg` | model-vendor marks (Lobe Icons mono, MIT), inlined as a JS markup table at build time; bound to providers/models by `model-descriptions.json` → `brands` |
78
+ | `src/assets/icons/providers/*` | cc-switch provider/vendor icon set (MIT); inline SVGs are bundled, raster/imported files are served by the host route |
58
79
  | `src/styles/tokens.css` | design tokens (dark base + ivory light) |
59
80
  | `src/styles/typography.css` | serif display / sans UI / mono code, editorial markdown |
60
81
  | `src/styles/chrome.css` | canvas, hairlines, clay accent, chrome details |
@@ -78,6 +99,7 @@ assembles the bundle:
78
99
  | `src/overrides/model-picker.js` | model picker installer |
79
100
  | `src/overrides/account-footer.js` | account footer/popover installer |
80
101
  | `src/overrides/scheduler.js` | scheduler, observers, subscriptions, teardown |
102
+ | `src/overrides/selection.js` | mirrors the window's focus state onto the document for the two text-selection paints |
81
103
  | `src/settings.js` | settings section (brand switch) |
82
104
  | `src/entry.js` | `apply()` orchestrator + exports |
83
105
  | `src/model-descriptions.json` | model copy (picker labels + per-model descriptions); validated at build time and **copied** to `lib/`, not inlined |
@@ -99,6 +121,20 @@ the catalog's own text; family rules are ordered and must stay anchored (the
99
121
  `flash` rule is scoped to `deepseek`, or another vendor's flash tier inherits
100
122
  DeepSeek's copy).
101
123
 
124
+ The same document carries the picker's **brand marks** under `brands`:
125
+ `brands.providers` maps a provider route id to a vendored mark (the level-2
126
+ group header), and `brands.models` is an ordered, anchored rule list matching a
127
+ model id (the row's vendor — the vendor that made the model, not the aggregator
128
+ reselling it, with the provider's mark as the fallback). Both name ids vendored
129
+ in `src/assets/icons/lobe/`, and the build fails on an id that is not there, so the
130
+ binding cannot drift. The marks are the **mono** Lobe Icons glyphs
131
+ (`fill="currentColor"`), stamped into the row as markup: the theme's own text
132
+ colour paints them, which keeps them legible on both canvases and keeps the
133
+ palette to its single clay accent. Full-colour variants are deliberately not
134
+ used — a third of the vendors ship no colour version (OpenAI, Anthropic, xAI,
135
+ Moonshot, Z.ai, Vercel, Groq), and several brand colours are near-black on the
136
+ `#141413` canvas.
137
+
102
138
  ### Host selector discipline · 宿主选择器纪律
103
139
 
104
140
  The host uses hashed CSS-module classes (`p_FcLG_row`, `_0cyzDW_viewArea`, …).
@@ -0,0 +1,10 @@
1
+ # This is the official list of project authors for copyright purposes.
2
+ # This file is distinct from the CONTRIBUTORS.txt file.
3
+ # See the latter for an explanation.
4
+ #
5
+ # Names should be added to this file as:
6
+ # Name or Organization <email address>
7
+
8
+ JetBrains <>
9
+ Philipp Nurullin <philipp.nurullin@jetbrains.com>
10
+ Konstantin Bulenkov <kb@jetbrains.com>
Binary file
package/fonts/OFL.txt ADDED
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.