@gehennawu/dsh-service 1.7.0 → 1.8.0

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.
package/README.en.md CHANGED
@@ -9,7 +9,7 @@
9
9
  <em>DeepSeek Harness (DSH) Web 服务控制与运维插件。</em>
10
10
  </p>
11
11
 
12
- [![Version](https://img.shields.io/badge/version-1.7.0-3b82f6.svg?style=flat-square)](package.json)
12
+ [![Version](https://img.shields.io/badge/version-1.8.0-3b82f6.svg?style=flat-square)](package.json)
13
13
  [![License: MIT](https://img.shields.io/badge/License-MIT-10b981.svg?style=flat-square)](LICENSE)
14
14
  [![DSH Compatibility](https://img.shields.io/badge/DSH-%E2%89%A50.1.1--rc.2%20%C2%B7%20compatible%20with%200.1.6--alpha.1-6366f1.svg?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
15
15
  [![Cordis](https://img.shields.io/badge/Cordis-v4.x-f59e0b.svg?style=flat-square)](https://cordis.moe/)
@@ -42,7 +42,7 @@ A service-control and operations plugin for DSH Web: safe restart, version manag
42
42
  - [🚀 Features](#-features)
43
43
  - [Version and updates](#version-and-updates) · [Safe restart](#safe-restart) · [Health diagnostics](#health-diagnostics) · [Model statistics](#model-statistics)
44
44
  - [Quota lookup](#quota-lookup) · [Backup management](#backup-management) · [Skills management](#skills-management) · [Subagent model](#subagent-model)
45
- - [Task notifications](#task-notifications) · [Session manager](#session-manager) · [Mobile adaptation](#mobile-adaptation) · [Right-Sidebar file editing](#right-sidebar-file-editing) · [External liveness probe](#external-liveness-probe)
45
+ - [Task notifications](#task-notifications) · [Session manager](#session-manager) · [Mobile adaptation](#mobile-adaptation) · [Model provider icons](#model-provider-icons) · [Right-Sidebar file editing](#right-sidebar-file-editing) · [External liveness probe](#external-liveness-probe)
46
46
  - [🏗️ Architecture](#-architecture)
47
47
  - [⚡ Installation](#-installation) · [🔄 Automatic restart](#-automatic-restart) · [🖥️ Platform support](#-platform-support)
48
48
  - [🔒 Security design](#-security-design) · [❓ FAQ](#-faq) · [🤝 Contributing](#-contributing) · [📄 License](#-license)
@@ -51,7 +51,7 @@ A service-control and operations plugin for DSH Web: safe restart, version manag
51
51
 
52
52
  The Settings "Service Control" panel has a six-page navigation: **Overview · Model stats · Quota lookup · Health · Maintenance · Configuration**; "Maintenance" aggregates five subpages — Sessions · Skills · Subagents · Backups · Restart — and "Configuration" aggregates Features · Task notifications · Settings Nav. Restart, Quota lookup, and Sessions can each enable a **quick entry in the settings left navigation** (off by default; the Skills and Subagents sidebar entries were removed).
53
53
 
54
- Under **Plugins → Plugin configuration**, eleven host-level switches: **Health diagnostics, Model statistics, Quota lookup, Backup maintenance, Task notifications, Skill manager, Subagent model, Session manager, Mobile adaptation, Right-Sidebar file editing, `/healthz` liveness endpoint** (all on by default except Mobile adaptation). All are live settings: disabling hides the UI, stops polling/subscriptions, and makes the host reject that capability; Overview and Restart stay available.
54
+ Under **Plugins → Plugin configuration**, twelve host-level switches: **Health diagnostics, Model statistics, Quota lookup, Backup maintenance, Task notifications, Skill manager, Subagent model, Session manager, Mobile adaptation, Model provider icons, Right-Sidebar file editing, `/healthz` liveness endpoint** (all on by default except Mobile adaptation). All are live settings: disabling hides the UI, stops polling/subscriptions, and makes the host reject that capability; Overview and Restart stay available.
55
55
 
56
56
  ![Plugin configuration](./screenshots/plugin-config_en.png)
57
57
 
@@ -67,7 +67,7 @@ Under **Plugins → Plugin configuration**, eleven host-level switches: **Health
67
67
  ![Configuration page](./screenshots/configuration_en.png)
68
68
 
69
69
  - Maintenance groups Sessions, Skills, Subagents, Backups, and Restart; it remembers the most recent subpage and falls back to an available item when a feature is disabled
70
- - Configuration groups feature switches, task notifications, and settings nav tabs; switches are grouped and apply live, Notifications stays visible but disabled when that feature is off, and Settings Nav supports manual reordering (drag / arrows) and visibility management of all tabs in the settings dialog sidebar, with every label shown in the active interface language only (a third-party plugin registering a static `中文 / English` string contributes just its current-language half, so narrow mobile viewports no longer truncate it), persisted to the server-side unified config file `$DSH_HOME/dsh-service-config.json` (cross-device sync, auto-fetched on startup with a local-cache fallback), applying live (the Service Control tab is permanently locked visible to prevent lockout)
70
+ - Configuration groups feature switches, task notifications, and settings nav tabs; switches are grouped and apply live, Notifications stays visible but disabled when that feature is off, and Settings Nav supports manual reordering (drag / arrows) and visibility management of all tabs in the settings dialog sidebar, persisted to the server-side unified config file `$DSH_HOME/dsh-service-config.json` (cross-device sync, auto-fetched on startup with a local-cache fallback), applying live (the Service Control tab is permanently locked visible to prevent lockout); quota card order and visibility use the same config (the `quotaCards` section, fetched when the quota page opens)
71
71
  - Unified plugin config file: lightweight per-feature preferences converge into a single `$DSH_HOME/dsh-service-config.json` (atomic write, `0600`), partitioned by feature section — updating or clearing one section never touches others; large caches (usage index etc.) and encrypted credentials stay out of this file
72
72
 
73
73
  ### Version and updates
@@ -83,7 +83,7 @@ Under **Plugins → Plugin configuration**, eleven host-level switches: **Health
83
83
 
84
84
  - Detects active agents, background jobs, and terminals before restart; lists them and requires explicit confirmation
85
85
  - `/restart` also works in conversations; automatically refuses while work is running
86
- - Probes the new process after restart and reloads the page; manual reload offered after 60 seconds
86
+ - Probes the new process after restart and reloads the page; manual reload offered after 60 seconds. A restart triggered by `/restart` in a conversation reloads the same way: the page records the process identity at load time and compares `instanceId` on reconnect, reloading as soon as the new process is up
87
87
  - Optional "Restart" entry in the settings left navigation (off by default), sharing the same confirmation flow as the "Maintenance → Restart" subpage
88
88
  - A suspected manual terminal launch warns that nothing will bring the process back and gets a yellow caution in Health
89
89
 
@@ -112,6 +112,7 @@ Under **Plugins → Plugin configuration**, eleven host-level switches: **Health
112
112
  ![Quota lookup](./screenshots/quota-lookup_en.png)
113
113
 
114
114
  - Provider cards keep the existing window presentation (label + percent / independent bar / reset countdown); **advanced configuration** (credentials, kind switching, manual reset entries) is collapsed per card by default
115
+ - Card **order and visibility**: "Reorder & visibility" on the quota page expands a management list where cards can be dragged or nudged with ↑/↓, and a toggle hides cards you rarely need (hiding only affects display, not querying or polling); the config shares one backend with the Settings Nav tabs, stored in the `quotaCards` section of the unified server-side config `$DSH_HOME/dsh-service-config.json` (cross-device sync with a local-cache fallback, sections never affect each other)
115
116
  - A **quota ring** in the conversation composer follows the current session's model provider and shows the tightest budget window (<80% green, ≥80% amber); clicking opens a detail panel that becomes a centered overlay on narrow screens
116
117
  - Built-in adaptations:
117
118
 
@@ -166,6 +167,7 @@ Under **Plugins → Plugin configuration**, eleven host-level switches: **Health
166
167
  - Values come from adapter metadata (`reasoning.efforts[].id`); effort ids are opaque to the host. Models with no declared levels disable the dropdown and show a hint
167
168
  - **inherit / follow / feature gate off** inject no provider, model, or reasoning effort at all; subagents that carry an explicit provider/model are unaffected
168
169
  - **Mode switching keeps the config** — the saved custom model (including its reasoning effort) and the fallback list survive switching between the three modes; a mode only decides whether the route applies, so switching back to "Custom" needs no re-selection (provider/model missing from the runtime catalog fall back to the first catalog entry)
170
+ - **No shift on entry** — the page seeds its first frame from the most recent successful read, so it lands directly on the real mode instead of showing "Default" and then jumping to "Custom"; on a fresh install or a different browser (no cache) it briefly shows "Reading configuration…"
169
171
  - **Fallback models (in order)** — both Follow and Custom modes accept an ordered fallback list: when the primary route is unavailable (channel unloaded, or quota state marks it unserviceable), the next model is tried in order; if none works, delegations fall back to native inheritance instead of failing. Fallback entries pass the same allow-list check as the primary route, with an optional reasoning effort per entry
170
172
  - **Conversation-page visibility** — every turn that spawned subagents shows a small line under its last message listing the models those subagents actually ran on, e.g. `Subagent models: cpa/gpt-5.6-luna (xhigh) · opencode-go/deepseek-v4-flash (max)` — covering fallback hits, explicit routes, and inherited sources, so you can verify the custom route at a glance; a session-level aggregate line also sits under the composer (20s refresh, independent of turn data — when compaction folds the delegation tool calls the official counter and the per-turn line vanish together, and the aggregate line covers from the host dispatch records, visible in any view; switch it off independently from Maintenance → Subagent, keeping only the per-turn line); records live in host memory (survive page reloads, cleared on process restart). Works regardless of the official "assign subagent models" switch
171
173
  - Config stored in `$DSH_HOME/dsh-service-subagent-route.json` (atomic writes, `0600`); one-click reset
@@ -207,6 +209,21 @@ Under **Plugins → Plugin configuration**, eleven host-level switches: **Health
207
209
  - Entry: the “Sessions” subpage under “Maintenance” (on by default); the optional settings-sidebar entry is off by default
208
210
  - Delete records live at `$DSH_HOME/dsh-service-sessions-deleted.json` (atomic write, `0600`, title/time only — no content, not recoverable)
209
211
 
212
+ ### Model provider icons
213
+
214
+ - The **model button in the composer shows the current provider's brand icon**: on wide screens (>480px) it is **prepended to the model name**; on phones (≤480px, where the official UI collapses the name into an icon) it **replaces** the official generic icon
215
+ - **Providers with no matching icon keep the official default icon untouched** (nothing prepended on wide screens, official icon unchanged on phones) — never a blank or a wrong logo
216
+ - Covers **38 of pi-ai's 40 built-in providers** (`ant-ling` and `radius` have no matching brand mark, so they fall back), plus commonly used routes: Ollama, vLLM, LM Studio, Perplexity, Cohere, Volcengine, Doubao, Hunyuan, Yuanbao, StepFun, SenseNova, Baichuan, 01.AI, Fal, Replicate, Midjourney and more — 62 marks across 76 provider mappings; regional and billing variants (e.g. `xiaomi-token-plan-*`, `qwen-token-plan-*`) share one brand mark
217
+ - **Custom route names are recognised by prefix/alias**: `opencode-goo` → opencode, `openrouter-f` → openrouter, `zai-coding-cn` → Zhipu, `xiaomi-token-plan-cn` → Xiaomi, `command-goat` → Command Code; anything unrecognised (such as the `cpa` relay, which publishes no brand mark) falls back to the official default icon
218
+ - **The CLIProxyAPI icon appears on demand**: the hand-drawn "concave diamond + mirrored swirl" mark shows on the model button **only after you have manually adapted some provider as CLIProxyAPI in the quota page** (regardless of the provider's name — `cpa` or a custom one alike); un-adapting immediately falls back to the official default icon
219
+ - **Quota cards carry the icons too**: adapted provider cards show the same brand mark before the channel name (14px; colour tiers keep their brand colour, mono tiers follow the theme text colour). The CLIProxyAPI "show only when adapted" gate applies here as well — the card list is exactly where you adapt, so the mark appears immediately
220
+ - **Legible in both light and dark themes**: a brand colour is kept only when its contrast is adequate against **both** a light and a dark background; otherwise the icon automatically switches to a monochrome variant that follows the theme's text colour — so you never get a black logo on a dark background, or a nearly invisible one in light mode
221
+ - **Zero runtime network requests**: icons are inlined into the client bundle at build time, so it works offline, needs no CSP exceptions, and never leaks your provider names to a third party
222
+ - The icon is sized to match the **quota ring** beside the composer (each mark's viewBox is tightened to its real drawn extent and squared at build time, so every brand reads at the same visual size instead of some filling the box and others shrinking)
223
+ - Toggle under Plugins → Plugin configuration → Interaction (on by default, applied live)
224
+ - Icons come from the MIT-licensed [LobeHub Icons](https://github.com/lobehub/lobe-icons) (pinned to `@1.95.0`); the Xiaomi icon uses the plain "mi" mark from CC0 [Simple Icons](https://github.com/simple-icons/simple-icons) (LobeHub's version is a two-line "Xiaomi / MIMO" wordmark that turns to mush at 15px). **Brand marks remain the property of their owners**, so review each vendor's brand guidelines before public-facing use
225
+ - **Every icon is browsable in one page**: [icon catalog](docs/model-icons.html) — 62 marks, 76 provider mappings, the matching rules, and a light/dark comparison; a single offline file, generated from the very data inlined into the client bundle
226
+
210
227
  ### Right-Sidebar file editing
211
228
 
212
229
  - The official right-Sidebar preview header gains an **“Edit” button in its top-right corner** (next to the renderer name): one click enters editing — a monospaced editor with a dirty marker, `Ctrl/Cmd + S` saving, “Reload”, “Undo save”, and a one-click “Preview” back to the official renderer
@@ -324,7 +341,7 @@ pm2 start "dsh web --host 127.0.0.1" --name dsh-web
324
341
 
325
342
  Requirements: Node.js `>=22`, and a DSH Web installation capable of loading both Host and Client plugin halves. Update checks require access to `registry.npmjs.org`; network failures do not affect other features.
326
343
 
327
- **DSH compatibility statement**: adapted to DSH `0.1.6-alpha.1` — session format V3 (`system/message` events in history, renamed PTC vocabulary; the detail view automatically archives system events), the handle-based sessionPersistence (usage refresh, title cache, and diagnostics counts all ride the new public surface `list`/`open`/`read`/`close`), the official right sidebar replacing the Detail column (the mobile right-edge gesture drives `ctx.layout.openRightbar/closeRightbar` directly), the object-shaped official turn-process (subagent turn claiming supports both shapes), and dual-hash compatibility for mobile bottom-row triggers. Older DSH releases (`>=0.1.1-rc.2`) remain supported: persistence and layout seams run in dual shapes detected from runtime capabilities, and adaptation items that target newer structures are naturally inert on older hosts (cosmetic only, no functional loss). Note: sessions written in the V3 format after upgrading cannot be read by older DSH releases — **backups do not restore across a version downgrade**. The version card shows a standing notice "Adapted for DSH 0.1.1-rc.2 ~ 0.1.6-alpha.1", and turns red when running on unverified releases (`≥0.1.6-alpha.2`).
344
+ **DSH compatibility statement**: adapted to DSH `0.1.6-alpha.2` — session format V3 (`system/message` events in history, renamed PTC vocabulary; the detail view automatically archives system events), the handle-based sessionPersistence (usage refresh, title cache, and diagnostics counts all ride the new public surface `list`/`open`/`read`/`close`), the official right sidebar replacing the Detail column (the mobile right-edge gesture drives `ctx.layout.openRightbar/closeRightbar` directly), the object-shaped official turn-process (subagent turn claiming supports both shapes), dual-hash compatibility for mobile bottom-row triggers, subagent turn-tail list-slot adaptive compatibility, `plugins.bundle.config` slot injection for the new Plugins page, and session-detail open fallback through `uiWorkspace`. Older DSH releases (`>=0.1.1-rc.2`) remain supported: persistence and layout seams run in dual shapes detected from runtime capabilities, and adaptation items that target newer structures are naturally inert on older hosts (cosmetic only, no functional loss). Note: sessions written in the V3 format after upgrading cannot be read by older DSH releases — **backups do not restore across a version downgrade**. The version card shows a standing notice "Adapted for DSH 0.1.1-rc.2 ~ 0.1.6-alpha.2", and turns red when running on unverified releases (`≥0.1.6-alpha.3`).
328
345
 
329
346
  ## 🔒 Security design
330
347
 
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  <em>A service-control &amp; operations plugin for DeepSeek Harness (DSH) Web.</em>
10
10
  </p>
11
11
 
12
- [![Version](https://img.shields.io/badge/version-1.7.0-3b82f6.svg?style=flat-square)](package.json)
12
+ [![Version](https://img.shields.io/badge/version-1.8.0-3b82f6.svg?style=flat-square)](package.json)
13
13
  [![License: MIT](https://img.shields.io/badge/License-MIT-10b981.svg?style=flat-square)](LICENSE)
14
14
  [![DSH Compatibility](https://img.shields.io/badge/DSH-%E2%89%A50.1.1--rc.2%20%C2%B7%20%E5%B7%B2%E9%80%82%E9%85%8D%200.1.6--alpha.1-6366f1.svg?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
15
15
  [![Cordis](https://img.shields.io/badge/Cordis-v4.x-f59e0b.svg?style=flat-square)](https://cordis.moe/)
@@ -42,7 +42,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
42
42
  - [🚀 功能](#-功能)
43
43
  - [版本与更新](#版本与更新) · [安全重启](#安全重启) · [健康诊断](#健康诊断) · [模型统计](#模型统计)
44
44
  - [额度查询](#额度查询) · [备份管理](#备份管理) · [技能管理](#技能管理) · [子代理模型](#子代理模型)
45
- - [任务通知](#任务通知) · [会话管理](#会话管理) · [移动端适配](#移动端适配) · [右栏文件编辑](#右栏文件编辑) · [外部探活](#外部探活)
45
+ - [任务通知](#任务通知) · [会话管理](#会话管理) · [移动端适配](#移动端适配) · [模型厂家图标](#模型厂家图标) · [右栏文件编辑](#右栏文件编辑) · [外部探活](#外部探活)
46
46
  - [🏗️ 架构](#-架构)
47
47
  - [⚡ 安装](#-安装) · [🔄 自动重启配置](#-自动重启配置) · [🖥️ 平台支持](#-平台支持)
48
48
  - [🔒 安全设计](#-安全设计) · [❓ 常见问题 FAQ](#-常见问题-faq) · [🤝 参与贡献](#-参与贡献) · [📄 许可证](#-许可证)
@@ -51,7 +51,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
51
51
 
52
52
  设置页「服务控制」面板六页导航:**概览 · 模型统计 · 额度查询 · 健康诊断 · 维护 · 配置**;其中「维护」聚合 会话管理 · 技能 · 子代理 · 备份维护 · 重启 五个子页,「配置」聚合 功能开关 · 任务通知 · 设置栏标签 三个子页。重启、额度查询、会话管理可另行开启**设置页左列快捷入口**(默认关闭;技能与子代理的左列入口已撤销)。
53
53
 
54
- 「插件 → 插件配置」提供十一个宿主级开关:**健康诊断、模型统计、额度查询、备份维护、任务通知、技能管理、子代理模型、会话管理、移动端适配、右栏文件编辑、`/healthz` 探活**(除移动端适配外默认开启)。全部热生效:关闭即隐藏界面、停止轮询并让宿主拒绝对应能力;概览与重启固定保留。
54
+ 「插件 → 插件配置」提供十二个宿主级开关:**健康诊断、模型统计、额度查询、备份维护、任务通知、技能管理、子代理模型、会话管理、移动端适配、模型厂家图标、右栏文件编辑、`/healthz` 探活**(除移动端适配外默认开启)。全部热生效:关闭即隐藏界面、停止轮询并让宿主拒绝对应能力;概览与重启固定保留。
55
55
 
56
56
  ![插件配置](./screenshots/plugin-config.png)
57
57
 
@@ -67,7 +67,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
67
67
  ![配置页](./screenshots/configuration.png)
68
68
 
69
69
  - 「维护」集中会话管理、技能、子代理、备份维护与重启;记住最近使用的子页,关闭对应功能后自动回退到仍可用的项目
70
- - 「配置」集中功能开关、任务通知与设置栏标签;开关按功能组展示并热生效,任务通知关闭时保留入口但显示置灰状态,设置栏标签支持对设置弹窗左侧全部导航标签进行手动排序(拖拽/上下箭头换位)与显隐管理,标签按当前界面语言单语显示(外部插件注册成 `中文 / English` 静态双语串时只取当前语言一侧,移动端窄屏不再被截断),配置持久化到服务端统一配置文件 `$DSH_HOME/dsh-service-config.json`(多设备同步、启动自动拉取,本地缓存兜底),即时生效(服务控制面板永久锁定显示防锁死)
70
+ - 「配置」集中功能开关、任务通知与设置栏标签;开关按功能组展示并热生效,任务通知关闭时保留入口但显示置灰状态,设置栏标签支持对设置弹窗左侧全部导航标签进行手动排序(拖拽/上下箭头换位)与显隐管理,配置持久化到服务端统一配置文件 `$DSH_HOME/dsh-service-config.json`(多设备同步、启动自动拉取,本地缓存兜底),即时生效(服务控制面板永久锁定显示防锁死);额度卡的排序与显隐走同一份配置(`quotaCards` 区块,进入额度页时拉取)
71
71
  - 插件统一配置文件:各功能的轻量偏好收敛在 `$DSH_HOME/dsh-service-config.json` 单一文件(原子写入、`0600`),按功能分区块隔离——修改或清除某一区块绝不影响其他区块;大缓存(使用统计索引等)与加密凭据不在此文件内
72
72
 
73
73
  ### 版本与更新
@@ -83,7 +83,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
83
83
 
84
84
  - 重启前检测活跃 Agent、后台任务与终端,展示清单并要求显式确认
85
85
  - 对话输入 `/restart` 也可触发;检测到运行中工作时自动拒绝
86
- - 重启后自动探测新进程并刷新页面,60 秒未恢复提供手动刷新
86
+ - 重启后自动探测新进程并刷新页面,60 秒未恢复提供手动刷新;对话里用 `/restart` 触发的重启同样自动刷新(页面加载时记下进程身份,重连后比对 `instanceId`,新进程上线即刷新)
87
87
  - 可开启「设置页左列显示入口」(默认关闭),与「维护 → 重启」子页共用同一确认流程
88
88
  - 疑似终端手动启动时提示「退出后不会自动拉起」,健康诊断以黄色警示标注
89
89
 
@@ -113,7 +113,8 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
113
113
 
114
114
  ![额度查询](./screenshots/quota-lookup.png)
115
115
 
116
- - 卡片分区展示各供应商:窗口百分比、独立进度条、重置时间;支持强制刷新、官网用量页链接与卡片排序
116
+ - 卡片分区展示各供应商:窗口百分比、独立进度条、重置时间;支持强制刷新与官网用量页链接
117
+ - 卡片**排序与显隐**:额度页「调整排序与显隐」展开管理列表,可拖拽或点 ↑↓ 调整卡片顺序,开关可隐藏不常用卡片(隐藏只影响展示,不影响查询与轮询);配置与设置栏标签同源,写入服务端统一配置文件 `$DSH_HOME/dsh-service-config.json` 的 `quotaCards` 区块(多设备同步、本地缓存兜底,区块间互不影响)
117
118
  - 对话输入框**额度圆环**:跟随当前会话模型所属供应商,显示最紧预算窗口用量(<80% 绿、≥80% 黄);点击弹出详情面板,窄屏自动切换为居中浮层
118
119
  - 内置适配:
119
120
 
@@ -168,6 +169,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
168
169
  - 该字段来自适配器 metadata(`reasoning.efforts[].id`),等级 ID 对宿主不透明;无等级声明的模型禁用下拉并提示
169
170
  - **inherit / follow / 功能开关关闭** 均不注入任何 provider、model 或思考等级;显式指定 provider/model 的子代理不受影响
170
171
  - **模式切换保留配置**:已保存的自定义模型(含思考等级)与回退列表在三种模式间切换时不会被清除——模式只决定是否生效,切回「自定义」无需重新选择(供应商/模型已不在运行时清单时自动回落到清单首项)
172
+ - **进入无位移**:本页以最近一次成功读取的配置作为首帧缓存,进入即直接落在真实模式上,不会先显示「初始」再跳到「自定义」;首次安装或换浏览器(无缓存)时先显示一行「读取配置…」
171
173
  - **回退模型(按顺序)**:跟随与自定义模式都可配置回退列表——第一路由不可用时(渠道已卸载、额度查询判定其不可服务)依次尝试后续模型;全部不可用则回落原生继承,不让派生失败。回退条目与主路由同一道白名单校验,思考等级逐条可选
172
174
  - **对话页可见性**:每个派生了子代理的回合,最后一条消息下方会显示一行小字列出该回合子代理实际使用的模型,如 `子代理模型:cpa/gpt-5.6-luna (xhigh) · opencode-go/deepseek-v4-flash (max)`——含回退命中、显式路由与继承来源,可直接核对自定义路由是否生效;**同时输入框下方常驻一行本会话累计模型行**(20s 刷新,不依赖回合数据——会话发生 compaction 折叠工具调用后官方计数会消失、回合尾行随之缺席,累计行由宿主派发记录兜底,任何视图都能看到;可在 维护 → 子代理 页用独立开关关闭,仅保留回合尾行);记录存宿主内存(页面刷新不丢、进程重启即清),官方「指派子代理模型」开关关闭与否都不影响本功能
173
175
  - 配置存 `$DSH_HOME/dsh-service-subagent-route.json`(原子写入、`0600`),可一键重置
@@ -209,6 +211,21 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
209
211
  - 自动补 `viewport-fit=cover` 避让刘海、禁双击缩放、输入框 ≥16px 防 iOS 聚焦放大
210
212
  - `?dshsvc-mobile-debug=1` 显示浮动诊断条(仅调试)
211
213
 
214
+ ### 模型厂家图标
215
+
216
+ - 输入框里那颗**模型按钮会显示当前渠道的厂家图标**:宽屏(>480px)加在模型名**前面**;手机上(≤480px,官方把名称收成图标的形态)**替换**掉官方那枚通用图标
217
+ - **没适配的渠道保持官方默认图标不变**(宽屏不加、手机照旧显示官方图标),不会出现空缺或错图
218
+ - 覆盖 **pi-ai 内置 40 个 provider 中的 38 个**(`ant-ling`、`radius` 无对应品牌图形,走默认图标),并补充 ollama、vLLM、LM Studio、Perplexity、Cohere、火山引擎、豆包、混元、元宝、阶跃、商汤、百川、零一万物、Fal、Replicate、Midjourney 等常用渠道,共 62 张图形 / 76 条渠道映射;区域与计费变体(如 `xiaomi-token-plan-*`、`qwen-token-plan-*`)共用同一品牌图形
219
+ - **自定义渠道名按前缀/别名自动识别**:`opencode-goo` → opencode、`openrouter-f` → openrouter、`zai-coding-cn` → 智谱、`xiaomi-token-plan-cn` → 小米、`command-goat` → Command Code 等;识别不到的(如 `cpa` 这类没有公开品牌图形的中转)自动回落官方默认图标
220
+ - **CLIProxyAPI 图标按需出现**:手绘的「内凹菱形 + 镜像漩涡」品牌标**只在你在余额查询里把某个渠道手动适配成 CLIProxyAPI 后**才显示在模型按钮上(渠道名不限,叫 `cpa` 还是自定义名都一样);撤销适配立即回落官方默认图标
221
+ - **余额查询的渠道卡片同样带图标**:已适配卡片的渠道名前显示同一套厂家小图标(14px;彩色档原样上品牌色、单色档跟随主题文字色)。CPA 的「手动适配才显示」门在这里同样生效——卡片区正是你做适配的地方,适配后立即出现
222
+ - **浅色 / 深色都清晰**:品牌色对浅底与深底**两侧**对比度都达标才保留原色,否则自动改用跟随主题文字色的单色版——不会出现深色模式下「黑图标糊在黑底上」或浅色模式下近乎隐形
223
+ - **零运行期网络请求**:图标在构建期内联进客户端产物,离线可用、不影响 CSP,也不向第三方暴露你的渠道名称
224
+ - 图标尺寸与输入框旁的**额度圆环**一致(生成期把每个图标的 viewBox 收紧到真实绘制范围并正方形化,所以各品牌「看起来一样大」,不会有的满格有的缩成一团)
225
+ - 开关在 插件 → 插件配置 → 交互(默认开,热生效)
226
+ - 图标来自 MIT 许可的 [LobeHub Icons](https://github.com/lobehub/lobe-icons)(版本钉死 `@1.95.0`);小米图标取自 CC0 的 [Simple Icons](https://github.com/simple-icons/simple-icons) 纯 mi 标(LobeHub 那份是「Xiaomi / MIMO」两行文字组合标,15px 下糊成一团)。**品牌图形版权归各厂商**,正式对外使用前请查阅对应厂商的品牌条款
227
+ - **全部图标可在一页里查看**:[图标目录](docs/model-icons.html)——62 张图形、76 条渠道映射、匹配规则与深浅色对照;离线单文件,与构建期内联进客户端的数据同源生成
228
+
212
229
  ### 右栏文件编辑
213
230
 
214
231
  - 官方右侧栏的文件预览头部**右上角多一个「编辑」按钮**(紧邻渲染器名),点一下就进编辑模式:等宽编辑器,带脏标记、`Ctrl/Cmd + S` 保存、「重新加载」「撤销保存」,以及一键「预览」返回官方渲染器
@@ -326,7 +343,7 @@ pm2 start "dsh web --host 127.0.0.1" --name dsh-web
326
343
 
327
344
  运行要求:Node.js `>=22`,DSH Web 能加载 Host 与 Client 两半插件。更新检查需访问 `registry.npmjs.org`;网络失败不影响其他功能。
328
345
 
329
- **DSH 适配口径**:已适配 DSH `0.1.6-alpha.1`——会话格式 V3(`system/message` 入史、旧 PTC 词汇更名,详情视图自动归档系统事件)、sessionPersistence handle 化(用量增量、标题缓存、诊断计数全部按新公共面 `list`/`open`/`read`/`close` 走)、官方右栏替代详情列(移动端右缘手势直接驱动 `ctx.layout.openRightbar/closeRightbar`)、官方 turn-process 对象化(子代理回合认领双形态兼容)、移动端底行触发钮双哈希兼容。旧版 DSH(`>=0.1.1-rc.2`)保持兼容:新旧两套 persistence/布局 seam 按运行时能力探测双形态走,旧宿主上针对新结构的适配项天然不生效(纯展示,无功能损失)。注意:升级后以 V3 格式写入的会话日志无法被旧版 DSH 读取——**备份不可跨版本降级恢复**。版本卡常驻显示「适配 DSH 0.1.1-rc.2 ~ 0.1.6-alpha.1」,越界运行版本(`≥0.1.6-alpha.2`)标红警示。
346
+ **DSH 适配口径**:已适配 DSH `0.1.6-alpha.2`——会话格式 V3(`system/message` 入史、旧 PTC 词汇更名,详情视图自动归档系统事件)、sessionPersistence handle 化(用量增量、标题缓存、诊断计数全部按新公共面 `list`/`open`/`read`/`close` 走)、官方右栏替代详情列(移动端右缘手势直接驱动 `ctx.layout.openRightbar/closeRightbar`)、官方 turn-process 对象化(子代理回合认领双形态兼容)、移动端底行触发钮双哈希兼容、子代理回合尾模型行 list 槽位自适应兼容、新插件管理页 `plugins.bundle.config` 槽位注入、会话详情打开接入 `uiWorkspace` 降级链路。旧版 DSH(`>=0.1.1-rc.2`)保持兼容:新旧两套 persistence/布局 seam 按运行时能力探测双形态走,旧宿主上针对新结构的适配项天然不生效(纯展示,无功能损失)。注意:升级后以 V3 格式写入的会话日志无法被旧版 DSH 读取——**备份不可跨版本降级恢复**。版本卡常驻显示「适配 DSH 0.1.1-rc.2 ~ 0.1.6-alpha.2」,越界运行版本(`≥0.1.6-alpha.3`)标红警示。
330
347
 
331
348
  ## 🔒 安全设计
332
349