dsh-thinking-levels 4.7.0 → 4.7.1

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/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["triggerStyle","popStyle","headStyle","rowStyle","useSyncExternalStore","useState","useRef","labelStyle","useState","useRef","providerNameStyle","modelRowStyle","labelStyle","providersOf","useSyncExternalStore","useRef","useState","useCallback","useMemo","useMemo","useSyncExternalStore","rowStyle","useState","useCallback","useSyncExternalStore","useState","useState","createElement"],"sources":["../src/client/locales.ts","../src/client/context-ring.tsx","../src/thinking-level.ts","../src/client/whale-mascot.ts","../src/client/effort-slider.tsx","../src/context-window.ts","../src/client/model-panel.tsx","../src/client/projection-value.ts","../src/client/effort-trace.tsx","../src/client/guide.tsx","../src/client/guide-steps.ts","../src/client/card.tsx","../src/client/family-tab.tsx","../src/client/index.ts"],"sourcesContent":["/** `thinking-levels` client dictionaries (zh / en / ja / ko / fr / de / it / ru / es / pt). */\r\n\r\n/** Dictionary namespace owned by this plugin. */\r\nexport const NS = 'thinking-levels'\r\n\r\n/** Simplified Chinese dictionary (the key-set source of truth). */\r\nexport const zh = {\r\n 'card.title': '思考档位',\r\n 'family.title': '起子插件设置',\r\n 'card.description': '在模型选择器中可选 Auto(mask):按工具调用历史自动在 low / high / max 间调度后提交 API。此处配置默认档位、调度边界与模型能力(档位 → 网关线上值映射)。',\r\n 'card.level': '默认档位',\r\n 'card.level.off': 'off — 关闭思考(仅手动,永不自动选择)',\r\n 'card.level.on': 'on — 开启思考(仅 toggle 型模型;只发 enable_thinking,不发 effort)',\r\n 'card.level.minimal': 'minimal — 最低(极轻任务)',\r\n 'card.level.low': 'low — 低(简单任务,廉价轮保持廉价)',\r\n 'card.level.medium': 'medium — 中',\r\n 'card.level.high': 'high — 高(官方默认)',\r\n 'card.level.xhigh': 'xhigh — 特高',\r\n 'card.level.max': 'max — 最大(重任务)',\r\n 'card.level.auto': 'auto — 按工具历史自动调度(默认)',\r\n 'card.enabled': '启用',\r\n 'card.allowDowngrade': '允许降档(auto 可降至 low)',\r\n 'card.allowUpgrade': '允许升档(auto 可升至 max)',\r\n 'card.defaultPricing': '目录外定价',\r\n 'card.simpleTools': '简单工具白名单(auto 降档判定)',\r\n 'card.simpleToolsHint': '逗号或空格分隔的工具名,追加进内置的「廉价确定性工具」判定(如 shell、pwsh、web_fetch)。auto 档据此把仅由这类短小调用构成的步骤降到低档;内置已覆盖 bash/terminal/shell/pwsh 等,此处仅补充宿主专有工具名。',\r\n 'card.simpleToolsRegex': '简单工具 regex 名单(auto 降档判定)',\r\n 'card.simpleToolsRegexHint': '每条一个 JavaScript 正则(不自动加锚点,建议自写 ^;大小写不敏感),与上方字面量名单并存、同一统计。匹配同时测完整工具名与剥 ops_ 后的裸名——「^ops_.*」可一次覆盖整个 dsh-ops 家族。编译失败的条目跳过并告警一次。',\r\n 'card.defaultPricingHint': '定价目录未收录的模型(含其他插件接入的网关型号)如何计价;目录内模型始终按自己的目录价。改价只影响后续新账。',\r\n 'card.defaultPricing.estimate': 'estimate — 典型价兜底估算(未校准·仅供参考,默认)',\r\n 'card.defaultPricing.cn': 'cn — 人民币校准档(目录外仍按典型价估算)',\r\n 'card.defaultPricing.global': 'global — 美元校准档(USD 目录补录前目录外仍为估算)',\r\n 'card.defaultPricing.custom': 'custom — 自填价(未提供整行价时不计价)',\r\n 'card.defaultPricing.off': 'off — 不计价(目录外显示「未计价」)',\r\n 'card.unavailable': '设置命名空间不可用:请确认 dsh-thinking-levels 已装配进 profile。',\r\n 'card.readonly': '只读',\r\n 'card.capabilities': '模型能力(llm-pi-ai 自定义提供方)',\r\n 'card.capabilities.hint': '直接读写 llm-pi-ai 配置:勾选档位并填写发送给网关的线上值(例如 high → ultra);off 留空表示不发送。视觉决定图片输入;思考开关决定 enable_thinking 置位;thinkingFormat 决定 wire 序列化格式。',\r\n 'card.capabilities.empty': 'llm-pi-ai 中没有已配置模型的自定义提供方。请先在「设置 → 模型」添加提供方与模型。',\r\n 'card.capabilities.unavailable': 'llm-pi-ai 设置命名空间不可用。',\r\n 'card.capabilities.none': '(无模型)',\r\n 'card.capabilities.search': '搜索模型(名称或 ID)…',\r\n 'card.capabilities.noMatches': '没有匹配的模型',\r\n 'card.capabilities.quickSettings': '一键设置',\r\n 'card.capabilities.presetOfficial': '应用到全部:Off / High / Max(官方 DeepSeek 风格)',\r\n 'card.capabilities.presetGeneric': '应用到全部:Off / Low / Medium / High(通用)',\r\n 'card.capabilities.vendor': '提供方',\r\n 'card.capabilities.developerRole': '网关不支持 developer 角色',\r\n 'card.capabilities.developerRoleHint': '官方兼容开关(dsh ≥ v0.1.0-rc.8):写入路由级 compat.supportsDeveloperRole: false,系统提示词按 system 角色发送,修复 vLLM / SGLang 等网关的 Unexpected message role 400。取消勾选 = 删除该字段、恢复继承。',\r\n 'card.capabilities.takeover': '第三方接管',\r\n 'card.capabilities.takeoverHint': '勾选后该路由的模型请求改由 dsh-llm-openai-completions 传输层短路发送(多模态真发 + 模态门禁 + 提示词注入),pi-ai 不再参与。写入传输层自身的 providers 名单;取消勾选 = 从名单移除。需已安装该传输层。',\r\n 'card.capabilities.takeoverHintAbsent': '传输层 dsh-llm-openai-completions 未安装——先安装并启用后才能按路由接管。',\r\n 'card.capabilities.expandProvider': '展开提供方',\r\n 'card.capabilities.collapseProvider': '收起提供方',\r\n 'card.capabilities.openModelSettings': '打开模型设置',\r\n 'card.capabilities.closeModelSettings': '收起模型设置',\r\n 'card.capabilities.vision': '视觉模型',\r\n 'card.capabilities.video': '视频输入',\r\n 'card.capabilities.audio': '音频输入',\r\n 'card.capabilities.pdf': 'PDF 输入',\r\n 'card.capabilities.mediaHint': '视频/音频声明写入接管传输层的 extraInputs(宿主模型行 input 枚举仅支持 text|image);仅该路由被接管时生效,勾选后此模型可接收对应内容块,未勾选时遇到即拒绝或按 modalFallback 遮蔽。',\r\n 'card.masterTakeover': '接管主控',\r\n 'card.masterTakeoverHint': '总闸:开启后本开关状态在每次启动时镜像为传输层的 enabled(唯一写入者)。“第三方接管”路由勾只管名单成员、不直接写总闸;主控关闭时勾选路由会自动点亮本开关。',\r\n 'card.capabilities.thinking': '思考模型',\r\n 'card.capabilities.supportsEffort': '支持 think effort',\r\n 'card.capabilities.efforts': '思考档位(勾选后填写线上值)',\r\n 'card.capabilities.wirePlaceholder': '线上值,如 ultra',\r\n 'card.capabilities.offPlaceholder': '留空 = 不发送',\r\n 'card.capabilities.atLeastThinking': '至少需要一个思考档位(off 除外)',\r\n 'card.capabilities.applyLevel': '应用此档位',\r\n 'card.capabilities.restoreDefault': '恢复默认档位',\r\n 'card.capabilities.unsaved': '未保存',\r\n 'card.capabilities.saveChanges': '保存更改',\r\n 'card.capabilities.saved': '已保存',\r\n 'card.capabilities.thinkingFormat': '思考格式',\r\n 'card.capabilities.thinkingFormat.inherit': '继承',\r\n 'card.capabilities.contextWindow': '上下文窗口上限',\r\n 'card.capabilities.contextCustomPlaceholder': '自定义整数,如 256000',\r\n 'card.capabilities.contextClear': '清除',\r\n 'card.capabilities.contextInteger': '上下文长度必须是整数(2000-1000000)',\r\n 'card.capabilities.contextRange': '上下文长度必须在 2000 到 1000000 之间',\r\n 'card.capabilities.contextHint': '选择预设或输入整数(2000–1000000),写入 llm-pi-ai 供上下文压力/压缩使用,无需重启即对下一请求生效。',\r\n 'input.context.title': '上下文窗口',\r\n 'input.context.globalHint': '全局生效:作用于所有使用该模型的会话(清除可恢复默认)',\r\n 'input.context.unset': '未设',\r\n 'input.context.custom': '自定义',\r\n 'input.context.noModel': '暂无会话模型',\r\n 'input.context.customPlaceholder': '自定义整数,如 256000',\r\n 'input.context.apply': '应用',\r\n 'input.context.clear': '清除',\r\n 'input.context.integer': '上下文长度必须是整数(2000-1000000)',\r\n 'input.context.range': '上下文长度必须在 2000 到 1000000 之间',\r\n 'model.panel.choose': '选择模型',\r\n 'model.panel.loading': '模型目录加载中…',\r\n 'model.panel.empty': '没有可用模型',\r\n 'model.panel.window': '窗口',\r\n 'model.panel.noTarget': '该模型没有可写的配置项',\r\n 'model.panel.unavailable': '当前会话的模型目录不可用',\r\n 'input.effort.title': '思考强度',\r\n 'panel.search.placeholder': '搜索模型…',\r\n 'card.takeoverUi': '模型界面接管',\r\n 'card.takeoverUiHint': '开启后由本插件重绘输入框的模型选择面板(含每行上下文/档位编辑与搜索);关闭(默认)保留官方模型弹窗——auto 档位照常出现,搜索与加载由官方界面负责。切换即时生效,无需重载。',\r\n 'card.capabilities.apiUnsupported': '该提供方使用非 openai-completions 协议:thinkingFormat / supportsReasoningEffort 是 openai-completions 专属字段,在这里不提供(写入会被宿主整体拒绝)。思考开关照常可用——它写入 protocol 中立的 reasoningEfforts,由宿主 pi-ai 按协议原生映射。',\r\n 'card.capabilities.thinkingNative': '思考开关在所有协议下都可勾选:写入 protocol 中立的 reasoningEfforts,由宿主 pi-ai 按各协议原生映射(Anthropic 思考预算 / Responses reasoning effort);仅 thinkingFormat / supportsReasoningEffort 为 openai-completions 专属,指明是思考模型且协议为 openai-completions 后才出现。',\r\n 'card.capabilities.staleCompat': '旧版本曾强塞进该模型行的 openai-completions 专属字段',\r\n 'card.capabilities.stripStaleCompat': '清除这些残留字段',\r\n 'card.dsContextTitle': '官方 DeepSeek 模型上下文上限',\r\n 'input.effort.default': '提供方默认',\r\n 'input.effort.reset': '恢复提供方默认',\r\n 'card.capabilities.failed': '保存失败:配置被拒绝或冲突,请检查值。',\r\n 'trace.label': 'Effort 轨迹',\r\n 'trace.empty': '本会话还没有已提交的请求档位。',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': '手动',\r\n 'trace.title': 'Effort 轨迹',\r\n 'trace.subtitle': '本会话每次请求实际发出的档位,连续相同档位折叠为一段(最新在上)。',\r\n 'trace.summary.requests': '次请求',\r\n 'trace.summary.runs': '段',\r\n 'trace.summary.autoRuns': '段由 auto 调度',\r\n 'trace.summary.peak': '峰值',\r\n 'trace.summary.hint': 'T=轮次 · S=步',\r\n 'trace.note.attribution': '注:0.2.2 起宿主禁止在请求阶段改档位,本插件(严格线)会自己写 `model/selection` 提前一步排程——因此「手动」标签只表示日志里最后一笔选择是具体档位,未必是人为点击。',\r\n 'trace.intent.default': '默认',\r\n 'trace.intent.unknown': '未记录',\r\n 'trace.intent.scheduler': '插件调度',\r\n 'trace.intent.unknownHint': '本次档位变化在会话日志里没有对应的选择记录(0.2.2+ 严格线由插件自身写 model/selection,这些写入不进日志)',\r\n 'trace.summary.switches': '模型切换',\r\n 'trace.dir.up': '相对上一段升档,共 %n 次请求',\r\n 'trace.dir.down': '相对上一段降档,共 %n 次请求',\r\n 'trace.dir.flat': '档位不变、选中意图变了,共 %n 次请求',\r\n 'trace.dir.start': '本会话首个档位,共 %n 次请求',\r\n 'ring.title': '上下文检查',\r\n 'ring.used': '已用',\r\n 'ring.remaining': '剩余',\r\n 'ring.window': '窗口容量',\r\n 'ring.percent': '占用',\r\n 'ring.system': '系统提示词',\r\n 'ring.tools': '工具定义',\r\n 'ring.messages': '对话消息',\r\n 'ring.warning': '上下文即将用尽——建议压缩上下文或开启新会话。',\r\n 'ring.aria': '上下文已用 %n',\r\n 'ring.unset': '本轮尚未产生用量',\r\n 'ring.billing': '缓存账单',\r\n 'ring.bill.step': '当前步',\r\n 'ring.bill.turn': '当前轮',\r\n 'ring.bill.session': '会话累计',\r\n 'ring.bill.cacheRead': '缓存命中',\r\n 'ring.bill.cacheMiss': '缓存未命中',\r\n 'ring.bill.output': '输出',\r\n 'ring.bill.fullMiss': '完全失效',\r\n 'ring.bill.rounds': '步',\r\n 'ring.bill.peak': '峰价',\r\n 'ring.bill.offPeak': '谷价',\r\n 'ring.bill.flat': '平价',\r\n 'ring.bill.unpriced': '未计价',\r\n 'ring.bill.custom': '自填价计价',\r\n 'ring.bill.pricedAs': '按 %n 计价',\r\n 'ring.bill.priced': '按目录价计价',\r\n 'ring.bill.estimate': '目录外估算价',\r\n 'ring.bill.uncalibrated': '未校准·仅供参考',\r\n} satisfies Record<string, string>\r\n\r\n/** English dictionary (keys mirror zh). */\r\nexport const en: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Thinking Levels',\r\n 'family.title': 'Qizi Plugin Settings',\r\n 'card.description': 'Pick Auto in the model selector: the plugin schedules low / high / max per tool round before submitting the API effort. Here you configure the default level, scheduler bounds, and per-model capabilities (level → gateway wire value mapping).',\r\n 'card.level': 'Default level',\r\n 'card.level.off': 'off — disable thinking (manual only, never auto-picked)',\r\n 'card.level.on': 'on — enable thinking (toggle-only models only; sends enable_thinking, never an effort)',\r\n 'card.level.minimal': 'minimal — least (very light tasks)',\r\n 'card.level.low': 'low — cheap rounds stay cheap',\r\n 'card.level.medium': 'medium — medium',\r\n 'card.level.high': 'high — the official default',\r\n 'card.level.xhigh': 'xhigh — extra high',\r\n 'card.level.max': 'max — heavy work',\r\n 'card.level.auto': 'auto — schedule from tool history (default)',\r\n 'card.enabled': 'Enabled',\r\n 'card.allowDowngrade': 'Allow downgrade (auto may drop to low)',\r\n 'card.allowUpgrade': 'Allow upgrade (auto may lift to max)',\r\n 'card.defaultPricing': 'Off-catalog pricing',\r\n 'card.simpleTools': 'Simple-tool allowlist (auto downgrade)',\r\n 'card.simpleToolsHint': 'Comma- or space-separated tool names added to the built-in \"cheap and deterministic tool\" set (e.g. shell, pwsh, web_fetch). In auto, a step made only of these short calls drops to low. The built-in set already covers bash/terminal/shell/pwsh; use this for host-specific names.',\r\n 'card.simpleToolsRegex': 'Simple-tool regex list (auto downgrade)',\r\n 'card.simpleToolsRegexHint': 'One JavaScript regex per entry (no auto-anchoring — write your own ^; case-insensitive), alongside the literal list above and counted in the same ratio. Patterns match BOTH the full tool name and the ops_-stripped bare name, so \"^ops_.*\" covers the whole dsh-ops family at once. Invalid entries are skipped with a one-time warning.',\r\n 'card.defaultPricingHint': 'How to price models the catalog does not list (including gateway models brought in by other plugins); catalogued models always use their own rates. Pricing changes only affect new accounting from now on.',\r\n 'card.defaultPricing.estimate': 'estimate — typical-price fallback (uncalibrated, reference only; default)',\r\n 'card.defaultPricing.cn': 'cn — CNY calibration tier (off-catalog still falls back to the typical price)',\r\n 'card.defaultPricing.global': 'global — USD calibration tier (off-catalog stays estimated until USD rows land)',\r\n 'card.defaultPricing.custom': 'custom — self-entered rates (unpriced without a full row)',\r\n 'card.defaultPricing.off': 'off — do not bill (off-catalog shows \"not billed\")',\r\n 'card.unavailable': 'Settings namespace unavailable: make sure dsh-thinking-levels is assembled into this profile.',\r\n 'card.readonly': 'Read-only',\r\n 'card.capabilities': 'Model capabilities (llm-pi-ai custom providers)',\r\n 'card.capabilities.hint': 'Reads and writes the llm-pi-ai config directly: tick a level and enter the exact value sent to the gateway (e.g. high → ultra); leaving off empty means “do not send”. Vision gates image input; the thinking toggle drives enable_thinking; thinkingFormat picks the wire serialization.',\r\n 'card.capabilities.empty': 'No custom provider has models configured in llm-pi-ai. Add a provider and models under Settings → Models first.',\r\n 'card.capabilities.unavailable': 'The llm-pi-ai settings namespace is unavailable.',\r\n 'card.capabilities.none': '(no models)',\r\n 'card.capabilities.search': 'Search models by name or ID…',\r\n 'card.capabilities.noMatches': 'No matching models',\r\n 'card.capabilities.quickSettings': 'Quick settings',\r\n 'card.capabilities.presetOfficial': 'Apply to all: Off / High / Max (official DeepSeek style)',\r\n 'card.capabilities.presetGeneric': 'Apply to all: Off / Low / Medium / High (generic)',\r\n 'card.capabilities.vendor': 'Provider',\r\n 'card.capabilities.developerRole': 'Gateway rejects the developer role',\r\n 'card.capabilities.developerRoleHint': 'Official compat switch (dsh ≥ v0.1.0-rc.8): writes route-level compat.supportsDeveloperRole: false so the system prompt is sent as role system — fixes the Unexpected message role 400 on vLLM / SGLang gateways. Unchecking deletes the field and restores inheritance.',\r\n 'card.capabilities.takeover': 'Third-party takeover',\r\n 'card.capabilities.takeoverHint': 'When checked, the model requests of this route are short-circuited through the dsh-llm-openai-completions transport (multimodal true-send, modality gate, prompt injection) and pi-ai steps out. Writes the providers list of the transport itself; unchecking removes the route. Requires the transport to be installed.',\r\n 'card.capabilities.takeoverHintAbsent': 'The dsh-llm-openai-completions transport is not installed — install and enable it to take routes over per route.',\r\n 'card.capabilities.expandProvider': 'Expand provider',\r\n 'card.capabilities.collapseProvider': 'Collapse provider',\r\n 'card.capabilities.openModelSettings': 'Open model settings',\r\n 'card.capabilities.closeModelSettings': 'Collapse model settings',\r\n 'card.capabilities.vision': 'Vision model',\r\n 'card.capabilities.video': 'Video input',\r\n 'card.capabilities.audio': 'Audio input',\r\n 'card.capabilities.pdf': 'PDF input',\r\n 'card.capabilities.mediaHint': 'Video/audio declarations are written to the taken-over transport’s extraInputs (the host model-row input enum only accepts text|image). Effective only while the route is taken over; when off, matching content blocks are refused or masked per modalFallback.',\r\n 'card.masterTakeover': 'Takeover master',\r\n 'card.masterTakeoverHint': 'Master switch: its state mirrors into the transport’s enabled on every start (the sole writer). The per-route “Third-party takeover” checkboxes own membership only; with the master off, checking a route lights this switch automatically.',\r\n 'card.capabilities.thinking': 'Thinking model',\r\n 'card.capabilities.supportsEffort': 'Supports think effort',\r\n 'card.capabilities.efforts': 'Thinking effort levels (tick, then enter the wire value)',\r\n 'card.capabilities.wirePlaceholder': 'Wire value, e.g. ultra',\r\n 'card.capabilities.offPlaceholder': 'Empty = do not send',\r\n 'card.capabilities.atLeastThinking': 'Select at least one thinking level (other than off)',\r\n 'card.capabilities.applyLevel': 'Apply levels',\r\n 'card.capabilities.restoreDefault': 'Restore defaults',\r\n 'card.capabilities.unsaved': 'Unsaved',\r\n 'card.capabilities.saveChanges': 'Save changes',\r\n 'card.capabilities.saved': 'Saved',\r\n 'card.capabilities.thinkingFormat': 'Thinking format',\r\n 'card.capabilities.thinkingFormat.inherit': 'Inherit',\r\n 'card.capabilities.contextWindow': 'Context window limit',\r\n 'card.capabilities.contextCustomPlaceholder': 'Custom integer, e.g. 256000',\r\n 'card.capabilities.contextClear': 'Clear',\r\n 'card.capabilities.contextInteger': 'Context length must be an integer (2000-1000000)',\r\n 'card.capabilities.contextRange': 'Context length must be between 2000 and 1000000',\r\n 'card.capabilities.contextHint': 'Pick a preset or enter an integer (2000–1000000); written to llm-pi-ai for context pressure/compaction and applied to the next request without a restart.',\r\n 'input.context.title': 'Context window',\r\n 'input.context.globalHint': 'Applies globally to every session using this model (Clear restores the default)',\r\n 'input.context.unset': 'Unset',\r\n 'input.context.custom': 'Custom',\r\n 'input.context.noModel': 'No session model yet',\r\n 'input.context.customPlaceholder': 'Custom integer, e.g. 256000',\r\n 'input.context.apply': 'Apply',\r\n 'input.context.clear': 'Clear',\r\n 'input.context.integer': 'Context length must be an integer (2000-1000000)',\r\n 'input.context.range': 'Context length must be between 2000 and 1000000',\r\n 'model.panel.choose': 'Choose model',\r\n 'model.panel.loading': 'Loading the model directory…',\r\n 'model.panel.empty': 'No models available',\r\n 'model.panel.window': 'Window',\r\n 'model.panel.noTarget': 'No writable config entry for this model',\r\n 'model.panel.unavailable': 'The model directory is unavailable for this session',\r\n 'input.effort.title': 'Reasoning effort',\r\n 'panel.search.placeholder': 'Search models…',\r\n 'card.takeoverUi': 'Model UI takeover',\r\n 'card.takeoverUiHint': 'On: this plugin replaces the composer model picker with its own panel (per-line context/effort editors + search). Off (default): the official popup stays — the auto level still appears, and search and loading remain the shipped selector’s. Changes apply immediately — no reload needed.',\r\n 'card.capabilities.apiUnsupported': 'This provider uses a non-openai-completions protocol: thinkingFormat / supportsReasoningEffort are openai-completions-only fields and are not offered here (a write carrying them is rejected wholesale by the host). The thinking switch is unaffected: it writes the protocol-neutral reasoningEfforts, which pi-ai maps natively per protocol.',\r\n 'card.capabilities.thinkingNative': 'The thinking switch is available on every protocol: it writes the protocol-neutral reasoningEfforts, which pi-ai maps natively (Anthropic thinking budget / Responses reasoning effort). thinkingFormat / supportsReasoningEffort are openai-completions-only and appear only once the model is declared a thinking model on that protocol.',\r\n 'card.capabilities.staleCompat': 'openai-completions-only fields an older version forced onto this model row',\r\n 'card.capabilities.stripStaleCompat': 'Remove these leftovers',\r\n 'card.dsContextTitle': 'Official DeepSeek context windows',\r\n 'input.effort.default': 'Provider default',\r\n 'input.effort.reset': 'Restore provider default',\r\n 'card.capabilities.failed': 'Save failed: the value was rejected or conflicted. Check it.',\r\n 'trace.label': 'Effort trace',\r\n 'trace.empty': 'No committed request levels in this session yet.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manual',\r\n 'trace.title': 'Effort trace',\r\n 'trace.subtitle': 'The level every request in this session actually went out with; consecutive identical levels collapse into one run (newest first).',\r\n 'trace.summary.requests': 'requests',\r\n 'trace.summary.runs': 'runs',\r\n 'trace.summary.autoRuns': 'runs scheduled by auto',\r\n 'trace.summary.peak': 'peak',\r\n 'trace.summary.hint': 'T=turn · S=step',\r\n 'trace.note.attribution': 'Note: from 0.2.2 the host forbids changing the level at request time, so this plugin (strict line) writes `model/selection` itself a step ahead — a “manual” tag therefore only means the last selection in the log was a concrete level, not necessarily a human click.',\r\n 'trace.intent.default': 'default',\r\n 'trace.intent.unknown': 'unrecorded',\r\n 'trace.intent.scheduler': 'scheduler',\r\n 'trace.intent.unknownHint': 'This level change has no matching selection record in the session log (on the 0.2.2+ strict line the plugin itself writes model/selection and those writes never reach the log)',\r\n 'trace.summary.switches': 'model switches',\r\n 'trace.dir.up': 'escalated from the previous run, %n request(s)',\r\n 'trace.dir.down': 'dropped from the previous run, %n request(s)',\r\n 'trace.dir.flat': 'same level, different pick, %n request(s)',\r\n 'trace.dir.start': 'this session’s first level, %n request(s)',\r\n 'ring.title': 'Context check',\r\n 'ring.used': 'Used',\r\n 'ring.remaining': 'Remaining',\r\n 'ring.window': 'Context window',\r\n 'ring.percent': 'Pressure',\r\n 'ring.system': 'System prompt',\r\n 'ring.tools': 'Tool definitions',\r\n 'ring.messages': 'Messages',\r\n 'ring.warning': 'Context is nearly full — compact the context or start a new session.',\r\n 'ring.aria': '%n of context used',\r\n 'ring.unset': 'No usage yet in this turn',\r\n 'ring.billing': 'Cache billing',\r\n 'ring.bill.step': 'This step',\r\n 'ring.bill.turn': 'This turn',\r\n 'ring.bill.session': 'Session total',\r\n 'ring.bill.cacheRead': 'Cache read',\r\n 'ring.bill.cacheMiss': 'Cache miss',\r\n 'ring.bill.output': 'Output',\r\n 'ring.bill.fullMiss': 'Full misses',\r\n 'ring.bill.rounds': 'steps',\r\n 'ring.bill.peak': 'Peak rates',\r\n 'ring.bill.offPeak': 'Off-peak rates',\r\n 'ring.bill.flat': 'Flat rate',\r\n 'ring.bill.unpriced': 'Not billed',\r\n 'ring.bill.custom': 'priced at custom rates',\r\n 'ring.bill.pricedAs': 'priced as %n',\r\n 'ring.bill.priced': 'priced at catalog rates',\r\n 'ring.bill.estimate': 'estimated off-catalog',\r\n 'ring.bill.uncalibrated': 'uncalibrated — reference only',\r\n}\r\n\r\n/** Japanese dictionary (keys mirror zh). */\r\nexport const ja: Record<keyof typeof zh, string> = {\r\n 'card.title': '思考レベル',\r\n 'family.title': '起子プラグイン設定',\r\n 'card.description': 'モデルセレクターで Auto(マスク)を選択すると、ツール呼び出し履歴から low / high / max を自動スケジュールして API に送信します。ここでは既定レベル、スケジューラーの境界、モデル能力(レベル → ゲートウェイ送信値のマッピング)を設定します。',\r\n 'card.level': '既定レベル',\r\n 'card.level.off': 'off — 思考を無効化(手動のみ、自動選択はされません)',\r\n 'card.level.on': 'on — 思考を有効化(トグルのみのモデル向け。enable_thinking のみ送信、effort は送信しません)',\r\n 'card.level.minimal': 'minimal — 最小(非常に軽いタスク)',\r\n 'card.level.low': 'low — 低(軽いラウンドは軽いまま)',\r\n 'card.level.medium': 'medium — 中',\r\n 'card.level.high': 'high — 高(公式既定値)',\r\n 'card.level.xhigh': 'xhigh — 特高',\r\n 'card.level.max': 'max — 最大(重いタスク)',\r\n 'card.level.auto': 'auto — ツール履歴から自動スケジュール(既定)',\r\n 'card.enabled': '有効',\r\n 'card.allowDowngrade': '降格を許可(auto は low まで下げられる)',\r\n 'card.allowUpgrade': '昇格を許可(auto は max まで上げられる)',\r\n 'card.defaultPricing': 'カタログ外モデルの価格',\r\n 'card.simpleTools': '簡易ツール許可リスト(auto ダウングレード)',\r\n 'card.simpleToolsHint': 'カンマまたはスペース区切りのツール名を内蔵の「安価・決定論的ツール」判定に追加します(例: shell、pwsh、web_fetch)。auto ではこれらの短い呼び出しのみのステップは low に下がります。内蔵集合は既に bash/terminal/shell/pwsh を含むため、ここではホスト固有の名前を補完してください。',\r\n 'card.simpleToolsRegex': '簡易ツール正規表現リスト(auto 降格判定)',\r\n 'card.simpleToolsRegexHint': '1 エントリ = 1 つの JavaScript 正規表現(自動アンカーなし — 自前で ^ を書く、大文字小文字を無視)。上のリテラル名単と併存し同一の比率に計上されます。パターンは完全なツール名と ops_ を剥いだ裸名の両方に一致するため、「^ops_.*」だけで dsh-ops ファミリー全体を覆えます。不正なパターンは 1 度だけ警告してスキップされます。',\r\n 'card.defaultPricingHint': '価格カタログに未登録のモデル(他プラグイン経由のゲートウェイモデル含む)の計算方法。登録済みモデルは常にカタログ価格を使用。価格変更は以降の新規記録のみ影響。',\r\n 'card.defaultPricing.estimate': 'estimate — 典型価格でフォールバック見積り(未校正・参考値、デフォルト)',\r\n 'card.defaultPricing.cn': 'cn — 人民元キャリブレーション(カタログ外は典型価格の見積りのまま)',\r\n 'card.defaultPricing.global': 'global — ドルキャリブレーション(USD 行の補録前はカタログ外から見積り)',\r\n 'card.defaultPricing.custom': 'custom — 手入力価格(行が不完全なら未計算)',\r\n 'card.defaultPricing.off': 'off — 計算しない(カタログ外は「未計算」と表示)',\r\n 'card.unavailable': '設定名前空間が利用できません:dsh-thinking-levels が profile に組み込まれているか確認してください。',\r\n 'card.readonly': '読み取り専用',\r\n 'card.capabilities': 'モデル能力(llm-pi-ai カスタムプロバイダー)',\r\n 'card.capabilities.hint': 'llm-pi-ai 設定を直接読み書きします:レベルにチェックを入れ、ゲートウェイに送信する値を入力(例:high → ultra)。off を空欄にすると送信しません。視覚は画像入力を決定、思考トグルは enable_thinking を制御、thinkingFormat は wire シリアライズ形式を選択します。',\r\n 'card.capabilities.empty': 'llm-pi-ai にモデルが設定されたカスタムプロバイダーがありません。先に「設定 → モデル」でプロバイダーとモデルを追加してください。',\r\n 'card.capabilities.unavailable': 'llm-pi-ai の設定名前空間が利用できません。',\r\n 'card.capabilities.none': '(モデルなし)',\r\n 'card.capabilities.search': 'モデル名または ID で検索…',\r\n 'card.capabilities.noMatches': '一致するモデルがありません',\r\n 'card.capabilities.quickSettings': 'クイック設定',\r\n 'card.capabilities.presetOfficial': 'すべてに適用:Off / High / Max(公式 DeepSeek 形式)',\r\n 'card.capabilities.presetGeneric': 'すべてに適用:Off / Low / Medium / High(汎用)',\r\n 'card.capabilities.vendor': 'プロバイダー',\r\n 'card.capabilities.developerRole': 'ゲートウェイは developer ロール非対応',\r\n 'card.capabilities.developerRoleHint': '公式互換スイッチ(dsh ≥ v0.1.0-rc.8):ルートレベルの compat.supportsDeveloperRole: false を書き込み、システムプロンプトを system ロールで送信します。vLLM / SGLang などの Unexpected message role 400 を修正。チェックを外すとフィールドを削除し継承に戻します。',\r\n 'card.capabilities.takeover': 'サードパーティテイクオーバー',\r\n 'card.capabilities.takeoverHint': 'チェックすると、このルートのモデルリクエストは dsh-llm-openai-completions トランスポート経由で短路送信され(マルチモーダル真送信・モーダルゲート・プロンプト注入)、pi-ai は関与しません。トランスポート自身の providers リストに書き込みます。チェック解除でルートを削除。トランスポートのインストールが必要です。',\r\n 'card.capabilities.takeoverHintAbsent': 'トランスポート dsh-llm-openai-completions が未インストールです — ルート単位のテイクオーバーには先にインストールして有効化してください。',\r\n 'card.capabilities.expandProvider': 'プロバイダーを展開',\r\n 'card.capabilities.collapseProvider': 'プロバイダーを折りたたむ',\r\n 'card.capabilities.openModelSettings': 'モデル設定を開く',\r\n 'card.capabilities.closeModelSettings': 'モデル設定を折りたたむ',\r\n 'card.capabilities.vision': '視覚モデル',\r\n 'card.capabilities.video': '動画入力',\r\n 'card.capabilities.audio': '音声入力',\r\n 'card.capabilities.pdf': 'PDF入力',\r\n 'card.capabilities.mediaHint': '動画/音声の宣言は引継ぎトランスポートの extraInputs に書き込まれます(ホストのモデル行 input 列挙は text|image のみ)。ルートが引継ぎ中のときのみ有効で、オフの場合は該当ブロックが拒否されるか modalFallback でマスクされます。',\r\n 'card.masterTakeover': '引継ぎマスター',\r\n 'card.masterTakeoverHint': 'マスタースイッチ:起動ごとにトランスポートの enabled へミラーされます(唯一の書き手)。ルート毎の「サードパーティ引継ぎ」チェックはメンバーのみを担い、マスター OFF でチェックすると自動的に点灯します。',\r\n 'card.capabilities.thinking': '思考モデル',\r\n 'card.capabilities.supportsEffort': 'think effort をサポート',\r\n 'card.capabilities.efforts': '思考レベル(チェック後、送信値を入力)',\r\n 'card.capabilities.wirePlaceholder': '送信値(例:ultra)',\r\n 'card.capabilities.offPlaceholder': '空欄 = 送信しない',\r\n 'card.capabilities.atLeastThinking': '思考レベルを 1 つ以上選択してください(off 以外)',\r\n 'card.capabilities.applyLevel': 'レベルを適用',\r\n 'card.capabilities.restoreDefault': '既定値に戻す',\r\n 'card.capabilities.unsaved': '未保存',\r\n 'card.capabilities.saveChanges': '変更を保存',\r\n 'card.capabilities.saved': '保存済み',\r\n 'card.capabilities.thinkingFormat': '思考形式',\r\n 'card.capabilities.thinkingFormat.inherit': '継承',\r\n 'card.capabilities.contextWindow': 'コンテキストウィンドウ上限',\r\n 'card.capabilities.contextCustomPlaceholder': 'カスタム整数(例:256000)',\r\n 'card.capabilities.contextClear': 'クリア',\r\n 'card.capabilities.contextInteger': 'コンテキスト長は整数で入力してください(2000-1000000)',\r\n 'card.capabilities.contextRange': 'コンテキスト長は 2000 から 1000000 の範囲で指定してください',\r\n 'card.capabilities.contextHint': 'プリセットを選ぶか整数を入力(2000–1000000)。llm-pi-ai に書き込まれ、コンテキスト圧力/圧縮に使用され、再起動なしで次のリクエストに反映されます。',\r\n 'input.context.title': 'コンテキストウィンドウ',\r\n 'input.context.globalHint': 'グローバルに有効:このモデルを使用するすべてのセッションに適用されます(クリアで既定値に戻ります)',\r\n 'input.context.unset': '未設定',\r\n 'input.context.custom': 'カスタム',\r\n 'input.context.noModel': 'セッションモデルがまだありません',\r\n 'input.context.customPlaceholder': 'カスタム整数(例:256000)',\r\n 'input.context.apply': '適用',\r\n 'input.context.clear': 'クリア',\r\n 'input.context.integer': 'コンテキスト長は整数で入力してください(2000-1000000)',\r\n 'input.context.range': 'コンテキスト長は 2000 から 1000000 の範囲で指定してください',\r\n 'model.panel.choose': 'モデルを選択',\r\n 'model.panel.loading': 'モデルディレクトリを読み込み中…',\r\n 'model.panel.empty': '利用可能なモデルがありません',\r\n 'model.panel.window': 'ウィンドウ',\r\n 'model.panel.noTarget': 'このモデルには書き込み可能な設定項目がありません',\r\n 'model.panel.unavailable': 'このセッションのモデルディレクトリは利用できません',\r\n 'input.effort.title': '思考レベル',\r\n 'panel.search.placeholder': 'モデルを検索…',\r\n 'card.takeoverUi': 'モデルUI引き継ぎ',\r\n 'card.takeoverUiHint': 'ON にするとこのプラグインが入力欄のモデル選択を独自パネル(行別のコンテキスト/レベル編集+検索)に置き換えます。OFF(既定)では公式ポップアップが維持され、auto レベルは引き続き表示され、検索と読み込みは標準セレクタの役割です。変更は即時反映されます(再読み込み不要)。',\r\n 'card.capabilities.apiUnsupported': 'このプロバイダーは openai-completions 以外のプロトコルを使用しています:thinkingFormat / supportsReasoningEffort は openai-completions 専用フィールドのためここでは提供しません(書き込むとホストが providers 全体を拒否します)。思考スイッチは影響を受けません — protocol 非依存の reasoningEfforts を書き込み、pi-ai がプロトコルごとにネイティブ変換します。',\r\n 'card.capabilities.thinkingNative': '思考スイッチはすべてのプロトコルでチェックできます:protocol 非依存の reasoningEfforts を書き込み、pi-ai が各プロトコルでネイティブ変換します(Anthropic の思考予算 / Responses の reasoning effort)。thinkingFormat / supportsReasoningEffort は openai-completions 専用で、そのプロトコルで思考モデルと宣言した場合のみ表示されます。',\r\n 'card.capabilities.staleCompat': '旧バージョンがこのモデル行に強制挿入した openai-completions 専用フィールド',\r\n 'card.capabilities.stripStaleCompat': 'この残留フィールドを削除',\r\n 'card.dsContextTitle': '公式 DeepSeek モデルのコンテキスト上限',\r\n 'input.effort.default': 'プロバイダーの既定',\r\n 'input.effort.reset': 'プロバイダーの既定に戻す',\r\n 'card.capabilities.failed': '保存に失敗しました:値が拒否されたか競合しています。確認してください。',\r\n 'trace.label': 'Effort 軌跡',\r\n 'trace.empty': 'このセッションには確定済みリクエストのレベルがまだありません。',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': '手動',\r\n 'trace.title': 'Effort 軌跡',\r\n 'trace.subtitle': 'このセッションで各リクエストが実際に送られたレベル。連続する同一レベルは 1 セグメントにまとめます(新しい順)。',\r\n 'trace.summary.requests': 'リクエスト',\r\n 'trace.summary.runs': 'セグメント',\r\n 'trace.summary.autoRuns': 'セグメントは auto が決定',\r\n 'trace.summary.peak': '最大',\r\n 'trace.summary.hint': 'T=ターン · S=ステップ',\r\n 'trace.note.attribution': '注:0.2.2 以降ホストはリクエスト段階でのレベル変更を禁止するため、本プラグイン(厳格ライン)は 1 ステップ先の `model/selection` を自分で書きます。したがって「手動」はログ上の最後の選択が具体レベルだったことだけを意味し、人手のクリックとは限りません。',\r\n 'trace.intent.default': '既定',\r\n 'trace.intent.unknown': '記録なし',\r\n 'trace.intent.scheduler': 'プラグイン',\r\n 'trace.intent.unknownHint': 'このレベル変更に対応する選択記録がセッションログにありません(0.2.2 以降の厳格ラインではプラグイン自身が model/selection を書き、その書き込みはログに残りません)',\r\n 'trace.summary.switches': 'モデル切替',\r\n 'trace.dir.up': '前のセグメントから上げ、%n リクエスト',\r\n 'trace.dir.down': '前のセグメントから下げ、%n リクエスト',\r\n 'trace.dir.flat': 'レベルは同じで選択のみ変更、%n リクエスト',\r\n 'trace.dir.start': 'このセッションの最初のレベル、%n リクエスト',\r\n 'ring.title': 'コンテキスト確認',\r\n 'ring.used': '使用済み',\r\n 'ring.remaining': '残り',\r\n 'ring.window': 'コンテキストウィンドウ',\r\n 'ring.percent': '占有率',\r\n 'ring.system': 'システムプロンプト',\r\n 'ring.tools': 'ツール定義',\r\n 'ring.messages': '対話メッセージ',\r\n 'ring.warning': 'コンテキストがもうすぐ満杯です。圧縮するか、新しいセッションを開始してください。',\r\n 'ring.aria': 'コンテキスト使用率 %n',\r\n 'ring.unset': 'このターンはまだ使用量がありません',\r\n 'ring.billing': 'キャッシュ請求',\r\n 'ring.bill.step': '現在のステップ',\r\n 'ring.bill.turn': '現在のターン',\r\n 'ring.bill.session': 'セッション累計',\r\n 'ring.bill.cacheRead': 'キャッシュヒット',\r\n 'ring.bill.cacheMiss': 'キャッシュミス',\r\n 'ring.bill.output': '出力',\r\n 'ring.bill.fullMiss': '完全ミス',\r\n 'ring.bill.rounds': 'ステップ',\r\n 'ring.bill.peak': 'ピーク料金',\r\n 'ring.bill.offPeak': 'オフピーク料金',\r\n 'ring.bill.flat': '定額',\r\n 'ring.bill.unpriced': '未計量',\r\n 'ring.bill.custom': 'カスタム料金で計量',\r\n 'ring.bill.pricedAs': '%n として計量',\r\n 'ring.bill.priced': 'カタログ料金で計量',\r\n 'ring.bill.estimate': 'カタログ外の推定料金',\r\n 'ring.bill.uncalibrated': '未較正・参考のみ',\r\n}\r\n\r\n/** Korean dictionary (keys mirror zh). */\r\nexport const ko: Record<keyof typeof zh, string> = {\r\n 'card.title': '사고 수준',\r\n 'family.title': '起子 플러그인 설정',\r\n 'card.description': '모델 선택기에서 Auto(마스크)를 선택하면 도구 호출 기록을 기반으로 low / high / max 를 자동 스케줄링하여 API에 제출합니다. 여기서 기본 수준, 스케줄러 경계, 모델 기능(수준 → 게이트웨이 전송 값 매핑)을 구성합니다.',\r\n 'card.level': '기본 수준',\r\n 'card.level.off': 'off — 사고 비활성화(수동 전용, 자동 선택 안 됨)',\r\n 'card.level.on': 'on — 사고 활성화(토글 전용 모델용. enable_thinking만 전송, effort는 전송하지 않음)',\r\n 'card.level.minimal': 'minimal — 최소(매우 가벼운 작업)',\r\n 'card.level.low': 'low — 낮음(가벼운 라운드는 가볍게 유지)',\r\n 'card.level.medium': 'medium — 중간',\r\n 'card.level.high': 'high — 높음(공식 기본값)',\r\n 'card.level.xhigh': 'xhigh — 특별히 높음',\r\n 'card.level.max': 'max — 최대(무거운 작업)',\r\n 'card.level.auto': 'auto — 도구 기록에서 자동 스케줄링(기본값)',\r\n 'card.enabled': '활성화',\r\n 'card.allowDowngrade': '다운그레이드 허용(auto가 low까지 내릴 수 있음)',\r\n 'card.allowUpgrade': '업그레이드 허용(auto가 max까지 올릴 수 있음)',\r\n 'card.defaultPricing': '카탈로그 외 과금',\r\n 'card.simpleTools': '간단한 도구 허용 목록(auto 강등)',\r\n 'card.simpleToolsHint': '쉼표 또는 공백으로 구분한 도구 이름을 내장 \"저렴하고 결정적인 도구\" 판정에 추가합니다(예: shell, pwsh, web_fetch). auto에서는 이런 짧은 호출만으로 구성된 단계가 low로 내려갑니다. 내장 목록은 이미 bash/terminal/shell/pwsh를 포함하므로 호스트 고유 이름을 보충하세요.',\r\n 'card.simpleToolsRegex': '간단 도구 정규식 목록(auto 강등 판정)',\r\n 'card.simpleToolsRegexHint': '한 줄에 하나의 JavaScript 정규식(자동 앵커 없음 — ^ 를 직접 쓰세요, 대소문자 무시). 위 리터럴 목록과 병행되어 같은 비율에 계산됩니다. 패턴은 전체 도구 이름과 ops_ 를 제거한 이름 모두에 일치하므로 \"^ops_.*\" 하나로 dsh-ops 계열 전체를 커버합니다. 잘못된 항목은 한 번 경고 후 건너뜁니다.',\r\n 'card.defaultPricingHint': '가격 카탈로그에 없는 모델(다른 플러그인으로 유입된 게이트웨이 모델 포함)의 과금 방식. 카탈로그 등재 모델은 항상 자체 등재가 사용. 가격 변경은 이후 신규 기록에만 반영.',\r\n 'card.defaultPricing.estimate': 'estimate — 전형가 폴백 추정(미교정·참고용, 기본)',\r\n 'card.defaultPricing.cn': 'cn — 위안화 보정 등급(카탈로그 외는 여전히 전형가 추정)',\r\n 'card.defaultPricing.global': 'global — 달러 보정 등급(USD 행 보충 전 카탈로그 외는 추정)',\r\n 'card.defaultPricing.custom': 'custom — 직접 입력 가격(행이 불완전하면 미과금)',\r\n 'card.defaultPricing.off': 'off — 미과금(카탈로그 외는 \"미과금\" 표시)',\r\n 'card.unavailable': '설정 네임스페이스를 사용할 수 없습니다: dsh-thinking-levels가 이 profile에 조립되었는지 확인하세요.',\r\n 'card.readonly': '읽기 전용',\r\n 'card.capabilities': '모델 기능(llm-pi-ai 사용자 지정 제공자)',\r\n 'card.capabilities.hint': 'llm-pi-ai 설정을 직접 읽고 씁니다: 수준을 체크하고 게이트웨이에 보낼 값을 입력(예: high → ultra). off를 비워 두면 전송하지 않습니다. 시각은 이미지 입력을 결정하고, 사고 토글은 enable_thinking을 제어하며, thinkingFormat은 wire 직렬화 형식을 선택합니다.',\r\n 'card.capabilities.empty': 'llm-pi-ai에 모델이 구성된 사용자 지정 제공자가 없습니다. 먼저 「설정 → 모델」에서 제공자와 모델을 추가하세요.',\r\n 'card.capabilities.unavailable': 'llm-pi-ai 설정 네임스페이스를 사용할 수 없습니다.',\r\n 'card.capabilities.none': '(모델 없음)',\r\n 'card.capabilities.search': '모델 이름 또는 ID로 검색…',\r\n 'card.capabilities.noMatches': '일치하는 모델이 없습니다',\r\n 'card.capabilities.quickSettings': '빠른 설정',\r\n 'card.capabilities.presetOfficial': '전체에 적용: Off / High / Max(공식 DeepSeek 방식)',\r\n 'card.capabilities.presetGeneric': '전체에 적용: Off / Low / Medium / High(일반 방식)',\r\n 'card.capabilities.vendor': '제공자',\r\n 'card.capabilities.developerRole': '게이트웨이가 developer 역할 미지원',\r\n 'card.capabilities.developerRoleHint': '공식 호환 스위치(dsh ≥ v0.1.0-rc.8): 라우트 수준 compat.supportsDeveloperRole: false 를 기록하여 시스템 프롬프트를 system 역할로 전송합니다. vLLM / SGLang 등의 Unexpected message role 400 을 수정. 체크 해제 시 필드를 삭제하고 상속을 복원합니다.',\r\n 'card.capabilities.takeover': '서드파티 인수',\r\n 'card.capabilities.takeoverHint': '체크하면 이 루트의 모델 요청이 dsh-llm-openai-completions 전송 계층을 통해 단락 전송되고(멀티모달 실전송·모달리티 게이트·프롬프트 주입) pi-ai 는 개입하지 않습니다. 전송 계층 자체의 providers 목록에 기록합니다. 체크 해제 시 루트를 제거합니다. 전송 계층 설치가 필요합니다.',\r\n 'card.capabilities.takeoverHintAbsent': 'dsh-llm-openai-completions 전송 계층이 설치되어 있지 않습니다 — 루트별 인수를 위해 먼저 설치하고 활성화하세요.',\r\n 'card.capabilities.expandProvider': '제공자 펼치기',\r\n 'card.capabilities.collapseProvider': '제공자 접기',\r\n 'card.capabilities.openModelSettings': '모델 설정 열기',\r\n 'card.capabilities.closeModelSettings': '모델 설정 접기',\r\n 'card.capabilities.vision': '시각 모델',\r\n 'card.capabilities.video': '비디오 입력',\r\n 'card.capabilities.audio': '오디오 입력',\r\n 'card.capabilities.pdf': 'PDF 입력',\r\n 'card.capabilities.mediaHint': '비디오/오디오 선언은 인수 transport의 extraInputs에 기록됩니다(호스트 모델 행 input 열거는 text|image만 허용). 해당 라우트가 인수 중일 때만 유효하며, 꺼져 있으면 해당 블록이 거부되거나 modalFallback로 가려집니다.',\r\n 'card.masterTakeover': '인수 마스터',\r\n 'card.masterTakeoverHint': '마스터 스위치: 시작 시마다 transport의 enabled로 미러링됩니다(유일한 기록자). 라우트별 서드파티 인수 체크는 멤버십만 담당하며, 마스터가 꺼진 상태에서 체크하면 자동으로 켜집니다.',\r\n 'card.capabilities.thinking': '사고 모델',\r\n 'card.capabilities.supportsEffort': 'think effort 지원',\r\n 'card.capabilities.efforts': '사고 수준(체크 후 전송 값 입력)',\r\n 'card.capabilities.wirePlaceholder': '전송 값(예: ultra)',\r\n 'card.capabilities.offPlaceholder': '비워 둠 = 전송하지 않음',\r\n 'card.capabilities.atLeastThinking': '사고 수준을 하나 이상 선택하세요(off 제외)',\r\n 'card.capabilities.applyLevel': '수준 적용',\r\n 'card.capabilities.restoreDefault': '기본값 복원',\r\n 'card.capabilities.unsaved': '저장되지 않음',\r\n 'card.capabilities.saveChanges': '변경 사항 저장',\r\n 'card.capabilities.saved': '저장됨',\r\n 'card.capabilities.thinkingFormat': '사고 형식',\r\n 'card.capabilities.thinkingFormat.inherit': '상속',\r\n 'card.capabilities.contextWindow': '컨텍스트 창 상한',\r\n 'card.capabilities.contextCustomPlaceholder': '사용자 지정 정수(예: 256000)',\r\n 'card.capabilities.contextClear': '지우기',\r\n 'card.capabilities.contextInteger': '컨텍스트 길이는 정수여야 합니다 (2000-1000000)',\r\n 'card.capabilities.contextRange': '컨텍스트 길이는 2000에서 1000000 사이여야 합니다',\r\n 'card.capabilities.contextHint': '프리셋을 선택하거나 정수를 입력하세요(2000–1000000). llm-pi-ai에 기록되어 컨텍스트 압력/압축에 사용되며, 재시작 없이 다음 요청에 반영됩니다.',\r\n 'input.context.title': '컨텍스트 창',\r\n 'input.context.globalHint': '전역 적용: 이 모델을 사용하는 모든 세션에 적용됩니다(지우면 기본값 복원)',\r\n 'input.context.unset': '미설정',\r\n 'input.context.custom': '사용자 지정',\r\n 'input.context.noModel': '세션 모델이 아직 없습니다',\r\n 'input.context.customPlaceholder': '사용자 지정 정수(예: 256000)',\r\n 'input.context.apply': '적용',\r\n 'input.context.clear': '지우기',\r\n 'input.context.integer': '컨텍스트 길이는 정수여야 합니다 (2000-1000000)',\r\n 'input.context.range': '컨텍스트 길이는 2000에서 1000000 사이여야 합니다',\r\n 'model.panel.choose': '모델 선택',\r\n 'model.panel.loading': '모델 디렉터리를 불러오는 중…',\r\n 'model.panel.empty': '사용 가능한 모델이 없습니다',\r\n 'model.panel.window': '창',\r\n 'model.panel.noTarget': '이 모델에는 쓰기 가능한 설정 항목이 없습니다',\r\n 'model.panel.unavailable': '이 세션의 모델 디렉터리를 사용할 수 없습니다',\r\n 'input.effort.title': '추론 강도',\r\n 'panel.search.placeholder': '모델 검색…',\r\n 'card.takeoverUi': '모델 UI 인수',\r\n 'card.takeoverUiHint': '켜면 이 플러그인이 입력창의 모델 선택을 자체 패널(행별 컨텍스트/레벨 편집 + 검색)로 대체합니다. 끄면(기본) 공식 팝업이 유지되며 auto 레벨은 계속 표시되고 검색과 로딩은 표준 셀렉터가 담당합니다. 변경이 즉시 반영됩니다(새로고침 불필요).',\r\n 'card.capabilities.apiUnsupported': '이 제공자는 openai-completions 이외 프로토콜을 사용합니다: thinkingFormat / supportsReasoningEffort 는 openai-completions 전용 필드이므로 여기서 제공하지 않습니다(기록하면 호스트가 providers 전체를 거부합니다). 사고 스위치는 영향받지 않습니다 — protocol 중립적인 reasoningEfforts 를 기록하면 pi-ai 가 프로토콜별로 네이티브 변환합니다.',\r\n 'card.capabilities.thinkingNative': '사고 스위치는 모든 프로토콜에서 체크할 수 있습니다: protocol 중립적인 reasoningEfforts 를 기록하고 pi-ai 가 각 프로토콜에서 네이티브 변환합니다(Anthropic 사고 예산 / Responses reasoning effort). thinkingFormat / supportsReasoningEffort 는 openai-completions 전용이며, 해당 프로토콜에서 사고 모델로 선언한 경우에만 표시됩니다.',\r\n 'card.capabilities.staleCompat': '구버전이 이 모델 행에 강제로 주입한 openai-completions 전용 필드',\r\n 'card.capabilities.stripStaleCompat': '이 잔여 필드 제거',\r\n 'card.dsContextTitle': '공식 DeepSeek 모델 컨텍스트 상한',\r\n 'input.effort.default': '공급자 기본값',\r\n 'input.effort.reset': '공급자 기본값으로 복원',\r\n 'card.capabilities.failed': '저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요.',\r\n 'trace.label': 'Effort 궤적',\r\n 'trace.empty': '이 세션에는 아직 확정된 요청 레벨이 없습니다.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': '수동',\r\n 'trace.title': 'Effort 궤적',\r\n 'trace.subtitle': '이 세션에서 각 요청이 실제로 보낸 레벨입니다. 연속된 동일 레벨은 한 구간으로 묶습니다(최신순).',\r\n 'trace.summary.requests': '회 요청',\r\n 'trace.summary.runs': '구간',\r\n 'trace.summary.autoRuns': '구간은 auto 결정',\r\n 'trace.summary.peak': '최고',\r\n 'trace.summary.hint': 'T=턴 · S=단계',\r\n 'trace.note.attribution': '참고: 0.2.2부터 호스트는 요청 단계에서 레벨 변경을 금지하므로, 이 플러그인(엄격 라인)은 한 단계 앞서 `model/selection`을 직접 기록합니다. 따라서 \"수동\"은 로그의 마지막 선택이 구체적 레벨이었다는 뜻일 뿐, 사람의 클릭을 의미하지 않습니다.',\r\n 'trace.intent.default': '기본',\r\n 'trace.intent.unknown': '기록 없음',\r\n 'trace.intent.scheduler': '플러그인',\r\n 'trace.intent.unknownHint': '이 레벨 변경에 대응하는 선택 기록이 세션 로그에 없습니다(0.2.2 이후 엄격 라인에서는 플러그인이 직접 model/selection을 기록하며 그 기록은 로그에 남지 않습니다)',\r\n 'trace.summary.switches': '모델 전환',\r\n 'trace.dir.up': '이전 구간보다 상향, %n회 요청',\r\n 'trace.dir.down': '이전 구간보다 하향, %n회 요청',\r\n 'trace.dir.flat': '레벨은 같고 선택만 변경, %n회 요청',\r\n 'trace.dir.start': '이 세션의 첫 레벨, %n회 요청',\r\n 'ring.title': '컨텍스트 확인',\r\n 'ring.used': '사용됨',\r\n 'ring.remaining': '남음',\r\n 'ring.window': '컨텍스트 창',\r\n 'ring.percent': '점유율',\r\n 'ring.system': '시스템 프롬프트',\r\n 'ring.tools': '도구 정의',\r\n 'ring.messages': '대화 메시지',\r\n 'ring.warning': '컨텍스트가 거의 가득 찼습니다. 컨텍스트를 압축하거나 새 세션을 시작하세요.',\r\n 'ring.aria': '컨텍스트 사용률 %n',\r\n 'ring.unset': '이번 턴에는 아직 사용량이 없습니다',\r\n 'ring.billing': '캐시 과금',\r\n 'ring.bill.step': '현재 단계',\r\n 'ring.bill.turn': '현재 턴',\r\n 'ring.bill.session': '세션 누적',\r\n 'ring.bill.cacheRead': '캐시 적중',\r\n 'ring.bill.cacheMiss': '캐시 미스',\r\n 'ring.bill.output': '출력',\r\n 'ring.bill.fullMiss': '완전 미스',\r\n 'ring.bill.rounds': '단계',\r\n 'ring.bill.peak': '피크 요금',\r\n 'ring.bill.offPeak': '비피크 요금',\r\n 'ring.bill.flat': '정액',\r\n 'ring.bill.unpriced': '미과금',\r\n 'ring.bill.custom': '사용자 지정 요금으로 과금',\r\n 'ring.bill.pricedAs': '%n 요금으로 과금',\r\n 'ring.bill.priced': '카탈로그 요금으로 과금',\r\n 'ring.bill.estimate': '카탈로그 외 추정 요금',\r\n 'ring.bill.uncalibrated': '미보정·참고용',\r\n}\r\n\r\n/** French dictionary (keys mirror zh). */\r\nexport const fr: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Niveaux de réflexion',\r\n 'family.title': 'Paramètres des plugins Qizi',\r\n 'card.description': 'Choisissez Auto dans le sélecteur de modèle : le plugin planifie low / high / max selon l\\'historique des appels d\\'outils avant de soumettre l\\'effort à l\\'API. Configurez ici le niveau par défaut, les limites du planificateur et les capacités par modèle (niveau → valeur envoyée à la passerelle).',\r\n 'card.level': 'Niveau par défaut',\r\n 'card.level.off': 'off — désactiver la réflexion (manuel uniquement, jamais auto-sélectionné)',\r\n 'card.level.on': 'on — activer la réflexion (modèles à bascule uniquement ; envoie enable_thinking, jamais d\\'effort)',\r\n 'card.level.minimal': 'minimal — minimum (tâches très légères)',\r\n 'card.level.low': 'low — bas (tours économiques restent économiques)',\r\n 'card.level.medium': 'medium — moyen',\r\n 'card.level.high': 'high — élevé (valeur officielle par défaut)',\r\n 'card.level.xhigh': 'xhigh — très élevé',\r\n 'card.level.max': 'max — maximum (tâches lourdes)',\r\n 'card.level.auto': 'auto — planification depuis l\\'historique des outils (par défaut)',\r\n 'card.enabled': 'Activé',\r\n 'card.allowDowngrade': 'Autoriser la rétrogradation (auto peut descendre à low)',\r\n 'card.allowUpgrade': 'Autoriser la montée (auto peut monter à max)',\r\n 'card.defaultPricing': 'Tarification hors catalogue',\r\n 'card.simpleTools': 'Liste d\\'outils simples (rétrogradation auto)',\r\n 'card.simpleToolsHint': 'Noms d\\'outils séparés par virgule ou espace, ajoutés à l\\'ensemble interne des « outils bon marché et déterministes » (ex. shell, pwsh, web_fetch). En mode auto, une étape composée uniquement de ces appels courts passe à low. L\\'ensemble interne couvre déjà bash/terminal/shell/pwsh ; utilisez ce champ pour les noms propres à l\\'hôte.',\r\n 'card.simpleToolsRegex': 'Liste regex d\\'outils simples (déclassement auto)',\r\n 'card.simpleToolsRegexHint': 'Une regex JavaScript par entrée (pas d\\'ancrage automatique — écrivez votre ^ ; insensible à la casse), en complément de la liste littérale ci-dessus et comptée dans le même ratio. Les motifs testent à la fois le nom complet et le nom nu sans ops_ — « ^ops_.* » couvre toute la famille dsh-ops d\\'un coup. Les entrées invalides sont ignorées avec un avertissement unique.',\r\n 'card.defaultPricingHint': 'Comment tarifer les modèles absents du catalogue (y compris les modèles de passerelle apportés par d\\'autres plugins) ; les modèles catalogués gardent leurs tarifs. Les changements ne touchent que les nouvelles lignes.',\r\n 'card.defaultPricing.estimate': 'estimate — estimation par prix type (non calibrée, à titre indicatif ; par défaut)',\r\n 'card.defaultPricing.cn': 'cn — palier calibré CNY (hors catalogue : estimation au prix type)',\r\n 'card.defaultPricing.global': 'global — palier calibré USD (hors catalogue estimé tant que les lignes USD manquent)',\r\n 'card.defaultPricing.custom': 'custom — tarifs saisis (non facturé sans ligne complète)',\r\n 'card.defaultPricing.off': 'off — ne pas facturer (hors catalogue affiche « non facturé »)',\r\n 'card.unavailable': 'Espace de noms des paramètres indisponible : assurez-vous que dsh-thinking-levels est assemblé dans ce profil.',\r\n 'card.readonly': 'Lecture seule',\r\n 'card.capabilities': 'Capacités du modèle (fournisseurs personnalisés llm-pi-ai)',\r\n 'card.capabilities.hint': 'Lit et écrit directement la configuration llm-pi-ai : cochez un niveau et saisissez la valeur exacte envoyée à la passerelle (ex. high → ultra) ; laisser off vide signifie « ne pas envoyer ». Vision contrôle l\\'entrée d\\'image ; le bouton de réflexion pilote enable_thinking ; thinkingFormat choisit la sérialisation wire.',\r\n 'card.capabilities.empty': 'Aucun fournisseur personnalisé n\\'a de modèles configurés dans llm-pi-ai. Ajoutez d\\'abord un fournisseur et des modèles dans Paramètres → Modèles.',\r\n 'card.capabilities.unavailable': 'L\\'espace de noms des paramètres llm-pi-ai est indisponible.',\r\n 'card.capabilities.none': '(aucun modèle)',\r\n 'card.capabilities.search': 'Rechercher des modèles par nom ou ID…',\r\n 'card.capabilities.noMatches': 'Aucun modèle correspondant',\r\n 'card.capabilities.quickSettings': 'Paramètres rapides',\r\n 'card.capabilities.presetOfficial': 'Appliquer à tous : Off / High / Max (style officiel DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Appliquer à tous : Off / Low / Medium / High (générique)',\r\n 'card.capabilities.vendor': 'Fournisseur',\r\n 'card.capabilities.developerRole': 'La passerelle rejette le rôle developer',\r\n 'card.capabilities.developerRoleHint': 'Commutateur de compatibilité officiel (dsh ≥ v0.1.0-rc.8) : écrit compat.supportsDeveloperRole: false au niveau de la route pour que le prompt système soit envoyé avec le rôle system — corrige l\\'erreur Unexpected message role 400 sur les passerelles vLLM / SGLang. Décocher supprime le champ et restaure l\\'héritage.',\r\n 'card.capabilities.takeover': 'Prise en charge tierce',\r\n 'card.capabilities.takeoverHint': 'Une fois coché, les requêtes de modèle de cette route passent par le transport dsh-llm-openai-completions (envoi multimodal réel, garde de modalité, injection de prompt) et pi-ai sort. Écrit la liste providers du transport lui-même ; décocher retire la route. Le transport doit être installé.',\r\n 'card.capabilities.takeoverHintAbsent': 'Le transport dsh-llm-openai-completions n est pas installé — installez-le et activez-le pour la prise en charge par route.',\r\n 'card.capabilities.expandProvider': 'Déplier le fournisseur',\r\n 'card.capabilities.collapseProvider': 'Replier le fournisseur',\r\n 'card.capabilities.openModelSettings': 'Ouvrir les paramètres du modèle',\r\n 'card.capabilities.closeModelSettings': 'Replier les paramètres du modèle',\r\n 'card.capabilities.vision': 'Modèle vision',\r\n 'card.capabilities.video': 'Entrée vidéo',\r\n 'card.capabilities.audio': 'Entrée audio',\r\n 'card.capabilities.pdf': 'Entrée PDF',\r\n 'card.capabilities.mediaHint': 'Les déclarations vidéo/audio sont écrites dans les extraInputs du transport repris (l’énumération input du modèle hôte n’accepte que text|image). Effectif uniquement lorsque la route est reprise ; sinon les blocs concernés sont refusés ou masqués selon modalFallback.',\r\n 'card.masterTakeover': 'Prise de contrôle maître',\r\n 'card.masterTakeoverHint': 'Interrupteur maître : son état est reflété dans le enabled du transport à chaque démarrage (seul rédacteur). Les cases de prise de contrôle tierce par route ne gèrent que l’appartenance ; master off, cocher une route allume cet interrupteur.',\r\n 'card.capabilities.thinking': 'Modèle de réflexion',\r\n 'card.capabilities.supportsEffort': 'Prend en charge think effort',\r\n 'card.capabilities.efforts': 'Niveaux de réflexion (cochez, puis saisissez la valeur wire)',\r\n 'card.capabilities.wirePlaceholder': 'Valeur wire, ex. ultra',\r\n 'card.capabilities.offPlaceholder': 'Vide = ne pas envoyer',\r\n 'card.capabilities.atLeastThinking': 'Sélectionnez au moins un niveau de réflexion (autre que off)',\r\n 'card.capabilities.applyLevel': 'Appliquer les niveaux',\r\n 'card.capabilities.restoreDefault': 'Restaurer les valeurs par défaut',\r\n 'card.capabilities.unsaved': 'Non enregistré',\r\n 'card.capabilities.saveChanges': 'Enregistrer les modifications',\r\n 'card.capabilities.saved': 'Enregistré',\r\n 'card.capabilities.thinkingFormat': 'Format de réflexion',\r\n 'card.capabilities.thinkingFormat.inherit': 'Hériter',\r\n 'card.capabilities.contextWindow': 'Limite de fenêtre de contexte',\r\n 'card.capabilities.contextCustomPlaceholder': 'Entier personnalisé, ex. 256000',\r\n 'card.capabilities.contextClear': 'Effacer',\r\n 'card.capabilities.contextInteger': 'La longueur du contexte doit être un entier (2000-1000000)',\r\n 'card.capabilities.contextRange': 'La longueur du contexte doit être comprise entre 2000 et 1000000',\r\n 'card.capabilities.contextHint': 'Choisissez un préréglage ou saisissez un entier (2000–1000000) ; écrit dans llm-pi-ai pour la pression/compression du contexte et appliqué à la requête suivante sans redémarrage.',\r\n 'input.context.title': 'Fenêtre de contexte',\r\n 'input.context.globalHint': 'S\\'applique globalement à toutes les sessions utilisant ce modèle (Effacer restaure la valeur par défaut)',\r\n 'input.context.unset': 'Non défini',\r\n 'input.context.custom': 'Personnalisé',\r\n 'input.context.noModel': 'Aucun modèle de session',\r\n 'input.context.customPlaceholder': 'Entier personnalisé, ex. 256000',\r\n 'input.context.apply': 'Appliquer',\r\n 'input.context.clear': 'Effacer',\r\n 'input.context.integer': 'La longueur du contexte doit être un entier (2000-1000000)',\r\n 'input.context.range': 'La longueur du contexte doit être comprise entre 2000 et 1000000',\r\n 'model.panel.choose': 'Choisir un modèle',\r\n 'model.panel.loading': 'Chargement du répertoire de modèles…',\r\n 'model.panel.empty': 'Aucun modèle disponible',\r\n 'model.panel.window': 'Fenêtre',\r\n 'model.panel.noTarget': 'Aucune entrée de configuration inscriptible pour ce modèle',\r\n 'model.panel.unavailable': 'Le répertoire de modèles est indisponible pour cette session',\r\n 'input.effort.title': 'Effort de raisonnement',\r\n 'panel.search.placeholder': 'Rechercher des modèles…',\r\n 'card.takeoverUi': \"Reprise de l'UI modèle\",\r\n 'card.takeoverUiHint': \"Activé, ce plugin remplace le sélecteur de modèle du composeur par son propre panneau (éditeurs contexte/niveau par ligne + recherche). Désactivé (défaut), la popup officielle reste en place — le niveau auto apparaît toujours, recherche et chargement appartiennent au sélecteur d'origine. Le changement s’applique immédiatement, sans rechargement.\",\r\n 'card.capabilities.apiUnsupported': \"Ce fournisseur utilise un protocole autre qu'openai-completions : thinkingFormat / supportsReasoningEffort sont des champs propres à openai-completions et ne sont pas proposés ici (une écriture qui les porte est rejetée en bloc par l'hôte). L'interrupteur de réflexion n'est pas affecté : il écrit reasoningEfforts, neutre au protocole, que pi-ai traduit nativement.\",\r\n 'card.capabilities.thinkingNative': \"L'interrupteur de réflexion est disponible sur tous les protocoles : il écrit reasoningEfforts, neutre au protocole, que pi-ai traduit nativement (budget de réflexion Anthropic / reasoning effort Responses). thinkingFormat / supportsReasoningEffort sont propres à openai-completions et n'apparaissent qu'une fois le modèle déclaré réflexif sur ce protocole.\",\r\n 'card.capabilities.staleCompat': 'champs propres à openai-completions qu une version antérieure a forcés sur cette ligne de modèle',\r\n 'card.capabilities.stripStaleCompat': 'Supprimer ces résidus',\r\n 'card.dsContextTitle': 'Fenêtres de contexte DeepSeek officielles',\r\n 'input.effort.default': 'Valeur par défaut du fournisseur',\r\n 'input.effort.reset': 'Restaurer la valeur par défaut du fournisseur',\r\n 'card.capabilities.failed': 'Échec de l\\'enregistrement : la valeur a été rejetée ou est en conflit. Vérifiez-la.',\r\n 'trace.label': 'Trace des efforts',\r\n 'trace.empty': 'Aucun niveau de requête validé dans cette session pour l\\'instant.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manuel',\r\n 'trace.title': 'Trace des efforts',\r\n 'trace.subtitle': 'Le niveau réellement envoyé à chaque requête de cette session ; les niveaux identiques consécutifs sont regroupés (le plus récent en haut).',\r\n 'trace.summary.requests': 'requêtes',\r\n 'trace.summary.runs': 'segments',\r\n 'trace.summary.autoRuns': 'segments planifiés par auto',\r\n 'trace.summary.peak': 'pic',\r\n 'trace.summary.hint': 'T=tour · S=étape',\r\n 'trace.note.attribution': 'Remarque : depuis 0.2.2 l’hôte interdit de changer le niveau au moment de la requête ; ce plugin (ligne stricte) écrit donc lui-même `model/selection` une étape à l’avance. L’étiquette « manuel » signifie seulement que la dernière sélection du journal était un niveau concret, pas forcément un clic humain.',\r\n 'trace.intent.default': 'par défaut',\r\n 'trace.intent.unknown': 'non enregistré',\r\n 'trace.intent.scheduler': 'planificateur',\r\n 'trace.intent.unknownHint': 'Ce changement de niveau n’a aucune sélection correspondante dans le journal (depuis 0.2.2, le plugin écrit lui-même model/selection et ces écritures n’atteignent pas le journal)',\r\n 'trace.summary.switches': 'changements de modèle',\r\n 'trace.dir.up': 'montée depuis le segment précédent, %n requête(s)',\r\n 'trace.dir.down': 'descente depuis le segment précédent, %n requête(s)',\r\n 'trace.dir.flat': 'même niveau, choix différent, %n requête(s)',\r\n 'trace.dir.start': 'premier niveau de la session, %n requête(s)',\r\n 'ring.title': 'Vérification du contexte',\r\n 'ring.used': 'Utilisé',\r\n 'ring.remaining': 'Restant',\r\n 'ring.window': 'Fenêtre de contexte',\r\n 'ring.percent': 'Occupation',\r\n 'ring.system': 'Prompt système',\r\n 'ring.tools': 'Définitions d’outils',\r\n 'ring.messages': 'Messages',\r\n 'ring.warning': 'Le contexte est presque plein — compactez le contexte ou démarrez une nouvelle session.',\r\n 'ring.aria': '%n du contexte utilisé',\r\n 'ring.unset': 'Aucune consommation dans ce tour',\r\n 'ring.billing': 'Facturation du cache',\r\n 'ring.bill.step': 'Cette étape',\r\n 'ring.bill.turn': 'Ce tour',\r\n 'ring.bill.session': 'Total de la session',\r\n 'ring.bill.cacheRead': 'Lecture du cache',\r\n 'ring.bill.cacheMiss': 'Échec du cache',\r\n 'ring.bill.output': 'Sortie',\r\n 'ring.bill.fullMiss': 'Échecs complets',\r\n 'ring.bill.rounds': 'étapes',\r\n 'ring.bill.peak': 'Tarifs de pointe',\r\n 'ring.bill.offPeak': 'Tarifs creux',\r\n 'ring.bill.flat': 'Tarif fixe',\r\n 'ring.bill.unpriced': 'Non facturé',\r\n 'ring.bill.custom': 'facturé au tarif personnalisé',\r\n 'ring.bill.pricedAs': 'facturé comme %n',\r\n 'ring.bill.priced': 'facturé au tarif du catalogue',\r\n 'ring.bill.estimate': 'estimé hors catalogue',\r\n 'ring.bill.uncalibrated': 'non calibré — à titre indicatif',\r\n}\r\n\r\n/** German dictionary (keys mirror zh). */\r\nexport const de: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Denkstufen',\r\n 'family.title': 'Qizi-Plugin-Einstellungen',\r\n 'card.description': 'Wählen Sie Auto im Modellselektor: Das Plugin plant low / high / max anhand des Tool-Aufrufverlaufs, bevor der API-Aufwand übermittelt wird. Hier konfigurieren Sie die Standardstufe, Planer-Grenzen und Modellfähigkeiten (Stufe → Gateway-Drahtwert-Zuordnung).',\r\n 'card.level': 'Standardstufe',\r\n 'card.level.off': 'off — Denken deaktivieren (nur manuell, nie automatisch gewählt)',\r\n 'card.level.on': 'on — Denken aktivieren (nur Umschaltmodelle; sendet enable_thinking, nie einen Aufwand)',\r\n 'card.level.minimal': 'minimal — geringst (sehr leichte Aufgaben)',\r\n 'card.level.low': 'low — niedrig (günstige Runden bleiben günstig)',\r\n 'card.level.medium': 'medium — mittel',\r\n 'card.level.high': 'high — hoch (offizieller Standard)',\r\n 'card.level.xhigh': 'xhigh — extra hoch',\r\n 'card.level.max': 'max — maximal (schwere Aufgaben)',\r\n 'card.level.auto': 'auto — Planung aus Tool-Verlauf (Standard)',\r\n 'card.enabled': 'Aktiviert',\r\n 'card.allowDowngrade': 'Herabstufung erlauben (auto kann auf low fallen)',\r\n 'card.allowUpgrade': 'Hochstufung erlauben (auto kann auf max steigen)',\r\n 'card.defaultPricing': 'Preis außerhalb des Katalogs',\r\n 'card.simpleTools': 'Allowlist einfacher Tools (Auto-Downgrade)',\r\n 'card.simpleToolsHint': 'Durch Komma oder Leerzeichen getrennte Tool-Namen, die der internen Menge „billige und deterministische Tools“ hinzugefügt werden (z. B. shell, pwsh, web_fetch). Im Auto-Modus sinkt ein Schritt, der nur aus diesen kurzen Aufrufen besteht, auf low. Die interne Menge enthält bereits bash/terminal/shell/pwsh; nutzen Sie dieses Feld für hostspezifische Namen.',\r\n 'card.simpleToolsRegex': 'Regex-Liste einfacher Tools (Auto-Downgrade)',\r\n 'card.simpleToolsRegexHint': 'Ein JavaScript-Regex pro Eintrag (kein automatischer Anker — ^ selbst schreiben; Groß-/Kleinschreibung ignoriert), neben der Literal-Liste oben und in derselben Quote gezählt. Muster prüfen BOTH den vollständigen Tool-Namen und den ohne ops_ — „^ops_.*“ deckt die ganze dsh-ops-Familie auf einen Schlag ab. Ungültige Einträge werden mit einer einmaligen Warnung übersprungen.',\r\n 'card.defaultPricingHint': 'Bepreisung von Modellen ohne Katalogeintrag (inkl. Gateway-Modelle anderer Plugins); katalogisierte Modelle nutzen immer ihre Katalogpreise. Änderungen wirken nur auf neue Buchungen.',\r\n 'card.defaultPricing.estimate': 'estimate — Schätzung über Typicalpreis (unkalibriert, nur Referenz; Standard)',\r\n 'card.defaultPricing.cn': 'cn — Kalibrierungsstufe CNY (ohne Katalogeintrag weiterhin Typicalpreis-Schätzung)',\r\n 'card.defaultPricing.global': 'global — Kalibrierungsstufe USD (ohne Katalogeintrag geschätzt, bis USD-Zeilen ergänzt sind)',\r\n 'card.defaultPricing.custom': 'custom — eigene Preise (ohne vollständige Zeile unbestückt)',\r\n 'card.defaultPricing.off': 'off — nicht abrechnen (ohne Katalogeintrag „nicht abgerechnet“)',\r\n 'card.unavailable': 'Einstellungs-Namensraum nicht verfügbar: Stellen Sie sicher, dass dsh-thinking-levels in diesem Profil eingebunden ist.',\r\n 'card.readonly': 'Schreibgeschützt',\r\n 'card.capabilities': 'Modellfähigkeiten (llm-pi-ai benutzerdefinierte Anbieter)',\r\n 'card.capabilities.hint': 'Liest und schreibt die llm-pi-ai-Konfiguration direkt: Aktivieren Sie eine Stufe und geben Sie den genauen Wert ein, der an das Gateway gesendet wird (z. B. high → ultra); off leer lassen bedeutet „nicht senden\". Vision steuert die Bild-Eingabe; der Denk-Schalter treibt enable_thinking; thinkingFormat wählt die Wire-Serialisierung.',\r\n 'card.capabilities.empty': 'Kein benutzerdefinierter Anbieter hat Modelle in llm-pi-ai konfiguriert. Fügen Sie zuerst einen Anbieter und Modelle unter Einstellungen → Modelle hinzu.',\r\n 'card.capabilities.unavailable': 'Der llm-pi-ai Einstellungs-Namensraum ist nicht verfügbar.',\r\n 'card.capabilities.none': '(keine Modelle)',\r\n 'card.capabilities.search': 'Modelle nach Name oder ID suchen…',\r\n 'card.capabilities.noMatches': 'Keine passenden Modelle',\r\n 'card.capabilities.quickSettings': 'Schnelleinstellungen',\r\n 'card.capabilities.presetOfficial': 'Auf alle anwenden: Off / High / Max (offizieller DeepSeek-Stil)',\r\n 'card.capabilities.presetGeneric': 'Auf alle anwenden: Off / Low / Medium / High (generisch)',\r\n 'card.capabilities.vendor': 'Anbieter',\r\n 'card.capabilities.developerRole': 'Gateway lehnt die Entwickler-Rolle ab',\r\n 'card.capabilities.developerRoleHint': 'Offizieller Kompatibilitätsschalter (dsh ≥ v0.1.0-rc.8): Schreibt compat.supportsDeveloperRole: false auf Routenebene, damit der System-Prompt als Rolle system gesendet wird — behebt den Unexpected message role 400 auf vLLM / SGLang Gateways. Deaktivieren löscht das Feld und stellt die Vererbung wieder her.',\r\n 'card.capabilities.takeover': 'Third-Party-Übernahme',\r\n 'card.capabilities.takeoverHint': 'Ist dies aktiviert, werden die Modellanfragen dieser Route durch die dsh-llm-openai-completions-Transportschicht geleitet (echtes Multimodal-Senden, Modalitäts-Gate, Prompt-Injection) und pi-ai tritt zurück. Schreibt die providers-Liste der Transportschicht selbst; Deaktivieren entfernt die Route. Die Transportschicht muss installiert sein.',\r\n 'card.capabilities.takeoverHintAbsent': 'Die Transportschicht dsh-llm-openai-completions ist nicht installiert — bitte zuerst installieren und aktivieren, um Routen gezielt zu übernehmen.',\r\n 'card.capabilities.expandProvider': 'Anbieter aufklappen',\r\n 'card.capabilities.collapseProvider': 'Anbieter einklappen',\r\n 'card.capabilities.openModelSettings': 'Modelleinstellungen öffnen',\r\n 'card.capabilities.closeModelSettings': 'Modelleinstellungen einklappen',\r\n 'card.capabilities.vision': 'Vision-Modell',\r\n 'card.capabilities.video': 'Videoeingabe',\r\n 'card.capabilities.audio': 'Audioeingabe',\r\n 'card.capabilities.pdf': 'PDF-Eingabe',\r\n 'card.capabilities.mediaHint': 'Video/Audio-Deklarationen werden in die extraInputs des übernommenen Transports geschrieben (die Input-Enumeration der Host-Modellzeile akzeptiert nur text|image). Nur wirksam, während die Route übernommen ist; andernfalls werden passende Blöcke abgelehnt oder per modalFallback maskiert.',\r\n 'card.masterTakeover': 'Übernahme-Master',\r\n 'card.masterTakeoverHint': 'Hauptschalter: Der Zustand wird bei jedem Start in das enabled des Transports gespiegelt (einziger Schreiber). Die Routen-Häkchen der Übernahme durch Drittanbieter steuern nur die Mitgliedschaft; bei ausgeschaltetem Master leuchtet er beim Häkchen automatisch auf.',\r\n 'card.capabilities.thinking': 'Denkmodell',\r\n 'card.capabilities.supportsEffort': 'Unterstützt think effort',\r\n 'card.capabilities.efforts': 'Denkstufen (aktivieren, dann Drahtwert eingeben)',\r\n 'card.capabilities.wirePlaceholder': 'Drahtwert, z. B. ultra',\r\n 'card.capabilities.offPlaceholder': 'Leer = nicht senden',\r\n 'card.capabilities.atLeastThinking': 'Wählen Sie mindestens eine Denkstufe (außer off)',\r\n 'card.capabilities.applyLevel': 'Stufen anwenden',\r\n 'card.capabilities.restoreDefault': 'Standardwerte wiederherstellen',\r\n 'card.capabilities.unsaved': 'Ungespeichert',\r\n 'card.capabilities.saveChanges': 'Änderungen speichern',\r\n 'card.capabilities.saved': 'Gespeichert',\r\n 'card.capabilities.thinkingFormat': 'Denkformat',\r\n 'card.capabilities.thinkingFormat.inherit': 'Erben',\r\n 'card.capabilities.contextWindow': 'Kontextfenster-Limit',\r\n 'card.capabilities.contextCustomPlaceholder': 'Benutzerdefinierte Ganzzahl, z. B. 256000',\r\n 'card.capabilities.contextClear': 'Löschen',\r\n 'card.capabilities.contextInteger': 'Kontextlänge muss eine Ganzzahl sein (2000-1000000)',\r\n 'card.capabilities.contextRange': 'Kontextlänge muss zwischen 2000 und 1000000 liegen',\r\n 'card.capabilities.contextHint': 'Wählen Sie eine Voreinstellung oder geben Sie eine Ganzzahl ein (2000–1000000); wird in llm-pi-ai geschrieben für Kontextdruck/Komprimierung und gilt ab der nächsten Anfrage ohne Neustart.',\r\n 'input.context.title': 'Kontextfenster',\r\n 'input.context.globalHint': 'Gilt global für alle Sitzungen mit diesem Modell (Löschen stellt den Standard wieder her)',\r\n 'input.context.unset': 'Nicht festgelegt',\r\n 'input.context.custom': 'Benutzerdefiniert',\r\n 'input.context.noModel': 'Noch kein Sitzungsmodell',\r\n 'input.context.customPlaceholder': 'Benutzerdefinierte Ganzzahl, z. B. 256000',\r\n 'input.context.apply': 'Anwenden',\r\n 'input.context.clear': 'Löschen',\r\n 'input.context.integer': 'Kontextlänge muss eine Ganzzahl sein (2000-1000000)',\r\n 'input.context.range': 'Kontextlänge muss zwischen 2000 und 1000000 liegen',\r\n 'model.panel.choose': 'Modell wählen',\r\n 'model.panel.loading': 'Modellverzeichnis wird geladen…',\r\n 'model.panel.empty': 'Keine Modelle verfügbar',\r\n 'model.panel.window': 'Fenster',\r\n 'model.panel.noTarget': 'Kein beschreibbarer Konfigurationseintrag für dieses Modell',\r\n 'model.panel.unavailable': 'Das Modellverzeichnis ist für diese Sitzung nicht verfügbar',\r\n 'input.effort.title': 'Schlussfolgerungsaufwand',\r\n 'panel.search.placeholder': 'Modelle suchen…',\r\n 'card.takeoverUi': 'Modell-UI-Übernahme',\r\n 'card.takeoverUiHint': 'Ein: dieses Plugin ersetzt die Modellauswahl des Composers durch ein eigenes Panel (Kontext-/Stufen-Editoren je Zeile + Suche). Aus (Standard): die offizielle Popup bleibt — die auto-Stufe erscheint weiterhin; Suche und Laden übernimmt der mitgelieferte Wähler. Änderungen wirken sofort — neu laden ist nicht nötig.',\r\n 'card.capabilities.apiUnsupported': 'Dieser Provider nutzt ein anderes Protokoll als openai-completions: thinkingFormat / supportsReasoningEffort sind openai-completions-exklusive Felder und werden hier nicht angeboten (eine Schreiboperation damit wird vom Host als Ganzes abgelehnt). Der Thinking-Schalter ist nicht betroffen: er schreibt protokollneutral reasoningEfforts, die pi-ai protokollweit nativ übersetzt.',\r\n 'card.capabilities.thinkingNative': 'Der Thinking-Schalter ist auf jedem Protokoll verfügbar: er schreibt protokollneutral reasoningEfforts, die pi-ai nativ übersetzt (Anthropic-Thinking-Budget / Responses reasoning effort). thinkingFormat / supportsReasoningEffort sind openai-completions-exklusiv und erscheinen erst, wenn das Modell auf diesem Protokoll als Thinking-Modell deklariert ist.',\r\n 'card.capabilities.staleCompat': 'openai-completions-exklusive Felder, die eine ältere Version in diese Modellzeile gezwungen hat',\r\n 'card.capabilities.stripStaleCompat': 'Diese Reste entfernen',\r\n 'card.dsContextTitle': 'Kontextfenster der offiziellen DeepSeek-Modelle',\r\n 'input.effort.default': 'Anbieterstandard',\r\n 'input.effort.reset': 'Auf Anbieterstandard zurücksetzen',\r\n 'card.capabilities.failed': 'Speichern fehlgeschlagen: Der Wert wurde abgelehnt oder steht in Konflikt. Bitte überprüfen.',\r\n 'trace.label': 'Effort-Verlauf',\r\n 'trace.empty': 'In dieser Sitzung gibt es noch keine übermittelten Request-Stufen.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manuell',\r\n 'trace.title': 'Effort-Verlauf',\r\n 'trace.subtitle': 'Die Stufe, mit der jede Anfrage dieser Sitzung tatsächlich gesendet wurde; aufeinanderfolgende gleiche Stufen werden zusammengefasst (neueste oben).',\r\n 'trace.summary.requests': 'Anfragen',\r\n 'trace.summary.runs': 'Abschnitte',\r\n 'trace.summary.autoRuns': 'Abschnitte von auto geplant',\r\n 'trace.summary.peak': 'Spitze',\r\n 'trace.summary.hint': 'T=Turn · S=Schritt',\r\n 'trace.note.attribution': 'Hinweis: Ab 0.2.2 verbietet der Host das Ändern der Stufe zur Request-Zeit; dieses Plugin (strikte Linie) schreibt `model/selection` daher selbst einen Schritt im Voraus. „Manuell“ heißt also nur, dass die letzte Auswahl im Log eine konkrete Stufe war — nicht zwingend ein menschlicher Klick.',\r\n 'trace.intent.default': 'Standard',\r\n 'trace.intent.unknown': 'nicht erfasst',\r\n 'trace.intent.scheduler': 'Planer',\r\n 'trace.intent.unknownHint': 'Für diese Stufenänderung gibt es keine passende Auswahl im Sitzungsprotokoll (ab 0.2.2 schreibt das Plugin selbst model/selection und diese Schreibvorgänge erreichen das Protokoll nicht)',\r\n 'trace.summary.switches': 'Modellwechsel',\r\n 'trace.dir.up': 'gegenüber dem vorigen Abschnitt erhöht, %n Anfrage(n)',\r\n 'trace.dir.down': 'gegenüber dem vorigen Abschnitt gesenkt, %n Anfrage(n)',\r\n 'trace.dir.flat': 'gleiche Stufe, andere Auswahl, %n Anfrage(n)',\r\n 'trace.dir.start': 'erste Stufe der Sitzung, %n Anfrage(n)',\r\n 'ring.title': 'Kontextprüfung',\r\n 'ring.used': 'Verwendet',\r\n 'ring.remaining': 'Verbleibend',\r\n 'ring.window': 'Kontextfenster',\r\n 'ring.percent': 'Auslastung',\r\n 'ring.system': 'System-Prompt',\r\n 'ring.tools': 'Werkzeugdefinitionen',\r\n 'ring.messages': 'Nachrichten',\r\n 'ring.warning': 'Der Kontext ist fast voll — verdichten Sie den Kontext oder starten Sie eine neue Sitzung.',\r\n 'ring.aria': '%n des Kontexts verbraucht',\r\n 'ring.unset': 'In diesem Zug noch keine Nutzung',\r\n 'ring.billing': 'Cache-Abrechnung',\r\n 'ring.bill.step': 'Aktueller Schritt',\r\n 'ring.bill.turn': 'Aktueller Zug',\r\n 'ring.bill.session': 'Sitzungssumme',\r\n 'ring.bill.cacheRead': 'Cache-Treffer',\r\n 'ring.bill.cacheMiss': 'Cache-Fehltreffer',\r\n 'ring.bill.output': 'Ausgabe',\r\n 'ring.bill.fullMiss': 'Vollständige Fehltreffer',\r\n 'ring.bill.rounds': 'Schritte',\r\n 'ring.bill.peak': 'Spitzentarif',\r\n 'ring.bill.offPeak': 'Nebentarif',\r\n 'ring.bill.flat': 'Pauschaltarif',\r\n 'ring.bill.unpriced': 'Nicht abgerechnet',\r\n 'ring.bill.custom': 'zu eigenen Sätzen abgerechnet',\r\n 'ring.bill.pricedAs': 'als %n abgerechnet',\r\n 'ring.bill.priced': 'zu Katalogsätzen abgerechnet',\r\n 'ring.bill.estimate': 'außerhalb des Katalogs geschätzt',\r\n 'ring.bill.uncalibrated': 'unkalibriert — nur als Richtwert',\r\n}\r\n\r\n/** Italian dictionary (keys mirror zh). */\r\nexport const it: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Livelli di ragionamento',\r\n 'family.title': 'Impostazioni plugin Qizi',\r\n 'card.description': 'Scegli Auto nel selettore del modello: il plugin pianifica low / high / max in base alla cronologia delle chiamate degli strumenti prima di inviare l\\'effort all\\'API. Qui configuri il livello predefinito, i limiti dello scheduler e le capacità per modello (livello → valore wire inviato al gateway).',\r\n 'card.level': 'Livello predefinito',\r\n 'card.level.off': 'off — disabilita il ragionamento (solo manuale, mai scelto automaticamente)',\r\n 'card.level.on': 'on — abilita il ragionamento (solo modelli a commutazione; invia enable_thinking, mai un effort)',\r\n 'card.level.minimal': 'minimal — minimo (compiti molto leggeri)',\r\n 'card.level.low': 'low — basso (i round economici restano economici)',\r\n 'card.level.medium': 'medium — medio',\r\n 'card.level.high': 'high — alto (predefinito ufficiale)',\r\n 'card.level.xhigh': 'xhigh — molto alto',\r\n 'card.level.max': 'max — massimo (compiti pesanti)',\r\n 'card.level.auto': 'auto — pianificazione dalla cronologia strumenti (predefinito)',\r\n 'card.enabled': 'Abilitato',\r\n 'card.allowDowngrade': 'Consenti declassamento (auto può scendere a low)',\r\n 'card.allowUpgrade': 'Consenti avanzamento (auto può salire a max)',\r\n 'card.defaultPricing': 'Prezzi fuori catalogo',\r\n 'card.simpleTools': 'Elenco strumenti semplici (downgrade automatico)',\r\n 'card.simpleToolsHint': 'Nomi di strumenti separati da virgole o spazi, aggiunti all\\'insieme interno degli \"strumenti economici e deterministici\" (es. shell, pwsh, web_fetch). In modalità auto, un passo composto solo da queste chiamate brevi scende a low. L\\'insieme interno copre già bash/terminal/shell/pwsh; usa questo campo per nomi specifici dell\\'host.',\r\n 'card.simpleToolsRegex': 'Lista regex strumenti semplici (downgrade auto)',\r\n 'card.simpleToolsRegexHint': 'Una regex JavaScript per voce (nessun ancoraggio automatico — scrivi tu il ^; insensibile a maiuscole), a fianco della lista letterale sopra e conteggiata nello stesso rapporto. I pattern testano sia il nome completo sia il nome nudo senza ops_ — «^ops_.*» copre l\\'intera famiglia dsh-ops in una volta. Le voci non valide vengono saltate con un avviso una tantum.',\r\n 'card.defaultPricingHint': 'Come fatturare i modelli assenti dal catalogo (inclusi i modelli gateway di altri plugin); i modelli in catalogo usano sempre i propri prezzi. Le modifiche valgono solo per le nuove registrazioni.',\r\n 'card.defaultPricing.estimate': 'estimate — stima a prezzo tipico (non calibrata, solo indicativa; predefinito)',\r\n 'card.defaultPricing.cn': 'cn — livello calibrato CNY (fuori catalogo resta la stima a prezzo tipico)',\r\n 'card.defaultPricing.global': 'global — livello calibrato USD (fuori catalogo stimato finché mancano le righe USD)',\r\n 'card.defaultPricing.custom': 'custom — prezzi inseriti a mano (non fatturato senza riga completa)',\r\n 'card.defaultPricing.off': 'off — non fatturare (fuori catalogo mostra \"non fatturato\")',\r\n 'card.unavailable': 'Namespace delle impostazioni non disponibile: assicurati che dsh-thinking-levels sia integrato in questo profilo.',\r\n 'card.readonly': 'Sola lettura',\r\n 'card.capabilities': 'Capacità del modello (provider personalizzati llm-pi-ai)',\r\n 'card.capabilities.hint': 'Legge e scrive direttamente la configurazione llm-pi-ai: spunta un livello e inserisci il valore esatto inviato al gateway (es. high → ultra); lasciare off vuoto significa «non inviare». Vision controlla l\\'input immagine; l\\'interruttore di ragionamento guida enable_thinking; thinkingFormat sceglie la serializzazione wire.',\r\n 'card.capabilities.empty': 'Nessun provider personalizzato ha modelli configurati in llm-pi-ai. Aggiungi prima un provider e dei modelli in Impostazioni → Modelli.',\r\n 'card.capabilities.unavailable': 'Il namespace delle impostazioni llm-pi-ai non è disponibile.',\r\n 'card.capabilities.none': '(nessun modello)',\r\n 'card.capabilities.search': 'Cerca modelli per nome o ID…',\r\n 'card.capabilities.noMatches': 'Nessun modello corrispondente',\r\n 'card.capabilities.quickSettings': 'Impostazioni rapide',\r\n 'card.capabilities.presetOfficial': 'Applica a tutti: Off / High / Max (stile ufficiale DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Applica a tutti: Off / Low / Medium / High (generico)',\r\n 'card.capabilities.vendor': 'Provider',\r\n 'card.capabilities.developerRole': 'Il gateway rifiuta il ruolo developer',\r\n 'card.capabilities.developerRoleHint': 'Interruttore di compatibilità ufficiale (dsh ≥ v0.1.0-rc.8): scrive compat.supportsDeveloperRole: false a livello di rotta così il prompt di sistema viene inviato come ruolo system — corregge l\\'errore Unexpected message role 400 su gateway vLLM / SGLang. Deselezionare elimina il campo e ripristina l\\'ereditarietà.',\r\n 'card.capabilities.takeover': 'Takeover di terze parti',\r\n 'card.capabilities.takeoverHint': 'Se selezionato, le richieste di modello di questa rotta passano per il trasporto dsh-llm-openai-completions (invio multimodale reale, gate di modalita, iniezione del prompt) e pi-ai esce. Scrive la lista providers del trasporto stesso; deselezionare rimuove la rotta. Richiede il trasporto installato.',\r\n 'card.capabilities.takeoverHintAbsent': 'Il trasporto dsh-llm-openai-completions non è installato — installarlo e attivarlo per il takeover per rotta.',\r\n 'card.capabilities.expandProvider': 'Espandi provider',\r\n 'card.capabilities.collapseProvider': 'Comprimi provider',\r\n 'card.capabilities.openModelSettings': 'Apri impostazioni modello',\r\n 'card.capabilities.closeModelSettings': 'Comprimi impostazioni modello',\r\n 'card.capabilities.vision': 'Modello vision',\r\n 'card.capabilities.video': 'Input video',\r\n 'card.capabilities.audio': 'Input audio',\r\n 'card.capabilities.pdf': 'Input PDF',\r\n 'card.capabilities.mediaHint': 'Le dichiarazioni video/audio vengono scritte negli extraInputs del transport preso in carico (l’enumerazione input della riga modello dell’host accetta solo text|image). Effettivo solo mentre la route è presa in carico; altrimenti i blocchi corrispondenti vengono rifiutati o mascherati secondo modalFallback.',\r\n 'card.masterTakeover': 'Takeover principale',\r\n 'card.masterTakeoverHint': 'Interruttore principale: lo stato viene specchiato nel enabled del transport a ogni avvio (unico scrittore). I check di takeover di terze parti per route gestiscono solo l’appartenenza; con il master spento, spuntando una route si accende automaticamente.',\r\n 'card.capabilities.thinking': 'Modello di ragionamento',\r\n 'card.capabilities.supportsEffort': 'Supporta think effort',\r\n 'card.capabilities.efforts': 'Livelli di ragionamento (spunta, poi inserisci il valore wire)',\r\n 'card.capabilities.wirePlaceholder': 'Valore wire, es. ultra',\r\n 'card.capabilities.offPlaceholder': 'Vuoto = non inviare',\r\n 'card.capabilities.atLeastThinking': 'Seleziona almeno un livello di ragionamento (diverso da off)',\r\n 'card.capabilities.applyLevel': 'Applica livelli',\r\n 'card.capabilities.restoreDefault': 'Ripristina predefiniti',\r\n 'card.capabilities.unsaved': 'Non salvato',\r\n 'card.capabilities.saveChanges': 'Salva modifiche',\r\n 'card.capabilities.saved': 'Salvato',\r\n 'card.capabilities.thinkingFormat': 'Formato di ragionamento',\r\n 'card.capabilities.thinkingFormat.inherit': 'Eredita',\r\n 'card.capabilities.contextWindow': 'Limite finestra di contesto',\r\n 'card.capabilities.contextCustomPlaceholder': 'Intero personalizzato, es. 256000',\r\n 'card.capabilities.contextClear': 'Cancella',\r\n 'card.capabilities.contextInteger': 'La lunghezza del contesto deve essere un intero (2000-1000000)',\r\n 'card.capabilities.contextRange': 'La lunghezza del contesto deve essere compresa tra 2000 e 1000000',\r\n 'card.capabilities.contextHint': 'Scegli un predefinito o inserisci un intero (2000–1000000); scritto in llm-pi-ai per la pressione/compressione del contesto e applicato alla richiesta successiva senza riavvio.',\r\n 'input.context.title': 'Finestra di contesto',\r\n 'input.context.globalHint': 'Si applica globalmente a tutte le sessioni che usano questo modello (Cancella ripristina il predefinito)',\r\n 'input.context.unset': 'Non impostato',\r\n 'input.context.custom': 'Personalizzato',\r\n 'input.context.noModel': 'Nessun modello di sessione',\r\n 'input.context.customPlaceholder': 'Intero personalizzato, es. 256000',\r\n 'input.context.apply': 'Applica',\r\n 'input.context.clear': 'Cancella',\r\n 'input.context.integer': 'La lunghezza del contesto deve essere un intero (2000-1000000)',\r\n 'input.context.range': 'La lunghezza del contesto deve essere compresa tra 2000 e 1000000',\r\n 'model.panel.choose': 'Scegli modello',\r\n 'model.panel.loading': 'Caricamento directory modelli…',\r\n 'model.panel.empty': 'Nessun modello disponibile',\r\n 'model.panel.window': 'Finestra',\r\n 'model.panel.noTarget': 'Nessuna voce di configurazione scrivibile per questo modello',\r\n 'model.panel.unavailable': 'La directory dei modelli non è disponibile per questa sessione',\r\n 'input.effort.title': 'Sforzo di ragionamento',\r\n 'panel.search.placeholder': 'Cerca modelli…',\r\n 'card.takeoverUi': 'Sostituzione UI modello',\r\n 'card.takeoverUiHint': \"Se attivo, questo plugin sostituisce il selettore modelli del compositore con un pannello proprio (editor contesto/livello per riga + ricerca). Se spento (predefinito) resta il popup ufficiale: il livello auto è comunque visibile, ricerca e caricamento sono a carico del selettore originale. La modifica ha effetto immediato, senza ricaricare.\",\r\n 'card.capabilities.apiUnsupported': 'Questo provider usa un protocollo diverso da openai-completions: thinkingFormat / supportsReasoningEffort sono campi esclusivi di openai-completions e qui non vengono offerti (una scrittura che li contiene viene rifiutata in blocco dall host). L interruttore thinking non è interessato: scrive reasoningEfforts, neutro rispetto al protocollo, che pi-ai traduce nativamente.',\r\n 'card.capabilities.thinkingNative': 'L interruttore thinking è disponibile su ogni protocollo: scrive reasoningEfforts, neutro rispetto al protocollo, che pi-ai traduce nativamente (budget thinking Anthropic / reasoning effort Responses). thinkingFormat / supportsReasoningEffort sono esclusivi di openai-completions e compaiono solo dopo che il modello è dichiarato thinking su quel protocollo.',\r\n 'card.capabilities.staleCompat': 'campi esclusivi di openai-completions che una versione precedente ha forzato su questa riga di modello',\r\n 'card.capabilities.stripStaleCompat': 'Rimuovi questi residui',\r\n 'card.dsContextTitle': 'Finestra di contesto dei modelli DeepSeek ufficiali',\r\n 'input.effort.default': 'Predefinito del provider',\r\n 'input.effort.reset': 'Ripristina il predefinito del provider',\r\n 'card.capabilities.failed': 'Salvataggio non riuscito: il valore è stato rifiutato o è in conflitto. Verifica.',\r\n 'trace.label': 'Traccia degli effort',\r\n 'trace.empty': 'Nessun livello di richiesta confermato in questa sessione.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manuale',\r\n 'trace.title': 'Traccia degli effort',\r\n 'trace.subtitle': 'Il livello realmente inviato a ogni richiesta di questa sessione; livelli identici consecutivi vengono raggruppati (più recenti in alto).',\r\n 'trace.summary.requests': 'richieste',\r\n 'trace.summary.runs': 'segmenti',\r\n 'trace.summary.autoRuns': 'segmenti pianificati da auto',\r\n 'trace.summary.peak': 'picco',\r\n 'trace.summary.hint': 'T=turno · S=passo',\r\n 'trace.note.attribution': 'Nota: dalla 0.2.2 l’host vieta di cambiare livello al momento della richiesta, quindi questo plugin (linea rigorosa) scrive `model/selection` da sé con un passo di anticipo. L’etichetta «manuale» significa solo che l’ultima selezione nel log era un livello concreto, non necessariamente un clic umano.',\r\n 'trace.intent.default': 'predefinito',\r\n 'trace.intent.unknown': 'non registrato',\r\n 'trace.intent.scheduler': 'pianificatore',\r\n 'trace.intent.unknownHint': 'Questo cambio di livello non ha una selezione corrispondente nel log (dalla 0.2.2 il plugin scrive da sé model/selection e queste scritture non arrivano al log)',\r\n 'trace.summary.switches': 'cambi di modello',\r\n 'trace.dir.up': 'salito rispetto al segmento precedente, %n richiesta/e',\r\n 'trace.dir.down': 'sceso rispetto al segmento precedente, %n richiesta/e',\r\n 'trace.dir.flat': 'stesso livello, scelta diversa, %n richiesta/e',\r\n 'trace.dir.start': 'primo livello della sessione, %n richiesta/e',\r\n 'ring.title': 'Controllo contesto',\r\n 'ring.used': 'Usato',\r\n 'ring.remaining': 'Rimanente',\r\n 'ring.window': 'Finestra di contesto',\r\n 'ring.percent': 'Occupazione',\r\n 'ring.system': 'Prompt di sistema',\r\n 'ring.tools': 'Definizioni degli strumenti',\r\n 'ring.messages': 'Messaggi',\r\n 'ring.warning': 'Il contesto è quasi pieno — compatta il contesto o avvia una nuova sessione.',\r\n 'ring.aria': '%n del contesto usato',\r\n 'ring.unset': 'Nessun consumo in questo turno',\r\n 'ring.billing': 'Addebito cache',\r\n 'ring.bill.step': 'Questo passo',\r\n 'ring.bill.turn': 'Questo turno',\r\n 'ring.bill.session': 'Totale sessione',\r\n 'ring.bill.cacheRead': 'Lettura cache',\r\n 'ring.bill.cacheMiss': 'Mancato riscontro cache',\r\n 'ring.bill.output': 'Output',\r\n 'ring.bill.fullMiss': 'Mancati riscontri completi',\r\n 'ring.bill.rounds': 'passi',\r\n 'ring.bill.peak': 'Tariffe di picco',\r\n 'ring.bill.offPeak': 'Tariffe fuori picco',\r\n 'ring.bill.flat': 'Tariffa fissa',\r\n 'ring.bill.unpriced': 'Non addebitato',\r\n 'ring.bill.custom': 'addebitato a tariffe personalizzate',\r\n 'ring.bill.pricedAs': 'addebitato come %n',\r\n 'ring.bill.priced': 'addebitato a tariffe di catalogo',\r\n 'ring.bill.estimate': 'stimato fuori catalogo',\r\n 'ring.bill.uncalibrated': 'non calibrato — solo indicativo',\r\n}\r\n\r\n/** Russian dictionary (keys mirror zh). */\r\nexport const ru: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Уровни мышления',\r\n 'family.title': 'Настройки плагинов Qizi',\r\n 'card.description': 'Выберите Auto в селекторе модели: плагин планирует low / high / max по истории вызовов инструментов перед отправкой effort в API. Здесь настраивается уровень по умолчанию, границы планировщика и возможности модели (уровень → значение, отправляемое шлюзу).',\r\n 'card.level': 'Уровень по умолчанию',\r\n 'card.level.off': 'off — отключить мышление (только вручную, никогда не выбирается автоматически)',\r\n 'card.level.on': 'on — включить мышление (только модели с переключателем; отправляет enable_thinking, без effort)',\r\n 'card.level.minimal': 'minimal — минимальный (очень лёгкие задачи)',\r\n 'card.level.low': 'low — низкий (дешёвые раунды остаются дешёвыми)',\r\n 'card.level.medium': 'medium — средний',\r\n 'card.level.high': 'high — высокий (официальное значение по умолчанию)',\r\n 'card.level.xhigh': 'xhigh — особо высокий',\r\n 'card.level.max': 'max — максимальный (тяжёлые задачи)',\r\n 'card.level.auto': 'auto — планирование по истории инструментов (по умолчанию)',\r\n 'card.enabled': 'Включено',\r\n 'card.allowDowngrade': 'Разрешить понижение (auto может снизить до low)',\r\n 'card.allowUpgrade': 'Разрешить повышение (auto может поднять до max)',\r\n 'card.defaultPricing': 'Внекаталожное ценообразование',\r\n 'card.simpleTools': 'Список простых инструментов (понижение auto)',\r\n 'card.simpleToolsHint': 'Имена инструментов через запятую или пробел, добавляемые во встроенный набор «дешёвых и детерминированных инструментов» (напр. shell, pwsh, web_fetch). В режиме auto шаг из таких коротких вызовов понижается до low. Встроенный набор уже включает bash/terminal/shell/pwsh; используйте это поле для имён, специфичных для хоста.',\r\n 'card.simpleToolsRegex': 'Regex-список простых инструментов (понижение auto)',\r\n 'card.simpleToolsRegexHint': 'Одно регулярное выражение JavaScript на запись (без автозаякоривания — ^ пишите сами; без учёта регистра), рядом со литеральным списком выше и в той же доле. Шаблоны проверяют и полное имя инструмента, и имя без ops_ — «^ops_.*» покрывает всё семейство dsh-ops разом. Некорректные записи пропускаются с однократным предупреждением.',\r\n 'card.defaultPricingHint': 'Как считать модели, которых нет в каталоге цен (включая шлюзовые модели из других плагинов); каталожные модели всегда считаются по своему прайсу. Изменения влияют только на новые записи.',\r\n 'card.defaultPricing.estimate': 'estimate — оценка по типовой цене (не откалибровано, справочно; по умолчанию)',\r\n 'card.defaultPricing.cn': 'cn — калибровка CNY (вне каталога всё равно оценка по типовой цене)',\r\n 'card.defaultPricing.global': 'global — калибровка USD (вне каталога оценивается, пока строки USD не добавлены)',\r\n 'card.defaultPricing.custom': 'custom — свои цены (без полной строки — без расчёта)',\r\n 'card.defaultPricing.off': 'off — не считать (вне каталога показ «не оплачено»)',\r\n 'card.unavailable': 'Пространство имён настроек недоступно: убедитесь, что dsh-thinking-levels подключён к этому профилю.',\r\n 'card.readonly': 'Только чтение',\r\n 'card.capabilities': 'Возможности модели (пользовательские провайдеры llm-pi-ai)',\r\n 'card.capabilities.hint': 'Напрямую читает и пишет конфигурацию llm-pi-ai: отметьте уровень и введите точное значение, отправляемое шлюзу (напр. high → ultra); пустое поле off означает «не отправлять». Vision управляет вводом изображений; переключатель мышления управляет enable_thinking; thinkingFormat задаёт формат сериализации wire.',\r\n 'card.capabilities.empty': 'Ни один пользовательский провайдер не имеет настроенных моделей в llm-pi-ai. Сначала добавьте провайдер и модели в Настройки → Модели.',\r\n 'card.capabilities.unavailable': 'Пространство имён настроек llm-pi-ai недоступно.',\r\n 'card.capabilities.none': '(нет моделей)',\r\n 'card.capabilities.search': 'Поиск моделей по имени или ID…',\r\n 'card.capabilities.noMatches': 'Нет подходящих моделей',\r\n 'card.capabilities.quickSettings': 'Быстрые настройки',\r\n 'card.capabilities.presetOfficial': 'Применить ко всем: Off / High / Max (официальный стиль DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Применить ко всем: Off / Low / Medium / High (общий)',\r\n 'card.capabilities.vendor': 'Провайдер',\r\n 'card.capabilities.developerRole': 'Шлюз отклоняет роль developer',\r\n 'card.capabilities.developerRoleHint': 'Официальный переключатель совместимости (dsh ≥ v0.1.0-rc.8): записывает compat.supportsDeveloperRole: false на уровне маршрута, чтобы системный промпт отправлялся с ролью system — исправляет Unexpected message role 400 на шлюзах vLLM / SGLang. Снятие флажка удаляет поле и восстанавливает наследование.',\r\n 'card.capabilities.takeover': 'Сторонний перехват',\r\n 'card.capabilities.takeoverHint': 'Если включено, запросы модели этого маршрута направляются через транспорт dsh-llm-openai-completions (истинная мультимодальная отправка, шлюз модальностей, инъекция промпта), а pi-ai устраняется. Записывает список providers самого транспорта; снятие флажка убирает маршрут. Требуется установленный транспорт.',\r\n 'card.capabilities.takeoverHintAbsent': 'Транспорт dsh-llm-openai-completions не установлен — установите и включите его для перехвата по маршрутам.',\r\n 'card.capabilities.expandProvider': 'Развернуть провайдер',\r\n 'card.capabilities.collapseProvider': 'Свернуть провайдер',\r\n 'card.capabilities.openModelSettings': 'Открыть настройки модели',\r\n 'card.capabilities.closeModelSettings': 'Свернуть настройки модели',\r\n 'card.capabilities.vision': 'Модель с vision',\r\n 'card.capabilities.video': 'Видеовход',\r\n 'card.capabilities.audio': 'Аудиовход',\r\n 'card.capabilities.pdf': 'Вход PDF',\r\n 'card.capabilities.mediaHint': 'Объявления видео/аудио записываются в extraInputs перехваченного транспорта (перечисление input строки модели хоста допускает только text|image). Действует, только пока маршрут перехвачен; иначе соответствующие блоки отклоняются или маскируются согласно modalFallback.',\r\n 'card.masterTakeover': 'Мастер перехвата',\r\n 'card.masterTakeoverHint': 'Главный выключатель: состояние зеркалится в enabled транспорта при каждом запуске (единственный писатель). Галочки стороннего перехвата у маршрутов управляют только членством; при выключенном мастере отметка маршрута автоматически включает его.',\r\n 'card.capabilities.thinking': 'Модель с мышлением',\r\n 'card.capabilities.supportsEffort': 'Поддерживает think effort',\r\n 'card.capabilities.efforts': 'Уровни мышления (отметьте, затем введите значение wire)',\r\n 'card.capabilities.wirePlaceholder': 'Значение wire, напр. ultra',\r\n 'card.capabilities.offPlaceholder': 'Пусто = не отправлять',\r\n 'card.capabilities.atLeastThinking': 'Выберите хотя бы один уровень мышления (кроме off)',\r\n 'card.capabilities.applyLevel': 'Применить уровни',\r\n 'card.capabilities.restoreDefault': 'Восстановить значения по умолчанию',\r\n 'card.capabilities.unsaved': 'Не сохранено',\r\n 'card.capabilities.saveChanges': 'Сохранить изменения',\r\n 'card.capabilities.saved': 'Сохранено',\r\n 'card.capabilities.thinkingFormat': 'Формат мышления',\r\n 'card.capabilities.thinkingFormat.inherit': 'Наследовать',\r\n 'card.capabilities.contextWindow': 'Лимит контекстного окна',\r\n 'card.capabilities.contextCustomPlaceholder': 'Пользовательское целое число, напр. 256000',\r\n 'card.capabilities.contextClear': 'Очистить',\r\n 'card.capabilities.contextInteger': 'Длина контекста должна быть целым числом (2000-1000000)',\r\n 'card.capabilities.contextRange': 'Длина контекста должна быть от 2000 до 1000000',\r\n 'card.capabilities.contextHint': 'Выберите пресет или введите целое число (2000–1000000); записывается в llm-pi-ai для давления/сжатия контекста и применяется к следующему запросу без перезапуска.',\r\n 'input.context.title': 'Контекстное окно',\r\n 'input.context.globalHint': 'Применяется глобально ко всем сессиям с этой моделью (Очистить восстанавливает значение по умолчанию)',\r\n 'input.context.unset': 'Не задано',\r\n 'input.context.custom': 'Пользовательское',\r\n 'input.context.noModel': 'Модель сессии ещё не выбрана',\r\n 'input.context.customPlaceholder': 'Пользовательское целое число, напр. 256000',\r\n 'input.context.apply': 'Применить',\r\n 'input.context.clear': 'Очистить',\r\n 'input.context.integer': 'Длина контекста должна быть целым числом (2000-1000000)',\r\n 'input.context.range': 'Длина контекста должна быть от 2000 до 1000000',\r\n 'model.panel.choose': 'Выбрать модель',\r\n 'model.panel.loading': 'Загрузка каталога моделей…',\r\n 'model.panel.empty': 'Нет доступных моделей',\r\n 'model.panel.window': 'Окно',\r\n 'model.panel.noTarget': 'Нет записываемой записи конфигурации для этой модели',\r\n 'model.panel.unavailable': 'Каталог моделей недоступен для этой сессии',\r\n 'input.effort.title': 'Усилие рассуждения',\r\n 'panel.search.placeholder': 'Поиск моделей…',\r\n 'card.takeoverUi': 'Перехват UI модели',\r\n 'card.takeoverUiHint': 'Включено: этот плагин заменяет выбор модели в композиторе собственной панелью (редакторы контекста/уровня в строках + поиск). Выключено (по умолчанию) остаётся официальное popup-окно — уровень auto по-прежнему виден, поиск и загрузка обеспечиваются штатным селектором. Изменения применяются сразу, без перезагрузки.',\r\n 'card.capabilities.apiUnsupported': 'Этот провайдер использует протокол, отличный от openai-completions: thinkingFormat / supportsReasoningEffort доступны только на openai-completions и здесь не предлагаются (запись с ними отклоняется хостом целиком). Переключатель thinking не затронут: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно.',\r\n 'card.capabilities.thinkingNative': 'Переключатель thinking доступен на всех протоколах: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно (бюджет thinking Anthropic / reasoning effort Responses). thinkingFormat / supportsReasoningEffort доступны только на openai-completions и появляются лишь после того, как модель объявлена thinking на этом протоколе.',\r\n 'card.capabilities.staleCompat': 'поля, доступные только на openai-completions, которые старая версия принудительно записала в эту строку модели',\r\n 'card.capabilities.stripStaleCompat': 'Удалить эти остатки',\r\n 'card.dsContextTitle': 'Лимиты контекста официальных моделей DeepSeek',\r\n 'input.effort.default': 'Значение провайдера по умолчанию',\r\n 'input.effort.reset': 'Вернуть значение провайдера по умолчанию',\r\n 'card.capabilities.failed': 'Ошибка сохранения: значение отклонено или конфликтует. Проверьте его.',\r\n 'trace.label': 'Трасса усилий',\r\n 'trace.empty': 'В этой сессии ещё нет зафиксированных уровней запросов.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'вручную',\r\n 'trace.title': 'Трасса усилий',\r\n 'trace.subtitle': 'Уровень, с которым реально ушёл каждый запрос этой сессии; одинаковые подряд уровни схлопнуты в один отрезок (сверху новее).',\r\n 'trace.summary.requests': 'запросов',\r\n 'trace.summary.runs': 'отрезков',\r\n 'trace.summary.autoRuns': 'отрезков выбрал auto',\r\n 'trace.summary.peak': 'пик',\r\n 'trace.summary.hint': 'T=ход · S=шаг',\r\n 'trace.note.attribution': 'Примечание: с 0.2.2 хост запрещает менять уровень на этапе запроса, поэтому плагин (строгая линия) сам пишет `model/selection` на шаг вперёд. Метка «вручную» означает лишь то, что последний выбор в журнале был конкретным уровнем, а не обязательно клик человека.',\r\n 'trace.intent.default': 'по умолчанию',\r\n 'trace.intent.unknown': 'не записано',\r\n 'trace.intent.scheduler': 'планировщик',\r\n 'trace.intent.unknownHint': 'Для этого изменения уровня в журнале нет соответствующего выбора (с 0.2.2 плагин сам пишет model/selection, и эти записи не попадают в журнал)',\r\n 'trace.summary.switches': 'смен модели',\r\n 'trace.dir.up': 'повышение относительно прошлого отрезка, %n запрос(ов)',\r\n 'trace.dir.down': 'понижение относительно прошлого отрезка, %n запрос(ов)',\r\n 'trace.dir.flat': 'уровень тот же, выбор другой, %n запрос(ов)',\r\n 'trace.dir.start': 'первый уровень сессии, %n запрос(ов)',\r\n 'ring.title': 'Проверка контекста',\r\n 'ring.used': 'Использовано',\r\n 'ring.remaining': 'Осталось',\r\n 'ring.window': 'Окно контекста',\r\n 'ring.percent': 'Заполнено',\r\n 'ring.system': 'Системный промпт',\r\n 'ring.tools': 'Определения инструментов',\r\n 'ring.messages': 'Сообщения',\r\n 'ring.warning': 'Контекст почти заполнен — сожмите контекст или начните новый сеанс.',\r\n 'ring.aria': 'Использовано %n контекста',\r\n 'ring.unset': 'В этом ходе расхода ещё нет',\r\n 'ring.billing': 'Расчёт кэша',\r\n 'ring.bill.step': 'Текущий шаг',\r\n 'ring.bill.turn': 'Текущий ход',\r\n 'ring.bill.session': 'Итого по сеансу',\r\n 'ring.bill.cacheRead': 'Чтение из кэша',\r\n 'ring.bill.cacheMiss': 'Промах кэша',\r\n 'ring.bill.output': 'Вывод',\r\n 'ring.bill.fullMiss': 'Полные промахи',\r\n 'ring.bill.rounds': 'шаг(ов)',\r\n 'ring.bill.peak': 'Пиковые тарифы',\r\n 'ring.bill.offPeak': 'Внепиковые тарифы',\r\n 'ring.bill.flat': 'Фиксированный тариф',\r\n 'ring.bill.unpriced': 'Без оплаты',\r\n 'ring.bill.custom': 'по собственному тарифу',\r\n 'ring.bill.pricedAs': 'по тарифу %n',\r\n 'ring.bill.priced': 'по тарифу каталога',\r\n 'ring.bill.estimate': 'оценка вне каталога',\r\n 'ring.bill.uncalibrated': 'без калибровки — только справка',\r\n}\r\n\r\n/** Spanish dictionary (keys mirror zh). */\r\nexport const es: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Niveles de razonamiento',\r\n 'family.title': 'Configuración de plugins Qizi',\r\n 'card.description': 'Elige Auto en el selector de modelo: el plugin planifica low / high / max según el historial de llamadas de herramientas antes de enviar el effort a la API. Aquí configuras el nivel predeterminado, los límites del planificador y las capacidades por modelo (nivel → valor wire enviado al gateway).',\r\n 'card.level': 'Nivel predeterminado',\r\n 'card.level.off': 'off — desactivar razonamiento (solo manual, nunca seleccionado automáticamente)',\r\n 'card.level.on': 'on — activar razonamiento (solo modelos de conmutación; envía enable_thinking, nunca un effort)',\r\n 'card.level.minimal': 'minimal — mínimo (tareas muy ligeras)',\r\n 'card.level.low': 'low — bajo (las rondas económicas siguen siendo económicas)',\r\n 'card.level.medium': 'medium — medio',\r\n 'card.level.high': 'high — alto (predeterminado oficial)',\r\n 'card.level.xhigh': 'xhigh — extra alto',\r\n 'card.level.max': 'max — máximo (tareas pesadas)',\r\n 'card.level.auto': 'auto — planificación desde el historial de herramientas (predeterminado)',\r\n 'card.enabled': 'Activado',\r\n 'card.allowDowngrade': 'Permitir degradación (auto puede bajar a low)',\r\n 'card.allowUpgrade': 'Permitir mejora (auto puede subir a max)',\r\n 'card.defaultPricing': 'Precio fuera del catálogo',\r\n 'card.simpleTools': 'Lista de herramientas simples (degradación auto)',\r\n 'card.simpleToolsHint': 'Nombres de herramientas separados por comas o espacios, añadidos al conjunto interno de \"herramientas baratas y deterministas\" (p. ej. shell, pwsh, web_fetch). En modo auto, un paso compuesto solo por estas llamadas cortas baja a low. El conjunto interno ya cubre bash/terminal/shell/pwsh; use este campo para nombres propios del host.',\r\n 'card.simpleToolsRegex': 'Lista regex de herramientas simples (bajada auto)',\r\n 'card.simpleToolsRegexHint': 'Una expresión regular de JavaScript por entrada (sin anclaje automático — escriba su propio ^; insensible a mayúsculas), junto a la lista literal de arriba y contada en la misma proporción. Los patrones prueban tanto el nombre completo como el nombre sin ops_ — «^ops_.*» cubre toda la familia dsh-ops de una vez. Las entradas inválidas se omiten con un aviso único.',\r\n 'card.defaultPricingHint': 'Cómo facturar los modelos sin entrada en el catálogo (incluidos modelos de puerta de enlace de otros plugins); los modelos catalogados usan siempre sus precios. Los cambios solo afectan a registros nuevos.',\r\n 'card.defaultPricing.estimate': 'estimate — estimación a precio típico (sin calibrar, solo referencia; predeterminado)',\r\n 'card.defaultPricing.cn': 'cn — nivel calibrado en CNY (fuera del catálogo sigue siendo estimación a precio típico)',\r\n 'card.defaultPricing.global': 'global — nivel calibrado en USD (fuera del catálogo estimado hasta que lleguen las filas USD)',\r\n 'card.defaultPricing.custom': 'custom — precios introducidos (sin factura si falta la fila completa)',\r\n 'card.defaultPricing.off': 'off — no facturar (fuera del catálogo muestra «sin facturar»)',\r\n 'card.unavailable': 'Espacio de nombres de configuración no disponible: asegúrate de que dsh-thinking-levels esté ensamblado en este perfil.',\r\n 'card.readonly': 'Solo lectura',\r\n 'card.capabilities': 'Capacidades del modelo (proveedores personalizados llm-pi-ai)',\r\n 'card.capabilities.hint': 'Lee y escribe directamente la configuración de llm-pi-ai: marca un nivel e introduce el valor exacto enviado al gateway (ej. high → ultra); dejar off vacío significa «no enviar». Vision controla la entrada de imágenes; el interruptor de razonamiento gestiona enable_thinking; thinkingFormat elige la serialización wire.',\r\n 'card.capabilities.empty': 'Ningún proveedor personalizado tiene modelos configurados en llm-pi-ai. Añade primero un proveedor y modelos en Configuración → Modelos.',\r\n 'card.capabilities.unavailable': 'El espacio de nombres de configuración de llm-pi-ai no está disponible.',\r\n 'card.capabilities.none': '(sin modelos)',\r\n 'card.capabilities.search': 'Buscar modelos por nombre o ID…',\r\n 'card.capabilities.noMatches': 'No hay modelos coincidentes',\r\n 'card.capabilities.quickSettings': 'Configuración rápida',\r\n 'card.capabilities.presetOfficial': 'Aplicar a todos: Off / High / Max (estilo oficial DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Aplicar a todos: Off / Low / Medium / High (genérico)',\r\n 'card.capabilities.vendor': 'Proveedor',\r\n 'card.capabilities.developerRole': 'El gateway rechaza el rol developer',\r\n 'card.capabilities.developerRoleHint': 'Interruptor de compatibilidad oficial (dsh ≥ v0.1.0-rc.8): escribe compat.supportsDeveloperRole: false a nivel de ruta para que el prompt del sistema se envíe con rol system — corrige el error Unexpected message role 400 en gateways vLLM / SGLang. Desmarcar elimina el campo y restaura la herencia.',\r\n 'card.capabilities.takeover': 'Toma de control de terceros',\r\n 'card.capabilities.takeoverHint': 'Al marcarlo, las peticiones de modelo de esta ruta se envian a traves del transporte dsh-llm-openai-completions (envio multimodal real, puerta de modalidad, inyeccion de prompt) y pi-ai sale. Escribe la lista providers del propio transporte; desmarcar elimina la ruta. Requiere el transporte instalado.',\r\n 'card.capabilities.takeoverHintAbsent': 'El transporte dsh-llm-openai-completions no esta instalado — instalalo y activalo para la toma de control por ruta.',\r\n 'card.capabilities.expandProvider': 'Expandir proveedor',\r\n 'card.capabilities.collapseProvider': 'Contraer proveedor',\r\n 'card.capabilities.openModelSettings': 'Abrir configuración del modelo',\r\n 'card.capabilities.closeModelSettings': 'Contraer configuración del modelo',\r\n 'card.capabilities.vision': 'Modelo de visión',\r\n 'card.capabilities.video': 'Entrada de video',\r\n 'card.capabilities.audio': 'Entrada de audio',\r\n 'card.capabilities.pdf': 'Entrada de PDF',\r\n 'card.capabilities.mediaHint': 'Las declaraciones de vídeo/audio se escriben en los extraInputs del transport tomado (la enumeración input de la fila de modelo del host solo acepta text|image). Efectivo solo mientras la ruta esté tomada; si no, los bloques correspondientes se rechazan o se enmascaran según modalFallback.',\r\n 'card.masterTakeover': 'Maestro de toma de control',\r\n 'card.masterTakeoverHint': 'Interruptor maestro: su estado se refleja en el enabled del transport en cada arranque (único escritor). Las casillas de toma de control de terceros por ruta solo gestionan pertenencia; con el maestro apagado, marcar una ruta lo enciende automáticamente.',\r\n 'card.capabilities.thinking': 'Modelo de razonamiento',\r\n 'card.capabilities.supportsEffort': 'Soporta think effort',\r\n 'card.capabilities.efforts': 'Niveles de razonamiento (marca, luego introduce el valor wire)',\r\n 'card.capabilities.wirePlaceholder': 'Valor wire, ej. ultra',\r\n 'card.capabilities.offPlaceholder': 'Vacío = no enviar',\r\n 'card.capabilities.atLeastThinking': 'Selecciona al menos un nivel de razonamiento (distinto de off)',\r\n 'card.capabilities.applyLevel': 'Aplicar niveles',\r\n 'card.capabilities.restoreDefault': 'Restaurar valores predeterminados',\r\n 'card.capabilities.unsaved': 'Sin guardar',\r\n 'card.capabilities.saveChanges': 'Guardar cambios',\r\n 'card.capabilities.saved': 'Guardado',\r\n 'card.capabilities.thinkingFormat': 'Formato de razonamiento',\r\n 'card.capabilities.thinkingFormat.inherit': 'Heredar',\r\n 'card.capabilities.contextWindow': 'Límite de ventana de contexto',\r\n 'card.capabilities.contextCustomPlaceholder': 'Entero personalizado, ej. 256000',\r\n 'card.capabilities.contextClear': 'Borrar',\r\n 'card.capabilities.contextInteger': 'La longitud del contexto debe ser un entero (2000-1000000)',\r\n 'card.capabilities.contextRange': 'La longitud del contexto debe estar entre 2000 y 1000000',\r\n 'card.capabilities.contextHint': 'Elige un ajuste predefinido o introduce un entero (2000–1000000); se escribe en llm-pi-ai para la presión/compresión del contexto y se aplica a la siguiente solicitud sin reiniciar.',\r\n 'input.context.title': 'Ventana de contexto',\r\n 'input.context.globalHint': 'Se aplica globalmente a todas las sesiones que usan este modelo (Borrar restaura el valor predeterminado)',\r\n 'input.context.unset': 'Sin definir',\r\n 'input.context.custom': 'Personalizado',\r\n 'input.context.noModel': 'Aún no hay modelo de sesión',\r\n 'input.context.customPlaceholder': 'Entero personalizado, ej. 256000',\r\n 'input.context.apply': 'Aplicar',\r\n 'input.context.clear': 'Borrar',\r\n 'input.context.integer': 'La longitud del contexto debe ser un entero (2000-1000000)',\r\n 'input.context.range': 'La longitud del contexto debe estar entre 2000 y 1000000',\r\n 'model.panel.choose': 'Elegir modelo',\r\n 'model.panel.loading': 'Cargando el directorio de modelos…',\r\n 'model.panel.empty': 'No hay modelos disponibles',\r\n 'model.panel.window': 'Ventana',\r\n 'model.panel.noTarget': 'No hay entrada de configuración escribible para este modelo',\r\n 'model.panel.unavailable': 'El directorio de modelos no está disponible para esta sesión',\r\n 'input.effort.title': 'Esfuerzo de razonamiento',\r\n 'panel.search.placeholder': 'Buscar modelos…',\r\n 'card.takeoverUi': 'Relevo de la UI de modelo',\r\n 'card.takeoverUiHint': 'Si está activo, este plugin sustituye el selector de modelos del compositor por un panel propio (editores de contexto/nivel por línea + búsqueda). Si está desactivado (predeterminado) se mantiene el popup oficial: el nivel auto sigue apareciendo y la búsqueda y la carga corresponden al selector nativo. El cambio se aplica de inmediato, sin recargar.',\r\n 'card.capabilities.apiUnsupported': 'Este proveedor usa un protocolo distinto de openai-completions: thinkingFormat / supportsReasoningEffort son campos exclusivos de openai-completions y aquí no se ofrecen (una escritura que los lleve es rechazada en bloque por el host). El interruptor de thinking no se ve afectado: escribe reasoningEfforts, neutral respecto al protocolo, que pi-ai traduce de forma nativa.',\r\n 'card.capabilities.thinkingNative': 'El interruptor de thinking está disponible en todos los protocolos: escribe reasoningEfforts, neutral respecto al protocolo, que pi-ai traduce de forma nativa (presupuesto de thinking de Anthropic / reasoning effort de Responses). thinkingFormat / supportsReasoningEffort son exclusivos de openai-completions y solo aparecen cuando el modelo se declara de thinking en ese protocolo.',\r\n 'card.capabilities.staleCompat': 'campos exclusivos de openai-completions que una versión anterior forzó en esta fila de modelo',\r\n 'card.capabilities.stripStaleCompat': 'Eliminar estos restos',\r\n 'card.dsContextTitle': 'Ventana de contexto de los modelos DeepSeek oficiales',\r\n 'input.effort.default': 'Predeterminado del proveedor',\r\n 'input.effort.reset': 'Restaurar el valor predeterminado del proveedor',\r\n 'card.capabilities.failed': 'Error al guardar: el valor fue rechazado o está en conflicto. Verifícalo.',\r\n 'trace.label': 'Trazado de esfuerzo',\r\n 'trace.empty': 'Aún no hay niveles de solicitud confirmados en esta sesión.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manual',\r\n 'trace.title': 'Trazado de esfuerzo',\r\n 'trace.subtitle': 'El nivel con el que realmente salió cada solicitud de esta sesión; los niveles idénticos consecutivos se agrupan (lo más reciente arriba).',\r\n 'trace.summary.requests': 'solicitudes',\r\n 'trace.summary.runs': 'tramos',\r\n 'trace.summary.autoRuns': 'tramos planificados por auto',\r\n 'trace.summary.peak': 'pico',\r\n 'trace.summary.hint': 'T=turno · S=paso',\r\n 'trace.note.attribution': 'Nota: desde 0.2.2 el host prohíbe cambiar el nivel en el momento de la solicitud, así que este plugin (línea estricta) escribe `model/selection` por sí mismo un paso antes. La etiqueta «manual» solo significa que la última selección del registro era un nivel concreto, no necesariamente un clic humano.',\r\n 'trace.intent.default': 'predeterminado',\r\n 'trace.intent.unknown': 'sin registro',\r\n 'trace.intent.scheduler': 'planificador',\r\n 'trace.intent.unknownHint': 'Este cambio de nivel no tiene una selección correspondiente en el registro (desde 0.2.2 el plugin escribe model/selection por sí mismo y esas escrituras no llegan al registro)',\r\n 'trace.summary.switches': 'cambios de modelo',\r\n 'trace.dir.up': 'subió respecto al tramo anterior, %n solicitud(es)',\r\n 'trace.dir.down': 'bajó respecto al tramo anterior, %n solicitud(es)',\r\n 'trace.dir.flat': 'mismo nivel, elección distinta, %n solicitud(es)',\r\n 'trace.dir.start': 'primer nivel de la sesión, %n solicitud(es)',\r\n 'ring.title': 'Comprobación de contexto',\r\n 'ring.used': 'Usado',\r\n 'ring.remaining': 'Restante',\r\n 'ring.window': 'Ventana de contexto',\r\n 'ring.percent': 'Ocupación',\r\n 'ring.system': 'Mensaje de sistema',\r\n 'ring.tools': 'Definiciones de herramientas',\r\n 'ring.messages': 'Mensajes',\r\n 'ring.warning': 'El contexto está casi lleno: compacta el contexto o inicia una sesión nueva.',\r\n 'ring.aria': '%n del contexto usado',\r\n 'ring.unset': 'Aún no hay consumo en este turno',\r\n 'ring.billing': 'Facturación de caché',\r\n 'ring.bill.step': 'Este paso',\r\n 'ring.bill.turn': 'Este turno',\r\n 'ring.bill.session': 'Total de la sesión',\r\n 'ring.bill.cacheRead': 'Lectura de caché',\r\n 'ring.bill.cacheMiss': 'Fallo de caché',\r\n 'ring.bill.output': 'Salida',\r\n 'ring.bill.fullMiss': 'Fallos completos',\r\n 'ring.bill.rounds': 'pasos',\r\n 'ring.bill.peak': 'Tarifas punta',\r\n 'ring.bill.offPeak': 'Tarifas valle',\r\n 'ring.bill.flat': 'Tarifa plana',\r\n 'ring.bill.unpriced': 'Sin facturar',\r\n 'ring.bill.custom': 'facturado a tarifa propia',\r\n 'ring.bill.pricedAs': 'facturado como %n',\r\n 'ring.bill.priced': 'facturado a tarifa de catálogo',\r\n 'ring.bill.estimate': 'estimado fuera de catálogo',\r\n 'ring.bill.uncalibrated': 'sin calibrar — solo orientativo',\r\n}\r\n\r\n/** Portuguese (pt-BR) dictionary (keys mirror zh). */\r\nexport const pt: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Níveis de raciocínio',\r\n 'family.title': 'Configurações dos plugins Qizi',\r\n 'card.description': 'Escolha Auto no seletor de modelo: o plugin programa low / high / max conforme o histórico de chamadas de ferramentas antes de enviar o effort à API. Aqui você configura o nível padrão, os limites do agendador e as capacidades por modelo (nível → valor wire enviado ao gateway).',\r\n 'card.level': 'Nível padrão',\r\n 'card.level.off': 'off — desativar o raciocínio (somente manual, nunca selecionado automaticamente)',\r\n 'card.level.on': 'on — ativar o raciocínio (somente modelos de alternância; envia enable_thinking, nunca um effort)',\r\n 'card.level.minimal': 'minimal — mínimo (tarefas muito leves)',\r\n 'card.level.low': 'low — baixo (rodadas baratas continuam baratas)',\r\n 'card.level.medium': 'medium — médio',\r\n 'card.level.high': 'high — alto (padrão oficial)',\r\n 'card.level.xhigh': 'xhigh — extra alto',\r\n 'card.level.max': 'max — máximo (tarefas pesadas)',\r\n 'card.level.auto': 'auto — programação a partir do histórico de ferramentas (padrão)',\r\n 'card.enabled': 'Ativado',\r\n 'card.allowDowngrade': 'Permitir rebaixamento (auto pode descer para low)',\r\n 'card.allowUpgrade': 'Permitir elevação (auto pode subir para max)',\r\n 'card.defaultPricing': 'Preço fora do catálogo',\r\n 'card.simpleTools': 'Lista de ferramentas simples (rebaixamento automático)',\r\n 'card.simpleToolsHint': 'Nomes de ferramentas separados por vírgula ou espaço, adicionados ao conjunto interno de \"ferramentas baratas e determinísticas\" (por exemplo shell, pwsh, web_fetch). No modo auto, uma etapa composta apenas por essas chamadas curtas desce para low. O conjunto interno já cobre bash/terminal/shell/pwsh; use este campo para nomes próprios do host.',\r\n 'card.simpleToolsRegex': 'Lista regex de ferramentas simples (rebaixamento auto)',\r\n 'card.simpleToolsRegexHint': 'Uma expressão regular JavaScript por entrada (sem âncora automática — escreva o seu ^; insensível a maiúsculas), ao lado da lista literal acima e contada na mesma razão. Os padrões testam tanto o nome completo quanto o nome sem ops_ — «^ops_.*» cobre toda a família dsh-ops de uma vez. Entradas inválidas são ignoradas com um aviso único.',\r\n 'card.defaultPricingHint': 'Como cobrar modelos sem entrada no catálogo (incluindo modelos de gateway de outros plugins); modelos catalogados usam sempre os próprios preços. Alterações afetam apenas registros novos.',\r\n 'card.defaultPricing.estimate': 'estimate — estimativa a preço típico (não calibrado, só referência; padrão)',\r\n 'card.defaultPricing.cn': 'cn — nível calibrado em CNY (fora do catálogo continua sendo estimativa a preço típico)',\r\n 'card.defaultPricing.global': 'global — nível calibrado em USD (fora do catálogo estimado até chegarem as linhas USD)',\r\n 'card.defaultPricing.custom': 'custom — preços informados (sem cobrança se faltar a linha completa)',\r\n 'card.defaultPricing.off': 'off — não cobrar (fora do catálogo mostra \"sem cobrança\")',\r\n 'card.unavailable': 'Namespace de configurações indisponível: confirme que dsh-thinking-levels está montado neste perfil.',\r\n 'card.readonly': 'Somente leitura',\r\n 'card.capabilities': 'Capacidades do modelo (provedores personalizados llm-pi-ai)',\r\n 'card.capabilities.hint': 'Lê e grava diretamente a configuração do llm-pi-ai: marque um nível e informe o valor exato enviado ao gateway (por exemplo high → ultra); deixar off vazio significa \"não enviar\". Vision controla a entrada de imagens; o interruptor de raciocínio gerencia enable_thinking; thinkingFormat escolhe a serialização wire.',\r\n 'card.capabilities.empty': 'Nenhum provedor personalizado tem modelos configurados no llm-pi-ai. Adicione primeiro um provedor e modelos em Configurações → Modelos.',\r\n 'card.capabilities.unavailable': 'O namespace de configurações do llm-pi-ai não está disponível.',\r\n 'card.capabilities.none': '(sem modelos)',\r\n 'card.capabilities.search': 'Buscar modelos por nome ou ID…',\r\n 'card.capabilities.noMatches': 'Nenhum modelo correspondente',\r\n 'card.capabilities.quickSettings': 'Configuração rápida',\r\n 'card.capabilities.presetOfficial': 'Aplicar a todos: Off / High / Max (estilo oficial DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Aplicar a todos: Off / Low / Medium / High (genérico)',\r\n 'card.capabilities.vendor': 'Provedor',\r\n 'card.capabilities.developerRole': 'O gateway rejeita a função developer',\r\n 'card.capabilities.developerRoleHint': 'Interruptor de compatibilidade oficial (dsh ≥ v0.1.0-rc.8): grava compat.supportsDeveloperRole: false no nível da rota para que o prompt de sistema seja enviado com a função system — corrige o erro Unexpected message role 400 em gateways vLLM / SGLang. Desmarcar remove o campo e restaura a herança.',\r\n 'card.capabilities.takeover': 'Assunção por terceiros',\r\n 'card.capabilities.takeoverHint': 'Ao marcar, as requisições de modelo desta rota passam a ser enviadas pela camada de transporte dsh-llm-openai-completions (envio multimodal real, porta de modalidade e injeção de prompt) e o pi-ai sai de cena. Grava na própria lista providers do transporte; desmarcar remove a rota. Requer o transporte instalado.',\r\n 'card.capabilities.takeoverHintAbsent': 'O transporte dsh-llm-openai-completions não está instalado — instale-o e ative-o para permitir a assunção por rota.',\r\n 'card.capabilities.expandProvider': 'Expandir provedor',\r\n 'card.capabilities.collapseProvider': 'Recolher provedor',\r\n 'card.capabilities.openModelSettings': 'Abrir configurações do modelo',\r\n 'card.capabilities.closeModelSettings': 'Recolher configurações do modelo',\r\n 'card.capabilities.vision': 'Modelo de visão',\r\n 'card.capabilities.video': 'Entrada de vídeo',\r\n 'card.capabilities.audio': 'Entrada de áudio',\r\n 'card.capabilities.pdf': 'Entrada de PDF',\r\n 'card.capabilities.mediaHint': 'As declarações de vídeo/áudio são gravadas em extraInputs do transporte assumido (a enumeração input da linha de modelo do host aceita apenas text|image). Valem apenas enquanto a rota estiver assumida; caso contrário os blocos correspondentes são rejeitados ou mascarados conforme modalFallback.',\r\n 'card.masterTakeover': 'Assunção mestre',\r\n 'card.masterTakeoverHint': 'Interruptor geral: o estado é espelhado no enabled do transporte a cada inicialização (único escritor). As caixas de assunção por terceiros gerenciam apenas a pertença à lista; com o mestre desligado, marcar uma rota acende este interruptor automaticamente.',\r\n 'card.capabilities.thinking': 'Modelo de raciocínio',\r\n 'card.capabilities.supportsEffort': 'Suporta think effort',\r\n 'card.capabilities.efforts': 'Níveis de raciocínio (marque e informe o valor wire)',\r\n 'card.capabilities.wirePlaceholder': 'Valor wire, por exemplo ultra',\r\n 'card.capabilities.offPlaceholder': 'Vazio = não enviar',\r\n 'card.capabilities.atLeastThinking': 'Selecione pelo menos um nível de raciocínio (exceto off)',\r\n 'card.capabilities.applyLevel': 'Aplicar níveis',\r\n 'card.capabilities.restoreDefault': 'Restaurar valores padrão',\r\n 'card.capabilities.unsaved': 'Não salvo',\r\n 'card.capabilities.saveChanges': 'Salvar alterações',\r\n 'card.capabilities.saved': 'Salvo',\r\n 'card.capabilities.thinkingFormat': 'Formato de raciocínio',\r\n 'card.capabilities.thinkingFormat.inherit': 'Herdar',\r\n 'card.capabilities.contextWindow': 'Limite da janela de contexto',\r\n 'card.capabilities.contextCustomPlaceholder': 'Inteiro personalizado, por exemplo 256000',\r\n 'card.capabilities.contextClear': 'Limpar',\r\n 'card.capabilities.contextInteger': 'O comprimento do contexto deve ser um inteiro (2000-1000000)',\r\n 'card.capabilities.contextRange': 'O comprimento do contexto deve estar entre 2000 e 1000000',\r\n 'card.capabilities.contextHint': 'Escolha um predefinido ou informe um inteiro (2000–1000000); é gravado em llm-pi-ai para a pressão/compactação de contexto e vale para a próxima requisição, sem reiniciar.',\r\n 'input.context.title': 'Janela de contexto',\r\n 'input.context.globalHint': 'Vale globalmente para todas as sessões que usam este modelo (Limpar restaura o padrão)',\r\n 'input.context.unset': 'Não definido',\r\n 'input.context.custom': 'Personalizado',\r\n 'input.context.noModel': 'Ainda não há modelo de sessão',\r\n 'input.context.customPlaceholder': 'Inteiro personalizado, por exemplo 256000',\r\n 'input.context.apply': 'Aplicar',\r\n 'input.context.clear': 'Limpar',\r\n 'input.context.integer': 'O comprimento do contexto deve ser um inteiro (2000-1000000)',\r\n 'input.context.range': 'O comprimento do contexto deve estar entre 2000 e 1000000',\r\n 'model.panel.choose': 'Escolher modelo',\r\n 'model.panel.loading': 'Carregando o diretório de modelos…',\r\n 'model.panel.empty': 'Nenhum modelo disponível',\r\n 'model.panel.window': 'Janela',\r\n 'model.panel.noTarget': 'Não há entrada de configuração gravável para este modelo',\r\n 'model.panel.unavailable': 'O diretório de modelos não está disponível para esta sessão',\r\n 'input.effort.title': 'Esforço de raciocínio',\r\n 'panel.search.placeholder': 'Buscar modelos…',\r\n 'card.takeoverUi': 'Assunção da interface de modelo',\r\n 'card.takeoverUiHint': 'Quando ativo, este plugin substitui o seletor de modelos do compositor por um painel próprio (editores de contexto/nível por linha + busca). Quando desativado (padrão), o pop-up oficial permanece: o nível auto continua aparecendo e a busca e o carregamento ficam a cargo do seletor nativo. A mudança vale imediatamente, sem recarregar.',\r\n 'card.capabilities.apiUnsupported': 'Este provedor usa um protocolo diferente de openai-completions: thinkingFormat / supportsReasoningEffort são campos exclusivos de openai-completions e não aparecem aqui (uma gravação que os leve é rejeitada em bloco pelo host). O interruptor de thinking não é afetado: grava reasoningEfforts, neutro quanto ao protocolo, que o pi-ai traduz nativamente.',\r\n 'card.capabilities.thinkingNative': 'O interruptor de thinking está disponível em todos os protocolos: grava reasoningEfforts, neutro quanto ao protocolo, que o pi-ai traduz nativamente (orçamento de thinking da Anthropic / reasoning effort do Responses). thinkingFormat / supportsReasoningEffort são exclusivos de openai-completions e só aparecem quando o modelo é declarado de thinking nesse protocolo.',\r\n 'card.capabilities.staleCompat': 'campos exclusivos de openai-completions que uma versão anterior forçou nesta linha de modelo',\r\n 'card.capabilities.stripStaleCompat': 'Remover esses resíduos',\r\n 'card.dsContextTitle': 'Janela de contexto dos modelos DeepSeek oficiais',\r\n 'input.effort.default': 'Padrão do provedor',\r\n 'input.effort.reset': 'Restaurar o padrão do provedor',\r\n 'card.capabilities.failed': 'Falha ao salvar: o valor foi rejeitado ou está em conflito. Verifique-o.',\r\n 'trace.label': 'Trilha de esforço',\r\n 'trace.empty': 'Ainda não há níveis de solicitação confirmados nesta sessão.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manual',\r\n 'trace.title': 'Trilha de esforço',\r\n 'trace.subtitle': 'O nível com que cada requisição desta sessão realmente saiu; níveis idênticos consecutivos são agrupados (mais recente no topo).',\r\n 'trace.summary.requests': 'requisições',\r\n 'trace.summary.runs': 'trechos',\r\n 'trace.summary.autoRuns': 'trechos agendados pelo auto',\r\n 'trace.summary.peak': 'pico',\r\n 'trace.summary.hint': 'T=turno · S=passo',\r\n 'trace.note.attribution': 'Nota: desde 0.2.2 o host proíbe mudar o nível no momento da requisição, então este plugin (linha estrita) escreve `model/selection` por conta própria um passo antes. O rótulo «manual» significa apenas que a última seleção no log era um nível concreto, não necessariamente um clique humano.',\r\n 'trace.intent.default': 'padrão',\r\n 'trace.intent.unknown': 'não registrado',\r\n 'trace.intent.scheduler': 'agendador',\r\n 'trace.intent.unknownHint': 'Esta mudança de nível não tem seleção correspondente no log (desde 0.2.2 o plugin escreve model/selection por conta própria e essas escrituras não chegam ao log)',\r\n 'trace.summary.switches': 'trocas de modelo',\r\n 'trace.dir.up': 'subiu em relação ao trecho anterior, %n requisição(ões)',\r\n 'trace.dir.down': 'desceu em relação ao trecho anterior, %n requisição(ões)',\r\n 'trace.dir.flat': 'mesmo nível, escolha diferente, %n requisição(ões)',\r\n 'trace.dir.start': 'primeiro nível da sessão, %n requisição(ões)',\r\n 'ring.title': 'Verificação de contexto',\r\n 'ring.used': 'Usado',\r\n 'ring.remaining': 'Restante',\r\n 'ring.window': 'Janela de contexto',\r\n 'ring.percent': 'Ocupação',\r\n 'ring.system': 'Prompt de sistema',\r\n 'ring.tools': 'Definições de ferramentas',\r\n 'ring.messages': 'Mensagens',\r\n 'ring.warning': 'O contexto está quase cheio — compacte o contexto ou inicie uma nova sessão.',\r\n 'ring.aria': '%n do contexto usado',\r\n 'ring.unset': 'Ainda sem consumo neste turno',\r\n 'ring.billing': 'Cobrança de cache',\r\n 'ring.bill.step': 'Este passo',\r\n 'ring.bill.turn': 'Este turno',\r\n 'ring.bill.session': 'Total da sessão',\r\n 'ring.bill.cacheRead': 'Leitura de cache',\r\n 'ring.bill.cacheMiss': 'Falha de cache',\r\n 'ring.bill.output': 'Saída',\r\n 'ring.bill.fullMiss': 'Falhas completas',\r\n 'ring.bill.rounds': 'passos',\r\n 'ring.bill.peak': 'Tarifas de pico',\r\n 'ring.bill.offPeak': 'Tarifas fora de pico',\r\n 'ring.bill.flat': 'Tarifa fixa',\r\n 'ring.bill.unpriced': 'Não cobrado',\r\n 'ring.bill.custom': 'cobrado a tarifa personalizada',\r\n 'ring.bill.pricedAs': 'cobrado como %n',\r\n 'ring.bill.priced': 'cobrado a tarifa de catálogo',\r\n 'ring.bill.estimate': 'estimado fora do catálogo',\r\n 'ring.bill.uncalibrated': 'não calibrado — apenas referência',\r\n}\r\n\r\n/** Combined dictionary map — all 10 languages, single-call registration. */\r\nexport const dictionaries: Record<string, Record<string, string>> = { zh, en, ja, ko, fr, de, it, ru, es, pt }\r\n","/**\n * Context-capacity check ring for the composer tool row\n * (`conversation.input.right`, the seat just left of the send button —\n * the same seat the retired context-window pill used, and the same side of\n * the composer where the shipped ContextMeter lived).\n *\n * Why this exists: the model-seat panel replaced the shipped `ModelSelect`\n * trigger and popup, and with them went the shipped context meter — the\n * \"how full is this window\" read. The editor part moved into the model\n * panel's per-model lines; the CHECK part (used vs. window, pressure, a\n * breakdown, a warning before you run out) is what this ring restores.\n * Layout language follows better-er/dsh-cache-billing (rows with a color\n * swatch, token counts right-aligned, a muted footer note), which itself\n * pins into the shipped meter's popup.\n *\n * Data: the session projection seats. `useProjection('contextPressure')`\n * is the same feed the shipped meter consumes (`{ usedTokens, contextWindow,\n * percent }`), `useProjection('contextBreakdown')` the three-way split\n * (`{ systemTokens, toolsTokens, messageTokens }`). Both are optional on the\n * props and defensively read: a harness without the projection seat, or a\n * session before its first request, renders nothing here instead of a dead\n * control (the retired pill's discipline). Values refresh live while the\n * projection pushes — no polling.\n *\n * Zero host coupling beyond react + the injected seats: plain SVG + HTML\n * with token-based inline styling; copy comes from the plugin dictionary\n * (`ring.*`), delivered as the `t` thunk from the model panel — a ru/es host\n * then reads its own language instead of the old inline zh/en pair.\n */\nimport { useEffect, useRef, useState, useSyncExternalStore } from 'react'\nimport type { CSSProperties, JSX } from 'react'\n\n/** The pressure projection slice — the token-meter wire view's own fields. */\nexport interface ContextPressureLike {\n /** Post-usage pressure: the last usage sample's prompt-side token count. */\n pressureTokens?: number\n /** The request-projected estimate (pressure + uncommitted surface). */\n projectedTokens?: number\n contextWindow?: number\n}\n\n/** The breakdown projection slice (shipped meter's three-way split). */\nexport interface ContextBreakdownLike {\n systemTokens?: number\n toolsTokens?: number\n messageTokens?: number\n}\n\n/**\n * One session projection seat: a selector hook over the host's projection\n * store. Absent on harnesses without the projection module — the component\n * then renders nothing.\n */\nexport type ProjectionHook = <T>(key: string) => T | undefined\n\n/** The tlCacheBilling projection wire view (full field set). */\nexport interface CacheBillingLike {\n available?: boolean\n cost?: number\n missCost?: number\n outputCost?: number\n currency?: string\n cacheReadTokens?: number\n totalInputTokens?: number\n outputTokens?: number\n hitRate?: number | null\n model?: string | null\n provider?: string | null\n matchedModel?: string | null\n modelMatched?: boolean\n tier?: 'peak' | 'offPeak' | 'flat' | null\n unitPricePerM?: number | null\n /** 目录化新增字段(全部 optional:旧 view 落新客户端时保守回退)。 */\n priced?: boolean\n pricingSource?: 'estimate' | 'cn' | 'global' | 'custom' | 'off' | 'catalog-miss' | null\n /** 金额为兜底典型价估算(未校准,仅供参考)。 */\n estimated?: boolean\n catalogKey?: string | null\n catalogLabel?: string | null\n priceRow?: { inputMiss: number; inputCacheHit: number; output: number } | null\n sessionByCurrency?: Array<{ currency: string; hitCost: number; missCost: number; outputCost: number }>\n mixedCurrency?: boolean\n turn?: number | null\n step?: number | null\n turnCost?: number\n turnHitCost?: number\n turnMissCost?: number\n turnOutputCost?: number\n turnTokens?: number\n turnCacheReadTokens?: number\n turnInputTokens?: number\n turnOutputTokens?: number\n sessionCacheHitCost?: number\n sessionMissCost?: number\n sessionOutputCost?: number\n sessionInputTokens?: number\n sessionCacheReadTokens?: number\n sessionOutputTokens?: number\n sessionRounds?: number\n sessionMissSteps?: number\n sessionWriteTokens?: number\n sessionFullMissSteps?: number\n}\n\n/** Full props of the ring entry (all optional — data comes from the store). */\nexport interface ContextRingProps {\n /** The session id of the slot's owning conversation (standard seat). */\n sessionId?: string\n /**\n * Capacity fallback from the model catalog: when the contextPressure\n * projection carries no contextWindow (some sessions never see the\n * request/context event), the declared window of the ACTIVE model fills in.\n */\n contextWindowFallback?: number\n /**\n * Dictionary thunk (`locale.bind(NS)` in the model panel, or the host's own\n * `PropsLocale` seat). Optional: a caller without it renders keys, never\n * Chinese — degrade to keys rather than to a language nobody asked for.\n */\n t?: (key: string) => string\n}\n\n/* ── inline styling (no CSS modules in the client bundle) ──────────────── */\n\nconst RING_SIZE = 18\nconst RING_STROKE = 2.5\n\nconst triggerStyle: CSSProperties = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '5px',\n height: '24px',\n padding: '0 6px',\n background: 'transparent',\n border: 'none',\n borderRadius: '6px',\n cursor: 'pointer',\n color: 'var(--dsw-alias-label-secondary, inherit)',\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '11px',\n lineHeight: '16px',\n whiteSpace: 'nowrap',\n}\n\nconst popStyle: CSSProperties = {\n position: 'absolute',\n bottom: 'calc(100% + 8px)',\n right: 0,\n zIndex: 1200,\n minWidth: '264px',\n padding: '10px 12px',\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\n color: 'var(--dsw-alias-label-primary, inherit)',\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.25))',\n borderRadius: '10px',\n boxShadow: '0 8px 24px rgba(0,0,0,0.14)',\n fontSize: '12px',\n lineHeight: '18px',\n}\n\nconst headStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'baseline',\n gap: '8px',\n fontWeight: 600,\n marginBottom: '4px',\n}\n\nconst figureStyle: CSSProperties = {\n fontVariantNumeric: 'tabular-nums',\n fontFamily: 'var(--ds-font-family-code, monospace)',\n}\n\nconst rowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n padding: '2px 0',\n}\n\nconst rowLabelStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n color: 'var(--dsw-alias-label-secondary, inherit)',\n}\n\nconst rowValueStyle: CSSProperties = {\n marginLeft: 'auto',\n fontVariantNumeric: 'tabular-nums',\n fontWeight: 500,\n textAlign: 'right' as const,\n}\n\nconst swatchStyle = (color: string): CSSProperties => ({\n display: 'inline-block',\n width: '8px',\n height: '8px',\n borderRadius: '2px',\n marginRight: '6px',\n flex: 'none',\n background: color,\n})\n\nconst warnStyle: CSSProperties = {\n marginTop: '6px',\n color: '#f43f5e',\n fontSize: '11px',\n lineHeight: '16px',\n}\n\nconst footStyle: CSSProperties = {\n marginTop: '6px',\n color: 'var(--dsw-alias-label-caption, inherit)',\n fontSize: '11px',\n lineHeight: '16px',\n}\n\nconst BREAKDOWN_COLORS = { system: '#8b5cf6', tools: '#0ea5e9', messages: '#10b981' } as const\n\n/** Pressure color: calm → amber → red (cache-billing's foot/warn palette). */\nexport function pressureColor(percent: number): string {\n if (percent >= 85) return '#f43f5e'\n if (percent >= 70) return '#f59e0b'\n return 'var(--dsw-alias-label-secondary, currentColor)'\n}\n\n/** Format a token count compactly (12.3k / 1.24M). */\nexport function formatTokens(n: number): string {\n if (n >= 1_000_000) return `${Math.round((n / 1_000_000) * 100) / 100}M`\n if (n >= 1000) return `${Math.round((n / 1000) * 10) / 10}k`\n return String(Math.round(n))\n}\n\nconst BILL_COLORS = { hit: '#10b981', miss: '#f59e0b', output: '#3b82f6' } as const\n\n/** One nested billing sub-row (cache-billing's indented swatch row). */\nfunction BillSubRow({ label, tokens, amount, color }: { label: string; tokens: number; amount: string; color: string }): JSX.Element {\n return (\n <div style={{ ...rowStyle, paddingLeft: '16px' }}>\n <dt style={rowLabelStyle}><span style={swatchStyle(color)} />{label}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>\n <span style={{ color: 'var(--dsw-alias-label-caption, inherit)', fontWeight: 400, marginRight: '6px' }}>{formatTokens(tokens)} tok</span>\n {amount}\n </dd>\n </div>\n )\n}\n\n/** 币种符号:目录原样不折算;未知币种回退 ISO 码。 */\nfunction currencySymbol(currency: string | undefined): string {\n if (currency === 'USD') return '$'\n if (currency !== undefined && currency !== 'CNY') return `${currency} `\n return '¥'\n}\n\n/** Format an amount: four decimals for a step, fewer for the totals. */\nfunction formatMoney(amount: number, digits: number, currency?: string): string {\n return `${currencySymbol(currency)}${amount.toFixed(digits)}`\n}\n\n/**\n * The module-level projection store. The ring renders inside the model seat,\n * whose entry props do NOT carry the projection hook — the hook lives on a\n * zero-size data hook mounted at `conversation.input.right` (the seat where\n * better-er/dsh-cache-billing proved the hook injection), which mirrors every\n * push into this store. The ring subscribes like any external store.\n */\ninterface ProjectionSnapshot {\n /** Set once the data hook mounts anywhere — the 0.2.0+ seat marker. */\n seatMounted?: boolean\n pressure?: ContextPressureLike\n breakdown?: ContextBreakdownLike\n billing?: CacheBillingLike\n}\n\nlet store: ProjectionSnapshot = {}\nconst listeners = new Set<() => void>()\n\n/** Immutable replacement — useSyncExternalStore compares snapshots by\n * reference, so in-place mutation would never re-render subscribers. */\nfunction publish(patch: Partial<ProjectionSnapshot>): void {\n store = { ...store, ...patch }\n for (const listener of listeners) listener()\n}\n\nfunction subscribeStore(listener: () => void): () => void {\n listeners.add(listener)\n return () => { listeners.delete(listener) }\n}\n\nfunction getStore(): ProjectionSnapshot {\n return store\n}\n\n/**\n * The zero-size data hook: props delivered by the slot renderer carry the\n * session projection hook; every push lands in the module store.\n */\nexport function ProjectionDataHook(props: { useProjection?: ProjectionHook }): JSX.Element {\n const pressure = props.useProjection?.('contextPressure') as ContextPressureLike | undefined\n const breakdown = props.useProjection?.('contextBreakdown') as ContextBreakdownLike | undefined\n const billing = props.useProjection?.('tlCacheBilling') as CacheBillingLike | undefined\n useEffect(() => {\n // The seat marker rides the first publish: the ring re-renders on every\n // publish, so a marker arriving after the ring's first render still\n // flips it from hidden to visible.\n publish({ seatMounted: true, pressure, breakdown, billing })\n })\n return <span data-dsh-thinking-levels=\"projection-hook\" style={{ display: 'none' }} />\n}\n\n/** The SVG ring: one background track + one pressure arc. */\nfunction Ring({ percent, color }: { percent: number; color: string }): JSX.Element {\n const r = (RING_SIZE - RING_STROKE) / 2\n const c = 2 * Math.PI * r\n const clamped = Math.max(0, Math.min(100, percent))\n return (\n <svg width={RING_SIZE} height={RING_SIZE} viewBox={`0 0 ${RING_SIZE} ${RING_SIZE}`} aria-hidden=\"true\">\n <circle cx={RING_SIZE / 2} cy={RING_SIZE / 2} r={r} fill=\"none\"\n stroke=\"var(--dsw-alias-border-l2, rgba(127,127,127,0.3))\" strokeWidth={RING_STROKE} />\n <circle cx={RING_SIZE / 2} cy={RING_SIZE / 2} r={r} fill=\"none\"\n stroke={color} strokeWidth={RING_STROKE} strokeLinecap=\"round\"\n strokeDasharray={`${(c * clamped) / 100} ${c}`}\n transform={`rotate(-90 ${RING_SIZE / 2} ${RING_SIZE / 2})`} />\n </svg>\n )\n}\n\n/** One breakdown row (cache-billing's swatch-row layout). */\nfunction BreakdownRow({ label, value, color }: { label: string; value: number; color: string }): JSX.Element {\n return (\n <div style={rowStyle}>\n <dt style={rowLabelStyle}><span style={swatchStyle(color)} />{label}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>{formatTokens(value)}</dd>\n </div>\n )\n}\n\n/**\n * The cache-billing block (catalog era). 未计价(priced===false)时保留 token\n * 读数、金额位换「未计价」文案;旧 view 缺 priced 字段 → 按历史行为计价。\n * 混币种会话不给跨币种合计,改按币种分行。\n */\nfunction BillingBlock({ billing, t }: { billing: CacheBillingLike; t: (key: string) => string }): JSX.Element {\n /** `ring.*` 读取(字典里只有一个 `%n` 占位符,有值就填)。 */\n const c = (key: string, value?: string): string => {\n const text = t(key)\n return value === undefined ? text : text.replace('%n', value)\n }\n const cur = billing.currency\n const priced = billing.priced !== false\n const money = (amount: number | undefined, digits: number): JSX.Element | string =>\n priced\n ? formatMoney(amount ?? 0, digits, cur)\n : <span style={{ color: 'var(--dsw-alias-label-caption, inherit)' }}>{c('ring.bill.unpriced')}</span>\n const dash = priced ? undefined : '—'\n const buckets = Array.isArray(billing.sessionByCurrency) ? billing.sessionByCurrency : []\n const sessionTotal: JSX.Element | string = !priced\n ? <span style={{ color: 'var(--dsw-alias-label-caption, inherit)' }}>{c('ring.bill.unpriced')}</span>\n : billing.mixedCurrency === true && buckets.length > 1\n // 跨币种不相加:逐桶展示(主币种取 session* 字段,其余补列)\n ? buckets.map((b) => `${currencySymbol(b.currency)}${(b.hitCost + b.missCost + b.outputCost).toFixed(2)}`).join(' + ')\n : formatMoney((billing.sessionCacheHitCost ?? 0) + (billing.sessionMissCost ?? 0) + (billing.sessionOutputCost ?? 0), 2, cur)\n return (\n <dl style={{ margin: '4px 0 0', padding: '6px 0 0', borderTop: '1px solid var(--dsw-alias-border-l3, rgba(127,127,127,0.18))' }}>\n <div style={rowStyle}>\n <dt style={{ ...rowLabelStyle, color: '#a78bfa' }}>{c('ring.bill.step')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>\n {formatTokens((billing.totalInputTokens ?? 0) + (billing.outputTokens ?? 0))} tok {money(billing.cost, 4)}\n </dd>\n </div>\n <BillSubRow label={c('ring.bill.cacheRead')} tokens={billing.cacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.cost ?? 0, 4, cur)} color={BILL_COLORS.hit} />\n <BillSubRow label={c('ring.bill.cacheMiss')} tokens={(billing.totalInputTokens ?? 0) - (billing.cacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.missCost ?? 0, 4, cur)} color={BILL_COLORS.miss} />\n <BillSubRow label={c('ring.bill.output')} tokens={billing.outputTokens ?? 0} amount={dash ?? formatMoney(billing.outputCost ?? 0, 4, cur)} color={BILL_COLORS.output} />\n <div style={rowStyle}>\n <dt style={{ ...rowLabelStyle, color: '#22d3ee' }}>{c('ring.bill.turn')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>\n {formatTokens(billing.turnTokens ?? 0)} tok {money(billing.turnCost, 3)}\n </dd>\n </div>\n <BillSubRow label={c('ring.bill.cacheRead')} tokens={billing.turnCacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.turnHitCost ?? 0, 3, cur)} color={BILL_COLORS.hit} />\n <BillSubRow label={c('ring.bill.cacheMiss')} tokens={(billing.turnInputTokens ?? 0) - (billing.turnCacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.turnMissCost ?? 0, 3, cur)} color={BILL_COLORS.miss} />\n <BillSubRow label={c('ring.bill.output')} tokens={billing.turnOutputTokens ?? 0} amount={dash ?? formatMoney(billing.turnOutputCost ?? 0, 3, cur)} color={BILL_COLORS.output} />\n <div style={rowStyle}>\n <dt style={{ ...rowLabelStyle, color: '#f472b6' }}>\n {c('ring.bill.session')}{billing.sessionRounds ? ` · ${billing.sessionRounds} ${c('ring.bill.rounds')}` : ''}\n </dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>\n {formatTokens((billing.sessionInputTokens ?? 0) + (billing.sessionOutputTokens ?? 0))} tok {sessionTotal}\n </dd>\n </div>\n <BillSubRow label={c('ring.bill.cacheRead')} tokens={billing.sessionCacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.sessionCacheHitCost ?? 0, 2, cur)} color={BILL_COLORS.hit} />\n <BillSubRow label={c('ring.bill.cacheMiss')} tokens={(billing.sessionInputTokens ?? 0) - (billing.sessionCacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.sessionMissCost ?? 0, 2, cur)} color={BILL_COLORS.miss} />\n <BillSubRow label={c('ring.bill.output')} tokens={billing.sessionOutputTokens ?? 0} amount={dash ?? formatMoney(billing.sessionOutputCost ?? 0, 2, cur)} color={BILL_COLORS.output} />\n {(billing.sessionFullMissSteps ?? 0) > 0 && (\n <div style={rowStyle}>\n <dt style={{ ...rowLabelStyle, color: '#f43f5e' }}>{c('ring.bill.fullMiss')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>{billing.sessionFullMissSteps}</dd>\n </div>\n )}\n </dl>\n )\n}\n\n/**\n * The ring entry: pressure arc trigger + the check popover. Renders nothing\n * without a projection seat or before the session has any reading.\n */\nexport function ContextRing(props: ContextRingProps): JSX.Element | null {\n // Two distinct invisible cases, handled differently: a host WITHOUT the\n // projection hook seat (≤0.1.6 lines — the data hook never mounts) hides the\n // ring, the retired pill's discipline — a permanently dead control helps\n // nobody there. A host WITH the hook but no reading yet (fresh session)\n // renders the dimmed unset state — fail-visible, because a hidden control is\n // indistinguishable from a dead registration, which cost a debug round-trip\n // once already.\n const live = useSyncExternalStore(subscribeStore, getStore)\n const hasSeat = live.seatMounted === true\n const [open, setOpen] = useState(false)\n const rootRef = useRef<HTMLDivElement | null>(null)\n const pressure = live.pressure\n const breakdown = live.breakdown\n const billing = live.billing\n // The official meter's own occupancy mapping (contextOccupancy): the\n // projected estimate wins, the raw pressure sample is the floor.\n const used = typeof pressure?.projectedTokens === 'number'\n ? pressure.projectedTokens\n : typeof pressure?.pressureTokens === 'number' ? pressure.pressureTokens : undefined\n const window_ = typeof pressure?.contextWindow === 'number' && pressure.contextWindow > 0\n ? pressure.contextWindow\n : typeof props.contextWindowFallback === 'number' && props.contextWindowFallback > 0\n ? props.contextWindowFallback\n : undefined\n const hasReading = used !== undefined && window_ !== undefined && window_ > 0\n\n /** Dictionary thunk: the model panel passes `locale.bind(NS)`; without it keys render. */\n const t = props.t ?? ((key: string) => key)\n /** `ring.*` 读取(字典里只有一个 `%n` 占位符,有值就填)。 */\n const c = (key: string, value?: string): string => {\n const text = t(key)\n return value === undefined ? text : text.replace('%n', value)\n }\n const percent = hasReading\n ? Math.min(100, Math.round(((used as number) / (window_ as number)) * 100))\n : 0\n const color = pressureColor(percent)\n const remaining = hasReading ? Math.max(0, (window_ as number) - (used as number)) : 0\n const rows: Array<{ label: string; value: number | undefined; color: string }> = !hasReading || breakdown === undefined\n ? []\n : [\n { label: c('ring.system'), value: breakdown.systemTokens, color: BREAKDOWN_COLORS.system },\n { label: c('ring.tools'), value: breakdown.toolsTokens, color: BREAKDOWN_COLORS.tools },\n { label: c('ring.messages'), value: breakdown.messageTokens, color: BREAKDOWN_COLORS.messages },\n ]\n\n // Hosts without the projection hook seat (≤0.1.6) can never produce a\n // reading — hide the control entirely rather than show a permanently dead\n // dial (the discipline in the comment at hasSeat). A host with the seat\n // flips `seatMounted` during the hook's own mount, so the gap is one store\n // tick before the first real re-render.\n if (!hasSeat) return null\n\n return (\n <div ref={rootRef} style={{ position: 'relative', display: 'inline-flex' }}>\n <button\n type=\"button\"\n style={hasReading ? triggerStyle : { ...triggerStyle, opacity: 0.55 }}\n aria-label={hasReading ? c('ring.aria', `${percent}%`) : c('ring.unset')}\n aria-haspopup={hasReading ? 'dialog' : undefined}\n aria-expanded={open}\n onClick={() => { if (hasReading) setOpen(state => !state) }}\n >\n <Ring percent={percent} color={color} />\n <span style={{ ...figureStyle, color: hasReading ? color : 'var(--dsw-alias-label-caption, inherit)' }}>\n {hasReading ? `${percent}%` : '–'}\n </span>\n </button>\n {open && hasReading && (\n <div style={popStyle} role=\"dialog\" aria-label={c('ring.title')}>\n <div style={headStyle}>\n {c('ring.title')}\n <span style={{ ...rowValueStyle, ...figureStyle }}>~{formatTokens(used)} / {formatTokens(window_)}</span>\n </div>\n <div style={rowStyle}>\n <dt style={rowLabelStyle}>{c('ring.percent')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0, color }}>{percent}%</dd>\n </div>\n <div style={rowStyle}>\n <dt style={rowLabelStyle}>{c('ring.remaining')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>{formatTokens(remaining)}</dd>\n </div>\n {rows.every(row => typeof row.value === 'number') && rows.length > 0 && (\n <dl style={{ margin: '4px 0 0', padding: '6px 0 0', borderTop: '1px solid var(--dsw-alias-border-l3, rgba(127,127,127,0.18))' }}>\n {rows.map(row => <BreakdownRow key={row.label} label={row.label} value={row.value as number} color={row.color} />)}\n </dl>\n )}\n {billing?.available === true && <BillingBlock billing={billing} t={t} />}\n {percent >= 85 && <div style={warnStyle}>{c('ring.warning')}</div>}\n <div style={footStyle}>\n {c('ring.window')}: {hasReading ? (window_ as number).toLocaleString() : c('ring.unset')}\n {billing?.available === true\n ? ` · ${billing.tier === 'peak' ? c('ring.bill.peak') : billing.tier === 'offPeak' ? c('ring.bill.offPeak') : billing.tier === 'flat' ? c('ring.bill.flat') : c('ring.bill.unpriced')} · ${\n billing.priced === false\n ? c('ring.bill.unpriced')\n : billing.estimated === true\n ? c('ring.bill.uncalibrated')\n : typeof billing.catalogLabel === 'string'\n ? c('ring.bill.pricedAs', billing.catalogLabel)\n : billing.pricingSource === 'custom'\n ? c('ring.bill.custom')\n : billing.modelMatched === false\n ? c('ring.bill.estimate')\n : c('ring.bill.priced')\n }`\n : ''}\n </div>\n </div>\n )}\n </div>\n )\n}\n","/**\r\n * Pure thinking-level decision for the dsh-thinking-levels plugin.\r\n *\r\n * The measured bottleneck of tool calls in dsh is the model's THINKING phase\r\n * (~90% of the wall-clock time for simple tasks), not the tool execution\r\n * itself. DeepSeek's API exposes `reasoning_effort` in wire levels\r\n * (off / low / high / max; low shipped 2026-08-13 in dsh rc.7 — rc.6 and\r\n * older adapters only accept off / high / max).\r\n *\r\n * The plugin offers EIGHT standard levels aligned with dsh-thinking-effort's\r\n * level set, plus the scheduler sentinel:\r\n * - `off` : thinking disabled (manual only — never auto-picked).\r\n * - `on` : thinking enabled at the model's default strength. Toggle-only\r\n * models (Qwen3.6-style) surface Off/On; `on` lifts to the\r\n * advertised `high` (or the highest thinking level the model\r\n * takes) instead of an exact wire level.\r\n * - `minimal` / `low` / `medium` / `high` / `xhigh` / `max` : strength\r\n * gradients. Each maps to a wire value via the model's `reasoningEfforts`\r\n * table (customizable per model — e.g. `high` → `ultra`); levels the model\r\n * does not advertise are clamped to its highest thinking level or stripped.\r\n * - `auto` : schedule per step from the recent tool-call history, between\r\n * `low` / `high` / `max` (never `off`, never `auto` itself).\r\n *\r\n * A request-level guard decides whether an effort may be injected at all:\r\n * models that do not advertise reasoning metadata (custom openai-completions\r\n * routes such as Qwen3.6 with no `reasoningEfforts`) must never receive a\r\n * `reasoningEffort` — dsh rejects it per request with\r\n * UNSUPPORTED_REASONING_EFFORT. Unsupported fields are stripped, not sent.\r\n *\r\n * Kept dependency-free (pure inputs -> output) so the policy is unit-testable\r\n * in isolation; the plugin host feeds it the live session's recent calls.\r\n */\r\n\r\n/** The user-facing thinking levels: the eight standard levels plus the scheduler sentinel. */\r\nexport type EffortId = 'off' | 'on' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto'\r\n\r\n/** Wire levels the auto scheduler may pick (never `off`, never `auto`). */\r\nexport type AutoEffort = 'low' | 'high' | 'max'\r\n\r\n/** The eight standard levels (excluding the `auto` scheduler sentinel). */\r\nexport const STANDARD_LEVELS: readonly EffortId[] = [\r\n 'off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',\r\n] as const\r\n\r\n/** Runtime guard: is this a level the plugin understands? */\r\nexport function isEffortId(value: unknown): value is EffortId {\r\n return STANDARD_LEVELS.includes(value as EffortId) || value === 'auto'\r\n}\r\n\r\n/**\r\n * Fail-loud config validation: reject an out-of-band level (e.g. a stray\r\n * value from an old profile) instead of silently injecting it into the\r\n * model request, where dsh would throw `UNSUPPORTED_REASONING_EFFORT`.\r\n */\r\nexport function assertEffortId(value: unknown, where: string): asserts value is EffortId {\r\n if (!isEffortId(value)) {\r\n throw new TypeError(\r\n `${where}: invalid thinking level ${JSON.stringify(value)} `\r\n + '(expected off | on | minimal | low | medium | high | xhigh | max | auto)',\r\n )\r\n }\r\n}\r\n\r\n/** One observed tool call of the current/last step. */\r\nexport interface ToolCallSample {\r\n /** Tool name, e.g. 'bash', 'fs_write', 'web_search', 'mcp__...'. */\r\n name: string\r\n /** Approximate argument size in characters (payload heft). */\r\n argsSize: number\r\n}\r\n\r\n/**\r\n * Everything the policy needs to decide one request's level.\r\n */\r\nexport interface EffortDecisionInput {\r\n /** Recent tool calls of the step (oldest first); empty for a fresh prompt. */\r\n recentCalls: readonly ToolCallSample[]\r\n /** The user-selected level: a fixed wire level, or `auto` for scheduling. */\r\n selected: EffortId\r\n /** Scheduler preference: allow the scheduler to drop below the hub (`high`). */\r\n allowDowngrade: boolean\r\n /** User preference: allow the scheduler to lift above the hub to `max`. */\r\n allowUpgrade: boolean\r\n /**\r\n * Extra tool names treated as cheap-and-deterministic, merged with the\r\n * built-in set (each matched after the `ops_` namespace strip). Empty/omitted\r\n * leaves the built-in classification untouched (issue #8 `Config.simpleTools`).\r\n */\r\n extraSimpleTools?: readonly string[]\r\n /**\r\n * Extra RAW REGEX patterns treated as cheap-and-deterministic, merged with\r\n * the literal list and the built-in set (issue #12 `Config.simpleToolsRegex`).\r\n * Each entry compiles as written (`i` flag, no auto-anchoring — the hint\r\n * suggests `^`); invalid entries are skipped with a one-time warning. The\r\n * matcher tests the full name and the bare name, so a family pattern like\r\n * `ops_.*` hits the whole namespace.\r\n */\r\n extraSimpleRegex?: readonly string[]\r\n}\r\n\r\n/**\r\n * Deterministic tool names that are cheap to reason about (word-boundary\r\n * anchored). `shell`/`pwsh`/`cmd`/`sh` sit alongside `bash`/`terminal` — every\r\n * one of them is a \"run this command\" entry, so a step made only of short calls\r\n * to any of them is cheap-and-deterministic (issue #8 follow-up: on hosts whose\r\n * command tool is named `shell`/`pwsh` rather than `bash`, auto used to sit\r\n * permanently on `high`).\r\n */\r\nconst SIMPLE_TOOL_RE = /^(?:fs|bash|terminal|shell|pwsh|cmd|sh|code|text|todo|job|skill|read|list|search|write|grep|glob|edit|ls|cat|rm|mv|cp|touch|mkdir|pwd|head|tail)(?:_|$)/i\r\n\r\n/**\r\n * Known tool-wrapper namespaces (issue #8). `ops_` is the prefix the dsh-ops\r\n * plugin family puts on its tools (`ops_bash`, `ops_grep`, `ops_shell`,\r\n * `ops_read_files`); the wrapped tool is just as cheap-and-deterministic as its\r\n * bare name, so the prefix is stripped before the simple-tool check. Only an\r\n * explicit table is stripped: a generic `word_` catch-all would misread\r\n * look-alike heavy names such as `codebase_search` as simple (see the\r\n * classification-boundary test).\r\n */\r\nconst TOOL_NAMESPACE_RE = /^(?:ops_)+/i\r\n\r\n/** Hefty payloads signal non-trivial work no matter the tool name. */\r\nconst HEAVY_ARGS = 800\r\n\r\n/** Escape a user-supplied token for embedding in a RegExp source. */\r\nfunction escapeRe(source: string): string {\r\n return source.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\r\n}\r\n\r\n/**\r\n * The merged cheap-and-deterministic classifier over both extra lists\r\n * (issue #12): literal entries (`Config.simpleTools`, anchored exactly as\r\n * before) plus raw regex entries (`Config.simpleToolsRegex`, compiled as\r\n * written — invalid ones skipped with a one-time warning, never thrown).\r\n *\r\n * `test` matches the FULL tool name AND the namespace-stripped bare name: a\r\n * family pattern like `ops_.*` can only ever hit the full name (the bare name\r\n * carries no `ops_` prefix), while a literal entry like `ops_bash` used to be\r\n * dead on arrival against the bare name alone — the dual face repairs it as a\r\n * side effect. The BUILT-IN table keeps its bare-name-only semantics (the\r\n * issue #8 contract); only the extra lists gained the second face.\r\n */\r\nexport interface SimpleToolMatcher {\r\n test(name: string): boolean\r\n}\r\n\r\n/**\r\n * Compiled matchers, memoised by content. The config arrays may be fresh\r\n * references on every read (volatile `.get()`), so key on the joined contents\r\n * rather than identity to avoid recompiling per request.\r\n */\r\nconst SIMPLE_MATCHER_CACHE = new Map<string, SimpleToolMatcher | null>()\r\n\r\n/**\r\n * Compile the two extra lists into one classifier, or `null` when both are\r\n * empty (the built-in classification then stands alone). A compile is pure\r\n * apart from the one-time `console.warn` for invalid regex entries — the\r\n * cache keys on content, so the warning fires once per configuration, not\r\n * once per request.\r\n */\r\nexport function compileSimpleToolsMatcher(\r\n literal: readonly string[] | undefined,\r\n regex: readonly string[] | undefined,\r\n): SimpleToolMatcher | null {\r\n const literalKey = (literal ?? []).join('\\u0000')\r\n const regexKey = (regex ?? []).join('\\u0000')\r\n if (literalKey === '' && regexKey === '') return null\r\n const key = `${literalKey}\\u0001${regexKey}`\r\n const hit = SIMPLE_MATCHER_CACHE.get(key)\r\n if (hit !== undefined) return hit\r\n const matcher = buildSimpleToolsMatcher(literal ?? [], regex ?? [])\r\n SIMPLE_MATCHER_CACHE.set(key, matcher)\r\n return matcher\r\n}\r\n\r\nfunction buildSimpleToolsMatcher(literal: readonly string[], regex: readonly string[]): SimpleToolMatcher | null {\r\n const cleaned = literal.map(token => token.trim()).filter(token => token !== '')\r\n const literalRe = cleaned.length === 0\r\n ? null\r\n : new RegExp(`^(?:${cleaned.map(escapeRe).join('|')})(?:_|$)`, 'i')\r\n const rawRes: RegExp[] = []\r\n const failed: string[] = []\r\n for (const pattern of regex) {\r\n const trimmed = pattern.trim()\r\n if (trimmed === '') continue\r\n try {\r\n rawRes.push(new RegExp(trimmed, 'i'))\r\n } catch {\r\n failed.push(trimmed)\r\n }\r\n }\r\n if (failed.length > 0) {\r\n console.warn(`[dsh-thinking-levels] Config.simpleToolsRegex: skipped invalid pattern(s) (they must compile as JavaScript RegExp): ${failed.map(p => `/${p}/`).join(', ')}`)\r\n }\r\n if (literalRe === null && rawRes.length === 0) return null\r\n return {\r\n test(name: string): boolean {\r\n const bare = name.replace(TOOL_NAMESPACE_RE, '')\r\n return (literalRe !== null && (literalRe.test(name) || literalRe.test(bare)))\r\n || rawRes.some(re => re.test(name) || re.test(bare))\r\n },\r\n }\r\n}\r\n\r\n/** Whether a tool name looks cheap-and-deterministic: the built-in table reads\r\n * the namespace-stripped bare name (issue #8 semantics, untouched); the extra\r\n * matcher carries its own dual face (full name ∥ bare name, issue #12). */\r\nfunction isSimpleToolName(name: string, extra?: SimpleToolMatcher | null): boolean {\r\n const bare = name.replace(TOOL_NAMESPACE_RE, '')\r\n return SIMPLE_TOOL_RE.test(bare) || (extra !== undefined && extra !== null && extra.test(name))\r\n}\r\n\r\n/** Count how many of the recent calls look cheap-and-deterministic. */\r\nfunction simpleRatio(calls: readonly ToolCallSample[], extra?: SimpleToolMatcher | null): number {\r\n if (calls.length === 0) return 1\r\n const simple = calls.filter(call =>\r\n isSimpleToolName(call.name, extra) && call.argsSize < HEAVY_ARGS,\r\n ).length\r\n return simple / calls.length\r\n}\r\n\r\n/**\r\n * Auto schedule: map a recent tool-call history to the wire level the NEXT\r\n * model request of that step should use.\r\n *\r\n * Hub is `high` (the official default). Rules:\r\n * - No tool calls yet (the session's FIRST request) -> `high`, ALWAYS.\r\n * - All/mostly simple tools -> `low` (when downgrades are allowed) — `low` is\r\n * the floor the scheduler may ever reach.\r\n * - Mixed or heavy tools -> `high` (the hub).\r\n * - Very heavy context (huge args) -> `max` (when upgrades are allowed).\r\n *\r\n * Why the first request sits on the hub instead of the old `low`: the first\r\n * step has no tool history to justify a downgrade, and it is the step that\r\n * decides the plan — tool choice, payload shape, decomposition. An\r\n * under-thought first step produces a plan the rest of the turn inherits, and\r\n * the measured saving of one cheap step does not pay for a re-plan. Downgrades\r\n * therefore require evidence: `low` needs at least one observed simple tool\r\n * call, so `allowDowngrade` no longer moves the no-sample branch.\r\n *\r\n * The scheduler MAY pick `low`: the request-level capability guard strips any\r\n * effort from models that do not support it, so a scheduled `low` only ever\r\n * reaches models that advertise the level.\r\n *\r\n * @param calls - recent tool calls of the step.\r\n * @param allowDowngrade - may drop below `high` once tool evidence exists.\r\n * @param allowUpgrade - may lift above `high`.\r\n * @returns a wire level; never `off` (off is manual-only) and never `auto`.\r\n */\r\nfunction scheduleEffort(\r\n calls: readonly ToolCallSample[],\r\n allowDowngrade: boolean,\r\n allowUpgrade: boolean,\r\n extra?: SimpleToolMatcher | null,\r\n): AutoEffort {\r\n // The no-sample branch is the first request of the session: start at the hub\r\n // regardless of `allowDowngrade` (see the rationale above).\r\n if (calls.length === 0) return 'high'\r\n\r\n const ratio = simpleRatio(calls, extra)\r\n const heaviest = calls.reduce((max, call) => Math.max(max, call.argsSize), 0)\r\n\r\n if (ratio >= 0.75 && allowDowngrade) return 'low'\r\n if (heaviest >= HEAVY_ARGS * 4 && allowUpgrade) return 'max'\r\n return 'high'\r\n}\r\n\r\n/**\r\n * Map the user's selected level to the level injected into the next\r\n * `agent/request`. Manual levels (off / low / high / max) pass through\r\n * unchanged — `low` is the manual pick for simple chat tasks. `auto`\r\n * delegates to the tool-history scheduler.\r\n *\r\n * @param input - recent calls, the selected level and the user's toggles.\r\n * @returns The level to inject; `auto` is resolved before returning.\r\n */\r\nexport function decideEffort(input: EffortDecisionInput): EffortId {\r\n const { recentCalls, selected, allowDowngrade, allowUpgrade, extraSimpleTools, extraSimpleRegex } = input\r\n if (selected !== 'auto') return selected\r\n return scheduleEffort(recentCalls, allowDowngrade, allowUpgrade, compileSimpleToolsMatcher(extraSimpleTools, extraSimpleRegex))\r\n}\r\n\r\n/**\r\n * Whether a model's resolved metadata advertises reasoning-effort support.\r\n * dsh resolves `reasoning` to `undefined` for non-reasoning models (e.g. a\r\n * hand-declared openai-completions route without `reasoningEfforts`), and\r\n * rejects any requested effort for them per request. An empty efforts list is\r\n * equally incapable and is treated as unsupported.\r\n * @param reasoning - the `reasoning` field of a resolved model info.\r\n * @returns true when the model advertises at least one effort level.\r\n */\r\nexport function reasoningEffortSupported(reasoning: unknown): boolean {\r\n if (typeof reasoning !== 'object' || reasoning === null) return false\r\n const efforts = (reasoning as { efforts?: unknown }).efforts\r\n return Array.isArray(efforts) && efforts.length > 0\r\n}\r\n\r\n/** One request-level injection decision. */\r\nexport interface EffortInjectionInput {\r\n /** Whether the target model advertises reasoning-effort support. */\r\n supportsReasoning: boolean\r\n /**\r\n * The level this request was ASKED for: the session's explicit pick (folded\r\n * from `model/selection`) when present, else the plugin-configured default.\r\n *\r\n * Never derive this from the request seed. From dsh 0.1.2-rc.1 on, the host\r\n * seeds `reasoningEffort` from the previous `request/header` — which is this\r\n * plugin's own output (`core/agent-loop/src/agent.ts:573-581`). Reading it as\r\n * a manual pick made `auto` resolve once and then stay frozen for the rest of\r\n * the session (issue #6, bug 2).\r\n */\r\n requested: EffortId\r\n /**\r\n * The `reasoningEffort` already present on the request seed (host echo of a\r\n * previous header, or route inheritance). Used ONLY to recognise the `on`\r\n * toggle and to strip an inherited effort from a model that cannot take one —\r\n * never as a manual-pick signal.\r\n */\r\n seedEffort: unknown\r\n /** Recent tool calls of the step, for the auto scheduler. */\r\n recentCalls: readonly ToolCallSample[]\r\n /** Scheduler preference: allow the scheduler to drop below `high`. */\r\n allowDowngrade: boolean\r\n /** Scheduler preference: allow lifting above `high` to `max`. */\r\n allowUpgrade: boolean\r\n /**\r\n * Extra tool names merged into the built-in cheap-and-deterministic set for\r\n * the `auto` scheduler (issue #8 `Config.simpleTools`).\r\n */\r\n extraSimpleTools?: readonly string[]\r\n /**\r\n * Extra raw regex patterns for the same set (issue #12\r\n * `Config.simpleToolsRegex`), compiled as written, invalid ones skipped.\r\n */\r\n extraSimpleRegex?: readonly string[]\r\n /** The model's advertised effort ids (including plugin masks like `auto`). */\r\n efforts: readonly string[]\r\n /**\r\n * The model takes only an on/off thinking toggle (Qwen3.6 / mimo-v2.5\r\n * style): `off` must be stripped (pi-ai expresses it by omitting the effort,\r\n * not by sending an `off` value), and `on` maps to the advertised `high`\r\n * level (pi-ai serializes it as enable_thinking, no reasoning_effort).\r\n */\r\n toggleOnly: boolean\r\n}\r\n\r\n/** The resolved action for one `agent/request`. */\r\nexport interface EffortInjectionDecision {\r\n /** Keep/inject a `reasoningEffort` on the request (false = strip it). */\r\n inject: boolean\r\n /** The wire level to set, present when `inject` is true. */\r\n level?: EffortId\r\n}\r\n\r\n/**\r\n * Clamp a level to the ones the model actually advertises. The adapter rejects\r\n * any other value per request (UNSUPPORTED_REASONING_EFFORT), so an unsupported\r\n * scheduled level is lifted to the model's highest advertised thinking level\r\n * (a toggle-only model advertises off/high → a scheduled low becomes `high`,\r\n * which enables thinking without sending a think effort), and a model\r\n * advertising no thinking level at all yields nothing (strip).\r\n * @param level - the scheduled or manually selected level.\r\n * @param efforts - the model's advertised effort ids (escalation-ordered).\r\n * @returns the level to inject, or `undefined` when the model cannot take it.\r\n */\r\nexport function clampToEfforts(level: EffortId, efforts: readonly string[]): EffortId | undefined {\r\n if (efforts.includes(level)) return level\r\n // off and auto are not thinking levels; the advertised list is\r\n // escalation-ordered.\r\n const thinking = efforts.filter(id => id !== 'off' && id !== 'auto')\r\n if (thinking.length === 0) return undefined\r\n return thinking[thinking.length - 1] as EffortId\r\n}\r\n\r\n/**\r\n * Decide what one model request should do with `reasoningEffort`.\r\n *\r\n * - A model without reasoning support never receives the field: dsh would\r\n * throw UNSUPPORTED_REASONING_EFFORT, so the seed's inherited effort (from a\r\n * previous route or session header) is stripped.\r\n * - A manual wire selection (`requested`) passes through unchanged when the\r\n * model advertises it; an unsupported manual pick is stripped rather than\r\n * clamped (the user asked for that exact level).\r\n * - `on` is the enable-thinking toggle, never a wire level: on a toggle-only\r\n * model it injects the advertised thinking level (`high`), which the wire\r\n * serializes as enable_thinking without a reasoning_effort; an\r\n * effort-capable model does not advertise `on`, so it is stripped.\r\n * - `auto` resolves through the scheduler; the result is clamped to the\r\n * model's advertised levels, so a scheduled `low` on a model that only takes\r\n * off/high (Qwen3.6) becomes `high` instead of an error.\r\n *\r\n * The manual/auto branch reads `requested` only. The seed no longer influences\r\n * it, so a header echoed back by the host cannot masquerade as a user pick.\r\n *\r\n * @param input - model capability plus the requested level and the seed's effort.\r\n * @returns whether to inject and the level to set.\r\n */\r\nexport function resolveEffortInjection(input: EffortInjectionInput): EffortInjectionDecision {\r\n const { supportsReasoning, requested, efforts, toggleOnly } = input\r\n if (!supportsReasoning) return { inject: false }\r\n if (toggleOnly) {\r\n // Toggle-only model (Qwen3.6 / mimo-v2.5 style): thinking is an on/off\r\n // switch expressed through the provider's enable_thinking semantics.\r\n // - Off → inject `off`: the provider maps it to thinking disabled.\r\n // - On / any other request → inject `high` (the advertised toggle level):\r\n // the short-circuit adapter serializes a non-off effort as\r\n // enable_thinking true — an explicit \"thinking on\" signal the wire needs.\r\n // (A request with NO effort at all is the ambiguous case: leaving it\r\n // absent relies on the provider default, which some gateways read as off.)\r\n return { inject: true, level: requested === 'off' ? 'off' : 'high' }\r\n }\r\n if (requested === 'on' || input.seedEffort === 'on') {\r\n // A stray On on an effort-capable model: never a wire level, stripped.\r\n return { inject: false }\r\n }\r\n if (requested !== 'auto') {\r\n // A manual pick is the user asking for that exact level: pass it through\r\n // only when the model advertises it, strip it otherwise (no clamping of an\r\n // explicit choice).\r\n return efforts.includes(requested)\r\n ? { inject: true, level: requested }\r\n : { inject: false }\r\n }\r\n const level = decideEffort({\r\n recentCalls: input.recentCalls,\r\n selected: 'auto',\r\n allowDowngrade: input.allowDowngrade,\r\n allowUpgrade: input.allowUpgrade,\r\n extraSimpleTools: input.extraSimpleTools,\r\n extraSimpleRegex: input.extraSimpleRegex,\r\n })\r\n const clamped = clampToEfforts(level, efforts)\r\n return clamped === undefined ? { inject: false } : { inject: true, level: clamped }\r\n}\r\n\r\n/** Wall-clock delta of one tool call, for the timing telemetry. */\r\nexport function toolDurationMs(startedAt: number, finishedAt: number): number {\r\n return Math.max(0, finishedAt - startedAt)\r\n}\r\n\r\n/* ── effort slider ordering & placement (client face, kept pure for tests) ── */\r\n\r\n/**\r\n * Display rank of the effort slider stops: `auto` is the scheduler sentinel and\r\n * sits LEFTMOST regardless of whether the model allows disabling thinking;\r\n * `off` / `on` follow, then the strength gradient. Ids outside the standard set\r\n * (custom gateway wire values such as `ultra`) rank last, in arrival order.\r\n */\r\nexport const EFFORT_SLIDER_RANK: Readonly<Record<string, number>> = {\r\n auto: 0, off: 1, on: 2, minimal: 3, low: 4, medium: 5, high: 6, xhigh: 7, max: 8,\r\n} as const\r\n\r\n/** Fallback rank for ids outside the standard table. */\r\nconst EFFORT_SLIDER_RANK_TAIL = 100\r\n\r\n/**\r\n * Order a model's advertised efforts for the slider track (left → right).\r\n * Stable sort: unknown ids keep their relative arrival order after the known\r\n * ranks, so a gateway's custom wire values are never dropped or reordered\r\n * against each other.\r\n */\r\nexport function orderEffortsForSlider<T extends { id: string }>(efforts: readonly T[]): T[] {\r\n return [...efforts].sort((a, b) => {\r\n const rankA = EFFORT_SLIDER_RANK[a.id] ?? EFFORT_SLIDER_RANK_TAIL\r\n const rankB = EFFORT_SLIDER_RANK[b.id] ?? EFFORT_SLIDER_RANK_TAIL\r\n return rankA - rankB\r\n })\r\n}\r\n\r\n/**\r\n * Map the line's effective effort to a stop index of the ordered track: exact\r\n * id match wins; an unmatched id (e.g. a defaultEffort the track does not\r\n * advertise) parks on the nearest stop by display rank, ties resolving to the\r\n * stronger level (higher index); an absent value parks on stop 0 (the neutral\r\n * left end — `auto` when advertised) and an empty track always yields 0, so the\r\n * caller never faces an out-of-range thumb.\r\n */\r\nexport function nearestEffortStopIndex(\r\n stops: readonly { id: string }[],\r\n value: string | undefined,\r\n): number {\r\n if (stops.length === 0) return 0\r\n if (value === undefined) return 0\r\n const exact = stops.findIndex(stop => stop.id === value)\r\n if (exact >= 0) return exact\r\n const rank = EFFORT_SLIDER_RANK[value] ?? EFFORT_SLIDER_RANK_TAIL\r\n let best = 0\r\n let bestDistance = Number.POSITIVE_INFINITY\r\n stops.forEach((stop, index) => {\r\n const stopRank = EFFORT_SLIDER_RANK[stop.id] ?? EFFORT_SLIDER_RANK_TAIL\r\n const distance = Math.abs(stopRank - rank)\r\n // `<=` resolves ties toward the stronger (right-most) level.\r\n if (distance <= bestDistance) {\r\n bestDistance = distance\r\n best = index\r\n }\r\n })\r\n return best\r\n}\r\n","/**\r\n * Whale-girl runner strip (鲸鱼娘侧面奔跑立绘, original left-facing\r\n * orientation — she rides the thumb looking back along the track),\r\n * inlined as a palette PNG data URL — the client bundle purity gate\r\n * forbids non-inline assets. Source: HanaAyane/dsh-reasoning-effort\r\n * assets/chibi-runner-strip.png (community whale-girl derivative);\r\n * regenerate via `python tools/whale-mascot.py`.\r\n */\r\nexport const WHALE_RUN_STRIP_SRC = 'data:image/png;base64,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1n55vUHH2h0SeODDwntYdnEKoojvmnU10wYI3cztLIyfnpi44WxZryIhVqtdxehpO8QGub4RfbQSjw/PTOEN7I1Gqh+joS5rY8/puZX7ihgfU0bSNHq7fvzL3IGBwtXC0SDUm6VS0czhY2IBUKBXuFqZgdIucYs8alnbLueWnOljbsZegotj1tHGYeEsE34b6cIILtWV4utmT5pn80kL9yj+vpF0BW1hy88E1BlIfPBJpL6n0hXcdD44NxIYj1IqFWTzyI1nfl8bV71w19Zk28H/Xq8AF2m4OPP9GcnhySM4BcOk71tjNR4IK8a41fhou5Zzk+gjb43rBjUC9c/IBT4TZwulDX/x9uIktuEagFnc95kmym4WffLxU6PLmz+SemdJ11mt/r5zUqkjz22pkQEVY8qbm1lsScPInSYkbu4fH1FoSM/+xJmKCI3AX8/L4wUj+1aCO98XAr3Bgq7Qzbj+2QqotwMGJzjvgMDPXIETELNsfaYtcf7AwCcs3KYuwPW8dYlZDP+NXagYNx4aDtMNk6n57Ymz+RS4jPjOmUSxi8fJRVzcP587H8EusyArc7jlXN+PiHqZhRmC4v4WLjZH89oWx/EiSupt3Pm/MIdShjTE/sSshYzvnFjR+Bd2kkb2N+ZlLefKBtfPi7ven/3vPNa/rUFrCByADP7s/DYscHjX+pbmesczvk1qRxo8P3O7nFuBSGY5d+7g2t3OfQfYgkJic5XhgdfYHSjxV3OKkmbc4N/ZFTcXzV2T0Ig4/UD0XC3lXy7nVm1rOXOg0CzC7r89cdYyTMxmIicOzk9w3Pkho52bv+3r3HmSmHdikJsrLthr/u2fv6L/KPfv8sID2KZnxNMToyYmuerEss8kdv/7AKOu9WFm3bXHzot+gjuj3m8+X3m2cdw54btRDLvPye/+e74u//ck9t8B0EcbXpoTp2MAAAAASUVORK5CYII='\r\n\r\n/** Frame geometry of the strip, in asset pixels (2x the CSS display size). */\r\nexport const WHALE_RUN_STRIP = {\r\n frames: 8,\r\n frameW: 67,\r\n frameH: 92,\r\n} as const\r\n","/**\r\n * Segment slider for one model line's reasoning effort (the 改造 of the retired\r\n * per-line `<select>`).\r\n *\r\n * Interaction follows the approved dsh-reasoning-effort visual spec: the thumb\r\n * follows the pointer CONTINUOUSLY and snaps to a stop on release (one\r\n * `directory.select` per gesture), the plain thumb is pure white in every\r\n * theme, the full thumb stays visible at both track endpoints, and\r\n * reduced-motion freezes motion. Deviations requested for this plugin: the\r\n * stop count adapts to the model's advertised efforts (not a fixed triple),\r\n * `auto` is pinned leftmost (see `orderEffortsForSlider`), and the whale-girl\r\n * runner thumb is per-line — DeepSeek lines run the 8-frame strip, every other\r\n * model gets the plain knob.\r\n *\r\n * The track carries the reference plugin's signature FX, ported from its\r\n * published bundle: a procedural canvas \"radiation\" (three sine waves with a\r\n * sharp crest, exponential trail decay from the thumb, a 4px pixel grid with\r\n * grain, 14 particle streaks flying left, and a radial glow at the thumb — all\r\n * clipped LEFT of the thumb, screen-blended over the track, pixelated), a CSS\r\n * flare at the thumb, theme-split tracks via `body[data-ds-dark-theme]`, a\r\n * light-theme progress fill, and a `[data-top]` breathe pulse. Dragging speeds\r\n * and brightens everything. The canvas runs a rAF loop unless\r\n * `prefers-reduced-motion` is set (then single frames on change).\r\n *\r\n * Inline styling only (no CSS modules in the client bundle) — everything a\r\n * stylesheet needs (pseudo-elements, keyframes, theme selectors, blend modes)\r\n * is injected once into `document.head` under a plugin-prefixed id. All math\r\n * is defensive: a render throw here would abdicate the whole model-seat entry\r\n * back to the shipped selector.\r\n */\r\nimport { useEffect, useRef, useState } from 'react'\r\nimport type { CSSProperties, JSX, KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from 'react'\r\nimport { nearestEffortStopIndex } from '../thinking-level.ts'\r\nimport { WHALE_RUN_STRIP, WHALE_RUN_STRIP_SRC } from './whale-mascot.ts'\r\n\r\n/** One ordered stop of the track (already run through `orderEffortsForSlider`). */\r\nexport interface EffortStop {\r\n id: string\r\n name: string\r\n}\r\n\r\nexport interface EffortSliderProps {\r\n /** Ordered left → right; `auto` first, unknown wire values last. */\r\n stops: readonly EffortStop[]\r\n /** The line's effective effort (current selection, else the model default). */\r\n value: string | undefined\r\n /** true = whale-girl runner thumb (DeepSeek lines); false = plain white knob. */\r\n mascot: boolean\r\n /** Frozen while a route write is in flight. */\r\n disabled: boolean\r\n /** Commit the picked stop id (once per gesture / keypress). */\r\n onCommit: (id: string) => void\r\n /** Locale copy thunk. */\r\n t: (key: string) => string\r\n}\r\n\r\n/* ── geometry (CSS px) ──────────────────────────────────────────────────── */\r\n\r\n/** Editor-row zone height: label row + track + headroom for the standing girl. */\r\nconst ZONE_H = 74\r\n/** Track thickness; sits `TRACK_B` px above the zone bottom (above the 14px label row).\r\n * Proportioned like the reference (track ≈ knob height), not a thin wire. */\r\nconst TRACK_H = 24\r\nconst TRACK_B = 16\r\n/** Horizontal inset keeping the thumb fully visible at both endpoint stops. */\r\nconst PAD_MASCOT = 18\r\nconst PAD_KNOB = 14\r\n/** Thumb metrics. */\r\nconst GIRL_W = WHALE_RUN_STRIP.frameW / 2\r\nconst GIRL_H = WHALE_RUN_STRIP.frameH / 2\r\nconst GIRL_B = TRACK_B + TRACK_H / 2 - 4\r\nconst KNOB = 28\r\n/** Flare pill sized to OUR track (the reference's 78×46 assumed a 30px track). */\r\nconst FLARE_W = 60\r\nconst FLARE_H = 36\r\n/** Label row height under the track. */\r\nconst LABEL_H = 14\r\n/** Strip footprint in CSS px (asset is 2x). */\r\nconst STRIP_CSS_W = (WHALE_RUN_STRIP.frameW * WHALE_RUN_STRIP.frames) / 2\r\nconst STRIP_CSS_H = WHALE_RUN_STRIP.frameH / 2\r\n\r\nconst KEYFRAMES_ID = 'dsh-thinking-levels-effort-slider'\r\nconst ZONE_CLASS = 'dsh-tl-zone'\r\nconst RUN_CLASS = 'dsh-tl-run'\r\nconst GIRL_CLASS = 'dsh-tl-girl'\r\nconst KNOB_CLASS = 'dsh-tl-knob'\r\nconst TRACK_CLASS = 'dsh-tl-track'\r\nconst FILL_CLASS = 'dsh-tl-fill'\r\nconst CANVAS_CLASS = 'dsh-tl-canvas'\r\nconst FLARE_CLASS = 'dsh-tl-flare'\r\nconst RUN_KEYFRAMES = 'dsh-tl-whale-run-keyframes'\r\n\r\n/**\r\n * The effect stylesheet: radiation track themes (dark violet gradient vs pale\r\n * blue + progress fill), the screen-blended pixelated canvas, the flare with\r\n * its cross streaks, dragging boosts, the `[data-top]` breathe pulses, the\r\n * girl's run cycle with drop-shadow glow, and the reduced-motion freezes.\r\n */\r\nconst EFFECT_CSS = `\r\n.${ZONE_CLASS}:focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary); outline-offset: 2px; }\r\n.${TRACK_CLASS} {\r\n border-radius: 999px;\r\n overflow: hidden;\r\n isolation: isolate;\r\n background: linear-gradient(100deg, #03040a 0%, #071126 22%, #101d4c 45%, #302262 70%, #5d35a0 100%);\r\n box-shadow:\r\n inset 0 1px 0 rgba(189, 199, 255, .15),\r\n inset 0 -1px 0 rgba(0, 0, 0, .55),\r\n 0 3px 10px rgba(12, 17, 55, .34);\r\n}\r\nbody[data-ds-dark-theme] .${TRACK_CLASS}::after {\r\n content: \"\";\r\n position: absolute;\r\n inset: 0;\r\n pointer-events: none;\r\n background:\r\n radial-gradient(circle at 18% 45%, rgba(82, 130, 255, .12), transparent 24%),\r\n linear-gradient(90deg, rgba(0, 0, 0, .28), transparent 42%, rgba(168, 113, 255, .12));\r\n}\r\nbody:not([data-ds-dark-theme]) .${TRACK_CLASS} {\r\n /* Gradient base even at 0% progress: LIGHT blue at the left deepening\r\n toward DARK blue at the right (matches the progress direction). */\r\n background: linear-gradient(90deg, #d9eafc 0%, #b3d3f5 40%, #6ba6e8 78%, #4080d8 100%);\r\n box-shadow:\r\n inset 0 1px 0 rgba(255, 255, 255, .9),\r\n inset 0 0 0 1px rgba(80, 133, 194, .14),\r\n 0 3px 10px rgba(48, 101, 165, .13);\r\n}\r\n.${FILL_CLASS} {\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n width: var(--dsh-tl-progress, 0%);\r\n border-radius: inherit;\r\n background: linear-gradient(90deg, #ffffff 0%, #d7eaff 18%, #75afea 54%, #0751ad 100%);\r\n transition: width 190ms cubic-bezier(.22, 1, .36, 1);\r\n display: none;\r\n}\r\nbody:not([data-ds-dark-theme]) .${FILL_CLASS} { display: block; }\r\n.${CANVAS_CLASS} {\r\n position: absolute;\r\n inset: 0;\r\n width: 100%;\r\n height: 100%;\r\n image-rendering: pixelated;\r\n mix-blend-mode: screen;\r\n pointer-events: none;\r\n transition: filter 140ms ease;\r\n}\r\n/* Screen only LIGHTENS — over the pale light-theme track it would wash the\r\n radiation out; paint it directly there. */\r\nbody:not([data-ds-dark-theme]) .${CANVAS_CLASS} { mix-blend-mode: normal; }\r\n.${FLARE_CLASS} {\r\n position: absolute;\r\n width: ${FLARE_W}px;\r\n height: ${FLARE_H}px;\r\n border-radius: 50%;\r\n background: radial-gradient(ellipse at 100% 50%, rgba(255,255,255,.96) 0 4%, rgba(188,189,255,.8) 11%, rgba(106,87,255,.5) 28%, rgba(105,31,255,.2) 49%, transparent 74%);\r\n filter: blur(1.5px) saturate(1.25);\r\n mix-blend-mode: screen;\r\n transform: translate(-100%, -50%);\r\n transition: left 70ms linear, filter 140ms ease;\r\n pointer-events: none;\r\n}\r\n.${FLARE_CLASS}::before,\r\n.${FLARE_CLASS}::after {\r\n content: \"\";\r\n position: absolute;\r\n inset: 50% auto auto 100%;\r\n border-radius: 999px;\r\n transform: translate(-50%, -50%);\r\n}\r\n.${FLARE_CLASS}::before {\r\n width: 52px;\r\n height: 1px;\r\n background: linear-gradient(90deg, transparent, rgba(100,160,255,.42), #f1ecff, rgba(193,82,255,.65), transparent);\r\n box-shadow: 0 0 7px #9b7cff, 0 0 13px rgba(72,132,255,.64);\r\n}\r\n.${FLARE_CLASS}::after {\r\n width: 1px;\r\n height: 20px;\r\n background: linear-gradient(180deg, transparent, rgba(196,190,255,.84), transparent);\r\n box-shadow: 0 0 7px #9c7cff;\r\n}\r\n.${ZONE_CLASS}[data-drag=\"1\"] .${CANVAS_CLASS} { filter: saturate(1.45) brightness(1.28) contrast(1.06); }\r\n.${ZONE_CLASS}[data-drag=\"1\"] .${FLARE_CLASS} { filter: blur(1.5px) saturate(1.6) brightness(1.42); transition: none; }\r\n.${KNOB_CLASS} {\r\n border-radius: 50%;\r\n background: #fff;\r\n border: 1px solid rgba(255, 255, 255, .94);\r\n box-shadow:\r\n 0 0 0 2px rgba(92, 105, 255, .12),\r\n 0 0 14px rgba(121, 82, 255, .48),\r\n 0 2px 7px rgba(0, 0, 0, .3);\r\n transition: left 190ms cubic-bezier(.22, 1, .36, 1), transform 160ms ease, box-shadow 180ms ease;\r\n}\r\n.${ZONE_CLASS}[data-drag=\"1\"] .${KNOB_CLASS} {\r\n transform: translateX(-50%) scale(1.07);\r\n transition: none;\r\n box-shadow:\r\n 0 0 0 3px rgba(113, 115, 255, .25),\r\n 0 0 20px rgba(74, 145, 255, .86),\r\n 0 0 31px rgba(171, 53, 255, .66),\r\n 0 3px 8px rgba(0, 0, 0, .32);\r\n}\r\n.${ZONE_CLASS}[data-top=\"1\"] .${TRACK_CLASS} { animation: dsh-tl-dark-breathe 1.9s ease-in-out infinite; }\r\n@keyframes dsh-tl-dark-breathe {\r\n 0%, 100% { box-shadow: inset 0 1px 0 rgba(196,204,255,.16), 0 3px 10px rgba(18,25,72,.4); }\r\n 50% { box-shadow: inset 0 1px 0 rgba(220,214,255,.24), 0 0 21px rgba(111,66,255,.5); }\r\n}\r\nbody:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top=\"1\"] .${TRACK_CLASS} { animation-name: dsh-tl-light-breathe; }\r\n@keyframes dsh-tl-light-breathe {\r\n 0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(67,124,193,.16), 0 3px 10px rgba(48,101,165,.13); }\r\n 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(67,124,193,.22), 0 3px 10px rgba(31,102,190,.22), 0 0 19px rgba(31,105,201,.24); }\r\n}\r\n.${RUN_CLASS} { animation: ${RUN_KEYFRAMES} 0.72s steps(8, end) infinite alternate; }\r\n@keyframes ${RUN_KEYFRAMES} {\r\n from { background-position-x: 0; }\r\n to { background-position-x: -${STRIP_CSS_W}px; }\r\n}\r\n.${GIRL_CLASS} {\r\n filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .28)) drop-shadow(0 0 5px rgba(92, 105, 255, .34));\r\n transform-origin: 50% 68%;\r\n transition: left 190ms cubic-bezier(.22, 1, .36, 1);\r\n}\r\n.${ZONE_CLASS}[data-drag=\"1\"] .${GIRL_CLASS} {\r\n animation-duration: 0.42s;\r\n transition: none;\r\n filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .28)) drop-shadow(0 0 8px rgba(87, 137, 255, .68));\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .${ZONE_CLASS}[data-top=\"1\"] .${TRACK_CLASS} { animation: none; }\r\n .${RUN_CLASS} { animation: none; }\r\n .${FLARE_CLASS}, .${FILL_CLASS}, .${KNOB_CLASS} { transition: none; }\r\n}\r\n`\r\n\r\nlet styleInjected = false\r\n\r\n/** Inject the effect stylesheet once per document. */\r\nfunction ensureEffectStyle(): void {\r\n if (styleInjected || document.getElementById(KEYFRAMES_ID) !== null) {\r\n styleInjected = true\r\n return\r\n }\r\n const style = document.createElement('style')\r\n style.id = KEYFRAMES_ID\r\n style.textContent = EFFECT_CSS\r\n document.head.appendChild(style)\r\n styleInjected = true\r\n}\r\n\r\nconst clamp01 = (value: number): number => Math.min(1, Math.max(0, value))\r\n\r\n/* ── the radiation canvas (ported from dsh-reasoning-effort) ────────────── */\r\n\r\ninterface RadiationState {\r\n /** Thumb x in canvas CSS px (already padded). */\r\n origin: number\r\n dragging: boolean\r\n}\r\n\r\n/**\r\n * Draw one frame of the track FX: sine-wave columns with a sharp crest and an\r\n * exponential trail decaying from the thumb, a 4px pixel grid with grain and a\r\n * radial halo around the thumb, particle streaks streaming LEFT, and a radial\r\n * glow at the origin — everything clipped LEFT of the thumb, theme-split by\r\n * the harness `data-ds-dark-theme` body attribute.\r\n */\r\nfunction drawRadiation(\r\n context: CanvasRenderingContext2D,\r\n width: number,\r\n height: number,\r\n time: number,\r\n state: RadiationState,\r\n): void {\r\n const origin = state.origin\r\n const isDark = document.body.hasAttribute('data-ds-dark-theme')\r\n const cell = 4\r\n const speed = state.dragging ? 2.8 : 1\r\n context.clearRect(0, 0, width, height)\r\n if (origin <= 0) return\r\n context.save()\r\n context.beginPath()\r\n context.rect(0, 0, origin, height)\r\n context.clip()\r\n for (let x = 0; x < origin; x += cell) {\r\n const delta = x + cell * 0.5 - origin\r\n const distance = Math.abs(delta)\r\n const phaseA = distance / 10 - time * 74e-4 * speed\r\n const phaseB = distance / 23 - time * 41e-4 * speed + 1.7\r\n const phaseC = distance / 40 - time * 22e-4 * speed + 3.4\r\n const sinA = Math.max(0, Math.sin(phaseA))\r\n const sinB = Math.max(0, Math.sin(phaseB))\r\n const sinC = Math.max(0, Math.sin(phaseC))\r\n const waveA = Math.pow(sinA, 2.6)\r\n const waveB = Math.pow(sinB, 3.2)\r\n const waveC = Math.pow(sinC, 4)\r\n const crest = Math.pow(sinA, 15) + Math.pow(sinB, 18) * 0.78\r\n const wave = Math.min(1, waveA * 0.76 + waveB * 0.58 + waveC * 0.32)\r\n const trail = 0.38 + 0.62 * Math.exp(-distance / Math.max(55, width * 0.72))\r\n const pillar = Math.pow(Math.max(0, Math.sin(x / 20 + time * 16e-4)), 3) * 0.27\r\n const columnEnergy = trail * (wave * 1.04 + pillar + crest * 0.32)\r\n if (columnEnergy > 0.012) {\r\n const nearness = Math.max(0, 1 - distance / Math.max(1, width * 0.78))\r\n const red = isDark ? Math.round(42 + 124 * nearness + 75 * wave) : Math.round(28 + 58 * nearness + 15 * wave)\r\n const green = isDark ? Math.round(56 + 58 * nearness + 44 * crest) : Math.round(88 + 72 * nearness + 30 * crest)\r\n const blue = isDark ? Math.round(175 + 72 * nearness + 8 * wave) : Math.round(182 + 62 * nearness)\r\n const alpha = isDark ? Math.min(0.88, columnEnergy * 0.72) : Math.min(0.9, columnEnergy * 0.85)\r\n context.fillStyle = `rgba(${red}, ${green}, ${blue}, ${alpha})`\r\n context.fillRect(x, 0, cell - 1, height)\r\n }\r\n for (let y = 0; y < height; y += cell) {\r\n const deltaY = y + cell * 0.5 - height * 0.5\r\n const radial = Math.hypot(delta / 38, deltaY / 11)\r\n const halo = Math.exp(-radial * 0.96) * 1.08\r\n const verticalShape = 0.58 + 0.42 * Math.cos(deltaY / height * Math.PI)\r\n const grain = 0.72 + 0.28 * Math.sin(x * 0.73 + y * 1.31 + time * 6e-3)\r\n const alpha = Math.min(0.96, (columnEnergy * 0.88 + halo + crest * 0.19) * verticalShape * grain)\r\n if (alpha < 0.035) continue\r\n const hot = Math.max(0, 1 - radial / 2.4)\r\n const red = isDark ? Math.round(54 + 148 * hot + 42 * wave + 35 * crest) : Math.round(20 + 92 * hot + 18 * wave)\r\n const green = isDark ? Math.round(68 + 78 * hot + 46 * crest) : Math.round(78 + 80 * hot + 30 * crest)\r\n const blue = isDark ? Math.round(186 + 64 * hot) : Math.round(188 + 62 * hot)\r\n context.fillStyle = `rgba(${red}, ${green}, ${blue}, ${isDark ? alpha : alpha * 0.95})`\r\n context.fillRect(x, y, cell - 1, cell - 1)\r\n }\r\n }\r\n for (let i = 0; i < 14; i += 1) {\r\n const travel = (time * (state.dragging ? 0.16 : 0.065) * (0.78 + i % 5 * 0.09) + i * 23) % Math.max(30, origin + 64)\r\n const particleX = origin - travel\r\n if (particleX < -24 || particleX > width + 16) continue\r\n const particleY = 3 + (i * 13 + Math.sin(time * 3e-3 + i) * 5) % Math.max(7, height - 6)\r\n const length = 4 + i % 4 * 4 + (state.dragging ? 6 : 0)\r\n const alpha = 0.28 + i % 5 * 0.1\r\n const streak = context.createLinearGradient(particleX, 0, particleX + length, 0)\r\n streak.addColorStop(0, isDark ? 'rgba(72,118,255,0)' : 'rgba(24,94,184,0)')\r\n streak.addColorStop(0.68, isDark ? `rgba(112,135,255,${alpha})` : `rgba(36,108,202,${alpha * 0.72})`)\r\n streak.addColorStop(1, isDark ? `rgba(236,222,255,${Math.min(1, alpha + 0.26)})` : `rgba(103,175,248,${Math.min(0.82, alpha + 0.18)})`)\r\n context.fillStyle = streak\r\n context.fillRect(particleX, particleY, length, i % 3 === 0 ? 2 : 1)\r\n }\r\n const glow = context.createRadialGradient(origin, height / 2, 0, origin, height / 2, 24)\r\n glow.addColorStop(0, isDark ? 'rgba(255,255,255,.82)' : 'rgba(255,255,255,.86)')\r\n glow.addColorStop(0.14, isDark ? 'rgba(183,190,255,.54)' : 'rgba(162,210,255,.48)')\r\n glow.addColorStop(0.44, isDark ? 'rgba(103,74,255,.28)' : 'rgba(37,112,207,.22)')\r\n glow.addColorStop(1, isDark ? 'rgba(86,31,210,0)' : 'rgba(25,91,181,0)')\r\n context.fillStyle = glow\r\n context.fillRect(origin - 26, 0, 52, height)\r\n context.restore()\r\n}\r\n\r\n/* ── inline styles (positioning only; looks live in the injected sheet) ─── */\r\n\r\nconst zoneStyle: CSSProperties = {\r\n position: 'relative',\r\n flex: '1 1 auto',\r\n minWidth: '100px',\r\n height: `${ZONE_H}px`,\r\n // Contain the screen-blended canvas/flare layers: they must blend with the\r\n // track only, never with sibling model rows, and the zone must not lose the\r\n // stacking race against neighboring popup content.\r\n isolation: 'isolate',\r\n zIndex: 1,\r\n touchAction: 'none',\r\n userSelect: 'none',\r\n WebkitUserSelect: 'none',\r\n}\r\n\r\nconst zoneDisabledStyle: CSSProperties = { ...zoneStyle, opacity: 0.55, cursor: 'default' }\r\nconst zoneActiveStyle: CSSProperties = { ...zoneStyle, cursor: 'pointer' }\r\n\r\nconst girlStyle: CSSProperties = {\r\n position: 'absolute',\r\n width: `${GIRL_W}px`,\r\n height: `${GIRL_H}px`,\r\n backgroundImage: `url(${WHALE_RUN_STRIP_SRC})`,\r\n backgroundSize: `${STRIP_CSS_W}px ${STRIP_CSS_H}px`,\r\n backgroundRepeat: 'no-repeat',\r\n transform: 'translateX(-50%)',\r\n pointerEvents: 'none',\r\n}\r\n\r\nconst knobStyle: CSSProperties = {\r\n position: 'absolute',\r\n width: `${KNOB}px`,\r\n height: `${KNOB}px`,\r\n transform: 'translateX(-50%)',\r\n pointerEvents: 'none',\r\n boxSizing: 'border-box',\r\n}\r\n\r\nconst labelStyle: CSSProperties = {\r\n position: 'absolute',\r\n bottom: '0',\r\n height: `${LABEL_H}px`,\r\n lineHeight: `${LABEL_H}px`,\r\n fontSize: '10px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n whiteSpace: 'nowrap',\r\n transform: 'translateX(-50%)',\r\n pointerEvents: 'none',\r\n}\r\n\r\nconst labelActiveStyle: CSSProperties = {\r\n ...labelStyle,\r\n color: 'var(--dsw-alias-state-business-primary)',\r\n fontWeight: 600,\r\n}\r\n\r\n/**\r\n * The effort slider for one model line. Renders `null` for an empty stop list —\r\n * a thrown render would abdicate the whole model-seat entry.\r\n */\r\nexport function EffortSlider({ stops, value, mascot, disabled, onCommit, t }: EffortSliderProps): JSX.Element | null {\r\n const [dragPos, setDragPos] = useState<number | null>(null)\r\n // Mirror for the pointer handlers: React state can lag one native event, which\r\n // would make a fast down→move→up gesture drop frames (or the release no-op).\r\n const dragRef = useRef<number | null>(null)\r\n const [keyIndex, setKeyIndex] = useState<number | null>(null)\r\n const canvasRef = useRef<HTMLCanvasElement | null>(null)\r\n // Live FX state for the canvas loop, immune to stale handler closures.\r\n const fractionRef = useRef(0)\r\n const draggingRef = useRef(false)\r\n const padRef = useRef(mascot ? PAD_MASCOT : PAD_KNOB)\r\n // Set by the canvas effect; one static frame per render under reduced motion.\r\n const redrawRef = useRef<(() => void) | null>(null)\r\n\r\n useEffect(() => {\r\n redrawRef.current?.()\r\n })\r\n\r\n /**\r\n * The canvas FX loop: dpr-aware resize, theme-following redraws, one rAF\r\n * frame per tick — or static single frames when the user prefers reduced\r\n * motion. Everything dies with the effect (the editor row unmount). Mounted\r\n * before the empty-stops early return: hooks must run unconditionally (with\r\n * no stops the canvas never renders and the effect no-ops).\r\n */\r\n useEffect(() => {\r\n const canvas = canvasRef.current\r\n if (canvas === null) return\r\n const context = canvas.getContext('2d')\r\n if (context === null) return\r\n const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)')\r\n let width = 1\r\n let height = 1\r\n let frame = 0\r\n const resize = (): void => {\r\n const bounds = canvas.getBoundingClientRect()\r\n const ratio = Math.min(window.devicePixelRatio || 1, 2)\r\n width = Math.max(1, bounds.width)\r\n height = Math.max(1, bounds.height)\r\n canvas.width = Math.max(1, Math.round(width * ratio))\r\n canvas.height = Math.max(1, Math.round(height * ratio))\r\n context.setTransform(ratio, 0, 0, ratio, 0, 0)\r\n }\r\n const draw = (time = performance.now()): void => {\r\n // The canvas fills the padded track, so the thumb's fraction maps\r\n // directly onto the canvas width (no extra pad offset here).\r\n drawRadiation(context, width, height, time, {\r\n origin: fractionRef.current * width,\r\n dragging: draggingRef.current,\r\n })\r\n }\r\n const loop = (time: number): void => {\r\n draw(time)\r\n frame = window.requestAnimationFrame(loop)\r\n }\r\n const redraw = (): void => {\r\n if (reducedMotion.matches) draw()\r\n }\r\n const resizeObserver = new ResizeObserver(() => {\r\n resize()\r\n draw()\r\n })\r\n const themeObserver = new MutationObserver(() => draw())\r\n resizeObserver.observe(canvas)\r\n themeObserver.observe(document.body, { attributes: true, attributeFilter: ['data-ds-dark-theme'] })\r\n redrawRef.current = redraw\r\n resize()\r\n draw()\r\n if (!reducedMotion.matches) frame = window.requestAnimationFrame(loop)\r\n return () => {\r\n window.cancelAnimationFrame(frame)\r\n resizeObserver.disconnect()\r\n themeObserver.disconnect()\r\n redrawRef.current = null\r\n }\r\n }, [])\r\n\r\n if (stops.length === 0) return null\r\n ensureEffectStyle()\r\n\r\n const pad = mascot ? PAD_MASCOT : PAD_KNOB\r\n padRef.current = pad\r\n const count = stops.length\r\n const indexOf = (fraction: number): number =>\r\n count <= 1 ? 0 : Math.min(count - 1, Math.max(0, Math.round(fraction * (count - 1))))\r\n const fractionOf = (index: number): number => (count <= 1 ? 0 : index / (count - 1))\r\n\r\n const committedIndex = nearestEffortStopIndex(stops, value)\r\n const shownFraction = dragPos ?? fractionOf(keyIndex ?? committedIndex)\r\n const shownIndex = indexOf(shownFraction)\r\n fractionRef.current = shownFraction\r\n draggingRef.current = dragPos !== null\r\n\r\n /** Pointer → 0..1 fraction within the padded rail of the zone's box. */\r\n const fractionFromEvent = (event: ReactPointerEvent<HTMLDivElement>): number => {\r\n const rect = event.currentTarget.getBoundingClientRect()\r\n if (rect.width <= 2 * pad) return 0\r\n return clamp01((event.clientX - rect.left - pad) / (rect.width - 2 * pad))\r\n }\r\n\r\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>): void => {\r\n if (disabled) return\r\n event.preventDefault()\r\n event.stopPropagation()\r\n event.currentTarget.setPointerCapture(event.pointerId)\r\n const fraction = fractionFromEvent(event)\r\n dragRef.current = fraction\r\n setDragPos(fraction)\r\n }\r\n\r\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>): void => {\r\n if (disabled || dragRef.current === null) return\r\n event.stopPropagation()\r\n const fraction = fractionFromEvent(event)\r\n dragRef.current = fraction\r\n setDragPos(fraction)\r\n }\r\n\r\n const settle = (event: ReactPointerEvent<HTMLDivElement>): void => {\r\n if (disabled || dragRef.current === null) return\r\n event.stopPropagation()\r\n const index = indexOf(dragRef.current)\r\n dragRef.current = null\r\n setDragPos(null)\r\n const id = stops[index]?.id\r\n if (id !== undefined && id !== value) onCommit(id)\r\n }\r\n\r\n const onKeyDown = (event: ReactKeyboardEvent<HTMLDivElement>): void => {\r\n if (disabled) return\r\n const current = keyIndex ?? committedIndex\r\n let next: number | undefined\r\n if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') next = Math.max(0, current - 1)\r\n else if (event.key === 'ArrowRight' || event.key === 'ArrowUp') next = Math.min(count - 1, current + 1)\r\n else if (event.key === 'Home') next = 0\r\n else if (event.key === 'End') next = count - 1\r\n else return\r\n event.preventDefault()\r\n event.stopPropagation()\r\n setKeyIndex(next)\r\n }\r\n\r\n const onKeyUp = (event: ReactKeyboardEvent<HTMLDivElement>): void => {\r\n if (disabled || keyIndex === null) return\r\n const moved = event.key === 'ArrowLeft' || event.key === 'ArrowRight'\r\n || event.key === 'ArrowUp' || event.key === 'ArrowDown'\r\n || event.key === 'Home' || event.key === 'End'\r\n event.stopPropagation()\r\n if (!moved) return\r\n const id = stops[keyIndex]?.id\r\n setKeyIndex(null)\r\n if (id !== undefined && id !== value) onCommit(id)\r\n }\r\n\r\n /**\r\n * Tick/label/thumb x position inside the padded rail (percent of the zone).\r\n */\r\n const at = (fraction: number): string =>\r\n `calc(${pad}px + ${fraction} * (100% - ${2 * pad}px))`\r\n\r\n const dragging = dragPos !== null\r\n\r\n return (\r\n <div\r\n role=\"slider\"\r\n className={ZONE_CLASS}\r\n tabIndex={disabled ? -1 : 0}\r\n aria-label={t('input.effort.title')}\r\n aria-valuemin={0}\r\n aria-valuemax={count - 1}\r\n aria-valuenow={shownIndex}\r\n aria-valuetext={stops[shownIndex]?.name ?? stops[committedIndex]?.id ?? ''}\r\n data-drag={dragging ? '1' : '0'}\r\n data-top={shownIndex === count - 1 ? '1' : '0'}\r\n style={disabled ? zoneDisabledStyle : zoneActiveStyle}\r\n onPointerDown={onPointerDown}\r\n onPointerMove={onPointerMove}\r\n onPointerUp={settle}\r\n onPointerCancel={settle}\r\n onKeyDown={onKeyDown}\r\n onKeyUp={onKeyUp}\r\n >\r\n <div\r\n className={TRACK_CLASS}\r\n style={{\r\n position: 'absolute',\r\n left: `${pad}px`,\r\n right: `${pad}px`,\r\n bottom: `${TRACK_B}px`,\r\n height: `${TRACK_H}px`,\r\n // Drives the light-theme progress fill (dark theme is canvas-carried).\r\n '--dsh-tl-progress': `${shownFraction * 100}%`,\r\n } as CSSProperties}\r\n >\r\n <div className={FILL_CLASS} />\r\n <canvas ref={canvasRef} className={CANVAS_CLASS} />\r\n {/* Flare lives INSIDE the track: the pill's overflow:hidden clips the\r\n glow to the pill (it used to bleed above/beside it). Left is the\r\n fraction of the padded rail = percent of the track width. */}\r\n <div\r\n className={FLARE_CLASS}\r\n style={{ left: `${shownFraction * 100}%`, top: '50%' }}\r\n />\r\n {/* Interior stops only: the rounded end caps swallow edge dots. */}\r\n {stops.slice(1, -1).map((stop, offset) => {\r\n const index = offset + 1\r\n return (\r\n <div\r\n key={stop.id}\r\n style={{\r\n position: 'absolute',\r\n bottom: `${TRACK_H / 2 - 3.5}px`,\r\n left: `${(index / Math.max(1, count - 1)) * 100}%`,\r\n width: '7px',\r\n height: '7px',\r\n borderRadius: '50%',\r\n background: '#fff',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n boxSizing: 'border-box',\r\n transform: 'translateX(-50%)',\r\n pointerEvents: 'none',\r\n zIndex: 2,\r\n opacity: index <= shownIndex ? 1 : 0.65,\r\n }}\r\n />\r\n )\r\n })}\r\n </div>\r\n {mascot\r\n ? (\r\n <div\r\n className={`${RUN_CLASS} ${GIRL_CLASS}`}\r\n style={{ ...girlStyle, left: at(shownFraction), bottom: `${GIRL_B}px` }}\r\n />\r\n )\r\n : (\r\n <div\r\n className={KNOB_CLASS}\r\n style={{ ...knobStyle, left: at(shownFraction), bottom: `${TRACK_B + TRACK_H / 2 - KNOB / 2}px` }}\r\n />\r\n )}\r\n {count <= 6 && stops.map((stop, index) => (\r\n <div\r\n key={stop.id}\r\n style={{\r\n ...(index === shownIndex ? labelActiveStyle : labelStyle),\r\n left: at(fractionOf(index)),\r\n }}\r\n >\r\n {stop.name}\r\n </div>\r\n ))}\r\n </div>\r\n )\r\n}\r\n\r\nexport default EffortSlider\r\n","/**\n * Pure context-window helpers for the dsh-thinking-levels plugin.\n *\n * The context-window limit of a custom gateway model is declared in the\n * llm-pi-ai model entry (`contextWindow`, a positive integer). The harness\n * consumes it through `resolveModelInfo(...).context.contextWindow` for\n * compaction thresholds, context-overflow detection and context-pressure\n * projections — a settings write takes effect on the next request without a\n * restart. This module centralizes the legal range, the common presets and\n * the display formatting shared by the config schema, the settings card and\n * the tests. Kept dependency-free (pure inputs -> output).\n */\n\n/** Smallest accepted context window (tokens), aligned with dsh-thinking-effort. */\nexport const CONTEXT_WINDOW_MIN = 2000\n/** Largest accepted context window (tokens), e.g. third-party DeepSeek 1M. */\nexport const CONTEXT_WINDOW_MAX = 1_000_000\n\n/** One selectable context-window preset. */\nexport interface ContextWindowPreset {\n /** Human-readable label shown on the card button and the model badge. */\n label: string\n /** The token count written to the llm-pi-ai model entry. */\n value: number\n}\n\n/** The multi-level context-window presets, in ascending order. */\nexport const CONTEXT_WINDOW_PRESETS: readonly ContextWindowPreset[] = [\n { label: '64K', value: 64_000 },\n { label: '128K', value: 131_072 },\n { label: '256K', value: 256_000 },\n { label: '400K', value: 400_000 },\n { label: '512K', value: 524_288 },\n { label: '1M', value: 1_000_000 },\n] as const\n\n/** Format a token count as a readable label (exact presets keep their label). */\nexport function formatContextWindow(value: number): string {\n const preset = CONTEXT_WINDOW_PRESETS.find(candidate => candidate.value === value)\n if (preset !== undefined) return preset.label\n if (value >= CONTEXT_WINDOW_MAX) return '1M'\n if (value >= 1024) return `${Math.round(value / 1024)}K`\n return String(value)\n}\n\n/** The result of validating a context-window value. */\nexport type ContextWindowValidation =\n | { ok: true; value: number }\n | { ok: false; reason: 'integer' | 'range' }\n\n/**\n * Validate a context-window candidate (number or numeric string). Accepts only\n * base-10 integers inside [CONTEXT_WINDOW_MIN, CONTEXT_WINDOW_MAX]; anything\n * else (float, 'abc', '1e3', out-of-range) is rejected with a reason.\n */\nexport function validateContextWindow(value: unknown): ContextWindowValidation {\n const raw = typeof value === 'string' ? value.trim() : value\n const asString = typeof raw === 'string' ? raw : String(raw)\n if (!/^\\d+$/.test(asString)) return { ok: false, reason: 'integer' }\n const numeric = Number(asString)\n if (!Number.isSafeInteger(numeric)) return { ok: false, reason: 'integer' }\n if (numeric < CONTEXT_WINDOW_MIN || numeric > CONTEXT_WINDOW_MAX) {\n return { ok: false, reason: 'range' }\n }\n return { ok: true, value: numeric }\n}\n","/**\r\n * Model-seat panel for the composer (`conversation.input.model`).\r\n *\r\n * Why this seat: the shipped `ModelSelect` renders no slots inside its popup,\r\n * so a plugin can never contribute *into* that panel — the working pattern\r\n * (proven by dsh-reasoning-effort) is to occupy the model seat itself: one\r\n * registered entry named after the seat with `priority: -1` replaces the\r\n * shipped trigger and popup outright. This component then renders its own\r\n * picker over the harness's shared model directory (`modelDirectories`\r\n * service), so model switching keeps working, and adds what the official\r\n * popup cannot offer: a context-window editor on every model line.\r\n *\r\n * Per-line context window (the \"max context window\" moved into each line):\r\n * each model row carries a compact chip showing the model's effective\r\n * `contextWindow`; clicking it opens an inline editor row (preset slider,\r\n * custom-integer input, Clear). Writes follow the same two-family discipline\r\n * the retired composer pill used (both consumed live by\r\n * `resolveModelInfo(...).context.contextWindow`, effective on the next\r\n * request without a restart):\r\n * - Custom gateways (`llm-pi-ai` providers): writes the model entry's\r\n * `contextWindow` under `providers[provider].models[i]`; a gateway model\r\n * missing from the config has no write target and renders the chip disabled.\r\n * - Official DeepSeek (`deepseek-official`, the `llm-deepseek` entry): writes\r\n * the catalog model's `contextWindow` when listed, otherwise caps via\r\n * `defaultContextWindow`.\r\n *\r\n * Per-line reasoning effort (the 改造 panel): the retired per-line `<select>`\r\n * became an effort chip that expands an inline segment slider\r\n * (`EffortSlider`) under the model line — stop count adapts to the model's\r\n * advertised efforts, `auto` sits leftmost, the thumb follows the pointer and\r\n * snaps on release. DeepSeek lines run the whale-girl runner strip as the\r\n * thumb (`isDeepSeekLine`); every other model gets the plain white knob. The\r\n * select's \"provider default\" reset survives as the ↺ button of the slider\r\n * row (submits the declared `defaultEffort`).\r\n *\r\n * Graceful degradation: when the harness provides no `modelDirectories`\r\n * service (older lines) the registration is skipped entirely and the shipped\r\n * model selector stays untouched.\r\n */\r\nimport { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react'\r\nimport type { CSSProperties, JSX } from 'react'\r\nimport type { SettingsScope } from './scope-face.ts'\r\nimport { ContextRing } from './context-ring.tsx'\r\nimport { EffortSlider } from './effort-slider.tsx'\r\nimport { orderEffortsForSlider } from '../thinking-level.ts'\r\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\r\n\r\n/** The official DeepSeek provider route owned by the llm-deepseek adapter. */\r\nconst DEEPSEEK_PROVIDER = 'deepseek-official'\r\n/** llm-deepseek's native default context capacity (DEFAULT_CONTEXT_WINDOW).\r\n * exported for the settings-card editor (4.4.0, takeoverUi off). */\r\nexport const DEEPSEEK_DEFAULT_WINDOW = 1_000_000\r\n/** Slider stop an unset window parks on: the thumb needs a position, the readout stays \"unset\". */\r\nconst UNSET_STOP_INDEX = CONTEXT_WINDOW_PRESETS.findIndex(preset => preset.value === 256_000)\r\n\r\n/**\r\n * Whether one model line gets the whale-girl runner thumb: the official\r\n * DeepSeek route plus any gateway model whose id or display name says\r\n * deepseek (custom \"DeepSeek\"-named providers). Every other line gets the\r\n * plain white knob.\r\n */\r\nconst isDeepSeekLine = (provider: string, modelId: string, name: string | undefined): boolean =>\r\n provider === DEEPSEEK_PROVIDER || /deepseek/i.test(modelId) || /deepseek/i.test(name ?? '')\r\n\r\n/** Snapshot shown when the session's directory face is unavailable. */\r\nconst UNAVAILABLE_STATE: ModelDirectoryState = {\r\n status: 'loading',\r\n groups: [],\r\n current: null,\r\n error: null,\r\n}\r\n\r\n/**\r\n * The absent-own-settings-scope snapshot: a module-level CONSTANT —\r\n * `useSyncExternalStore` demands a stable getSnapshot value, an inline\r\n * literal re-renders forever (the #185 pattern proven on the capability\r\n * card's transport face).\r\n */\r\nconst TL_ABSENT_SNAPSHOT = Object.freeze({\r\n status: 'unavailable' as const,\r\n value: undefined,\r\n revision: undefined,\r\n writable: false,\r\n base: undefined,\r\n user: undefined,\r\n mode: 'memory' as const,\r\n})\r\n\r\n/** One injected face: the shared model directory plus the two config forms. */\r\nexport interface ModelPanelInjected {\r\n /**\r\n * The session's shared model directory store, loader and selector.\r\n * Undefined when the resolver refused this session (odd session shape):\r\n * the panel renders its unavailable notice instead of crashing — a thrown\r\n * render abdicates the seat entry and the shipped selector comes back.\r\n */\r\n directory: ModelDirectoryFace | undefined\r\n /** The `llm-pi-ai` config form (custom gateway models). */\r\n piAiScope: SettingsScope<unknown>\r\n /** The `llm-deepseek` config form (official DeepSeek models). */\r\n deepseekScope: SettingsScope<unknown>\r\n /**\r\n * The plugin's OWN settings scope: the trigger chip reads the configured\r\n * `level` as the user-intent source (issue #5). Absent on hosts without the\r\n * settings channel — the chip then falls back to the directory value.\r\n */\r\n tlScope?: SettingsScope<unknown>\r\n /**\r\n * The effort the session's last committed request actually carried, folded\r\n * from our own `tlAutoSchedule` projection (issue #11). Undefined when the\r\n * projection channel is absent or the session has no committed request yet —\r\n * the chip then shows the plain intent label.\r\n *\r\n * Distinct from `directory.current.reasoningEffort`, which is the host's\r\n * `modelSelection.next` (user intent): with `auto` selected that value stays\r\n * `'auto'` forever, which is exactly why the chip used to show \"Auto\" while\r\n * requests went out as `high`.\r\n */\r\n lastEffectiveEffort?: string\r\n}\r\n\r\n/** Full props: the injected face + the session standard seat + locale copy. */\r\nexport interface ModelPanelProps extends ModelPanelInjected {\r\n /** The session id of the slot's owning conversation (standard seat). */\r\n sessionId: string\r\n /** Locale copy thunk. */\r\n t: (key: string) => string\r\n}\r\n\r\n/* ── shared inline styling (no CSS modules in the client bundle) ───────── */\r\n\r\nconst rootStyle: CSSProperties = { position: 'relative', display: 'inline-flex' }\r\n\r\nconst triggerStyle: CSSProperties = {\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n gap: '6px',\r\n height: '26px',\r\n padding: '0 10px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '8px',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n cursor: 'pointer',\r\n whiteSpace: 'nowrap',\r\n maxWidth: '220px',\r\n}\r\n\r\nconst triggerNameStyle: CSSProperties = {\r\n minWidth: 0,\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n}\r\n\r\nconst triggerEffortStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n maxWidth: '72px',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\nconst chevronStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n fontSize: '9px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\nconst popStyle: CSSProperties = {\r\n position: 'absolute',\r\n bottom: 'calc(100% + 8px)',\r\n left: '0',\r\n // Above host chrome (the composer tool rows render z-indexed FABs); capped\r\n // by the viewport so a narrow chat column can still reach every row.\r\n zIndex: 1300,\r\n width: 'min(320px, calc(100vw - 24px))',\r\n padding: '8px',\r\n background: 'var(--dsw-alias-bg-layer-3)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '10px',\r\n boxShadow: '0 8px 28px rgba(0,0,0,0.18)',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '4px',\r\n}\r\n\r\nconst backdropStyle: CSSProperties = { position: 'fixed', inset: 0, zIndex: 1299 }\r\n\r\nconst modelsStyle: CSSProperties = { maxHeight: '320px', overflowY: 'auto', display: 'flex', flexDirection: 'column', gap: '2px' }\r\n\r\nconst providerToggleStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '6px',\r\n width: '100%',\r\n padding: '6px 8px',\r\n border: 'none',\r\n borderRadius: '6px',\r\n background: 'transparent',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n font: 'inherit',\r\n fontSize: '12px',\r\n cursor: 'pointer',\r\n textAlign: 'left',\r\n}\r\n\r\nconst providerNameStyle: CSSProperties = { flex: '1 1 auto', fontWeight: 600 }\r\n\r\nconst providerMetaStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n fontSize: '11px',\r\n}\r\n\r\n/** The model-line row CONTAINER: highlight surface + flex parent of pick/select/chip.\r\n* Wraps so the inline window editor (a flex item too) takes its own full line. */\r\nconst modelRowStyle: CSSProperties = {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n alignItems: 'center',\r\n gap: '6px',\r\n width: '100%',\r\n borderRadius: '6px',\r\n}\r\n\r\nconst modelRowActiveStyle: CSSProperties = {\r\n ...modelRowStyle,\r\n background: 'var(--dsw-alias-state-business-primary-weak, var(--dsw-alias-interactive-bg-hover, transparent))',\r\n}\r\n\r\n/** The pick button inside the row: name/description/✓, keeps the row's old padding. */\r\nconst modelPickStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n minWidth: 0,\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '6px',\r\n padding: '6px 4px 6px 18px',\r\n border: 'none',\r\n background: 'transparent',\r\n color: 'var(--dsw-alias-label-primary)',\r\n font: 'inherit',\r\n fontSize: '12px',\r\n cursor: 'pointer',\r\n textAlign: 'left',\r\n}\r\n\r\nconst modelCopyStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n minWidth: 0,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '1px',\r\n}\r\n\r\nconst modelNameStyle: CSSProperties = { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }\r\n\r\nconst checkStyle: CSSProperties = { flex: '0 0 auto', color: 'var(--dsw-alias-state-business-primary)' }\r\n\r\nconst chipStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n height: '18px',\r\n padding: '0 6px',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '5px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontVariantNumeric: 'tabular-nums',\r\n cursor: 'pointer',\r\n whiteSpace: 'nowrap',\r\n marginRight: '8px',\r\n}\r\n\r\nconst chipDisabledStyle: CSSProperties = { ...chipStyle, cursor: 'default', opacity: 0.55 }\r\n\r\n/** The per-line effort chip (ex-select): shows the line's effective level name. */\r\nconst effortChipStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n height: '18px',\r\n maxWidth: '96px',\r\n padding: '0 6px',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '5px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n cursor: 'pointer',\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n userSelect: 'none',\r\n}\r\n\r\nconst editorRowStyle: CSSProperties = {\r\n flex: '1 1 100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '6px',\r\n margin: '2px 8px 6px 18px',\r\n padding: '6px',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '6px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n fontSize: '12px',\r\n // Stack above the neighboring model rows: the slider's girl/flare layers\r\n // must not lose the paint order against the row containers below it.\r\n position: 'relative',\r\n zIndex: 2,\r\n}\r\n\r\nconst labelStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n whiteSpace: 'nowrap',\r\n}\r\n\r\nconst sliderStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n minWidth: '48px',\r\n maxWidth: '170px',\r\n height: '14px',\r\n margin: '0',\r\n padding: '0',\r\n accentColor: 'var(--dsw-alias-state-business-primary)',\r\n cursor: 'pointer',\r\n}\r\n\r\nconst valueStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n minWidth: '24px',\r\n textAlign: 'right',\r\n color: 'var(--dsw-alias-label-primary)',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontVariantNumeric: 'tabular-nums',\r\n}\r\n\r\nconst actionButtonStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n height: '18px',\r\n padding: '0 6px',\r\n border: '1px solid transparent',\r\n borderRadius: '4px',\r\n background: 'transparent',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n font: 'inherit',\r\n cursor: 'pointer',\r\n}\r\n\r\nconst inputStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n padding: '2px 6px',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '5px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n font: 'inherit',\r\n}\r\n\r\nconst errorStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n color: 'var(--dsw-alias-state-error-primary)',\r\n fontSize: '11px',\r\n}\r\n\r\nconst statusStyle: CSSProperties = {\r\n padding: '10px 8px',\r\n fontSize: '12px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\nconst errorBannerStyle: CSSProperties = {\r\n padding: '6px 8px',\r\n borderRadius: '6px',\r\n background: 'var(--dsw-alias-interactive-bg-hover-danger)',\r\n color: 'var(--dsw-alias-state-error-primary)',\r\n fontSize: '11px',\r\n}\r\n\r\n/* ── helpers over the settings user layer ──────────────────────────────── */\r\n\r\n/** The user-layer `providers` value of the llm-pi-ai namespace, when present. */\r\nfunction providersOf(snapshot: unknown): Record<string, unknown> {\r\n if (typeof snapshot !== 'object' || snapshot === null) return {}\r\n // 0.1.7+ snapshots carry the user layer; ≤0.1.6 settingsScope snapshots\r\n // carry the merged section as `value` — read whichever the host provides.\r\n const user = (snapshot as { user?: unknown }).user\r\n ?? (snapshot as { value?: unknown }).value\r\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\r\n const providers = (user as Record<string, unknown>)['providers']\r\n return typeof providers === 'object' && providers !== null && !Array.isArray(providers)\r\n ? providers as Record<string, unknown>\r\n : {}\r\n}\r\n\r\n/** The user-layer `models`/`defaultContextWindow` of the llm-deepseek namespace. */\r\nexport function deepseekSectionOf(snapshot: unknown): {\r\n models?: Record<string, unknown>[]\r\n defaultContextWindow?: number\r\n} {\r\n if (typeof snapshot !== 'object' || snapshot === null) return {}\r\n const user = (snapshot as { user?: unknown }).user\r\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\r\n const section = user as { models?: unknown; defaultContextWindow?: unknown }\r\n const models = Array.isArray(section.models)\r\n ? section.models.filter((model): model is Record<string, unknown> =>\r\n typeof model === 'object' && model !== null && !Array.isArray(model))\r\n : undefined\r\n const defaultContextWindow = typeof section.defaultContextWindow === 'number'\r\n ? section.defaultContextWindow\r\n : undefined\r\n return {\r\n ...models === undefined ? {} : { models },\r\n ...defaultContextWindow === undefined ? {} : { defaultContextWindow },\r\n }\r\n}\r\n\r\n/** One model entry's declared contextWindow, when present. */\r\nexport function contextWindowOf(model: Record<string, unknown>): number | undefined {\r\n const value = model['contextWindow']\r\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : undefined\r\n}\r\n\r\n/** A provider's model entry in the llm-pi-ai user layer, when present. */\r\nfunction piModelEntry(\r\n providers: Record<string, unknown>,\r\n provider: string,\r\n model: string,\r\n): Record<string, unknown> | undefined {\r\n const profile = providers[provider] as { models?: unknown[] } | undefined\r\n const entry = profile !== undefined && Array.isArray(profile.models)\r\n ? profile.models.find((candidate): candidate is Record<string, unknown> =>\r\n typeof candidate === 'object' && candidate !== null && (candidate as Record<string, unknown>)['id'] === model)\r\n : undefined\r\n return entry\r\n}\r\n\r\n/** The slider stop nearest to a committed token count. */\r\nfunction stopIndexOf(value: number | undefined): number {\r\n if (value === undefined) return Math.max(0, UNSET_STOP_INDEX)\r\n let best = 0\r\n let bestDistance = Number.POSITIVE_INFINITY\r\n CONTEXT_WINDOW_PRESETS.forEach((preset, index) => {\r\n const distance = Math.abs(preset.value - value)\r\n if (distance < bestDistance) {\r\n bestDistance = distance\r\n best = index\r\n }\r\n })\r\n return best\r\n}\r\n\r\n/**\r\n * The model-seat panel: replaces the shipped model selector on this seat and\r\n * renders one picker whose every model line carries a context-window chip\r\n * (the \"max context window\" editor moved into each line).\r\n * @param props - injected directory + config forms, session seat, copy.\r\n */\r\nexport function ModelPanel({ directory, piAiScope, deepseekScope, tlScope, sessionId, lastEffectiveEffort, t }: ModelPanelProps): JSX.Element {\r\n const state = useSyncExternalStore(\r\n listener => directory?.store.subscribe(listener) ?? (() => {}),\r\n () => directory?.store.getSnapshot() ?? UNAVAILABLE_STATE,\r\n )\r\n const piSnapshot = useSyncExternalStore(\r\n listener => piAiScope.subscribe(listener),\r\n () => piAiScope.getSnapshot(),\r\n )\r\n const dsSnapshot = useSyncExternalStore(\r\n listener => deepseekScope.subscribe(listener),\r\n () => deepseekScope.getSnapshot(),\r\n )\r\n const tlSnapshot = useSyncExternalStore(\r\n listener => tlScope?.subscribe(listener) ?? (() => {}),\r\n () => (tlScope === undefined ? TL_ABSENT_SNAPSHOT : tlScope.getSnapshot()),\r\n )\r\n /** The configured default level: the chip's user-intent fallback (issue #5). */\r\n const configLevel = (tlSnapshot.status === 'ready'\r\n ? (tlSnapshot.value as { level?: string } | undefined)?.level\r\n : undefined) ?? 'auto'\r\n\r\n /**\r\n * The effort explicitly picked in THIS mount — the authoritative intent\r\n * until the session changes (issue #5). The directory's merged `current`\r\n * cannot tell a persisted `auto` pending from a scheduler-resolved wire\r\n * level apart; a local pick can, so it wins whenever it exists.\r\n */\r\n const selectedEffortRef = useRef<string | undefined>(undefined)\r\n\r\n const [open, setOpen] = useState(false)\r\n const [expanded, setExpanded] = useState<ReadonlySet<string>>(() => new Set())\r\n // One inline editor at a time: the context-window editor or the effort slider,\r\n // expanded under their own model line (the row wraps it onto its own line).\r\n const [editing, setEditing] = useState<{ provider: string; model: string; kind: 'context' | 'effort' } | null>(null)\r\n const [draft, setDraft] = useState<number | null>(null)\r\n const [custom, setCustom] = useState(false)\r\n const [raw, setRaw] = useState('')\r\n const [error, setError] = useState<string | null>(null)\r\n const [busy, setBusy] = useState(false)\r\n // Popup filter query (issue #3: the official popup's search must survive\r\n // the takeover; the threshold `> 4` mirrors the shipped selector's rule).\r\n const [query, setQuery] = useState('')\r\n const rootRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n if (!open) return\r\n directory?.load().catch(() => { /* surfaced on the shared store */ })\r\n }, [directory, open])\r\n\r\n // Intent is per-session: a new conversation starts with no local pick.\r\n useEffect(() => { selectedEffortRef.current = undefined }, [sessionId])\r\n\r\n const close = useCallback((): void => {\r\n setOpen(false)\r\n setEditing(null)\r\n setError(null)\r\n setQuery('')\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (!open) return\r\n const onOutside = (event: globalThis.MouseEvent): void => {\r\n const target = event.target\r\n if (target instanceof Node && rootRef.current?.contains(target)) return\r\n close()\r\n }\r\n document.addEventListener('mousedown', onOutside)\r\n return () => document.removeEventListener('mousedown', onOutside)\r\n }, [close, open])\r\n\r\n const writable = piSnapshot.status === 'ready' && piSnapshot.writable\r\n && dsSnapshot.status === 'ready' && dsSnapshot.writable\r\n\r\n const current = useMemo(() => {\r\n if (state.current === null) return undefined\r\n for (const group of state.groups) {\r\n if (group.id !== state.current.provider) continue\r\n const model = group.models.find(candidate => candidate.id === state.current?.model)\r\n if (model !== undefined) return { model, name: model.name, provider: group.id }\r\n }\r\n return undefined\r\n }, [state])\r\n\r\n const providers = useMemo(() => providersOf(piSnapshot), [piSnapshot])\r\n const dsSection = useMemo(() => deepseekSectionOf(dsSnapshot), [dsSnapshot])\r\n\r\n // Popup filtering (issue #3): the takeover popup must offer what the\r\n // shipped popup offers — a search row once the catalog outgrows quick\r\n // scanning (`> 4`, the shipped rule), matching name/id case-insensitively\r\n // and keeping the provider grouping. An empty needle rides the full list.\r\n const needle = query.trim().toLowerCase()\r\n const totalModels = useMemo(\r\n () => state.groups.reduce((count, group) => count + group.models.length, 0),\r\n [state.groups],\r\n )\r\n const showSearch = totalModels > 4\r\n const visibleGroups = useMemo(() => (needle === ''\r\n ? state.groups\r\n : state.groups\r\n .map(group => ({\r\n ...group,\r\n models: group.models.filter(model =>\r\n model.name.toLowerCase().includes(needle) || model.id.toLowerCase().includes(needle)),\r\n }))\r\n .filter(group => group.models.length > 0)), [state.groups, needle])\r\n\r\n /** The effective window of one model line, resolved against its family.\r\n * Declared BEFORE activeWindow: the ring's window-fallback memo calls this\r\n * in its factory, and a const arrow below the first caller would be a\r\n * temporal-dead-zone ReferenceError on every mount with a selected model\r\n * (the seat then abdicates and the shipped selector takes over). */\r\n const windowOf = (provider: string, model: string): number | undefined => {\r\n if (provider === DEEPSEEK_PROVIDER) {\r\n const models = dsSection.models ?? []\r\n const index = models.findIndex(entry => entry['id'] === model)\r\n return index >= 0 ? contextWindowOf(models[index]) : dsSection.defaultContextWindow\r\n }\r\n const entry = piModelEntry(providers, provider, model)\r\n return entry === undefined ? undefined : contextWindowOf(entry)\r\n }\r\n\r\n /** The active model's declared capacity — the ring's window fallback. */\r\n const activeWindow = useMemo(() => {\r\n if (current === undefined) return undefined\r\n return windowOf(current.provider, current.model.id ?? current.model.name ?? '')\r\n }, [current, providers, dsSection]) as number | undefined\r\n\r\n /** Whether one model line has a config write target. */\r\n const writableLine = (provider: string, model: string): boolean => {\r\n if (!writable) return false\r\n if (provider === DEEPSEEK_PROVIDER) return true\r\n return piModelEntry(providers, provider, model) !== undefined\r\n }\r\n\r\n /** Commit (or delete) one model line's context window. */\r\n const commitWindow = (provider: string, model: string, value: number | undefined): void => {\r\n setBusy(true)\r\n const done = (): void => { setBusy(false); setDraft(null) }\r\n if (provider === DEEPSEEK_PROVIDER) {\r\n const models = (deepseekSectionOf(dsSnapshot).models ?? []).map(entry => ({ ...entry }))\r\n const index = models.findIndex(entry => entry['id'] === model)\r\n const commit = index >= 0\r\n ? deepseekScope.set('models', models.map((entry, at) => {\r\n if (at !== index) return entry\r\n if (value === undefined) {\r\n const rest = { ...entry }\r\n delete rest['contextWindow']\r\n return rest\r\n }\r\n return { ...entry, contextWindow: value }\r\n }))\r\n : deepseekScope.set('defaultContextWindow', value === undefined ? DEEPSEEK_DEFAULT_WINDOW : value)\r\n commit.then(done, done)\r\n return\r\n }\r\n const next = structuredClone(providers)\r\n const entry = piModelEntry(next, provider, model)\r\n if (entry === undefined) {\r\n setBusy(false)\r\n setDraft(null)\r\n return\r\n }\r\n if (value === undefined) delete entry['contextWindow']\r\n else entry['contextWindow'] = value\r\n piAiScope.set('providers', next).then(done, done)\r\n }\r\n\r\n /** Validate and commit the custom input; empty clears. */\r\n const applyCustom = (): void => {\r\n if (editing === null) return\r\n const trimmed = raw.trim()\r\n if (trimmed === '') {\r\n setError(null)\r\n commitWindow(editing.provider, editing.model, undefined)\r\n return\r\n }\r\n const validation = validateContextWindow(trimmed)\r\n if (!validation.ok) {\r\n setError(t(validation.reason === 'integer' ? 'input.context.integer' : 'input.context.range'))\r\n return\r\n }\r\n setError(null)\r\n commitWindow(editing.provider, editing.model, validation.value)\r\n }\r\n\r\n const openEditor = (provider: string, model: string): void => {\r\n setEditing({ provider, model, kind: 'context' })\r\n setDraft(null)\r\n setCustom(false)\r\n setRaw('')\r\n setError(null)\r\n }\r\n\r\n /** Toggle one line's inline effort slider (the ex-select). */\r\n const toggleEffortEditor = (provider: string, model: string): void => {\r\n setEditing(previous =>\r\n previous !== null && previous.provider === provider && previous.model === model && previous.kind === 'effort'\r\n ? null\r\n : { provider, model, kind: 'effort' })\r\n }\r\n\r\n const toggleProvider = (provider: string): void => {\r\n setExpanded(previous => {\r\n const next = new Set(previous)\r\n if (next.has(provider)) next.delete(provider)\r\n else next.add(provider)\r\n return next\r\n })\r\n }\r\n\r\n const chooseModel = (provider: string, model: string): void => {\r\n if (busy || directory === undefined) return\r\n setBusy(true)\r\n directory.select({ provider, model })\r\n .then(() => { setBusy(false); close() })\r\n .catch(() => { setBusy(false) })\r\n }\r\n\r\n /** Commit one model line's reasoning effort; empty string = provider default (omit the field). */\r\n const chooseEffort = (provider: string, model: string, effort: string): void => {\r\n if (busy || directory === undefined) return\r\n setBusy(true)\r\n selectedEffortRef.current = effort === '' ? undefined : effort\r\n directory.select({ provider, model, ...(effort === '' ? {} : { reasoningEffort: effort }) })\r\n .then(() => { setBusy(false) })\r\n .catch(() => { setBusy(false) })\r\n }\r\n\r\n const triggerLabel = current?.name ?? state.current?.model ?? t('model.panel.choose')\r\n\r\n const currentReasoning = current?.model.reasoning\r\n // Issue #5: the chip shows the USER intent, never the masked wire level the\r\n // scheduler last sent alone. Chain: this mount's explicit pick > a merged\r\n // value that IS `auto` (a persisted pending auto survives while it differs\r\n // from the resolved level) > the configured default when the model\r\n // advertises the mask > the directory's merged value. When the intent is\r\n // the mask, the step's resolved level rides along as a secondary hint.\r\n const resolvedEffort = state.current?.reasoningEffort\r\n /**\r\n * Issue #11: what the last request ACTUALLY carried.\r\n *\r\n * `resolvedEffort` above is the host's `modelSelection.next` — the user's\r\n * intent — so with `auto` picked it stays `'auto'` and the `→ level` hint\r\n * could never appear. The projection's `lastEffective` is the committed\r\n * header's resolved level. Fall back to `resolvedEffort` for hosts without the\r\n * projection so a non-auto pick keeps its previous hint behaviour.\r\n */\r\n const actualEffort = lastEffectiveEffort ?? resolvedEffort\r\n const autoAdvertised = currentReasoning?.efforts.some(effort => effort.id === 'auto') === true\r\n const intentEffort = selectedEffortRef.current\r\n ?? (resolvedEffort === 'auto' || (autoAdvertised && configLevel === 'auto')\r\n ? 'auto'\r\n : resolvedEffort ?? currentReasoning?.defaultEffort)\r\n const effortName = (id: string): string =>\r\n currentReasoning?.efforts.find(level => level.id === id)?.name ?? id\r\n const effortLabel = currentReasoning === undefined\r\n ? undefined\r\n : intentEffort === undefined\r\n ? t('input.effort.default')\r\n : effortName(intentEffort)\r\n const resolvedHint = currentReasoning !== undefined\r\n && intentEffort === 'auto'\r\n && actualEffort !== undefined\r\n && actualEffort !== 'auto'\r\n ? `→ ${effortName(actualEffort)}`\r\n : undefined\r\n\r\n return (\r\n <div ref={rootRef} style={rootStyle}>\r\n <button\r\n type=\"button\"\r\n style={triggerStyle}\r\n aria-expanded={open}\r\n aria-haspopup=\"dialog\"\r\n aria-label={t('model.panel.choose')}\r\n title={state.current === null ? triggerLabel : `${state.current.provider}/${triggerLabel}`}\r\n onClick={() => { if (open) close(); else { setOpen(true); setError(null) } }}\r\n >\r\n <span style={triggerNameStyle}>{triggerLabel}</span>\r\n {effortLabel !== undefined && <span style={triggerEffortStyle}>{effortLabel}</span>}\r\n {resolvedHint !== undefined && <span style={triggerEffortStyle}>{resolvedHint}</span>}\r\n <span style={chevronStyle}>{open ? '▲' : '▼'}</span>\r\n </button>\r\n {/* The context-capacity check ring: user-placed to the RIGHT of the\r\n model selector. Lives inside the seat this panel owns, so the\r\n position is exact; on hosts without the projection seat it renders\r\n nothing. */}\r\n {/* The context-capacity check ring: user-placed to the RIGHT of the\r\n model selector. Lives inside the seat this panel owns, so the\r\n position is exact. Capacity falls back to the ACTIVE model's\r\n declared window when the pressure projection carries none. */}\r\n <ContextRing contextWindowFallback={activeWindow} t={t} />\r\n {open\r\n ? (\r\n <>\r\n <div style={backdropStyle} onClick={close} />\r\n <div style={popStyle} role=\"dialog\" aria-label={t('model.panel.choose')}>\r\n {showSearch && (\r\n <input\r\n type=\"text\"\r\n value={query}\r\n placeholder={t('panel.search.placeholder')}\r\n aria-label={t('panel.search.placeholder')}\r\n style={{ ...inputStyle, width: '100%', boxSizing: 'border-box', margin: '2px 0 6px' }}\r\n onChange={event => setQuery(event.currentTarget.value)}\r\n />\r\n )}\r\n <div style={modelsStyle}>\r\n {directory === undefined && (\r\n <div style={statusStyle}>{t('model.panel.unavailable')}</div>\r\n )}\r\n {directory !== undefined && state.status === 'loading' && state.groups.length === 0 && (\r\n <div style={statusStyle}>{t('model.panel.loading')}</div>\r\n )}\r\n {directory !== undefined && visibleGroups.map(group => {\r\n const isExpanded = needle !== '' || expanded.has(group.id)\r\n const name = group.name ?? group.label ?? group.id\r\n const activeModel = state.current?.provider === group.id ? state.current.model : undefined\r\n return (\r\n <section key={group.id}>\r\n <button\r\n type=\"button\"\r\n style={providerToggleStyle}\r\n aria-expanded={isExpanded}\r\n onClick={() => toggleProvider(group.id)}\r\n >\r\n <span style={providerNameStyle}>{name}</span>\r\n <span style={providerMetaStyle}>{group.models.length}</span>\r\n <span style={chevronStyle}>{isExpanded ? '▼' : '▶'}</span>\r\n </button>\r\n {isExpanded && group.models.map(model => {\r\n const active = activeModel === model.id\r\n const lineWritable = writableLine(group.id, model.id)\r\n const lineWindow = windowOf(group.id, model.id)\r\n const isContextEditing = editing !== null\r\n && editing.provider === group.id\r\n && editing.model === model.id\r\n && editing.kind === 'context'\r\n const isEffortEditing = editing !== null\r\n && editing.provider === group.id\r\n && editing.model === model.id\r\n && editing.kind === 'effort'\r\n const lineEffort = active\r\n ? state.current?.reasoningEffort ?? model.reasoning?.defaultEffort\r\n : model.reasoning?.defaultEffort\r\n // Slider stops adapt to the model's advertised efforts;\r\n // `auto` (when the directory masks it in) sits leftmost.\r\n const lineStops = model.reasoning === undefined\r\n ? []\r\n : orderEffortsForSlider(model.reasoning.efforts)\r\n const lineEffortName = lineEffort === undefined\r\n ? t('input.effort.default')\r\n : lineStops.find(stop => stop.id === lineEffort)?.name ?? lineEffort\r\n return (\r\n <div key={group.id + ':' + model.id} style={active ? modelRowActiveStyle : modelRowStyle}>\r\n <button\r\n type=\"button\"\r\n role=\"option\"\r\n aria-selected={active}\r\n style={modelPickStyle}\r\n disabled={busy}\r\n onClick={() => chooseModel(group.id, model.id)}\r\n >\r\n <span style={modelCopyStyle}>\r\n <span style={modelNameStyle}>{model.name}</span>\r\n </span>\r\n {active && <span style={checkStyle} aria-hidden=\"true\">✓</span>}\r\n </button>\r\n {(model.reasoning?.efforts.length ?? 0) > 0 && (\r\n <span\r\n role=\"button\"\r\n tabIndex={0}\r\n aria-label={t('input.effort.title')}\r\n title={t('input.effort.title')}\r\n aria-expanded={isEffortEditing}\r\n style={effortChipStyle}\r\n onClick={event => {\r\n event.stopPropagation()\r\n if (!busy) toggleEffortEditor(group.id, model.id)\r\n }}\r\n onKeyDown={event => {\r\n if (event.key !== 'Enter' && event.key !== ' ') return\r\n event.preventDefault()\r\n event.stopPropagation()\r\n if (!busy) toggleEffortEditor(group.id, model.id)\r\n }}\r\n >\r\n {lineEffortName}\r\n </span>\r\n )}\r\n {isEffortEditing && model.reasoning !== undefined && (\r\n <div style={editorRowStyle} onClick={event => event.stopPropagation()}>\r\n <span style={labelStyle}>{t('input.effort.title')}</span>\r\n <EffortSlider\r\n stops={lineStops}\r\n value={lineEffort}\r\n mascot={isDeepSeekLine(group.id, model.id, model.name)}\r\n disabled={busy}\r\n onCommit={id => chooseEffort(group.id, model.id, id)}\r\n t={t}\r\n />\r\n {model.reasoning.defaultEffort !== undefined && (\r\n <button\r\n type=\"button\"\r\n disabled={busy}\r\n aria-label={t('input.effort.reset')}\r\n title={t('input.effort.reset')}\r\n style={actionButtonStyle}\r\n onClick={event => {\r\n event.stopPropagation()\r\n const target = model.reasoning?.defaultEffort\r\n if (target !== undefined) chooseEffort(group.id, model.id, target)\r\n }}\r\n >\r\n ↺\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n <span\r\n role=\"button\"\r\n tabIndex={0}\r\n aria-label={t('input.context.title')}\r\n title={lineWritable\r\n ? t('input.context.globalHint')\r\n : t('model.panel.noTarget')}\r\n style={lineWritable && !busy ? chipStyle : chipDisabledStyle}\r\n onClick={event => {\r\n event.stopPropagation()\r\n if (!lineWritable || busy) return\r\n if (isContextEditing) { setEditing(null); return }\r\n openEditor(group.id, model.id)\r\n }}\r\n onKeyDown={event => {\r\n if (event.key !== 'Enter' && event.key !== ' ') return\r\n event.preventDefault()\r\n event.stopPropagation()\r\n if (!lineWritable || busy) return\r\n openEditor(group.id, model.id)\r\n }}\r\n >\r\n {lineWindow === undefined\r\n ? t('input.context.unset')\r\n : formatContextWindow(lineWindow)}\r\n </span>\r\n {isContextEditing && (\r\n <div style={editorRowStyle}>\r\n <span style={labelStyle} title={t('input.context.globalHint')}>\r\n {t('model.panel.window')}\r\n </span>\r\n <input\r\n type=\"range\"\r\n min={0}\r\n max={CONTEXT_WINDOW_PRESETS.length - 1}\r\n step={1}\r\n value={draft ?? stopIndexOf(lineWindow)}\r\n disabled={busy}\r\n aria-label={t('input.context.title')}\r\n style={sliderStyle}\r\n onChange={event => { setDraft(Number(event.currentTarget.value)) }}\r\n onPointerUp={() => {\r\n if (draft === null) return\r\n commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value)\r\n }}\r\n onKeyUp={() => {\r\n if (draft === null) return\r\n commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value)\r\n }}\r\n />\r\n <span style={valueStyle}>\r\n {draft === null\r\n ? lineWindow === undefined ? t('input.context.unset') : formatContextWindow(lineWindow)\r\n : formatContextWindow(CONTEXT_WINDOW_PRESETS[draft]?.value ?? 0)}\r\n </span>\r\n {custom\r\n ? (\r\n <>\r\n <input\r\n type=\"text\"\r\n inputMode=\"numeric\"\r\n value={raw}\r\n disabled={busy}\r\n placeholder={t('input.context.customPlaceholder')}\r\n aria-label={t('input.context.customPlaceholder')}\r\n style={inputStyle}\r\n onChange={event => { setRaw(event.currentTarget.value) }}\r\n onKeyDown={event => { if (event.key === 'Enter') applyCustom() }}\r\n />\r\n <button\r\n type=\"button\"\r\n disabled={busy}\r\n style={actionButtonStyle}\r\n onClick={applyCustom}\r\n >\r\n {t('input.context.apply')}\r\n </button>\r\n </>\r\n )\r\n : (\r\n <>\r\n <button\r\n type=\"button\"\r\n disabled={busy}\r\n aria-label={t('input.context.custom')}\r\n title={t('input.context.custom')}\r\n style={actionButtonStyle}\r\n onClick={() => { setCustom(true); setError(null) }}\r\n >\r\n ⋯\r\n </button>\r\n <button\r\n type=\"button\"\r\n disabled={busy || lineWindow === undefined}\r\n style={{\r\n ...actionButtonStyle,\r\n opacity: lineWindow === undefined ? 0.55 : 1,\r\n }}\r\n onClick={() => {\r\n setDraft(null)\r\n setError(null)\r\n commitWindow(group.id, model.id, undefined)\r\n }}\r\n >\r\n {t('input.context.clear')}\r\n </button>\r\n </>\r\n )}\r\n {error !== null && <span style={errorStyle}>{error}</span>}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n })}\r\n </section>\r\n )\r\n })}\r\n {directory !== undefined && state.status !== 'loading' && state.groups.length === 0 && (\r\n <div style={statusStyle}>{t('model.panel.empty')}</div>\r\n )}\r\n {directory !== undefined && needle !== '' && visibleGroups.length === 0 && state.groups.length > 0 && (\r\n <div style={statusStyle}>{t('model.panel.empty')}</div>\r\n )}\r\n </div>\r\n {directory !== undefined && state.error !== null && <div style={errorBannerStyle} role=\"status\">{state.error}</div>}\r\n </div>\r\n </>\r\n )\r\n : null}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ModelPanel\r\n","/**\n * One helper shared by every client read of a HOST projection face.\n *\n * The host's `ProjectionValueStore` face is built as\n * `{ getSnapshot: () => rows.get(key)?.value, subscribe }` — i.e. `getSnapshot()`\n * returns the projection STATE ITSELF, bare:\n *\n * ```ts\n * binding.session.projections.faceOf('tlAutoSchedule').getSnapshot()\n * // => { samples, userEffort, lastEffective, trace }\n * ```\n *\n * (`packages/api/session-controller/src/client/sessions/projection-store.ts`,\n * `channel()`; every in-tree consumer casts the snapshot straight to its\n * projection type — `faceOf('permissions').getSnapshot() as PermissionSelection`,\n * `faceOf('goal').getSnapshot() as GoalProjection | null | undefined`, ….)\n *\n * The `{ status, value }` wrapper belongs to a DIFFERENT API — the settings\n * handles (`configForms` / `settingsScope`), which is why `card.tsx` /\n * `model-panel.tsx` unwrap `.value` there. Reading a projection face with that\n * assumption yields `undefined` on every real host: the effort tab then renders\n * its empty state (\"本会话还没有已提交的请求档位。\") while the projection holds a\n * perfectly good trace, and the chip loses `lastEffective` (the issue #11\n * symptom coming back). Verified live on 4.6.0 against a session whose\n * `tlAutoSchedule` row had `[{high,manual,1},{low,manual,1}]`.\n *\n * Both shapes are still accepted, because a patched/older host wrapper or a\n * test double must not turn a cosmetic read into a dead one. The bare state is\n * recognized POSITIVELY — our projection always carries at least one of the\n * four known keys — so a wrapper is never mistaken for state and vice versa.\n */\n\n/** The projection-state keys `tlAutoSchedule` always carries (any one identifies the bare value). */\nconst STATE_KEYS = ['trace', 'lastEffective', 'userEffort', 'samples'] as const\n\n/**\n * Unwrap one projection face's `getSnapshot()` result into the state record.\n *\n * @param snapshot - the face snapshot, as the host returns it.\n * @returns the projection state, or undefined for an absent/unrecognizable value.\n */\nexport function projectionValueOf(snapshot: unknown): Record<string, unknown> | undefined {\n if (typeof snapshot !== 'object' || snapshot === null) return undefined\n const record = snapshot as Record<string, unknown>\n for (const key of STATE_KEYS) {\n if (key in record) return record\n }\n // Wrapper shape (`{ value }`) — accepted for older hosts / test doubles.\n const inner = record['value']\n return typeof inner === 'object' && inner !== null ? (inner as Record<string, unknown>) : undefined\n}\n","/**\r\n * Effort-trace tab — the `conversation.view` face of dsh-thinking-levels,\r\n * following the conversation-view pattern dsh-perm-gate's history tab\r\n * demonstrates (runtime slot declared by the conversation UI package; the\r\n * typed SlotMap merge lives in `types/contracts.d.ts`).\r\n *\r\n * A run-length timeline of the effort levels this session's requests ACTUALLY\r\n * went out with — the `tlAutoSchedule` projection's `trace` (stateVersion 4),\r\n * the same durable fold the composer chip's `lastEffective` reads. Consecutive\r\n * requests with the same level AND intent collapse into one run, so even a\r\n * 95-step session reads as a handful of rows:\r\n *\r\n * ↑ auto max ×1 T4·S7 14:03:22\r\n * = auto high ×12 T3·S2 13:58:10\r\n * ↓ auto low ×3 T1·S1 13:44:31\r\n *\r\n * The ↑/↓/= glyph is the transition against the escalation rank of the\r\n * previous (older) run; the run text shows the intent (`auto`/`manual`,\r\n * neutral when the session never picked and the configured default applied)\r\n * plus the repetition count and the turn·step the run STARTED in.\r\n *\r\n * ## Which \"node\" a run belongs to\r\n *\r\n * A run's position stamp is the `turn/start` / `step/start` pair preceding its\r\n * first `request/header`. The plugin's decision itself happens EARLIER — at\r\n * `agent/pre-step`, before the host appends `step/start` (agent-loop\r\n * `agent.ts`: `preStep()` then `session.append('step/start')`) — so the stamp\r\n * names the step the level was chosen FOR, which is exactly the node the user\r\n * sees in the timeline.\r\n *\r\n * Data source: the session's projection face — NO HTTP feed. The projection is\r\n * a pure fold over the session log, so a cold read rebuilds historical\r\n * sessions for free. Everything is best-effort: a missing projection face, an\r\n * empty trace or a throwing face read renders the empty state — a thrown\r\n * render would abdicate the whole tab, which is never acceptable for a\r\n * cosmetic view.\r\n *\r\n * Presentation mirrors perm-gate's approval history on purpose (title +\r\n * subtitle header, a summary strip, then one card per run with a circled glyph\r\n * on a connected rail, a colored intent tag, meta chips and a right-aligned\r\n * clock): the two tabs sit next to each other in the same tab row and must not\r\n * look like two different products.\r\n */\r\nimport { useMemo, useSyncExternalStore } from 'react'\r\nimport type { CSSProperties, JSX } from 'react'\r\nimport { EFFORT_SLIDER_RANK } from '../thinking-level.ts'\r\nimport type { EffortRun } from '../auto-schedule-projection.ts'\r\nimport { projectionValueOf } from './projection-value.ts'\r\n\r\n/** Props the slot's `inject` option delivers (index.ts closes over the faces). */\r\nexport interface EffortTraceInjected {\r\n sessionId?: unknown\r\n /** The sessions face captured by the client assembly (same face the chip reads). */\r\n sessions?: SessionsFace | undefined\r\n}\r\n\r\n/** The tab's full props: injected faces + the locale seat with its fallback. */\r\nexport interface EffortTraceProps extends EffortTraceInjected {\r\n /** Host locale delivery (0.1.7+ `PropsLocale` seat). Absent on ≤0.1.6. */\r\n t?: ((key: string) => string) | undefined\r\n /** Injected eager binder fallback (`locale.bind(NS)`, index.ts). */\r\n tFallback?: ((key: string) => string) | undefined\r\n}\r\n\r\n/** One display row of the trace timeline (newest first). */\r\nexport interface TraceRow {\r\n run: EffortRun\r\n /** Transition from the previous (older) run, by escalation rank. */\r\n dir: 'up' | 'down' | 'flat' | 'start'\r\n}\r\n\r\n/** Transition glyph per direction (mirrors perm-gate's glyph table pattern). */\r\nconst GLYPH: Record<TraceRow['dir'], string> = { up: '↑', down: '↓', flat: '=', start: '•' }\r\n\r\n/**\r\n * Rail/glyph color per DIRECTION — a rise is green, a drop is red, flat/start\r\n * are muted/blue.\r\n *\r\n * These are LITERAL colors, not theme tokens, on purpose. A direction is a\r\n * fixed semantic (up = more thinking, down = less), so it must read the same on\r\n * every theme; the token defaults were also what made it look washed out — the\r\n * active theme's `--dsw-alias-state-success-primary` / `-warn-*` resolve to\r\n * muted tints meant for large surfaces, not for an 18px ring and a one-glyph\r\n * rail. `down` is red rather than amber for the same reason: amber next to a\r\n * green up-arrow reads as \"caution\", while a downgrade is simply the opposite\r\n * direction and should be the opposite color.\r\n */\r\nconst TONE: Record<TraceRow['dir'], { color: string; bg: string }> = {\r\n up: {\r\n color: '#18a058',\r\n bg: 'rgba(24,160,88,0.12)',\r\n },\r\n down: {\r\n color: '#d03050',\r\n bg: 'rgba(208,48,80,0.12)',\r\n },\r\n flat: {\r\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.9))',\r\n bg: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\r\n },\r\n start: {\r\n color: '#2b6cb0',\r\n bg: 'rgba(43,108,176,0.10)',\r\n },\r\n}\r\n\r\n/**\r\n * Tag tone per ATTRIBUTION — deliberately separate from the direction tone.\r\n *\r\n * `unknown` is amber, never grey: it is not a verdict about the level, it says\r\n * the log does not explain the change, and that deserves attention. Colouring\r\n * it like a decision would be the same lie as labelling it \"manual\".\r\n */\r\nconst INTENT_TONE: Record<EffortRun['intent'], { color: string; bg: string }> = {\r\n auto: {\r\n color: '#18a058',\r\n bg: 'rgba(24,160,88,0.12)',\r\n },\r\n manual: {\r\n color: '#2b6cb0',\r\n bg: 'rgba(43,108,176,0.10)',\r\n },\r\n default: {\r\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.9))',\r\n bg: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\r\n },\r\n unknown: {\r\n color: '#d48806',\r\n bg: 'rgba(212,136,6,0.14)',\r\n },\r\n scheduler: {\r\n // Proven plugin output: the strongest, most saturated green of the set —\r\n // this is the \"we know exactly who wrote it\" state and should look it.\r\n color: '#0e9f6e',\r\n bg: 'rgba(14,159,110,0.16)',\r\n },\r\n}\r\n\r\n/** Unknown ids rank after the standard table (same tail semantics as the slider). */\r\nconst rankOf = (level: string): number => EFFORT_SLIDER_RANK[level] ?? 100\r\n\r\n/** `HH:MM:SS` in the viewer's zone; empty for an absent stamp. */\r\nfunction clockOf(ms: number | undefined): string {\r\n if (typeof ms !== 'number' || !Number.isFinite(ms)) return ''\r\n const d = new Date(ms)\r\n const pad = (n: number): string => String(n).padStart(2, '0')\r\n return `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`\r\n}\r\n\r\n/** `T{turn}·S{step}` for a stamped run, empty when the run carries no position. */\r\nfunction positionOf(run: EffortRun): string {\r\n if (typeof run.turn !== 'number') return ''\r\n return typeof run.step === 'number' ? `T${run.turn}·S${run.step}` : `T${run.turn}`\r\n}\r\n\r\n/**\r\n * Build the display rows: newest run first, each carrying the transition\r\n * against its chronological predecessor. Pure — the component is a straight\r\n * map over this.\r\n * @param trace - the folded run-length trace, oldest run first.\r\n * @returns rows newest first; empty for an absent or empty trace.\r\n */\r\nexport function traceRows(trace: readonly EffortRun[] | undefined): TraceRow[] {\r\n if (trace === undefined || trace.length === 0) return []\r\n const rows: TraceRow[] = []\r\n for (let i = trace.length - 1; i >= 0; i -= 1) {\r\n const run = trace[i]!\r\n const prev = i > 0 ? trace[i - 1] : undefined\r\n if (prev === undefined) {\r\n rows.push({ run, dir: 'start' })\r\n continue\r\n }\r\n const from = rankOf(prev.level)\r\n const to = rankOf(run.level)\r\n rows.push({ run, dir: to > from ? 'up' : to < from ? 'down' : 'flat' })\r\n }\r\n return rows\r\n}\r\n\r\n/** The whole-session summary the header strip shows. */\r\nexport interface TraceSummary {\r\n /** Committed requests covered by the trace (sum of run counts). */\r\n requests: number\r\n /** How many distinct runs are kept. */\r\n runs: number\r\n /** Highest escalation rank the session ever reached, if any. */\r\n highest: string | undefined\r\n /** How many of those runs came from the `auto` sentinel (rather than a manual lock). */\r\n autoRuns: number\r\n /** How many runs the log cannot attribute (see {@link EffortRun.intent}). */\r\n unknownRuns: number\r\n /** Provider/model switches across the session's committed requests. */\r\n switches: number\r\n}\r\n\r\n/**\r\n * Summarize a trace for the header strip. Pure.\r\n * @param trace - the folded trace, oldest run first.\r\n * @param modelSwitches - route switches folded by the projection (0 when absent).\r\n * @returns the summary; zeroed for an absent trace.\r\n */\r\nexport function summarize(trace: readonly EffortRun[] | undefined, modelSwitches = 0): TraceSummary {\r\n if (trace === undefined || trace.length === 0) {\r\n return { requests: 0, runs: 0, highest: undefined, autoRuns: 0, unknownRuns: 0, switches: modelSwitches }\r\n }\r\n let requests = 0\r\n let highest: string | undefined\r\n let autoRuns = 0\r\n let unknownRuns = 0\r\n for (const run of trace) {\r\n requests += run.count\r\n if (run.intent === 'auto') autoRuns += 1\r\n if (run.intent === 'unknown') unknownRuns += 1\r\n if (highest === undefined || rankOf(run.level) > rankOf(highest)) highest = run.level\r\n }\r\n return { requests, runs: trace.length, highest, autoRuns, unknownRuns, switches: modelSwitches }\r\n}\r\n\r\n/**\r\n * Read the folded trace off the session's projection face — the exact read\r\n * path the composer chip's `lastEffective` uses. Returns `undefined` — never\r\n * throws — when the session id, the face or the field is absent (older hosts,\r\n * cold sessions, odd shapes).\r\n * @param sessions - the sessions face.\r\n * @param sessionId - the owning session.\r\n * @returns the folded run-length trace, or undefined.\r\n */\r\nexport function traceOf(\r\n sessions: SessionsFace | undefined,\r\n sessionId: string | undefined,\r\n): readonly EffortRun[] | undefined {\r\n try {\r\n if (typeof sessionId !== 'string' || sessionId.length === 0) return undefined\r\n const face = sessions?.binding(sessionId)?.session?.projections?.faceOf?.('tlAutoSchedule')\r\n const snapshot = typeof face?.getSnapshot === 'function' ? face.getSnapshot() : undefined\r\n // The face snapshot IS the state (no `{ value }` wrapper — see\r\n // projection-value.ts); reading `.value` here rendered the empty state\r\n // over a filled trace on every real host.\r\n const raw = projectionValueOf(snapshot)?.['trace']\r\n return Array.isArray(raw) ? raw as readonly EffortRun[] : undefined\r\n } catch {\r\n // A thrown cosmetic read must never escape: degrade to \"no data\".\r\n return undefined\r\n }\r\n}\r\n\r\n/** The whole projection slice this tab renders (trace + route bookkeeping). */\r\nexport interface TraceSlice {\r\n trace: readonly EffortRun[]\r\n /** Provider/model of the last committed request, for the summary strip. */\r\n lastProvider: string | null\r\n lastModel: string | null\r\n /** How many route switches the session shows. */\r\n modelSwitches: number\r\n}\r\n\r\n/**\r\n * Read the whole slice off the projection face. `undefined` — never a throw —\r\n * when the face or its trace is absent; a trace with no route bookkeeping still\r\n * renders (the older cached row simply has no switch count).\r\n *\r\n * ## Reference stability is mandatory here\r\n *\r\n * `useSyncExternalStore` requires `getSnapshot()` to return the SAME reference\r\n * until the underlying value changes. The projection face hands out the bare\r\n * state object and only swaps it on a real publish, so the slice is memoized on\r\n * that state identity: building a fresh `{ trace, … }` per call would make every\r\n * render look like a change and spin React into an infinite re-render.\r\n * @param sessions - the sessions face.\r\n * @param sessionId - the owning session.\r\n * @returns the slice, or undefined when there is nothing to render.\r\n */\r\nexport function traceSliceOf(\r\n sessions: SessionsFace | undefined,\r\n sessionId: string | undefined,\r\n): TraceSlice | undefined {\r\n try {\r\n if (typeof sessionId !== 'string' || sessionId.length === 0) return undefined\r\n const face = sessions?.binding(sessionId)?.session?.projections?.faceOf?.('tlAutoSchedule')\r\n const snapshot = typeof face?.getSnapshot === 'function' ? face.getSnapshot() : undefined\r\n const state = projectionValueOf(snapshot)\r\n if (state === undefined) return undefined\r\n const raw = state['trace']\r\n if (!Array.isArray(raw)) return undefined\r\n const cached = sliceCache.get(state)\r\n if (cached !== undefined) return cached\r\n const provider = state['lastProvider']\r\n const model = state['lastModel']\r\n const switches = state['modelSwitches']\r\n const slice: TraceSlice = {\r\n trace: raw as readonly EffortRun[],\r\n lastProvider: typeof provider === 'string' && provider.length > 0 ? provider : null,\r\n lastModel: typeof model === 'string' && model.length > 0 ? model : null,\r\n modelSwitches: typeof switches === 'number' && Number.isFinite(switches) ? switches : 0,\r\n }\r\n sliceCache.set(state, slice)\r\n return slice\r\n } catch {\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Memo for {@link traceSliceOf}: one slice per projection state identity. The\r\n * face is shared by every reader of this key (the chip and the tab), so the\r\n * memo lives at module level; entries die with the state objects themselves, so\r\n * it cannot grow without bound.\r\n */\r\nconst sliceCache = new WeakMap<object, TraceSlice>()\r\n\r\n/**\r\n * Subscribe to the trace over the projection face's store when it offers one;\r\n * a one-shot read otherwise (the conversation re-renders around every request\r\n * anyway, so the one-shot cadence still tracks). `useSyncExternalStore` needs\r\n * a cached snapshot — the projection registry gates republishes on\r\n * `Object.is`, so the face's `value.trace` reference is stable between\r\n * publishes and the read wrapper stays honest.\r\n */\r\nfunction useTrace(sessions: SessionsFace | undefined, sessionId: unknown): TraceSlice | undefined {\r\n const id = typeof sessionId === 'string' && sessionId.length > 0 ? sessionId : undefined\r\n const face = useMemo(() => {\r\n try {\r\n return id === undefined ? undefined : sessions?.binding(id)?.session?.projections?.faceOf?.('tlAutoSchedule')\r\n } catch {\r\n return undefined\r\n }\r\n }, [sessions, id])\r\n const getSnapshot = useMemo(() => () => traceSliceOf(sessions, id), [sessions, id])\r\n const subscribe = useMemo(() => (listener: () => void): (() => void) => {\r\n try {\r\n return typeof face?.subscribe === 'function' ? face.subscribe(listener) : () => {}\r\n } catch {\r\n return () => {}\r\n }\r\n }, [face])\r\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot)\r\n}\r\n\r\n/* ── styles (perm-gate history parity) ─────────────────────────────────── */\r\n\r\nconst pageStyle: CSSProperties = {\r\n boxSizing: 'border-box',\r\n maxWidth: '720px',\r\n margin: '0 auto',\r\n padding: '8px 4px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '8px',\r\n font: 'inherit',\r\n overflowY: 'auto',\r\n}\r\n\r\nconst titleStyle: CSSProperties = {\r\n fontSize: '14px',\r\n fontWeight: 600,\r\n color: 'var(--dsw-alias-label-primary)',\r\n}\r\n\r\nconst subtitleStyle: CSSProperties = {\r\n marginTop: '2px',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n color: 'var(--dsw-alias-label-secondary, var(--dsw-alias-label-primary))',\r\n}\r\n\r\n/** The summary strip: the same rounded bar perm-gate's snapshot inventory uses. */\r\nconst barStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '10px',\r\n flexWrap: 'wrap',\r\n padding: '6px 10px',\r\n borderRadius: '8px',\r\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\nconst barStatStyle: CSSProperties = {\r\n display: 'inline-flex',\r\n alignItems: 'baseline',\r\n gap: '4px',\r\n}\r\n\r\nconst barValueStyle: CSSProperties = {\r\n fontWeight: 600,\r\n color: 'var(--dsw-alias-label-primary)',\r\n fontVariantNumeric: 'tabular-nums',\r\n}\r\n\r\nconst barSepStyle: CSSProperties = {\r\n width: '1px',\r\n height: '10px',\r\n background: 'var(--dsw-alias-border-l2, rgba(127,127,127,0.3))',\r\n}\r\n\r\nconst rowStyle: CSSProperties = {\r\n display: 'flex',\r\n gap: '10px',\r\n padding: '6px 10px',\r\n borderRadius: '8px',\r\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\r\n}\r\n\r\nconst railStyle: CSSProperties = {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n flex: '0 0 auto',\r\n width: '20px',\r\n}\r\n\r\nconst markStyle: CSSProperties = {\r\n width: '18px',\r\n height: '18px',\r\n marginTop: '3px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n fontWeight: 700,\r\n borderRadius: '999px',\r\n borderStyle: 'solid',\r\n // 1.5px + a 700-weight glyph: at 1px the ring and the arrow both washed out\r\n // against the translucent row background, which is what made \"which way did\r\n // it move\" hard to read at a glance.\r\n borderWidth: '1.5px',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n}\r\n\r\nconst railLineStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n width: '1px',\r\n minHeight: '10px',\r\n background: 'var(--dsw-alias-border-l2, rgba(127,127,127,0.3))',\r\n}\r\n\r\nconst bodyStyle: CSSProperties = { flex: '1 1 auto', minWidth: 0, paddingBottom: '10px' }\r\n\r\nconst headStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '8px',\r\n flexWrap: 'wrap',\r\n}\r\n\r\nconst levelStyle: CSSProperties = {\r\n font: '600 12px/18px var(--ds-font-family-code, monospace)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n}\r\n\r\nconst tagStyle: CSSProperties = {\r\n fontSize: '11px',\r\n lineHeight: '18px',\r\n padding: '0 8px',\r\n borderRadius: '9px',\r\n fontWeight: 600,\r\n}\r\n\r\nconst metaStyle: CSSProperties = {\r\n fontSize: '11px',\r\n lineHeight: '18px',\r\n padding: '0 6px',\r\n borderRadius: '9px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.3))',\r\n fontVariantNumeric: 'tabular-nums',\r\n}\r\n\r\nconst clockStyle: CSSProperties = {\r\n marginLeft: 'auto',\r\n flex: '0 0 auto',\r\n fontSize: '11px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n fontVariantNumeric: 'tabular-nums',\r\n}\r\n\r\nconst noteStyle: CSSProperties = {\r\n marginTop: '2px',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n color: 'var(--dsw-alias-label-secondary, inherit)',\r\n overflowWrap: 'anywhere',\r\n}\r\n\r\nconst emptyStyle: CSSProperties = {\r\n padding: '16px 0',\r\n fontSize: '13px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\n/** The summary strip above the timeline. */\r\nfunction SummaryBar(props: { t: (key: string) => string; summary: TraceSummary }): JSX.Element {\r\n const { t, summary } = props\r\n return (\r\n <div style={barStyle}>\r\n <span style={barStatStyle}>\r\n <span style={barValueStyle}>{summary.requests}</span>\r\n <span>{t('trace.summary.requests')}</span>\r\n </span>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={barStatStyle}>\r\n <span style={barValueStyle}>{summary.runs}</span>\r\n <span>{t('trace.summary.runs')}</span>\r\n </span>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={barStatStyle}>\r\n <span style={barValueStyle}>{summary.autoRuns}</span>\r\n <span>{t('trace.summary.autoRuns')}</span>\r\n </span>\r\n {summary.unknownRuns === 0\r\n ? null\r\n : (\r\n <>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={{ ...barStatStyle, color: '#d48806' }}>\r\n <span style={barValueStyle}>{summary.unknownRuns}</span>\r\n <span>{t('trace.intent.unknown')}</span>\r\n </span>\r\n </>\r\n )}\r\n {summary.switches === 0\r\n ? null\r\n : (\r\n <>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={barStatStyle}>\r\n <span style={barValueStyle}>{summary.switches}</span>\r\n <span>{t('trace.summary.switches')}</span>\r\n </span>\r\n </>\r\n )}\r\n {summary.highest === undefined\r\n ? null\r\n : (\r\n <>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={barStatStyle}>\r\n <span>{t('trace.summary.peak')}</span>\r\n <span style={{ ...barValueStyle, fontFamily: 'var(--ds-font-family-code, monospace)' }}>\r\n {summary.highest}\r\n </span>\r\n </span>\r\n </>\r\n )}\r\n <span style={{ marginLeft: 'auto' }}>{t('trace.summary.hint')}</span>\r\n </div>\r\n )\r\n}\r\n\r\n/** The tab body: summary strip + timeline rows newest first, or the empty state. */\r\nexport function EffortTrace(props: EffortTraceProps): JSX.Element {\r\n const t = props.t ?? props.tFallback ?? ((key: string) => key)\r\n const slice = useTrace(props.sessions, props.sessionId)\r\n const trace = slice?.trace ?? []\r\n const rows = traceRows(trace)\r\n if (slice === undefined || rows.length === 0) {\r\n return (\r\n <div style={pageStyle}>\r\n <div>\r\n <div style={titleStyle}>{t('trace.title')}</div>\r\n <div style={subtitleStyle}>{t('trace.subtitle')}</div>\r\n </div>\r\n <span style={{ ...emptyStyle, fontSize: '13px' }}>{t('trace.empty')}</span>\r\n </div>\r\n )\r\n }\r\n return (\r\n <div style={pageStyle}>\r\n <div>\r\n <div style={titleStyle}>{t('trace.title')}</div>\r\n <div style={subtitleStyle}>{t('trace.subtitle')}</div>\r\n </div>\r\n <SummaryBar t={t} summary={summarize(trace, slice.modelSwitches)} />\r\n {/*\r\n * Attribution honesty: on the 0.2.2+ strict line THIS plugin is itself a\r\n * `model/selection` writer (it must fix the next step's level before\r\n * preparation), so a concrete level in the log cannot be proven to be a\r\n * human click. Say so instead of labelling scheduler output \"manual\".\r\n */}\r\n <div style={{ fontSize: '11px', lineHeight: '16px', color: 'var(--dsw-alias-label-tertiary)' }}>\r\n {t('trace.note.attribution')}\r\n </div>\r\n <div style={{ display: 'flex', flexDirection: 'column', gap: '6px' }}>\r\n {rows.map((row, i) => {\r\n const tone = TONE[row.dir]\r\n const intentTone = INTENT_TONE[row.run.intent]\r\n const position = positionOf(row.run)\r\n const clock = clockOf(row.run.time)\r\n const intentLabel = t(`trace.intent.${row.run.intent}`)\r\n const route = row.run.model === undefined\r\n ? ''\r\n : row.run.provider === undefined ? row.run.model : `${row.run.provider}/${row.run.model}`\r\n return (\r\n <div key={`${row.run.level}-${row.run.turn ?? 'x'}-${row.run.step ?? 'x'}-${trace.length - i}`} style={rowStyle}>\r\n <div style={railStyle}>\r\n <span aria-hidden style={{ ...markStyle, borderColor: tone.color, color: tone.color }}>\r\n {GLYPH[row.dir]}\r\n </span>\r\n <span aria-hidden style={railLineStyle} />\r\n </div>\r\n <div style={bodyStyle}>\r\n <div style={headStyle}>\r\n <code style={levelStyle}>{row.run.level}</code>\r\n <span\r\n style={{ ...tagStyle, color: intentTone.color, background: intentTone.bg }}\r\n title={row.run.intent === 'unknown' ? t('trace.intent.unknownHint') : undefined}\r\n >\r\n {intentLabel}\r\n </span>\r\n {row.run.count > 1\r\n ? <span style={metaStyle}>{`× ${row.run.count}`}</span>\r\n : null}\r\n {position === '' ? null : <span style={metaStyle}>{position}</span>}\r\n {/*\r\n * The model the level was sent to. Recorded from the request\r\n * header, never inferred — without it a run cannot say which\r\n * route it belonged to.\r\n */}\r\n {route === '' ? null : <span style={{ ...metaStyle, fontFamily: 'var(--ds-font-family-code, monospace)' }}>{route}</span>}\r\n {clock === '' ? null : <span style={clockStyle}>{clock}</span>}\r\n </div>\r\n <div style={noteStyle}>\r\n {t(`trace.dir.${row.dir}`).replace('%n', String(row.run.count))}\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n </div>\r\n )\r\n}\r\n","/**\n * ⚠️ 生成副本 —— 请勿手改。真源:mine-dsh-plugins/_tools/guide-kit/guide.tsx\n * 重新同步:node _tools/guide-kit/sync.mjs\n */\n/**\n * guide-kit —— 九插件共用的「首次使用引导」件(**生成副本,勿手改**)。\n *\n * 唯一真源:`mine-dsh-plugins/_tools/guide-kit/guide.tsx`\n * 同步命令:`node _tools/guide-kit/sync.mjs`(会覆盖本文件;改这里等于白改)\n *\n * 六条契约(见 .agents/plans/unified-i18n-onboarding/spec.md §2):\n * 1. Skip 恒定可见,任何步骤都能退;\n * 2. 永远有字:引导外壳(标题/按钮/步进)自带 10 语词表,按 <html lang> 取词,\n * 认不出的一律落 en;步骤正文按「本语 → en → zh → 任意可用」逐级回退,绝不留空白;\n * 3. 重启入口:`GuideRestartButton`(或自己调 `resetGuide(ns)` + setOpen(true))就地重开;\n * 4. 零依赖:只 react + localStorage,不 import 平台包,不抢宿主设置表单;\n * 5. 引导自己绝不能成为卡面渲染的失败点:样式注入与存储访问全部 try/catch + 能力探测;\n * 6. 外壳词表与步骤正文分离:外壳跨插件统一(本文件),正文每插件一份 `guide-steps.ts`。\n */\nimport { useEffect, useState } from 'react'\nimport type { CSSProperties, JSX } from 'react'\n\nexport interface GuideStep {\n title: string\n body: string\n}\n\nexport interface GuideLabels {\n title: string\n skip: string\n next: string\n prev: string\n done: string\n restart: string\n stepOf: (_current: number, _total: number) => string\n}\n\n/** 生态通用的十个语言码(与各插件 `locale/*.json`、README 的十语镜像同口径)。 */\nexport const GUIDE_LOCALES = ['zh', 'en', 'ja', 'ko', 'fr', 'de', 'it', 'ru', 'es', 'pt'] as const\nexport type GuideLocale = (typeof GUIDE_LOCALES)[number]\n\n/**\n * 引导外壳词表(10 语)。\n *\n * 为什么不塞进各插件 locales:这七个词是**跨插件同一套**,塞进九个字典要重复翻译\n * 9×10 次,且一旦措辞调整就得动九个仓。外壳留在本文件,正文留各插件。\n */\nexport const GUIDE_COPY: Record<GuideLocale, GuideLabels> = {\n zh: {\n title: '快速上手',\n skip: '跳过引导',\n next: '下一步',\n prev: '上一步',\n done: '开始使用',\n restart: '重新查看引导',\n stepOf: (current, total) => `第 ${current} / ${total} 步`,\n },\n en: {\n title: 'Quick start',\n skip: 'Skip guide',\n next: 'Next',\n prev: 'Back',\n done: 'Get started',\n restart: 'Show guide again',\n stepOf: (current, total) => `Step ${current} of ${total}`,\n },\n ja: {\n title: 'クイックスタート',\n skip: 'ガイドをスキップ',\n next: '次へ',\n prev: '戻る',\n done: 'はじめる',\n restart: 'ガイドをもう一度表示',\n stepOf: (current, total) => `ステップ ${current} / ${total}`,\n },\n ko: {\n title: '빠른 시작',\n skip: '가이드 건너뛰기',\n next: '다음',\n prev: '이전',\n done: '시작하기',\n restart: '가이드 다시 보기',\n stepOf: (current, total) => `${current} / ${total} 단계`,\n },\n fr: {\n title: 'Démarrage rapide',\n skip: 'Ignorer le guide',\n next: 'Suivant',\n prev: 'Retour',\n done: 'Commencer',\n restart: 'Revoir le guide',\n stepOf: (current, total) => `Étape ${current} sur ${total}`,\n },\n de: {\n title: 'Schnellstart',\n skip: 'Anleitung überspringen',\n next: 'Weiter',\n prev: 'Zurück',\n done: 'Loslegen',\n restart: 'Anleitung erneut anzeigen',\n stepOf: (current, total) => `Schritt ${current} von ${total}`,\n },\n it: {\n title: 'Avvio rapido',\n skip: 'Salta la guida',\n next: 'Avanti',\n prev: 'Indietro',\n done: 'Inizia',\n restart: 'Rivedi la guida',\n stepOf: (current, total) => `Passo ${current} di ${total}`,\n },\n ru: {\n title: 'Быстрый старт',\n skip: 'Пропустить руководство',\n next: 'Далее',\n prev: 'Назад',\n done: 'Начать',\n restart: 'Показать руководство снова',\n stepOf: (current, total) => `Шаг ${current} из ${total}`,\n },\n es: {\n title: 'Inicio rápido',\n skip: 'Omitir la guía',\n next: 'Siguiente',\n prev: 'Atrás',\n done: 'Empezar',\n restart: 'Ver la guía de nuevo',\n stepOf: (current, total) => `Paso ${current} de ${total}`,\n },\n pt: {\n title: 'Início rápido',\n skip: 'Ignorar o guia',\n next: 'Próximo',\n prev: 'Voltar',\n done: 'Começar',\n restart: 'Ver o guia novamente',\n stepOf: (current, total) => `Passo ${current} de ${total}`,\n },\n}\n\n/** 语言标签 → 语言码:只认主标签,认不出的落 null(由调用方回退 en)。 */\nexport function normalizeGuideLocale(tag: string): GuideLocale | null {\n const primary = tag.toLowerCase().trim().split(/[-_]/)[0] ?? ''\n return (GUIDE_LOCALES as readonly string[]).includes(primary) ? (primary as GuideLocale) : null\n}\n\nfunction htmlLang(): string {\n try {\n return typeof document === 'undefined' ? '' : (document.documentElement?.lang ?? '')\n } catch {\n return ''\n }\n}\n\n/**\n * 当前引导语言:以宿主 `<html lang>` 为准(语言切换会改写这个属性)。\n *\n * 认不出 → en:引导是「帮助」面,宁可给英文也不能给空白或中文硬串。\n */\nexport function currentGuideLocale(): GuideLocale {\n return normalizeGuideLocale(htmlLang()) ?? 'en'\n}\n\n/** 兼容旧调用(1.x 版本只区分 zh/en):需要细分语种请用 `currentGuideLocale()`。 */\nexport function guideLang(): GuideLocale {\n return currentGuideLocale()\n}\n\n/** 引导外壳取词。 */\nexport function guideLabels(locale: GuideLocale = currentGuideLocale()): GuideLabels {\n return GUIDE_COPY[locale] ?? GUIDE_COPY.en\n}\n\n/**\n * 步骤正文取词:本语 → en → zh → 表里第一个可用。\n *\n * 为什么需要回退链:九插件分批补语种,某个插件可能只有 zh/en 而宿主是 ru;\n * 这时给英文是可用的,给空白等于「引导坏了」。`undefined` 步骤表按空表处理。\n */\nexport function guideSteps(\n map: Partial<Record<GuideLocale, readonly GuideStep[]>> | undefined,\n): readonly GuideStep[] {\n if (map === undefined) return []\n const order: (GuideLocale | undefined)[] = [currentGuideLocale(), 'en', 'zh']\n for (const key of order) {\n const hit = key === undefined ? undefined : map[key]\n if (hit !== undefined && hit.length > 0) return hit\n }\n for (const key of GUIDE_LOCALES) {\n const hit = map[key]\n if (hit !== undefined && hit.length > 0) return hit\n }\n return []\n}\n\nfunction guideStorageKey(ns: string): string {\n return `dsh.guide.${ns}.skipped`\n}\n\n/** 是否已跳过(存储不可用时按「未跳过」处理:宁可多教一次,不要静默不教)。 */\nexport function isGuideSkipped(ns: string): boolean {\n try {\n return typeof localStorage !== 'undefined' && localStorage.getItem(guideStorageKey(ns)) === '1'\n } catch {\n return false\n }\n}\n\n/** 记下跳过;写失败不抛(隐私模式 / 存储禁用)。 */\nexport function skipGuide(ns: string): void {\n try {\n localStorage?.setItem(guideStorageKey(ns), '1')\n } catch {\n /* ignore */\n }\n}\n\n/** 清标记 = 允许重新教学。 */\nexport function resetGuide(ns: string): void {\n try {\n localStorage?.removeItem(guideStorageKey(ns))\n } catch {\n /* ignore */\n }\n}\n\nconst GUIDE_CSS = `\n.sgGuide{border:1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.28));background:var(--dsw-alias-bg-layer-2, rgba(127,127,127,.06));border-radius:12px;padding:14px 16px;margin:0 0 12px}\n.sgGuideHead{display:flex;align-items:center;gap:8px;margin:0 0 10px}\n.sgGuideTitle{font-size:14px;font-weight:600;color:var(--dsw-alias-label-primary, currentColor)}\n.sgGuideStep{font-size:12px;color:var(--dsw-alias-label-tertiary, rgba(127,127,127,.9));margin-left:auto}\n.sgGuideBody{font-size:13px;line-height:1.6;color:var(--dsw-alias-label-secondary, currentColor);min-height:52px}\n.sgGuideBody b{color:var(--dsw-alias-label-primary, currentColor);font-weight:600}\n.sgGuideDots{display:flex;gap:6px;margin:10px 0 0}\n.sgGuideDot{width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-border-l2, rgba(127,127,127,.3))}\n.sgGuideDot-on{background:var(--dsw-alias-button-primary-fill, #4d6bfe)}\n.sgGuideFoot{display:flex;align-items:center;gap:8px;margin:12px 0 0}\n.sgGuideBtn{appearance:none;font:inherit;font-size:12px;padding:5px 12px;border-radius:8px;border:1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.3));background:transparent;color:var(--dsw-alias-label-primary, currentColor);cursor:pointer}\n.sgGuideBtn-primary{background:var(--dsw-alias-button-primary-fill, #4d6bfe);border-color:transparent;color:#fff}\n.sgGuideBtn-skip{margin-right:auto;color:var(--dsw-alias-label-tertiary, rgba(127,127,127,.9));border-color:transparent;text-decoration:underline}\n.sgGuideRestart{appearance:none;font:inherit;font-size:12px;padding:0;border:0;background:transparent;color:var(--dsw-alias-link-primary, #4d6bfe);cursor:pointer;text-decoration:underline}\n`\n\nfunction injectGuideCss(): void {\n // 宿主是浏览器,但**测试替身**常常只给一个残缺的 document(无 querySelector /\n // 无 head)——样式注入是纯装饰,任何缺失都安静跳过,绝不让引导把卡面炸掉。\n try {\n if (typeof document === 'undefined') return\n if (typeof document.querySelector !== 'function') return\n if (typeof document.createElement !== 'function') return\n if (!document.head) return\n if (document.querySelector('style[data-plugin-css=\"guide-kit\"]') !== null) return\n const tag = document.createElement('style')\n tag.dataset.pluginCss = 'guide-kit'\n tag.textContent = GUIDE_CSS\n document.head.appendChild(tag)\n } catch {\n /* 残缺 DOM:跳过样式,行为不受影响 */\n }\n}\n\n/** 语言变更订阅:语言切换后重渲染词表(引导是短生命周期,直接跟随 <html lang>)。 */\nfunction useLangTick(): void {\n const [, setTick] = useState(0)\n useEffect(() => {\n try {\n if (typeof MutationObserver === 'undefined' || typeof document === 'undefined') return\n if (!document.documentElement) return\n const observer = new MutationObserver(() => setTick((n) => n + 1))\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] })\n return () => observer.disconnect()\n } catch {\n return\n }\n }, [])\n}\n\n/**\n * 引导主体:3 步以内的小教学 + 恒定可见的 Skip。\n *\n * `onClose` 由宿主卡面传:Skip/Done 都会调用它(Skip 同时写标记)。\n */\nexport function GuidePanel(props: {\n ns: string\n steps: readonly GuideStep[]\n onClose: () => void\n}): JSX.Element | null {\n const { ns, steps, onClose } = props\n const [index, setIndex] = useState(0)\n useLangTick()\n const labels = guideLabels()\n useEffect(() => {\n injectGuideCss()\n }, [])\n if (steps.length === 0) return null\n const current = steps[Math.min(index, steps.length - 1)]!\n const last = index >= steps.length - 1\n // Skip 与 Done 都写标记:**「看过」= 不再自动弹**。只给 Skip 写字会让点\n // 「开始使用」走完的用户每次进设置面都被再教一遍(认真看完的人最烦这个)。\n const finish = (): void => {\n skipGuide(ns)\n onClose()\n }\n return (\n <section className=\"sgGuide\" aria-label={labels.title}>\n <header className=\"sgGuideHead\">\n <span className=\"sgGuideTitle\">{labels.title}</span>\n <span className=\"sgGuideStep\">{labels.stepOf(index + 1, steps.length)}</span>\n </header>\n <div className=\"sgGuideBody\">\n <b>{current.title}</b>\n <div>{current.body}</div>\n </div>\n <div className=\"sgGuideDots\" aria-hidden=\"true\">\n {steps.map((step, i) => (\n <span key={step.title} className={'sgGuideDot' + (i === index ? ' sgGuideDot-on' : '')} />\n ))}\n </div>\n <footer className=\"sgGuideFoot\">\n <button type=\"button\" className=\"sgGuideBtn sgGuideBtn-skip\" onClick={() => finish()}>\n {labels.skip}\n </button>\n {index > 0 && (\n <button type=\"button\" className=\"sgGuideBtn\" onClick={() => setIndex(index - 1)}>\n {labels.prev}\n </button>\n )}\n {last ? (\n <button type=\"button\" className=\"sgGuideBtn sgGuideBtn-primary\" onClick={() => finish()}>\n {labels.done}\n </button>\n ) : (\n <button type=\"button\" className=\"sgGuideBtn sgGuideBtn-primary\" onClick={() => setIndex(index + 1)}>\n {labels.next}\n </button>\n )}\n </footer>\n </section>\n )\n}\n\n/**\n * 重启入口:清标记 + 就地重开引导。\n *\n * 统一件,避免九插件各写一份(措辞/样式/清标记时机容易走样)。跳过之后\n * 用户想再看一次,不需要去清浏览器存储。\n */\nexport function GuideRestartButton(props: {\n ns: string\n onOpen: () => void\n style?: CSSProperties\n}): JSX.Element {\n const { ns, onOpen, style } = props\n useLangTick()\n return (\n <button\n type=\"button\"\n className=\"sgGuideRestart\"\n style={style}\n onClick={() => {\n resetGuide(ns)\n onOpen()\n }}\n >\n {guideLabels().restart}\n </button>\n )\n}\n","/**\n * dsh-thinking-levels 的首次使用引导文案(3 步)。\n *\n * 与 `guide.tsx`(生成副本)分文件:副本会被 `_tools/guide-kit/sync.mjs` 覆盖。\n */\nimport type { GuideLocale, GuideStep } from './guide.tsx'\n\nexport const THINKING_GUIDE_STEPS: Partial<Record<GuideLocale, readonly GuideStep[]>> = {\n zh: [\n {\n title: '它决定「想多深」',\n body: '按请求难度自动挑思考档位:简单问答降到 low,复杂任务抬到 high。默认「自动」就够用,别一上来钉死 max——贵且慢。',\n },\n {\n title: '允许上浮比允许下调更重要',\n body: '「允许上调」打开后遇到难题会自动加深思考;「允许降级」则会为了省钱往下压。想稳就先只开上调。',\n },\n {\n title: '看实时档位在环上',\n body: '输入框右侧的圆环显示当前上下文占用与压力档;点开模型面板能看到本次请求实际发出的思考档位与理由。',\n },\n ],\n en: [\n {\n title: 'It decides how deeply to think',\n body: 'Picks a reasoning effort per request by difficulty: easy Q&A drops to low, hard tasks rise to high. \"Auto\" is enough — don\\'t pin max from the start, it is slow and expensive.',\n },\n {\n title: 'Allowing upgrades matters more than allowing downgrades',\n body: 'With \"allow upgrade\" on, hard problems get more thinking automatically; \"allow downgrade\" pushes thinking down to save money. For stability, turn on upgrade only.',\n },\n {\n title: 'The ring shows the live gear',\n body: 'The ring right of the composer shows context usage and pressure; open the model panel to see the effort actually sent with this request and why.',\n },\n ],\n}\n","/**\n * Thinking-levels settings card — the family settings tab face of the\n * dsh-thinking-levels plugin.\n *\n * The card binds this plugin's entry config through the `configForms` cordis\n * service and renders its fields: the level picker\n * (off / on / minimal / low / medium / high / xhigh / max / auto) plus the\n * scheduler toggles. Every change commits immediately through the scope (no\n * staged form): the decision is read per model request, so a committed change\n * applies to the next request without a restart.\n *\n * Below the scheduler rows, a \"model capabilities\" block edits the\n * `llm-pi-ai` namespace directly (read + write through the same settings\n * transport), borrowing dsh-thinking-effort's presentation: providers group\n * their models, each model row shows capability badges and expands into a\n * per-level editor where a level is ticked and its gateway wire value entered\n * (e.g. `high` → `ultra`); `off` left empty means \"do not send\". A search box\n * filters models and one-click presets apply official/generic level sets to\n * every thinking model.\n *\n * Kept dependency-free beyond react: the scopes are subscribed with\n * `useSyncExternalStore`, and the controls are plain HTML so the client bundle\n * needs no CSS modules and no primitives value import.\n */\nimport { useCallback, useState, useSyncExternalStore } from 'react'\nimport type { CSSProperties, JSX } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { SettingsScope } from './scope-face.ts'\nimport type { EffortId } from '../thinking-level.ts'\nimport type { PricingPolicy } from '../price-catalog.ts'\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\nimport { contextWindowOf, deepseekSectionOf, DEEPSEEK_DEFAULT_WINDOW } from './model-panel.tsx'\nimport type { ThinkingLevelsConfig } from '../index.ts'\nimport { GuidePanel, GuideRestartButton, guideSteps, isGuideSkipped } from './guide.tsx'\nimport { THINKING_GUIDE_STEPS } from './guide-steps.ts'\n\n/** One injected face: the plugin's own scope plus the llm-pi-ai namespace scope. */\nexport interface ThinkingLevelsCardInjected {\n scope: SettingsScope<ThinkingLevelsConfig>\n /** The `llm-pi-ai` settings namespace, read and written for model capabilities. */\n piAiScope: SettingsScope<unknown>\n /**\n * The openai-completions transport's section (`llm-openai-completions`):\n * read for the per-route takeover state, written by the route-head takeover\n * checkbox (`enabled` + the manual `providers` list). Absent face = the\n * transport is not composed; the checkbox then renders disabled.\n */\n ocScope?: SettingsScope<unknown>\n /**\n * The `llm-deepseek` section: with the seat takeover off (4.4.0 default)\n * the official-model context editor lives on this card instead of the\n * ModelPanel lines. Absent on hosts without the namespace.\n */\n deepseekScope?: SettingsScope<unknown>\n}\n\n/** Full props: locale seat + the injected scopes. */\nexport type ThinkingLevelsCardProps = PropsLocale<'thinking-levels'> & ThinkingLevelsCardInjected\n\n/** The user-facing levels, in picker order: eight standard levels plus the auto scheduler sentinel. */\nconst EFFORT_OPTIONS: readonly EffortId[] = [\n 'off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'auto',\n]\n\n/** 计价兜底档,in picker order:缺省 estimate(典型价估算,未校准仅供参考)。 */\nconst PRICING_OPTIONS: readonly PricingPolicy[] = [\n 'estimate', 'cn', 'global', 'custom', 'off',\n]\n\n/**\n * The levels the capability editor offers. This is the llm-pi-ai\n * `reasoningEfforts` table-key space — pi-ai's fixed seven levels (schema\n * rejects any other key). `on` (the enable-thinking toggle) is a selector /\n * injection-level concept, expressed here by the `off` + `high` pair\n * (enable_thinking false/true), so it has no table key of its own.\n */\nconst CAPABILITY_LEVELS: readonly EffortId[] = [\n 'off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',\n] as const\n\n/** One-click presets, mirroring dsh-thinking-effort: official DeepSeek style and a generic set. */\nconst PRESETS: readonly { key: 'official' | 'generic'; levels: Record<string, unknown> }[] = [\n { key: 'official', levels: { off: null, high: 'high', max: 'max' } },\n { key: 'generic', levels: { off: null, low: 'low', medium: 'medium', high: 'high' } },\n]\n\n/** The wire thinking formats offered (llm-pi-ai's nameable set, incl. qwen-chat-template). */\nconst THINKING_FORMATS = [\n 'openai', 'deepseek', 'openrouter', 'together', 'zai', 'qwen',\n 'qwen-chat-template', 'string-thinking', 'ant-ling',\n] as const\n\n/* ── shared row styling (inline; keeps the client bundle CSS-free) ──────── */\n\nconst rowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '12px',\n padding: '6px 0',\n fontSize: '13px',\n lineHeight: '20px',\n}\n\nconst labelStyle: CSSProperties = { margin: 0, color: 'var(--dsw-alias-label-primary)' }\n\n/** Native form controls (the select's dropdown popup) follow `color-scheme`,\n * which the ≤0.1.6 shells never set — derive it from the body luminance once\n * at bundle eval so dark-theme hosts get dark popups without a media query\n * (the app theme isn't the OS theme, so prefers-color-scheme would lie). */\nconst controlColorScheme: 'dark' | 'light' = (() => {\n try {\n const rgb = getComputedStyle(document.body).backgroundColor.match(/\\d+/g) ?? ['255', '255', '255']\n const [r, g, b] = rgb.map(Number)\n return (r * 299 + g * 587 + b * 114) / 1000 < 128 ? 'dark' : 'light'\n } catch { return 'light' }\n})()\n\nconst controlStyle: CSSProperties = {\n // Translucent fallback: the alias tokens don't exist on the ≤0.1.6 shells,\n // and the old `#fff` fallback painted white controls onto dark dialogs.\n background: 'var(--dsw-alias-bg-surface, rgba(127,127,127,0.12))',\n color: 'var(--dsw-alias-label-primary, inherit)',\n colorScheme: controlColorScheme,\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '3px 8px',\n fontSize: '13px',\n}\n\nconst sectionStyle: CSSProperties = {\n marginTop: '14px',\n paddingTop: '12px',\n borderTop: '1px solid var(--dsw-alias-border-l2)',\n}\n\nconst fieldStyle: CSSProperties = { display: 'flex', flexDirection: 'column', gap: '4px' }\n\nconst fieldLabelStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\n\nconst hintStyle: CSSProperties = { margin: '6px 0 0', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\n\n/** Provider group shell: an outlined row grouping its models. */\nconst providerStyle: CSSProperties = {\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '8px',\n margin: '8px 0 0',\n overflow: 'hidden',\n}\n\nconst providerHeadStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '7px 10px',\n background: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\n}\n\nconst providerNameStyle: CSSProperties = {\n margin: 0,\n flex: '1 1 auto',\n minWidth: 0,\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '12px',\n lineHeight: '18px',\n fontWeight: 600,\n color: 'var(--dsw-alias-label-primary)',\n overflowWrap: 'anywhere',\n}\n\nconst providerBadgeStyle: CSSProperties = {\n margin: 0,\n fontSize: '10px',\n lineHeight: '16px',\n color: 'var(--dsw-alias-label-tertiary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '0 5px',\n whiteSpace: 'nowrap',\n}\n\nconst iconButtonStyle: CSSProperties = {\n background: 'none',\n border: 'none',\n color: 'var(--dsw-alias-label-tertiary)',\n cursor: 'pointer',\n padding: '2px 4px',\n display: 'inline-flex',\n alignItems: 'center',\n}\n\n/** One model row inside a provider group. */\nconst modelRowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '7px 10px',\n borderTop: '1px solid var(--dsw-alias-border-l2)',\n}\n\nconst modelIdStyle: CSSProperties = {\n margin: 0,\n flex: '1 1 auto',\n minWidth: 0,\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '12px',\n lineHeight: '18px',\n color: 'var(--dsw-alias-label-secondary)',\n overflowWrap: 'anywhere',\n}\n\n/** Capability badge chips (text / image / context). */\nconst badgeStyle: CSSProperties = {\n fontSize: '10px',\n lineHeight: '16px',\n color: 'var(--dsw-alias-label-tertiary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '0 5px',\n whiteSpace: 'nowrap',\n}\n\n/** The per-level editor grid: one row per level with a toggle, a label and a wire input. */\nconst levelRowStyle: CSSProperties = {\n display: 'grid',\n gridTemplateColumns: 'auto 92px minmax(0, 1fr)',\n alignItems: 'center',\n gap: '8px',\n padding: '4px 0',\n fontSize: '13px',\n}\n\nconst levelNameStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-secondary)' }\n\nconst wireInputStyle: CSSProperties = {\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-primary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '3px 8px',\n fontSize: '12px',\n width: '100%',\n boxSizing: 'border-box',\n}\n\n/* ── helpers over the llm-pi-ai user layer ─────────────────────────────── */\n\n/** A row's `reasoningEfforts` as stored in the user layer. */\nfunction effortsOf(model: Record<string, unknown>): false | Record<string, unknown> | undefined {\n const value = model['reasoningEfforts']\n if (value === false) return false\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n return value as Record<string, unknown>\n }\n return undefined\n}\n\n/**\n * Build a `reasoningEfforts` table from a level→wire draft. `off` maps to\n * `null` (omit the reasoning option → enable_thinking false) unless the user\n * typed a wire value; every other ticked level keeps its typed wire value.\n * pi-ai rejects a table offering nothing beyond `off`, so a selection of only\n * `off` falls back to the default `high` level.\n */\nfunction effortTableOf(draft: Record<string, string | null>): Record<string, unknown> {\n const table: Record<string, unknown> = {}\n for (const level of CAPABILITY_LEVELS) {\n const wire = draft[level]\n if (wire === undefined || wire === null) continue\n const trimmed = typeof wire === 'string' ? wire.trim() : ''\n if (level === 'off') table[level] = trimmed === '' ? null : trimmed\n else if (trimmed !== '') table[level] = trimmed\n }\n if (Object.keys(table).length === 0 || Object.keys(table).every(level => table[level] === null)) {\n return { ...table, high: 'high' }\n }\n return table\n}\n\n/** Whether a row declares `compat.supportsReasoningEffort` (the wire sends reasoning_effort). */\nfunction supportsEffortOf(model: Record<string, unknown>): boolean {\n const compat = model['compat']\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\n return (compat as Record<string, unknown>)['supportsReasoningEffort'] === true\n}\n\n/** Patch one row's `compat` object, merging rather than replacing sibling fields. */\nfunction patchCompat(\n row: Record<string, unknown>,\n patch: (compat: Record<string, unknown>) => void,\n): void {\n const compat = typeof row['compat'] === 'object' && row['compat'] !== null && !Array.isArray(row['compat'])\n ? { ...(row['compat'] as Record<string, unknown>) }\n : {}\n patch(compat)\n if (Object.keys(compat).length === 0) delete row['compat']\n else row['compat'] = compat\n}\n\n/** The user-layer `providers` value of the llm-pi-ai namespace, when present. */\nfunction providersOf(snapshot: unknown): Record<string, unknown> {\n if (typeof snapshot !== 'object' || snapshot === null) return {}\n // 0.1.7+ snapshots carry the user layer; ≤0.1.6 settingsScope snapshots\n // carry the merged section as `value` — read whichever the host provides.\n const user = (snapshot as { user?: unknown }).user\n ?? (snapshot as { value?: unknown }).value\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\n const providers = (user as Record<string, unknown>)['providers']\n return typeof providers === 'object' && providers !== null && !Array.isArray(providers)\n ? providers as Record<string, unknown>\n : {}\n}\n\n/** Whether a route-level profile declares `compat.supportsDeveloperRole: false`. */\nfunction developerRoleDisabledOf(profile: unknown): boolean {\n if (typeof profile !== 'object' || profile === null) return false\n const compat = (profile as Record<string, unknown>)['compat']\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\n return (compat as Record<string, unknown>)['supportsDeveloperRole'] === false\n}\n\n/**\n * Whether the transport currently takes this route over: its master switch on\n * AND the route in its manual providers list. Pure membership — the checkbox\n * is the single per-route truth, so dispatch uses the same set.\n */\nfunction takeoverActiveOf(section: { enabled?: unknown; providers?: unknown }, providerId: string): boolean {\n if (section.enabled !== true) return false\n return Array.isArray(section.providers) && (section.providers as unknown[]).includes(providerId)\n}\n\n/**\n * The transport's `extraInputs` dict ('provider/model' → modality list), from\n * its own section. The host llm-pi-ai schema caps a model row's `input` enum\n * at text|image, so video/audio declarations for omni models live here —\n * the taken-over transport unions them into the model's effective input.\n */\nfunction extraInputsOf(section: { extraInputs?: unknown }): Record<string, string[]> {\n if (typeof section.extraInputs !== 'object' || section.extraInputs === null || Array.isArray(section.extraInputs)) return {}\n const out: Record<string, string[]> = {}\n for (const [key, value] of Object.entries(section.extraInputs as Record<string, unknown>)) {\n if (Array.isArray(value)) out[key] = value.filter((m): m is string => typeof m === 'string')\n }\n return out\n}\n\n/**\n * One settings write with a single self-heal retry. A false return means the\n * host refused the optimistic lock — and the client has ALREADY completed its\n * recover() (a fresh describe folded into the mirror) by the time resolve\n * lands, so an immediate second attempt carries a fresh revision: the machine\n * equivalent of the user's proven \"click it twice\" workaround.\n */\nasync function setWithRetry(scope: SettingsScope<unknown>, field: string, value: unknown): Promise<{ ok: boolean; retried: boolean }> {\n const ok1 = await scope.set(field, value).catch(() => false)\n if (ok1) return { ok: true, retried: false }\n await new Promise((resolve) => setTimeout(resolve, 350))\n const ok2 = await scope.set(field, value).catch(() => false)\n return { ok: ok2, retried: true }\n}\n\n/** One flattened capability entry: a provider's model at an array index. */\ninterface CapabilityEntry {\n providerId: string\n index: number\n model: Record<string, unknown>\n modelId: string\n /** The provider-level `compat`, applied to models that declare none (display parity). */\n providerCompat?: unknown\n /** The provider-level `defaultInput`, applied to models that declare none (display parity). */\n providerInput?: unknown[]\n /** The provider-level `api` (wire protocol): the host's compat gates differ per protocol. */\n providerApi?: unknown\n}\n\n/** The effective `compat` of an entry: its own `compat` merged over the provider-level `compat`. */\nfunction compatOf(entry: CapabilityEntry): Record<string, unknown> {\n const base = typeof entry.providerCompat === 'object' && entry.providerCompat !== null\n ? entry.providerCompat as Record<string, unknown>\n : {}\n const own = entry.model['compat']\n return typeof own === 'object' && own !== null && !Array.isArray(own)\n ? { ...base, ...(own as Record<string, unknown>) }\n : base\n}\n\n/**\n * Whether this entry's wire protocol takes the model-level\n * openai-completions compat fields (`compat.thinkingFormat`,\n * `compat.supportsReasoningEffort`). The host llm-pi-ai gate (`COMPAT_GATES`)\n * offers them ONLY on openai-completions, and a MODEL-level write carrying one\n * on a Responses/Anthropic route fails the WHOLE providers payload\n * (`not configurable here`). An absent `api` keeps pi-ai's\n * openai-completions default, so the row stays editable.\n *\n * Scoped to the FIELD, never to thinking: the thinking DECLARATION\n * (`reasoningEfforts`) is protocol-neutral and stays editable everywhere — a\n * non-completions route merely must not carry the completions-only compat\n * fields alongside it (issue #6).\n * (exported for the gate's unit regression, issues #2/#6)\n */\nexport function completionsCompatConfigurable(entry: CapabilityEntry): boolean {\n return typeof entry.providerApi !== 'string' || entry.providerApi === 'openai-completions'\n}\n\n/**\n * The pre-#6 spelling of {@link completionsCompatConfigurable}, kept exported\n * because the 4.4.x line published it.\n * @deprecated use {@link completionsCompatConfigurable}.\n */\nexport const effortCompatConfigurable = completionsCompatConfigurable\n\n/**\n * Write the Thinking checkbox's declaration onto ONE model row (the caller\n * hands the row inside its cloned providers payload). Protocol-aware on\n * purpose (issue #6):\n *\n * - `reasoningEfforts` is protocol-NEUTRAL: the host llm-pi-ai resolves it to\n * `reasoning: true` + `thinkingLevelMap` for every wire protocol, and pi-ai\n * then maps the levels natively (Anthropic thinking budget, Responses\n * reasoning effort). Thinking is therefore declarable on all three protocol\n * families — it is the prerequisite of the effort selector.\n * - the `off` wire value is where the protocols DIVERGE. `off: null` marks the\n * level unsupported to pi-ai (`getSupportedThinkingLevels` drops it), which\n * is the completions transport's \"send nothing\" toggle — fine there, but on\n * a pi-ai-served route it would leave thinking un-turn-off-able. A\n * non-completions route therefore keeps `off` SELECTABLE with the\n * providers' own \"no reasoning\" token: Anthropic only needs it non-null\n * (`thinking: {type:'disabled'}`), Responses sends `effort: 'none'`.\n * - the qwen `thinkingFormat` autofill is an openai-completions-ONLY compat\n * field: writing it on a Responses/Anthropic route makes the host reject the\n * whole providers payload, so it is skipped there and the format simply\n * stays inherited.\n * @param entry - the capability entry whose provider protocol decides the gate.\n * @param row - the model row to mutate.\n * @param next - the new Thinking state.\n */\nexport function writeThinkingRow(\n entry: CapabilityEntry,\n row: Record<string, unknown>,\n next: boolean,\n): void {\n if (!next) {\n // Thinking off: a non-reasoning model never takes an effort.\n row['reasoningEfforts'] = false\n return\n }\n // Thinking on: a table must exist so the wire drives enable_thinking /\n // reasoning_effort. Start from the persisted table or the default high\n // set; a toggle model (no effort) keeps supportsReasoningEffort false.\n const effortCapable = supportsEffortOf(row)\n const completions = completionsCompatConfigurable(entry)\n if (effortCapable) {\n row['reasoningEfforts'] = effortTableOf({ high: 'high' })\n } else if (completions) {\n row['reasoningEfforts'] = { off: null, high: 'high' }\n } else {\n row['reasoningEfforts'] = { off: 'none', high: 'high' }\n }\n // Toggle-style thinking models need the official qwen format so pi-ai\n // sends enable_thinking (early vLLM thinking models return no thinking\n // content without that flag, and reject reasoning_effort). Only fills\n // an absent format — an explicit choice is never clobbered — and only on\n // the one protocol whose compat takes the field.\n if (!effortCapable && completions) {\n patchCompat(row, (compat) => {\n if (compat['thinkingFormat'] === undefined) compat['thinkingFormat'] = 'qwen-chat-template'\n })\n }\n}\n\n/**\n * The two compat switches that exist ONLY on the openai-completions protocol.\n * Both are model-level writes; on any other protocol the host's\n * `resolveModelCompat` refuses the entry and fails the WHOLE providers payload\n * (`model \"x\" sets compat \"…\", but its api is \"…\", which does not take it`).\n */\nexport const THINKING_COMPAT_FIELDS = ['thinkingFormat', 'supportsReasoningEffort'] as const\n\n/**\n * The openai-completions-only compat fields an entry's OWN model row still\n * carries while its route speaks another protocol — i.e. leftovers from a\n * version that offered those switches on every route (4.4.0–4.4.2), or a\n * hand-edited `cordis.yml`. They are a hard write blocker: the next save of\n * ANY model switch on this route fails wholesale until they are removed.\n *\n * This is the \"split the force-written format out and check it\" half of issue\n * #7: the fields are no longer offered on such routes, so what remains is\n * exactly this audit + one-click cleanup.\n * @param entry - the capability entry (model row + its route's protocol).\n * @returns the offending field names, in {@link THINKING_COMPAT_FIELDS} order.\n */\nexport function staleThinkingCompatFields(entry: CapabilityEntry): string[] {\n if (completionsCompatConfigurable(entry)) return []\n const own = entry.model['compat']\n if (typeof own !== 'object' || own === null || Array.isArray(own)) return []\n const compat = own as Record<string, unknown>\n return THINKING_COMPAT_FIELDS.filter(field => compat[field] !== undefined)\n}\n\n/**\n * Remove those leftovers from ONE model row, returning what was removed (empty\n * when the row was already clean, so the caller can skip the write). Sibling\n * compat fields survive; an emptied compat object is deleted rather than left\n * as `{}`.\n * @param entry - the capability entry whose protocol decides what is stale.\n * @param row - the model row to mutate.\n * @returns the removed field names.\n */\nexport function stripThinkingCompat(entry: CapabilityEntry, row: Record<string, unknown>): string[] {\n const removed = staleThinkingCompatFields({ ...entry, model: row })\n if (removed.length === 0) return []\n const own = row['compat'] as Record<string, unknown>\n const compat = { ...own }\n for (const field of removed) delete compat[field]\n if (Object.keys(compat).length === 0) delete row['compat']\n else row['compat'] = compat\n return removed\n}\n\n/** Flatten the user-layer providers into capability entries (models arrays only). */\nfunction entriesOf(providers: Record<string, unknown>): CapabilityEntry[] {\n return Object.entries(providers).flatMap(([providerId, profile]) => {\n const raw = profile as Record<string, unknown>\n const models = raw['models']\n if (!Array.isArray(models)) return []\n const providerCompat = raw['compat']\n const providerInput = Array.isArray(raw['defaultInput']) ? raw['defaultInput'] as unknown[] : undefined\n return models.map((model, index) => ({\n providerId,\n index,\n model: (typeof model === 'object' && model !== null && !Array.isArray(model)\n ? model as Record<string, unknown>\n : {}),\n modelId: typeof model === 'object' && model !== null && typeof (model as Record<string, unknown>)['id'] === 'string'\n ? (model as Record<string, unknown>)['id'] as string\n : `#${index + 1}`,\n providerCompat,\n providerInput,\n providerApi: raw['api'],\n }))\n })\n}\n\n/** Human-readable capability summary of one entry (input modalities + declared context window). */\nfunction summaryOf(entry: CapabilityEntry): { text: boolean; image: boolean; context: string | null } {\n // Modalities fall back to the provider-level `defaultInput` so a vision\n // gateway declared once on the route shows every model as vision, matching\n // llm-pi-ai's resolution and the adapter's runtime gate.\n const input = Array.isArray(entry.model['input'])\n ? entry.model['input'] as unknown[]\n : entry.providerInput\n const text = !Array.isArray(input) || input.length === 0 || input.includes('text')\n const image = Array.isArray(input) && input.includes('image')\n const contextWindow = entry.model['contextWindow']\n const context = typeof contextWindow === 'number' && Number.isFinite(contextWindow) && contextWindow > 0\n ? formatContextWindow(contextWindow)\n : null\n return { text, image, context }\n}\n\n/** A tiny inline chevron icon (no CSS modules). */\nfunction ChevronIcon({ open }: { open: boolean }): JSX.Element {\n return (\n <svg\n width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" aria-hidden\n style={{ transform: open ? 'rotate(180deg)' : 'none', transition: 'transform 0.16s' }}\n >\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )\n}\n\n/**\n * Horizontal pill toggle: the real checkbox stays the a11y control (sr-only),\n * the drawn track/knob reflects `checked` — which the card feeds from its\n * optimistic overlay, so the pill flips the instant the user clicks and rolls\n * back on a refused write (same pendingTl contract as every other field).\n */\nfunction PillToggle(props: {\n id: string\n checked: boolean\n disabled: boolean\n title?: string\n onChange: (next: boolean) => void\n}): JSX.Element {\n const { id, checked, disabled, title, onChange } = props\n return (\n <label\n htmlFor={id}\n title={title}\n style={{ display: 'inline-flex', alignItems: 'center', cursor: disabled ? 'default' : 'pointer' }}\n >\n <input\n id={id}\n type=\"checkbox\"\n checked={checked}\n disabled={disabled}\n onChange={(event) => onChange(event.currentTarget.checked)}\n style={{ position: 'absolute', width: 1, height: 1, margin: 0, opacity: 0, pointerEvents: 'none' }}\n />\n <span\n aria-hidden\n style={{\n display: 'inline-block',\n width: '36px',\n height: '20px',\n borderRadius: '999px',\n flex: '0 0 auto',\n position: 'relative',\n background: checked\n ? 'var(--dsw-alias-bg-control-primary, #4d6bfe)'\n : 'var(--dsw-alias-fill-input-primary, rgba(127,127,127,0.25))',\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\n transition: 'background 0.16s',\n }}\n >\n <span\n style={{\n position: 'absolute',\n top: '1px',\n left: checked ? '17px' : '1px',\n width: '16px',\n height: '16px',\n borderRadius: '50%',\n background: '#fff',\n boxShadow: '0 1px 2px rgba(0,0,0,0.25)',\n transition: 'left 0.16s',\n }}\n />\n </span>\n </label>\n )\n}\n\n/**\n * The llm-pi-ai model-capability editor block (dsh-thinking-effort style:\n * provider groups, model rows with badges, per-level wire editors, search and\n * one-click presets).\n * @param scope - the `llm-pi-ai` namespace scope.\n * @param t - copy lookup.\n * @param readonly - whether writes are forbidden.\n * @returns the capabilities block, or a placeholder when nothing is configured.\n */\n/**\n * The absent-transport snapshot: a module-level CONSTANT. `useSyncExternalStore`\n * requires getSnapshot to return a STABLE value — an inline fallback literal is\n * a new object on every call, and React spins an infinite update loop (#185)\n * the moment this block renders with no transport handle (the ready branch's\n * first-ever mount crash).\n */\nconst OC_ABSENT_SNAPSHOT = Object.freeze({\n status: 'unavailable' as const,\n value: undefined,\n revision: undefined,\n writable: false,\n base: undefined,\n user: undefined,\n mode: 'memory' as const,\n})\n\nfunction ModelCapabilities(props: {\n scope: SettingsScope<unknown>\n ocScope?: SettingsScope<unknown>\n /** The plugin's OWN settings scope (TL namespace): hosts the takeover master switch write. */\n tlScope?: SettingsScope<unknown>\n t: (key: string) => string\n readonly: boolean\n}): JSX.Element {\n const { scope, ocScope, tlScope, t, readonly } = props\n // Stable subscription identities: inline lambdas make React resubscribe on\n // every render, and the host controller folds a fresh decoded snapshot into\n // its store on every subscribe — each resubscription would then look like a\n // store change and re-render forever.\n const subscribe = useCallback((listener: () => void) => scope.subscribe(listener), [scope])\n const getSnapshot = useCallback(() => scope.getSnapshot(), [scope])\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\n // The transport's live section: drives the per-route takeover checkbox.\n const ocSubscribe = useCallback(\n (listener: () => void) => ocScope?.subscribe(listener) ?? (() => {}),\n [ocScope],\n )\n const ocGetSnapshot = useCallback(\n () => (ocScope !== undefined ? ocScope.getSnapshot() : OC_ABSENT_SNAPSHOT),\n [ocScope],\n )\n const ocSnapshot = useSyncExternalStore(ocSubscribe, ocGetSnapshot)\n const ocSection = (ocSnapshot.status === 'ready' && typeof ocSnapshot.value === 'object' && ocSnapshot.value !== null\n ? ocSnapshot.value\n : {}) as { enabled?: unknown; providers?: unknown; extraInputs?: unknown }\n const ocWritable = ocSnapshot.status === 'ready' && ocSnapshot.writable && !readonly\n // Optimistic overlay (plan tl-write-immediacy §B): pending values shadow the\n // snapshots until their write settles. resolve(true) implies the client has\n // already accepted the new mirror view, so clearing the pending entry then\n // is gap-free; resolve(false) rolls the overlay back AND surfaces the error\n // banner. Optimistic writes deliberately do NOT touch `busy` — a 350ms\n // grey-out would defeat the instant-flip this overlay exists for.\n const [pendingOc, setPendingOc] = useState<Partial<{ enabled: boolean; providers: string[]; extraInputs: Record<string, string[]> }>>({})\n const [pendingPi, setPendingPi] = useState<Record<string, unknown> | undefined>(undefined)\n const [writeError, setWriteError] = useState<string | null>(null)\n const viewOc = { ...ocSection, ...pendingOc } as { enabled?: unknown; providers?: unknown; extraInputs?: unknown }\n const unavailable = snapshot.status === 'unavailable'\n const providers = snapshot.status === 'ready' ? providersOf(snapshot) : {}\n // H1: the overlay must sit at the SOURCE of the model-row derivation chain —\n // thinking / vision / effort / context all flow from entriesOf(...).\n const viewProviders = { ...providers, ...pendingPi }\n // Every llm-pi-ai provider is listed with its models — no list gating: the\n // official compat surface (dsh ≥ rc.8) means pi-ai serves every route\n // natively, so each model is editable right here.\n const allEntries = entriesOf(viewProviders)\n\n // UI-only state: provider/model expansion, the wire drafts, and the query.\n const [query, setQuery] = useState('')\n const [expandedProviders, setExpandedProviders] = useState<Record<string, boolean>>({})\n const [expandedModels, setExpandedModels] = useState<Record<string, boolean>>({})\n const [drafts, setDrafts] = useState<Record<string, Record<string, string | null>>>({})\n // `busy` has no writer by design (see the optimistic-write note above) —\n // every write path is optimistic with its own inline rollback, so the\n // disabled states below are currently pure `readonly` mirrors.\n const [busy] = useState(false)\n const [contextRaw, setContextRaw] = useState<Record<string, string>>({})\n const [contextError, setContextError] = useState<Record<string, string>>({})\n\n const entryKey = (entry: CapabilityEntry): string => `${entry.providerId}\\u0000${entry.index}`\n\n /** Commit one patch over the user-layer providers (optimistic + self-heal retry). */\n const commitProviders = (mutate: (current: Record<string, unknown>) => Record<string, unknown>): void => {\n if (snapshot.status !== 'ready' || readonly) return\n const next = mutate(structuredClone(viewProviders))\n setPendingPi(next)\n void setWithRetry(scope, 'providers', next).then(({ ok }) => {\n setPendingPi(undefined)\n if (!ok) setWriteError(t('card.writeError'))\n })\n }\n\n /** Toggle the route-level official compat flag: unchecked = inherit (unset). */\n const toggleDeveloperRole = (providerId: string, next: boolean): void => {\n commitProviders((current) => {\n const profile = current[providerId] as Record<string, unknown> | undefined\n if (profile === undefined) return current\n const compat = typeof profile['compat'] === 'object' && profile['compat'] !== null && !Array.isArray(profile['compat'])\n ? { ...(profile['compat'] as Record<string, unknown>) }\n : {}\n if (next) compat['supportsDeveloperRole'] = false\n else delete compat['supportsDeveloperRole']\n if (Object.keys(compat).length === 0) delete profile['compat']\n else profile['compat'] = compat\n return current\n })\n }\n\n /**\n * Toggle the per-route third-party takeover. Ownership split (plan §D): this\n * checkbox writes MEMBERSHIP only — `OC.enabled`'s sole writer is the host\n * mirror of TL's `takeover` master. Checking a route while the master is off\n * lights the master through ONE TL-namespace write instead of the old direct\n * OC.enabled write that used to fight the mirror and bounce the checkbox.\n */\n const toggleTakeover = (providerId: string, next: boolean): void => {\n if (ocScope === undefined || !ocWritable) return\n const currentProviders = Array.isArray(viewOc.providers)\n ? (viewOc.providers as unknown[]).filter((id): id is string => typeof id === 'string')\n : []\n const providers = next\n ? [...new Set([...currentProviders, providerId])]\n : currentProviders.filter((id) => id !== providerId)\n setPendingOc((cur) => ({ ...cur, providers }))\n // Master-off detection reads TL's OWN snapshot, never viewOc.enabled: the\n // enabled field folds lazily (host mirror timing) and reads stale-true\n // right after a master-off click, which would skip the auto-light. The\n // TL snapshot folds on the master write itself, so it is always fresh.\n const tlTakeoverNow = (tlScope?.getSnapshot().value as { takeover?: unknown } | undefined)?.takeover === true\n if (next && !tlTakeoverNow && tlScope !== undefined) {\n // Light the master AND carry OC.enabled with it in-session: the host\n // mirror only reconciles at boot reliably, so the card writes both sides\n // of the lighting (same value — no fight with the mirror is possible).\n void setWithRetry(tlScope, 'takeover', true).then(({ ok }) => {\n if (!ok) setWriteError(t('card.writeError'))\n })\n void setWithRetry(ocScope, 'enabled', true).then(({ ok }) => {\n if (!ok) setWriteError(t('card.writeError'))\n })\n }\n void setWithRetry(ocScope, 'providers', providers).then(({ ok }) => {\n setPendingOc((cur) => {\n const rest = { ...cur }\n delete rest['providers']\n return rest\n })\n if (!ok) {\n setPendingOc((cur) => ({ ...cur, providers: currentProviders }))\n setWriteError(t('card.writeError'))\n }\n })\n }\n\n /** The model's extra input modalities declared on the transport ('provider/model' key). */\n const modelExtrasOf = (providerId: string, modelId: string): string[] =>\n extraInputsOf(viewOc)[`${providerId}/${modelId}`] ?? []\n\n /** Toggle one model's video/audio/pdf declaration on the transport's extraInputs.\n * The host pi-ai schema caps model-row `input` at text|image, so omni\n * modalities live here — effective only while the route is taken over. */\n const toggleModelModality = (providerId: string, modelId: string, modality: 'video' | 'audio' | 'pdf', next: boolean): void => {\n if (ocScope === undefined || !ocWritable) return\n const current = extraInputsOf(viewOc)\n const modelKey = `${providerId}/${modelId}`\n const entry = Array.isArray(current[modelKey]) ? [...current[modelKey]] : []\n const nextEntry = next ? [...new Set([...entry, modality])] : entry.filter((m) => m !== modality)\n const nextDict: Record<string, string[]> = { ...current }\n if (nextEntry.length > 0) nextDict[modelKey] = nextEntry\n else delete nextDict[modelKey]\n setPendingOc((cur) => ({ ...cur, extraInputs: nextDict }))\n void setWithRetry(ocScope, 'extraInputs', nextDict).then(({ ok }) => {\n setPendingOc((cur) => {\n const rest = { ...cur }\n delete rest['extraInputs']\n return rest\n })\n if (!ok) {\n setPendingOc((cur) => ({ ...cur, extraInputs: current }))\n setWriteError(t('card.writeError'))\n }\n })\n }\n\n /** Patch one model row of one provider. */\n const patchModel = (\n providerId: string,\n index: number,\n patch: (model: Record<string, unknown>) => void,\n ): void => {\n commitProviders((current) => {\n const profile = current[providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) return current\n const model = profile.models[index]\n if (typeof model !== 'object' || model === null) return current\n patch(model as Record<string, unknown>)\n return current\n })\n }\n\n /**\n * Toggle whether a model is a thinking model (`reasoningEfforts` table vs\n * false). Delegates the row patch to {@link writeThinkingRow}: thinking is\n * declared on every protocol, only the completions-only format autofill is\n * protocol-gated.\n */\n const toggleThinking = (entry: CapabilityEntry, next: boolean): void => {\n patchModel(entry.providerId, entry.index, (row) => writeThinkingRow(entry, row, next))\n }\n\n /**\n * Toggle whether a model accepts reasoning_effort levels.\n *\n * openai-completions only, by construction: the checkbox is no longer\n * rendered anywhere else (issue #7), so this writer can never be reached with\n * a route whose protocol would refuse the field.\n */\n const toggleEffortCapable = (entry: CapabilityEntry, next: boolean): void => {\n if (!completionsCompatConfigurable(entry)) return\n patchModel(entry.providerId, entry.index, (row) => {\n patchCompat(row, (compat) => {\n compat['supportsReasoningEffort'] = next\n // Counterpart of the auto-fill in toggleThinking: effort-capable rows\n // need reasoning_effort on the wire, so drop the toggle-style qwen\n // format when effort turns on (it would drive enable_thinking instead).\n if (next && compat['thinkingFormat'] === 'qwen-chat-template') delete compat['thinkingFormat']\n })\n })\n }\n\n /** Remove the completions-only compat leftovers from one model row (issue\n * #7's cleanup half). The audit lives in {@link staleThinkingCompatFields};\n * this is the one-click repair, and it is a no-op when the row is already\n * clean. */\n const stripStaleCompat = (entry: CapabilityEntry): void => {\n patchModel(entry.providerId, entry.index, (row) => {\n stripThinkingCompat(entry, row)\n })\n }\n\n /**\n * Sweep every stale row in one providers write (card-level audit button).\n * One write instead of N: the host validates the whole payload, so a\n * half-cleaned section could still be refused by a row the sweep had not\n * reached yet.\n */\n const stripAllStaleCompat = (): void => {\n commitProviders((current) => {\n for (const entry of entriesOf(current)) {\n const profile = current[entry.providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) continue\n const row = profile.models[entry.index]\n if (typeof row !== 'object' || row === null) continue\n stripThinkingCompat(entry, row as Record<string, unknown>)\n }\n return current\n })\n }\n\n /** Apply one model's wire draft as its `reasoningEfforts` table. */\n const applyDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n const draft = drafts[key]\n if (draft === undefined) return\n const table = effortTableOf(draft)\n patchModel(entry.providerId, entry.index, (row) => {\n row['reasoningEfforts'] = table\n // The `supportsReasoningEffort` side effect is a COMPLETIONS-ONLY concern\n // (issue #8): it tells pi-ai's completions wire to send a reasoning_effort\n // string. Anthropic/Responses derive their dispatch from the\n // thinkingLevelMap alone, and the host refuses the field on those\n // protocols — writing it here would reject the WHOLE providers payload,\n // i.e. ticking one level would silently fail the save.\n if (!completionsCompatConfigurable(entry)) return\n // Mark effort support only when the model already had it or the user\n // ticked a reasoning_effort-only level (minimal/low/medium/xhigh/max).\n // A toggle-only model (Qwen3.6: off/high = enable_thinking) must keep\n // supportsReasoningEffort false — flipping it would make the adapter\n // send a reasoning_effort the gateway rejects (400).\n const extended = Object.keys(table).some(level => level !== 'off' && level !== 'on' && level !== 'high')\n if (supportsEffortOf(row) || extended) {\n patchCompat(row, (compat) => {\n compat['supportsReasoningEffort'] = true\n })\n }\n })\n }\n\n /** Reset a model's draft to its persisted table (or the default high set). */\n const resetDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setDrafts(current => {\n const next = { ...current }\n const table = effortsOf(entry.model)\n if (typeof table === 'object' && table !== null) {\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\n level,\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\n ]))\n } else {\n next[key] = { off: '', high: 'high' }\n }\n return next\n })\n }\n\n /** Seed a model's draft when it is first expanded. */\n const ensureDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setDrafts(current => {\n if (current[key] !== undefined) return current\n const next = { ...current }\n const table = effortsOf(entry.model)\n if (typeof table === 'object' && table !== null) {\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\n level,\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\n ]))\n } else {\n next[key] = { off: '', high: 'high' }\n }\n return next\n })\n }\n\n /** Apply a one-click preset to every thinking model. */\n const applyPreset = (levels: Record<string, unknown>): void => {\n commitProviders((current) => {\n for (const entry of entriesOf(current)) {\n const profile = current[entry.providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) continue\n const model = profile.models[entry.index]\n if (typeof model !== 'object' || model === null) continue\n const row = model as Record<string, unknown>\n if (effortsOf(row) === undefined) continue // only thinking models\n // Replace the table but never touch supportsReasoningEffort: a\n // toggle-only model (Qwen3.6) must stay Off/On (enable_thinking), so\n // the request guard keeps clamping any injected level to its default\n // strength instead of sending a reasoning_effort the gateway rejects.\n row['reasoningEfforts'] = levels\n }\n return current\n })\n }\n\n /** Seed a model's context-window input when it is first expanded. */\n const seedContext = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setContextRaw(current => {\n if (current[key] !== undefined) return current\n const value = entry.model['contextWindow']\n return {\n ...current,\n [key]: typeof value === 'number' && Number.isFinite(value) ? String(value) : '',\n }\n })\n }\n\n /** Write (or delete) a model's `contextWindow` in the llm-pi-ai entry. */\n const commitContextWindow = (entry: CapabilityEntry, value: number | undefined): void => {\n const key = entryKey(entry)\n patchModel(entry.providerId, entry.index, (row) => {\n if (value === undefined) delete row['contextWindow']\n else row['contextWindow'] = value\n })\n setContextError(current => {\n const next = { ...current }\n delete next[key]\n return next\n })\n }\n\n /** Apply one preset immediately. */\n const applyContextPreset = (entry: CapabilityEntry, value: number): void => {\n const key = entryKey(entry)\n setContextRaw(current => ({ ...current, [key]: String(value) }))\n commitContextWindow(entry, value)\n }\n\n /** Validate and commit the custom input (blur / Enter); empty clears it. */\n const applyContextInput = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n const raw = (contextRaw[key] ?? '').trim()\n if (raw === '') {\n commitContextWindow(entry, undefined)\n return\n }\n const validation = validateContextWindow(raw)\n if (!validation.ok) {\n setContextError(current => ({\n ...current,\n [key]: t(validation.reason === 'integer'\n ? 'card.capabilities.contextInteger'\n : 'card.capabilities.contextRange'),\n }))\n return\n }\n commitContextWindow(entry, validation.value)\n }\n\n /** Clear the model's context-window declaration (delete the field). */\n const clearContext = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setContextRaw(current => ({ ...current, [key]: '' }))\n commitContextWindow(entry, undefined)\n }\n\n if (unavailable) {\n return (\n <div style={sectionStyle}>\n <p style={hintStyle}>{t('card.capabilities.unavailable')}</p>\n </div>\n )\n }\n if (allEntries.length === 0) {\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\n <p style={hintStyle}>{t('card.capabilities.empty')}</p>\n </div>\n )\n }\n\n const needle = query.trim().toLowerCase()\n const visible = needle === ''\n ? allEntries\n : allEntries.filter(entry =>\n entry.modelId.toLowerCase().includes(needle)\n || entry.providerId.toLowerCase().includes(needle))\n const providerIds = [...new Set(visible.map(entry => entry.providerId))]\n // Issue #7 audit: rows an older version force-wrote the openai-completions\n // compat fields onto. They block the NEXT write on that route wholesale, so\n // the count is surfaced at card level with a route-wide sweep.\n const staleEntries = allEntries.filter(entry => staleThinkingCompatFields(entry).length > 0)\n\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\n <p style={hintStyle}>{t('card.capabilities.hint')}</p>\n {writeError !== null && (\n <p style={{ margin: '0 0 4px', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }} role=\"status\">⚠ {writeError}</p>\n )}\n {staleEntries.length > 0 && (\n <div style={{ margin: '4px 0 6px' }}>\n <p style={{ ...hintStyle, color: 'var(--dsw-alias-warning, #b7791f)' }}>\n {t('card.capabilities.staleCompat')}: {staleEntries.length} / {allEntries.length}\n </p>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={stripAllStaleCompat}\n style={{ ...controlStyle, cursor: readonly || busy ? 'default' : 'pointer' }}\n >\n {t('card.capabilities.stripStaleCompat')}\n </button>\n </div>\n )}\n\n {/* Search + one-click presets */}\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '8px 0 2px' }}>\n <input\n type=\"text\"\n value={query}\n placeholder={t('card.capabilities.search')}\n disabled={readonly || busy}\n style={{ ...controlStyle, flex: '1 1 160px', minWidth: '140px' }}\n onChange={(event) => setQuery(event.currentTarget.value)}\n />\n {PRESETS.map(preset => (\n <button\n key={preset.key}\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyPreset(preset.levels)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t(`card.capabilities.preset${preset.key === 'official' ? 'Official' : 'Generic'}`)}\n </button>\n ))}\n </div>\n\n {visible.length === 0\n ? <p style={hintStyle}>{t('card.capabilities.noMatches')}</p>\n : providerIds.map(providerId => {\n const providerEntries = visible.filter(entry => entry.providerId === providerId)\n const providerOpen = expandedProviders[providerId] === true || needle !== ''\n return (\n <div key={providerId} style={providerStyle}>\n <div style={providerHeadStyle}>\n <button\n type=\"button\"\n aria-expanded={providerOpen}\n disabled={readonly || busy}\n onClick={() => setExpandedProviders(current => ({\n ...current,\n [providerId]: current[providerId] !== true,\n }))}\n style={{\n ...iconButtonStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n }}\n title={providerOpen ? t('card.capabilities.collapseProvider') : t('card.capabilities.expandProvider')}\n >\n <ChevronIcon open={providerOpen} />\n </button>\n <p style={providerNameStyle}>{providerId}</p>\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '11px', whiteSpace: 'nowrap', color: 'var(--dsw-alias-label-secondary)' }}\n title={t('card.capabilities.developerRoleHint')}\n >\n <input\n type=\"checkbox\"\n checked={developerRoleDisabledOf(providers[providerId])}\n disabled={readonly || busy}\n onChange={(event) => toggleDeveloperRole(providerId, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.developerRole')}</span>\n </label>\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '11px', whiteSpace: 'nowrap', color: ocWritable ? 'var(--dsw-alias-label-secondary)' : 'var(--dsw-alias-label-disabled, var(--dsw-alias-label-caption))' }}\n title={ocScope === undefined ? t('card.capabilities.takeoverHintAbsent') : t('card.capabilities.takeoverHint')}\n >\n <input\n type=\"checkbox\"\n checked={takeoverActiveOf(viewOc, providerId)}\n disabled={readonly || busy || !ocWritable}\n onChange={(event) => toggleTakeover(providerId, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.takeover')}</span>\n </label>\n <p style={providerBadgeStyle}>{providerEntries.length}</p>\n </div>\n {providerOpen\n ? providerEntries.map(entry => {\n const key = entryKey(entry)\n const modelOpen = expandedModels[key] === true\n const efforts = effortsOf(entry.model)\n const thinking = typeof efforts === 'object'\n // Display falls back to the provider-level `compat` so a\n // route-declared thinking/effort posture shows on every model.\n const compat = compatOf(entry)\n const supportsEffort = compat['supportsReasoningEffort'] === true\n // Issue #2/#6/#7: a non-completions protocol refuses the\n // openai-completions compat FIELDS at the write site. Issue #7\n // moves them OUT of that surface entirely (they are not\n // rendered at all) instead of rendering them disabled: the\n // fields are only reachable once the model is DECLARED a\n // thinking model AND the route speaks completions. The\n // Thinking switch stays live on every protocol — it writes\n // protocol-neutral `reasoningEfforts`, the prerequisite.\n const compatGated = !completionsCompatConfigurable(entry)\n const compatOffered = thinking && !compatGated\n // What an older version force-wrote onto this row (or a\n // hand-edited cordis.yml left behind): a hard write blocker\n // for the whole route, so it is surfaced with one-click cleanup.\n const stale = staleThinkingCompatFields(entry)\n const meta = summaryOf(entry)\n const format = typeof compat['thinkingFormat'] === 'string'\n ? compat['thinkingFormat']\n : undefined\n return (\n <div key={key}>\n <div style={modelRowStyle}>\n <button\n type=\"button\"\n aria-expanded={modelOpen}\n disabled={readonly || busy}\n onClick={() => {\n const next = expandedModels[key] !== true\n setExpandedModels(current => ({ ...current, [key]: next }))\n if (next) { ensureDraft(entry); seedContext(entry) }\n }}\n style={{\n ...iconButtonStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n }}\n title={modelOpen ? t('card.capabilities.closeModelSettings') : t('card.capabilities.openModelSettings')}\n >\n <ChevronIcon open={modelOpen} />\n </button>\n <p style={modelIdStyle}>{entry.modelId}</p>\n <span style={badgeStyle} title=\"text\">{meta.text ? 'T' : '–'}</span>\n <span style={badgeStyle} title=\"image\">{meta.image ? 'IMG' : '–'}</span>\n {modelExtrasOf(entry.providerId, entry.modelId).includes('video') && <span style={badgeStyle} title=\"video (extraInputs)\">VID</span>}\n {modelExtrasOf(entry.providerId, entry.modelId).includes('audio') && <span style={badgeStyle} title=\"audio (extraInputs)\">AUD</span>}\n {modelExtrasOf(entry.providerId, entry.modelId).includes('pdf') && <span style={badgeStyle} title=\"pdf (extraInputs)\">PDF</span>}\n {meta.context !== null && <span style={badgeStyle}>{meta.context}</span>}\n {thinking && !supportsEffort && <span style={badgeStyle}>On/Off</span>}\n </div>\n {modelOpen\n ? (\n <div style={{ padding: '4px 10px 10px', borderTop: '1px solid var(--dsw-alias-border-l2)' }}>\n {compatGated && <p style={hintStyle}>{t('card.capabilities.apiUnsupported')}</p>}\n {stale.length > 0 && (\n <div style={{ margin: '0 0 8px' }}>\n <p style={{ ...hintStyle, color: 'var(--dsw-alias-warning, #b7791f)' }}>\n {t('card.capabilities.staleCompat')}: {stale.join(', ')}\n </p>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => stripStaleCompat(entry)}\n style={{ ...controlStyle, cursor: readonly || busy ? 'default' : 'pointer' }}\n >\n {t('card.capabilities.stripStaleCompat')}\n </button>\n </div>\n )}\n {/* Layer 1 — base capabilities: is it a thinking model? A vision model? */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', margin: '2px 0 8px' }}>\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}\n title={compatGated ? t('card.capabilities.thinkingNative') : undefined}\n >\n <input\n type=\"checkbox\"\n checked={thinking}\n disabled={readonly || busy}\n onChange={(event) => toggleThinking(entry, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.thinking')}</span>\n </label>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={meta.image}\n disabled={readonly || busy}\n onChange={(event) => {\n patchModel(entry.providerId, entry.index, (row) => {\n // Image input implies text input; the pair is written together.\n row['input'] = event.currentTarget.checked ? ['text', 'image'] : ['text']\n })\n }}\n />\n <span>{t('card.capabilities.vision')}</span>\n </label>\n {/* Video/audio/pdf declarations live on the taken-over transport\n (extraInputs): the host model-row input enum caps at text|image.\n `pdf` is accepted by the transport schema (audio|video|pdf) and\n renders uploaded PDFs as native OpenAI `file` parts. */}\n {(['video', 'audio', 'pdf'] as const).map(modality => (\n <label\n key={modality}\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px', color: takeoverActiveOf(viewOc, entry.providerId) ? undefined : 'var(--dsw-alias-label-disabled, var(--dsw-alias-label-caption))' }}\n title={t('card.capabilities.mediaHint')}\n >\n <input\n type=\"checkbox\"\n checked={modelExtrasOf(entry.providerId, entry.modelId).includes(modality)}\n disabled={readonly || busy || !ocWritable || !takeoverActiveOf(viewOc, entry.providerId)}\n onChange={(event) => toggleModelModality(entry.providerId, entry.modelId, modality, event.currentTarget.checked)}\n />\n <span>{t(`card.capabilities.${modality}`)}</span>\n </label>\n ))}\n </div>\n {/* Layer 2 — openai-completions-only compat switch, and\n only once the model is DECLARED a thinking model:\n a non-thinking model has no effort wire to declare,\n and a non-completions route refuses the field. */}\n {compatOffered\n ? (\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px', margin: '0 0 8px' }}\n >\n <input\n type=\"checkbox\"\n checked={supportsEffort}\n disabled={readonly || busy}\n onChange={(event) => toggleEffortCapable(entry, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.supportsEffort')}</span>\n </label>\n )\n : null}\n {/* Layer 3 — the per-level wire map (`reasoningEfforts`).\n PROTOCOL-NEUTRAL (issue #8): the host turns this table\n into pi-ai's `thinkingLevelMap`, which every protocol\n reads — Anthropic for its thinking budget, Responses\n for its reasoning effort, completions for the\n reasoning_effort string. So the editor must open on a\n non-completions route too; only the COMPLETIONS\n toggle-style guard (needs `supportsReasoningEffort`\n before offering reasoning_effort levels) applies. */}\n {thinking && (!compatOffered || supportsEffort)\n ? (\n <>\n {/* Per-level wire editor — the reasoningEfforts map */}\n <p style={fieldLabelStyle}>{t('card.capabilities.efforts')}</p>\n <div style={{ margin: '4px 0 6px' }}>\n {CAPABILITY_LEVELS.map(level => {\n const wire = drafts[key]?.[level]\n const on = wire !== undefined && wire !== null\n return (\n <div key={level} style={levelRowStyle}>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={on}\n disabled={readonly || busy}\n onChange={(event) => {\n const checked = event.currentTarget.checked\n setDrafts(current => {\n const draft = { ...(current[key] ?? {}) }\n draft[level] = checked\n ? (level === 'off' ? '' : level)\n : null\n return { ...current, [key]: draft }\n })\n }}\n />\n <span>{level}</span>\n </label>\n <span style={levelNameStyle}>{level === 'off' ? t('card.capabilities.offPlaceholder') : '→'}</span>\n <input\n type=\"text\"\n value={wire ?? ''}\n disabled={readonly || busy || !on}\n placeholder={t('card.capabilities.wirePlaceholder')}\n style={wireInputStyle}\n onChange={(event) => {\n setDrafts(current => {\n const draft = { ...(current[key] ?? {}) }\n draft[level] = event.currentTarget.value\n return { ...current, [key]: draft }\n })\n }}\n />\n </div>\n )\n })}\n </div>\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyDraft(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.applyLevel')}\n </button>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => resetDraft(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.restoreDefault')}\n </button>\n </div>\n </>\n )\n : null}\n {/* Layer 4 — thinking format (wire serialization). Same\n two conditions as Layer 2: it is a completions-only\n compat field describing how a THINKING model's\n levels serialize, so it is absent everywhere else. */}\n {compatOffered && (\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\n <label style={fieldStyle}>\n <span style={fieldLabelStyle}>{t('card.capabilities.thinkingFormat')}</span>\n <select\n style={controlStyle}\n value={format ?? 'inherit'}\n disabled={readonly || busy}\n onChange={(event) => {\n const next = event.currentTarget.value\n patchModel(entry.providerId, entry.index, (row) => {\n patchCompat(row, (compat) => {\n if (next === 'inherit') delete compat['thinkingFormat']\n else compat['thinkingFormat'] = next\n })\n })\n }}\n >\n <option value=\"inherit\">{t('card.capabilities.thinkingFormat.inherit')}</option>\n {THINKING_FORMATS.map(formatOption => (\n <option key={formatOption} value={formatOption}>{formatOption}</option>\n ))}\n </select>\n </label>\n </div>\n )}\n {/* Context-window limit: presets + custom integer (written to llm-pi-ai, live on next request) */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\n <label style={fieldStyle}>\n <span style={fieldLabelStyle}>{t('card.capabilities.contextWindow')}</span>\n <div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap', alignItems: 'center' }}>\n {CONTEXT_WINDOW_PRESETS.map(preset => (\n <button\n key={preset.value}\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyContextPreset(entry, preset.value)}\n style={{\n ...controlStyle,\n padding: '2px 8px',\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {preset.label}\n </button>\n ))}\n <input\n type=\"text\"\n value={contextRaw[key] ?? ''}\n disabled={readonly || busy}\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\n style={{ ...controlStyle, width: '120px' }}\n onChange={(event) => {\n const next = event.currentTarget.value\n setContextRaw(current => ({ ...current, [key]: next }))\n }}\n onBlur={() => applyContextInput(entry)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') event.currentTarget.blur()\n }}\n />\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => clearContext(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.contextClear')}\n </button>\n </div>\n {contextError[key] !== undefined\n ? (\n <span style={{ margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }}>\n {contextError[key]}\n </span>\n )\n : null}\n </label>\n </div>\n </div>\n )\n : null}\n </div>\n )\n })\n : null}\n </div>\n )\n })}\n {readonly ? <p style={hintStyle}>{t('card.readonly')}</p> : null}\n </div>\n )\n}\n\n/**\n * The absent-llm-deepseek snapshot: module-level CONSTANT (the stable-snapshot\n * rule that killed the first-ever panel mount, #185).\n */\nconst DS_ABSENT_SNAPSHOT = Object.freeze({\n status: 'unavailable' as const,\n value: undefined,\n revision: undefined,\n writable: false,\n base: undefined,\n user: undefined,\n mode: 'memory' as const,\n})\n\n/**\n * Official DeepSeek model context-window editor (4.4.0): the per-line editor\n * lived only in the ModelPanel; with the seat takeover off by default the\n * card owns it. Writes mirror the panel's DEEPSEEK branch exactly: the model\n * entry's `contextWindow` when listed, the route `defaultContextWindow`\n * otherwise (clear = back to the native 1M).\n * @param props - the llm-deepseek scope (absent = section hidden), copy, fence.\n * @returns the editor block, or null when the namespace/scope is unavailable.\n */\nfunction DeepSeekContextSection(props: {\n scope: SettingsScope<unknown> | undefined\n t: (key: string) => string\n readonly: boolean\n}): JSX.Element | null {\n const { scope, t, readonly } = props\n const subscribe = useCallback(\n (listener: () => void) => (scope !== undefined ? scope.subscribe(listener) : () => {}),\n [scope],\n )\n const getSnapshot = useCallback(\n () => (scope === undefined ? DS_ABSENT_SNAPSHOT : scope.getSnapshot()),\n [scope],\n )\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\n const [raw, setRaw] = useState<Record<string, string>>({})\n const [errors, setErrors] = useState<Record<string, string>>({})\n const [busy, setBusy] = useState(false)\n if (snapshot.status !== 'ready') return null\n const section = deepseekSectionOf(snapshot)\n const models = section.models ?? []\n if (models.length === 0 && section.defaultContextWindow === undefined) return null\n const writable = snapshot.writable && !readonly && !busy\n\n /** Commit one row's window (index -1 = the route default layer). */\n const commit = (index: number, value: number | undefined): void => {\n if (scope === undefined || !writable) return\n setBusy(true)\n const rows = (deepseekSectionOf(scope.getSnapshot()).models ?? []).map(entry => ({ ...entry }))\n const write = index >= 0\n ? scope.set('models', rows.map((entry, at) => {\n if (at !== index) return entry\n if (value === undefined) {\n const rest = { ...entry }\n delete rest['contextWindow']\n return rest\n }\n return { ...entry, contextWindow: value }\n }))\n : scope.set('defaultContextWindow', value ?? DEEPSEEK_DEFAULT_WINDOW)\n void write.then(\n () => {\n setBusy(false)\n setErrors(cur => {\n const next = { ...cur }\n delete next[String(index)]\n return next\n })\n },\n () => {\n setBusy(false)\n setErrors(cur => ({ ...cur, [String(index)]: t('card.capabilities.failed') }))\n },\n )\n }\n\n /** Validate and commit the custom input; empty clears. */\n const applyCustom = (index: number): void => {\n const key = String(index)\n const trimmed = (raw[key] ?? '').trim()\n if (trimmed === '') {\n commit(index, undefined)\n return\n }\n const validation = validateContextWindow(trimmed)\n if (!validation.ok) {\n setErrors(cur => ({\n ...cur,\n [key]: t(validation.reason === 'integer' ? 'input.context.integer' : 'input.context.range'),\n }))\n return\n }\n commit(index, validation.value)\n }\n\n const rows: { label: string; index: number; value: number | undefined }[] = [\n ...models.map((entry, index) => ({\n label: String(entry['name'] ?? entry['id'] ?? index),\n index,\n value: contextWindowOf(entry),\n })),\n { label: t('model.panel.window'), index: -1, value: section.defaultContextWindow },\n ]\n\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.dsContextTitle')}</p>\n {rows.map(row => {\n const key = String(row.index)\n return (\n <div key={key} style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '6px 0' }}>\n <span style={{ ...fieldLabelStyle, margin: 0 }}>{row.label}</span>\n <span style={badgeStyle}>{row.value === undefined ? t('input.context.unset') : formatContextWindow(row.value)}</span>\n {CONTEXT_WINDOW_PRESETS.map(preset => (\n <button\n key={preset.value}\n type=\"button\"\n disabled={!writable}\n onClick={() => commit(row.index, preset.value)}\n style={{\n ...controlStyle,\n padding: '2px 8px',\n cursor: writable ? 'pointer' : 'default',\n opacity: writable ? 1 : 0.5,\n }}\n >\n {preset.label}\n </button>\n ))}\n <input\n type=\"text\"\n inputMode=\"numeric\"\n value={raw[key] ?? ''}\n disabled={!writable}\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\n style={{ ...controlStyle, width: '120px' }}\n onChange={event => setRaw(cur => ({ ...cur, [key]: event.currentTarget.value }))}\n onKeyDown={event => { if (event.key === 'Enter') applyCustom(row.index) }}\n />\n <button\n type=\"button\"\n disabled={!writable || row.value === undefined}\n onClick={() => commit(row.index, undefined)}\n style={{ ...controlStyle, padding: '2px 8px' }}\n >\n {t('input.context.clear')}\n </button>\n {errors[key] !== undefined && (\n <span style={{ fontSize: '12px', color: 'var(--dsw-alias-danger, #e5484d)' }}>{errors[key]}</span>\n )}\n </div>\n )\n })}\n </div>\n )\n}\n\n/**\n * The card body, wrapped in a disclosure shell like every peer settings card:\n * a header (name + description + chevron) that toggles the body, expanded by\n * default so the family section reads as an open page of drawers.\n * @param props - locale copy and the injected scopes.\n */\nexport function ThinkingLevelsCard({ t, scope, piAiScope, ocScope, deepseekScope }: ThinkingLevelsCardProps): JSX.Element {\n const [open, setOpen] = useState(true)\n // Stable subscription identities (see ModelCapabilities): the host controller\n // folds a fresh snapshot on every subscribe, so per-render inline lambdas\n // would resubscribe→fold→re-render forever.\n const subscribe = useCallback((listener: () => void) => scope.subscribe(listener), [scope])\n const getSnapshot = useCallback(() => scope.getSnapshot(), [scope])\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\n const unavailable = snapshot.status === 'unavailable'\n const readonly = unavailable || !snapshot.writable\n // configForms serves the STORED doc: volatile fields arrive as plain values\n // (simplify() unwraps the live refs before persistence), so the card sees a\n // plain config shape even though the host-side type carries Volatile unions.\n const value = (snapshot.value ?? {}) as unknown as Partial<{\n enabled: boolean\n level: EffortId\n allowDowngrade: boolean\n allowUpgrade: boolean\n takeover: boolean\n takeoverUi: boolean\n defaultPricing: PricingPolicy\n simpleTools: string[]\n }>\n // Optimistic overlay for this card's own writes (plan §E): same contract as\n // the capability card's overlay — clear on resolve(true), roll back + banner\n // on resolve(false).\n const [pendingTl, setPendingTl] = useState<Partial<{ enabled: boolean; level: EffortId; allowDowngrade: boolean; allowUpgrade: boolean; takeover: boolean; takeoverUi: boolean; defaultPricing: PricingPolicy; simpleTools: string[] }>>({})\n const [writeErrorTl, setWriteErrorTl] = useState<string | null>(null)\n // The simple-tool allowlist is edited as free text (comma/space separated) and\n // written back as a deduped string[]; the local text is the source of truth for\n // the input so typing a trailing comma does not fight the persisted array.\n const [simpleToolsText, setSimpleToolsText] = useState<string>((value.simpleTools ?? []).join(', '))\n const viewValue = { ...value, ...pendingTl }\n // 首次使用引导:本地标记持久化;卡底「重新查看引导」清标记就地重开。\n const [guideOpen, setGuideOpen] = useState(() => !isGuideSkipped('thinking-levels'))\n const level = EFFORT_OPTIONS.includes(viewValue.level as EffortId) ? viewValue.level as EffortId : 'auto'\n const defaultPricing = PRICING_OPTIONS.includes(viewValue.defaultPricing as PricingPolicy) ? viewValue.defaultPricing as PricingPolicy : 'estimate'\n const writeTl = (field: 'enabled' | 'level' | 'allowDowngrade' | 'allowUpgrade' | 'simpleTools' | 'takeover' | 'takeoverUi' | 'defaultPricing', v: unknown): void => {\n setPendingTl((cur) => ({ ...cur, [field]: v as never }))\n void setWithRetry(scope, field, v).then(({ ok }) => {\n setPendingTl((cur) => {\n const rest = { ...cur }\n delete rest[field]\n return rest\n })\n if (!ok) setWriteErrorTl(t('card.writeError'))\n })\n // The takeover master carries OC.enabled with it in-session (same value):\n // the host mirror reconciles at boot, but an in-session flip must take\n // effect immediately — writing the same value the mirror would write can\n // never fight it.\n if (field === 'takeover' && typeof v === 'boolean' && ocScope !== undefined) {\n void setWithRetry(ocScope, 'enabled', v).then(({ ok }) => {\n if (!ok) setWriteErrorTl(t('card.writeError'))\n })\n }\n }\n\n return (\n <div style={{\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\n borderRadius: '12px',\n transition: 'border-color 0.16s, background 0.16s',\n }}>\n <button\n type=\"button\"\n aria-expanded={open}\n style={{\n appearance: 'none',\n width: '100%',\n font: 'inherit',\n color: 'inherit',\n textAlign: 'left',\n cursor: 'pointer',\n background: 'none',\n border: 0,\n borderRadius: '12px',\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n padding: '14px 16px',\n }}\n onClick={() => { setOpen(current => !current) }}\n >\n <span style={{ flex: '1 1 0%', minWidth: 0 }}>\n <div style={{ fontSize: '14px', fontWeight: 600, color: 'var(--dsw-alias-label-primary)' }}>{t('card.title')}</div>\n <div style={{ color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))', fontSize: '13px', lineHeight: 1.5 }}>{t('card.description')}</div>\n </span>\n <svg\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden\n style={{\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))',\n flex: '0 0 auto',\n transition: 'transform 0.16s',\n transform: open ? 'rotate(180deg)' : 'none',\n }}\n >\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n {open\n ? (\n <div style={{ padding: '12px 16px' }}>\n {guideOpen\n ? (\n <GuidePanel\n ns=\"thinking-levels\"\n steps={guideSteps(THINKING_GUIDE_STEPS)}\n onClose={() => { setGuideOpen(false) }}\n />\n )\n : null}\n {unavailable\n ? (\n <div style={{ fontSize: '13px', color: 'var(--dsw-alias-label-tertiary)' }}>\n {t('card.unavailable')}\n </div>\n )\n : (\n <>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-level\" style={labelStyle}>{t('card.level')}</label>\n <select\n id=\"plugin-config-thinking-levels-level\"\n value={level}\n disabled={readonly}\n style={controlStyle}\n onChange={(event) => { writeTl('level', event.currentTarget.value as EffortId) }}\n >\n {EFFORT_OPTIONS.map((option) => (\n <option key={option} value={option}>{t(`card.level.${option}`)}</option>\n ))}\n </select>\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-enabled\" style={labelStyle}>{t('card.enabled')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-enabled\"\n checked={viewValue.enabled ?? true}\n disabled={readonly}\n onChange={(next) => { writeTl('enabled', next) }}\n />\n </div>\n <div style={rowStyle}>\n <label\n htmlFor=\"plugin-config-thinking-levels-takeover\"\n style={labelStyle}\n title={t('card.masterTakeoverHint')}\n >{t('card.masterTakeover')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-takeover\"\n checked={viewValue.takeover ?? false}\n disabled={readonly}\n title={t('card.masterTakeoverHint')}\n onChange={(next) => { writeTl('takeover', next) }}\n />\n </div>\n <div style={rowStyle}>\n <label\n htmlFor=\"plugin-config-thinking-levels-takeover-ui\"\n style={labelStyle}\n title={t('card.takeoverUiHint')}\n >{t('card.takeoverUi')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-takeover-ui\"\n checked={viewValue.takeoverUi ?? false}\n disabled={readonly}\n title={t('card.takeoverUiHint')}\n onChange={(next) => { writeTl('takeoverUi', next) }}\n />\n </div>\n {/* Visible explainer (user feedback: what enabling actually\n buys must be readable without hunting for a tooltip). */}\n <p style={{ ...hintStyle, margin: '2px 0 10px' }}>{t('card.takeoverUiHint')}</p>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-downgrade\" style={labelStyle}>{t('card.allowDowngrade')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-downgrade\"\n checked={viewValue.allowDowngrade ?? true}\n disabled={readonly || viewValue.level !== 'auto'}\n onChange={(next) => { writeTl('allowDowngrade', next) }}\n />\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-upgrade\" style={labelStyle}>{t('card.allowUpgrade')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-upgrade\"\n checked={viewValue.allowUpgrade ?? false}\n disabled={readonly || viewValue.level !== 'auto'}\n onChange={(next) => { writeTl('allowUpgrade', next) }}\n />\n </div>\n <div style={rowStyle}>\n <label\n htmlFor=\"plugin-config-thinking-levels-default-pricing\"\n style={labelStyle}\n title={t('card.defaultPricingHint')}\n >{t('card.defaultPricing')}</label>\n <select\n id=\"plugin-config-thinking-levels-default-pricing\"\n value={defaultPricing}\n disabled={readonly}\n style={controlStyle}\n onChange={(event) => { writeTl('defaultPricing', event.currentTarget.value) }}\n >\n {PRICING_OPTIONS.map((option) => (\n <option key={option} value={option}>{t(`card.defaultPricing.${option}`)}</option>\n ))}\n </select>\n </div>\n <div style={fieldStyle}>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-simple-tools\" style={labelStyle}>{t('card.simpleTools')}</label>\n <input\n id=\"plugin-config-thinking-levels-simple-tools\"\n type=\"text\"\n style={controlStyle}\n disabled={readonly}\n value={simpleToolsText}\n placeholder=\"shell, pwsh, web_fetch\"\n onChange={(event) => {\n const raw = event.currentTarget.value\n setSimpleToolsText(raw)\n const parsed = Array.from(new Set(raw.split(/[,\\s]+/).map(token => token.trim()).filter(token => token !== '')))\n writeTl('simpleTools', parsed)\n }}\n />\n </div>\n <p style={{ ...hintStyle, margin: '2px 0 10px' }}>{t('card.simpleToolsHint')}</p>\n </div>\n {writeErrorTl !== null && (\n <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-danger, #e5484d)' }} role=\"status\">⚠ {writeErrorTl}</p>\n )}\n {!snapshot.writable\n && <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-label-tertiary)' }}>{t('card.readonly')}</p>}\n <ModelCapabilities scope={piAiScope} ocScope={ocScope} tlScope={scope} t={t} readonly={readonly} />\n <DeepSeekContextSection scope={deepseekScope} t={t} readonly={readonly} />\n {/* 引导重启入口:跳过之后想再看一次,不必清浏览器存储。 */}\n <p style={{ margin: '10px 0 0' }}>\n <GuideRestartButton ns=\"thinking-levels\" onOpen={() => { setGuideOpen(true) }} />\n </p>\n </>\n )}\n </div>\n )\n : null}\n </div>\n )\n}\n","/**\r\n * FamilySettingsSection — the top-level 「起子插件设置」 settings section.\r\n *\r\n * One `settings.section` nav entry (registered by this plugin) whose entry\r\n * declares the `dsh-family.tab` child slot; sibling plugins (session-guard\r\n * first) contribute their cards there via `ctx.slots.inject('dsh-family.tab',\r\n * …)`. The section renders the family's own thinking-levels card as the first\r\n * tab and every contributor as a following tab — the same tabs-around-pages\r\n * pattern the built-in Plugins section uses (ui-settings-plugins): the tab\r\n * ledger is a HostObservable projected from the child-slot registry, and the\r\n * active tab mounts through `renderSlot(key, {}, { only: id })`. Each card is\r\n * a disclosure drawer expanded by default, so an opened tab shows its full\r\n * panel right away.\r\n *\r\n * When this section is absent the whole family surface is absent; a\r\n * contributor's inject simply idles (an undischarged wait never blocks the\r\n * client half), so plugins stay fully functional without their card.\r\n */\r\nimport { useEffect, useState } from 'react'\r\nimport type { JSX, ReactNode } from 'react'\r\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\r\nimport { ThinkingLevelsCard, type ThinkingLevelsCardInjected } from './card.tsx'\r\n\r\n/**\r\n * Structural mirrors of the ui-slots faces this section consumes (the same\r\n * pattern as scope-face.ts: the package's `export *` type graph resolves\r\n * unreliably outside the harness workspace, so the handful of shapes are\r\n * declared locally instead).\r\n */\r\ntype HostObservable<T> = {\r\n getSnapshot(): T\r\n subscribe(listener: () => void): () => void\r\n}\r\n\r\n/** One contributor tab projected from the `dsh-family.tab` ledger. */\r\nexport interface FamilyTabEntry {\r\n id: string\r\n order: number\r\n label: string\r\n}\r\n\r\n/** Registration-side business face for the section. */\r\nexport interface FamilySectionInjected extends ThinkingLevelsCardInjected {\r\n hooks: {\r\n /** Ordered projection of the contributor ledger (locale-aware). */\r\n tabs: HostObservable<readonly FamilyTabEntry[]>\r\n }\r\n /** Apply-time EAGER locale binder — the ≤0.1.6 stand-in for the host's\r\n * PropsLocale delivery (0.1.7+ shells pass `t` and this is ignored). */\r\n tFallback?: (key: string) => string\r\n /** Direct-mount face for contributor tabs where the shell delivers no\r\n * renderSlot (≤0.1.6): mounts the active ledger entry's own component from\r\n * the raw `ctx.slots.entries` records. Null on any failure. */\r\n renderContributor?: (id: string) => ReactNode\r\n}\r\n\r\n/**\r\n * The framework-delivered child-slot dispatcher, narrowed to our one child key.\r\n * Optional: the Plugins-page `plugins.bundle.config` card renders this same\r\n * component WITHOUT a children declaration (the `dsh-family.tab` child slot is\r\n * claimed by the settings.section entry alone), so the machinery delivers no\r\n * renderSlot seat on that surface — contributor tabs degrade to empty panels\r\n * there instead of crashing on an absent dispatcher.\r\n */\r\ninterface FamilyRenderSlots {\r\n renderSlot?(key: 'dsh-family.tab', owner?: object, opts?: { only?: string; fallback?: React.ReactNode }): React.ReactNode\r\n}\r\n\r\n/** Full props: locale + contributor dispatcher + the resolved inject face. */\r\nexport type FamilySettingsSectionProps =\r\n PropsLocale<'thinking-levels'>\r\n & FamilyRenderSlots\r\n & FamilySectionInjected\r\n\r\n/** This plugin's own tab, always first: the thinking-levels card itself. */\r\nconst OWN_TAB_ID = 'thinking-levels'\r\n\r\nconst NO_TABS: readonly FamilyTabEntry[] = []\r\n\r\n/** The hooks-compartment selector hook face (bound `use<Name>` hook) —\r\n * delivered by 0.1.7+ shells only; optional for the ≤0.1.6 degraded read. */\r\ninterface FamilyHooksFace {\r\n useTabs?: <S>(selector: (value: readonly FamilyTabEntry[]) => S) => S\r\n}\r\n\r\n/**\r\n * Contributor ledger reader across shell generations. 0.1.7+ shells deliver\r\n * the hooks compartment (`useTabs`); ≤0.1.6 shells deliver none, so the same\r\n * projected observable (`hooks.tabs`, injected by the section factory) is read\r\n * through React's own subscription instead. The face choice is fixed per host\r\n * (a shell never grows hooks mid-session), so the hook order stays stable per\r\n * component instance even though the two paths differ.\r\n */\r\nfunction useContributorTabs(\r\n hooksFace: FamilyHooksFace,\r\n hooksTabs?: HostObservable<readonly FamilyTabEntry[]>,\r\n): readonly FamilyTabEntry[] {\r\n const [polled, setPolled] = useState<readonly FamilyTabEntry[]>(\r\n () => hooksTabs?.getSnapshot() ?? NO_TABS,\r\n )\r\n useEffect(() => {\r\n if (hooksFace.useTabs !== undefined || hooksTabs === undefined) return\r\n return hooksTabs.subscribe(() => setPolled(hooksTabs.getSnapshot()))\r\n }, [hooksFace, hooksTabs])\r\n if (hooksFace.useTabs !== undefined) return hooksFace.useTabs(value => value)\r\n return polled\r\n}\r\n\r\nexport function FamilySettingsSection(props: FamilySettingsSectionProps): JSX.Element {\r\n const { t: tHost, renderSlot, scope, piAiScope, ocScope, deepseekScope } = props\r\n // Locale: the host's PropsLocale delivery when present (0.1.7+), the injected\r\n // EAGER binder when not (≤0.1.6), identity as the last resort — a thrown\r\n // translate kills the whole section render.\r\n const t = tHost ?? props.tFallback ?? ((key: string) => key)\r\n const contributors = useContributorTabs(props as unknown as FamilyHooksFace, props.hooks?.tabs)\r\n const [activeId, setActiveId] = useState<string>(OWN_TAB_ID)\r\n const rows = [\r\n { id: OWN_TAB_ID, order: Number.NEGATIVE_INFINITY, label: t('card.title') },\r\n ...contributors,\r\n ]\r\n const active = rows.some(row => row.id === activeId) ? activeId : OWN_TAB_ID\r\n\r\n return (\r\n <div style={{ display: 'grid', gap: '12px' }}>\r\n <div role=\"tablist\" aria-label={t('family.title')} style={{ display: 'flex', flexWrap: 'wrap', gap: '4px' }}>\r\n {rows.map(row => (\r\n <button\r\n key={row.id}\r\n type=\"button\"\r\n role=\"tab\"\r\n aria-selected={row.id === active}\r\n onClick={() => { setActiveId(row.id) }}\r\n style={{\r\n appearance: 'none',\r\n font: 'inherit',\r\n cursor: 'pointer',\r\n whiteSpace: 'nowrap',\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\r\n background: row.id === active ? 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.08))' : 'none',\r\n color: 'var(--dsw-alias-label-primary, inherit)',\r\n borderRadius: '8px',\r\n padding: '5px 12px',\r\n fontSize: '13px',\r\n }}\r\n >\r\n {row.label}\r\n </button>\r\n ))}\r\n </div>\r\n <div role=\"tabpanel\">\r\n {active === OWN_TAB_ID\r\n ? <ThinkingLevelsCard t={t} scope={scope} piAiScope={piAiScope} ocScope={ocScope} deepseekScope={deepseekScope} />\r\n : renderSlot\r\n ? renderSlot('dsh-family.tab', {}, { only: active, fallback: null })\r\n : props.renderContributor?.(active) ?? null}\r\n </div>\r\n </div>\r\n )\r\n}\r\n","/**\r\n * dsh-thinking-levels — browser half.\r\n *\r\n * Registers the `thinking-levels` dictionaries and one composer model-seat\r\n * panel (`conversation.input.model`) carrying the per-line context-window\r\n * editor.\r\n *\r\n * The plugin's own settings (default level, enable toggle, scheduler bounds)\r\n * have NO standalone settings card since the DSH 0.1.7 line: the host renders\r\n * the Plugins settings form declaratively from the `.volatile()` fields of the\r\n * schema in src/index.ts, and the runtime values flow through the\r\n * `configForms` service keyed by the composition entry id. The former\r\n * per-plugin settings card was dropped with that migration (its seat no\r\n * longer exists in 0.1.7), including its llm-pi-ai model-capability editor.\r\n * DSH 0.2.0 restores a client face for them: the family settings section\r\n * below and the Plugins-page `plugins.bundle.config` card (same component,\r\n * same inject factory).\r\n *\r\n * All @deepseek-ai/* imports are type-only: collaboration happens through\r\n * cordis services (`configForms`) and slot registration only (client bundle\r\n * purity).\r\n */\r\nimport { createElement } from 'react'\r\nimport type { ComponentType, ReactNode } from 'react'\r\nimport type { Context as ClientContext } from '@deepseek-ai/cordis'\r\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\r\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\r\n// DSH 0.1.5 moved the `ctx.slots` Context augmentation here (it used to live in\r\n// the retired `dsh-client-runtime` package): importing the client types restores\r\n// the typed `ctx.slots` member on the cordis Context surface.\r\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\r\nimport { NS, de, en, es, fr, it, ja, ko, pt, ru, zh } from './locales.ts'\r\nimport { ModelPanel, type ModelPanelInjected } from './model-panel.tsx'\r\nimport { EffortTrace } from './effort-trace.tsx'\r\nimport { projectionValueOf } from './projection-value.ts'\r\nimport { ProjectionDataHook } from './context-ring.tsx'\r\nimport { FamilySettingsSection, type FamilySectionInjected, type FamilyTabEntry } from './family-tab.tsx'\r\n// Type-only: pulls the settings shell's SlotMap merges ('settings.section').\r\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\r\n\r\n/**\r\n * The plugin-family shared settings surface: ONE top-level `settings.section`\r\n * nav entry (「起子插件设置」) whose entry declares the `dsh-family.tab` child\r\n * slot; sibling plugins contribute their cards there (session-guard first) and\r\n * the section renders them as tabs — the built-in Plugins section's\r\n * tabs-around-pages pattern; every card drawer is expanded by default. Declaring is claiming (ui-slots): the child slot\r\n * exists exactly while this section entry does, and a contributor's\r\n * `ctx.slots.inject('dsh-family.tab', …)` idles harmlessly if this plugin is\r\n * absent (an undischarged inject never blocks the client half).\r\n */\r\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\r\n interface SlotMap {\r\n 'dsh-family.tab': { kind: 'list'; scope: 'root' }\r\n /**\r\n * Plugins-page configuration card (official ui-plugin-manager contract):\r\n * keyed by the bundle's package name, rendered on the bundle's detail page\r\n * with `{ view: 'page' }` owner props. Declared here because community\r\n * plugins don't import the official package's client types — the same\r\n * merge pattern as dsh-tidy-display's settings-slots.ts.\r\n */\r\n 'plugins.bundle.config': { kind: 'keyed'; scope: 'root'; owner: Record<string, unknown> }\r\n }\r\n}\r\n\r\n/** Services required by the browser half (the common floor across all host\r\n * generations). Generation-specific services resolve through separate deferred\r\n * injects below: a cordis inject naming an absent service would pend forever,\r\n * so `configForms` (0.1.7+), `settingsScope` (≤0.1.6) and `modelDirectories`\r\n * each get their own inject that simply never fires where the service is\r\n * missing — shape-detected availability, never version-guessed.\r\n */\r\nexport const inject = ['slots', 'locale']\r\n\r\n/**\r\n * The openai-completions transport's settings namespace, resolved per render:\r\n * its composition entry id changed shape across packaging history\r\n * (`dsh-llm-openai-completions` in the 0.4.0 fragment; earlier manual installs\r\n * used the short form), so both candidates are probed and the one the host's\r\n * describe document actually carries wins. A handle for an absent namespace\r\n * reports `unavailable` forever, which the capability card treats as \"transport\r\n * absent\" — that degradation is only honest when BOTH candidates are absent.\r\n */\r\nconst OC_NAMESPACE_PREFERRED = 'dsh-llm-openai-completions'\r\nconst OC_NAMESPACE_LEGACY = 'llm-openai-completions'\r\n\r\ninterface ScopeStatusFace {\r\n getSnapshot?: () => { status?: 'loading' | 'ready' | 'unavailable' }\r\n}\r\n\r\nfunction ocTransportScopeOf(scopeOf: (ns: string) => unknown): unknown {\r\n const preferredScope = scopeOf(OC_NAMESPACE_PREFERRED) as ScopeStatusFace | undefined\r\n const status = typeof preferredScope?.getSnapshot === 'function'\r\n ? preferredScope.getSnapshot().status\r\n : undefined\r\n // `loading` means the mirror is still folding — the preferred face may still\r\n // turn ready, so keep it rather than degrading to the legacy name.\r\n if (status === 'unavailable') return scopeOf(OC_NAMESPACE_LEGACY)\r\n return preferredScope\r\n}\r\n\r\nconst TL_NAMESPACE_MODERN = 'dsh-thinking-levels'\r\nconst TL_NAMESPACE_LEGACY = 'thinking-levels'\r\n\r\n/**\r\n * The plugin's own settings scope, generation-probed like the transport above:\r\n * 0.1.7+ keys configForms by the composition entry id (`dsh-thinking-levels`),\r\n * while ≤0.1.6 hosts register the settings section under `thinking-levels` —\r\n * the same namespace the legacy card reads. A handle for an absent namespace\r\n * reports `unavailable` forever, which is the probe signal.\r\n */\r\nfunction tlSettingsScopeOf(scopeOf: (ns: string) => unknown): unknown {\r\n const modern = scopeOf(TL_NAMESPACE_MODERN) as ScopeStatusFace | undefined\r\n const status = typeof modern?.getSnapshot === 'function'\r\n ? modern.getSnapshot().status\r\n : undefined\r\n if (status === 'unavailable') {\r\n logOwnScopeOnce(false, status)\r\n return scopeOf(TL_NAMESPACE_LEGACY)\r\n }\r\n logOwnScopeOnce(true, status)\r\n return modern\r\n}\r\n\r\n/** One-shot generation probe line (client mirror of the server's\r\n * installSection-style log): which own-settings namespace the family section\r\n * settled on, and why. Never repeats — render-time callers hit this often. */\r\nlet ownScopeLogged = false\r\nfunction logOwnScopeOnce(modern: boolean, status: unknown): void {\r\n if (ownScopeLogged) return\r\n ownScopeLogged = true\r\n console.info(`[dsh-thinking-levels] own-scope ns = ${modern ? TL_NAMESPACE_MODERN : TL_NAMESPACE_LEGACY} (modern status=${String(status)})`)\r\n}\r\n\r\n/**\r\n * Raw ledger record: ui-slots keeps `component` and the per-entry `inject` on\r\n * the entry objects of `ctx.slots.entries(key)` on every host line (the\r\n * public SlotMap typing narrows to options only, so the direct-mount face\r\n * widens the shape locally).\r\n */\r\ninterface FamilyLedgerEntry {\r\n options: { id?: string; locale?: string }\r\n component?: ComponentType<Record<string, unknown>>\r\n inject?: () => unknown\r\n}\r\n\r\n/**\r\n * Client plugin body: dictionaries plus the composer quick-control slot.\r\n * @param ctx - client root context.\r\n */\r\nexport function apply(ctx: ClientContext): void {\r\n // `locale.bind` is a 0.1.7+ face; the only apply-scope use is the family\r\n // section's nav label (registered in the configForms path below), so the\r\n // fallback never renders anywhere.\r\n const locale = ctx.locale as { bind?: (ns: string) => (key: string) => string }\r\n const t = typeof locale.bind === 'function' ? locale.bind(NS) : (key: string) => key\r\n // The one scope factory, set by whichever generation's settings channel the\r\n // host provides (see the waist injects at the end of apply).\r\n let scopeOf: ((ns: string) => unknown) | undefined\r\n /** One-shot guard for `registerModernSurface` — see its declaration for why a\r\n * second call is not merely redundant but destructive (double seating). */\r\n let modernSurfaceClaimed = false\r\n const scopeInject = (ctx as unknown as {\r\n inject: (deps: string[], cb: (scope: Record<string, unknown>) => void) => void\r\n }).inject\r\n\r\n // `register(ns, dicts)` is typed to the built-in locale ids (`zh` / `en`\r\n // only); the shipped `ja` / `ko` / `fr` / `de` / `it` / `ru` / `es` / `pt`\r\n // dictionaries go through the single-locale overload, so they are installed\r\n // and ready once DSH publishes those ids.\r\n ctx.effect(() => {\r\n const disposers = [\r\n ctx.locale.register(NS, { zh, en }),\r\n ctx.locale.register(NS, 'ja', ja),\r\n ctx.locale.register(NS, 'ko', ko),\r\n ctx.locale.register(NS, 'fr', fr),\r\n ctx.locale.register(NS, 'de', de),\r\n ctx.locale.register(NS, 'it', it),\r\n ctx.locale.register(NS, 'ru', ru),\r\n ctx.locale.register(NS, 'es', es),\r\n ctx.locale.register(NS, 'pt', pt),\r\n ]\r\n return () => { for (const dispose of disposers) dispose() }\r\n }, 'dsh-thinking-levels: dictionaries')\r\n\r\n // Composer model seat: one registered entry named after the seat with\r\n // `priority: -1` replaces the shipped `ModelSelect` trigger and popup\r\n // outright (the official popup renders no slots, so occupying the seat is\r\n // the only way to contribute inside it — the dsh-reasoning-effort pattern).\r\n // The panel renders its own picker over the harness's shared\r\n // `modelDirectories` service (model switching keeps working) and puts a\r\n // context-window editor on every model line: custom gateways write the\r\n // `llm-pi-ai` entry config, official DeepSeek models write the\r\n // `llm-deepseek` entry (its `models[].contextWindow`, else the provider\r\n // default).\r\n // Resolve `modelDirectories` through a cordis inject, NOT a synchronous\r\n // property read: at apply time the ui-model-selection module's service may\r\n // not be started yet, and the property read returned undefined on 0.1.7\r\n // hosts — the whole panel was silently skipped and the shipped selector\r\n // stayed. The deferred inject waits for the service to start; on harness\r\n // lines without the module the callback never fires or sees undefined,\r\n // leaving the shipped selector untouched.\r\n //\r\n // The inject must ALSO declare the resolver's own dependency set\r\n // (`sessions`, `remote`, `remote.session` — ui-model-selection's\r\n // `ModelDirectoryResolver.static inject`): a cordis Service resolves\r\n // `this.ctx` through the ACCESSING context (the traceable proxy rebinds\r\n // `ctx` to the reader), and `directoryFor()` reads `this.ctx.sessions` —\r\n // with only `modelDirectories` declared that read came back undefined and\r\n // every `directoryFor` call threw, so the seat entry crashed on first\r\n // render and the slot boundary abdicated it back to the shipped selector.\r\n /**\r\n * takeoverUi seat watchdog (4.4.1, desktop field report): the one-shot\r\n * mirror read at inject time was not enough — on the real host the seat\r\n * callback fires when `modelDirectories` starts, which can precede BOTH the\r\n * settings waist binding (`scopeOf` still undefined) and the mirror fold\r\n * (status `loading`). A static decision then never seats even with the\r\n * switch on, and no reload changes it (the service order is the same every\r\n * boot). Seating becomes an evaluation driven by every input that can move\r\n * it: the declaration, the waist binding, and each settings change — flip\r\n * the switch and the panel seats (or abdicates) immediately, no reload.\r\n */\r\n let seatDirectories: ModelDirectoriesFace | undefined\r\n /** The `sessions` face, kept for the chip's projection read (issue #11). */\r\n let sessionsRef: SessionsFace | undefined\r\n let seatDeclared = false\r\n let seatWatched = false\r\n let seatClaimed: (() => void) | undefined\r\n let seatWatchOff: (() => void) | undefined\r\n let seatHandleMemo: {\r\n getSnapshot?: () => { status?: string; value?: unknown }\r\n subscribe?: (listener: () => void) => () => void\r\n } | undefined\r\n const seatHandle = (): typeof seatHandleMemo => {\r\n if (seatHandleMemo === undefined && scopeOf !== undefined) {\r\n seatHandleMemo = tlSettingsScopeOf(scopeOf) as NonNullable<typeof seatHandleMemo>\r\n }\r\n return seatHandleMemo\r\n }\r\n /**\r\n * The level the session's last committed request actually carried, read from\r\n * this plugin's own `tlAutoSchedule` projection (issue #11).\r\n *\r\n * Why not the directory's `current.reasoningEffort`: the host derives it from\r\n * `modelSelection.next` — the selection the NEXT step uses, i.e. the user's\r\n * intent (`dsh-client-ui-model-selection/src/client/directory.ts:178`). With\r\n * `auto` picked, `next.reasoningEffort` stays `'auto'` for the whole session,\r\n * so the chip had no way to show what was really sent. The projection folds\r\n * the committed `request/header`, which carries the resolved level.\r\n *\r\n * Returns `undefined` — never throws — when the projection channel or the\r\n * projection itself is absent (older hosts, cold sessions). The chip then\r\n * degrades to the plain intent label.\r\n * @param sessions - the sessions face captured from the scope inject.\r\n * @param sessionId - the owning session.\r\n * @returns the last effective effort id, or undefined.\r\n */\r\n const lastEffectiveOf = (sessions: SessionsFace | undefined, sessionId: string): string | undefined => {\r\n try {\r\n const face = sessions?.binding(sessionId)?.session?.projections?.faceOf?.('tlAutoSchedule')\r\n const snapshot = typeof face?.getSnapshot === 'function' ? face.getSnapshot() : undefined\r\n // The projection face returns the state BARE; the `{ value }` wrapper is\r\n // the settings-handle shape and read as undefined here (issue #11's\r\n // symptom back on 4.6.0). See projection-value.ts.\r\n const raw = projectionValueOf(snapshot)?.['lastEffective']\r\n return typeof raw === 'string' && raw.length > 0 ? raw : undefined\r\n } catch {\r\n // A thrown inject abdicates the seat entry and the shipped selector comes\r\n // back — never let a cosmetic read do that.\r\n return undefined\r\n }\r\n }\r\n const takeoverUiOn = (): boolean => {\r\n const snap = typeof seatHandle()?.getSnapshot === 'function' ? seatHandle()!.getSnapshot!() : undefined\r\n return snap?.status === 'ready'\r\n && (snap.value as { takeoverUi?: unknown } | undefined)?.takeoverUi === true\r\n }\r\n const seatOptions = (directories: ModelDirectoriesFace): Record<string, unknown> => ({\r\n name: 'conversation.input.model',\r\n id: 'context-window-model-panel',\r\n priority: -1,\r\n locale: NS,\r\n inject: (sessionId: string): ModelPanelInjected => {\r\n // Entry ids of the target plugins: each dsh llm plugin's composition\r\n // entry id matches its settings namespace (`llm-pi-ai` / `llm-deepseek`).\r\n // A `directoryFor` failure (odd session shape) must not throw out of\r\n // the render: a thrown inject abdicates the seat entry — the whole\r\n // takeover — so degrade to the unavailable face instead.\r\n let directory: ModelDirectoryFace | undefined\r\n try {\r\n directory = directories.directoryFor(sessionId)\r\n } catch {\r\n directory = undefined\r\n }\r\n return {\r\n directory,\r\n // Resolved through the generation waist; by the time a session\r\n // renders, both deferred injects have long settled.\r\n piAiScope: scopeOf?.('llm-pi-ai') as never,\r\n deepseekScope: scopeOf?.('llm-deepseek') as never,\r\n // The plugin's own settings face: the chip reads the configured\r\n // level as the user-intent source (issue #5).\r\n tlScope: scopeOf === undefined ? undefined : tlSettingsScopeOf(scopeOf) as never,\r\n // Issue #11: the level the last request ACTUALLY carried. The host's\r\n // `modelSelection.next` (what the directory exposes as `current`) is the\r\n // user's intent — with `auto` selected it stays `'auto'` forever, so the\r\n // chip could never show what was really sent. Read our own projection\r\n // instead; `undefined` on any host without it, and the chip degrades to\r\n // the plain intent label.\r\n lastEffectiveEffort: lastEffectiveOf(sessionsRef, sessionId),\r\n }\r\n },\r\n })\r\n /** Apply the current intent: seat while on, release the seat while off. */\r\n const evaluateSeat = (): void => {\r\n if (!seatDeclared || seatDirectories === undefined || scopeOf === undefined) return\r\n const on = takeoverUiOn()\r\n if (on && seatClaimed === undefined) {\r\n try {\r\n seatClaimed = ctx.slots.register(seatOptions(seatDirectories) as never, ModelPanel) as unknown as (() => void)\r\n } catch {\r\n // A host that refuses the late register leaves the shipped selector —\r\n // the honest degradation is \"no takeover\", never a broken composer.\r\n seatClaimed = undefined\r\n }\r\n } else if (!on && seatClaimed !== undefined) {\r\n const claim = seatClaimed\r\n seatClaimed = undefined\r\n claim()\r\n }\r\n }\r\n const startSeatWatch = (): void => {\r\n if (seatWatched) return\r\n if (scopeOf === undefined || !seatDeclared || seatDirectories === undefined) return\r\n seatWatched = true\r\n const handle = seatHandle()\r\n if (typeof handle?.subscribe === 'function') seatWatchOff = handle.subscribe(() => { evaluateSeat() })\r\n evaluateSeat()\r\n }\r\n ;(ctx as unknown as {\r\n inject: (\r\n deps: string[],\r\n cb: (scope: {\r\n modelDirectories: ModelDirectoriesFace | undefined\r\n sessions: SessionsFace | undefined\r\n }) => void,\r\n ) => void\r\n }).inject(['modelDirectories', 'sessions', 'remote', 'remote.session'], (scope) => {\r\n const directories = scope.modelDirectories\r\n if (directories === undefined) return\r\n seatDirectories = directories\r\n sessionsRef = scope.sessions\r\n ctx.slots.inject('conversation.input.model', function* () {\r\n // Reaching the generator proves the seat is declared — late\r\n // ctx.slots.register from the watch is then legitimate. The yielded\r\n // function is the fiber's teardown: stop watching, give the shipped\r\n // ModelSelect back.\r\n seatDeclared = true\r\n startSeatWatch()\r\n yield () => {\r\n seatWatchOff?.()\r\n seatWatchOff = undefined\r\n seatWatched = false\r\n if (seatClaimed !== undefined) {\r\n const claim = seatClaimed\r\n seatClaimed = undefined\r\n claim()\r\n }\r\n }\r\n })\r\n })\r\n\r\n // Effort-trace tab (conversation.view — the dsh-perm-gate history pattern):\r\n // a run-length timeline of the levels this session's requests actually went\r\n // out with, folded by the `tlAutoSchedule` projection (stateVersion 3) from\r\n // the same committed headers the chip's `lastEffective` reads. Its own\r\n // `sessions` inject on purpose: the tab must not ride the modelDirectories\r\n // one above (an absent directories service must not cost the tab). On a\r\n // host that never declared the slot the generator inject simply never\r\n // fires — the honest degradation is \"no tab\", like the undischarged\r\n // dsh-family.tab inject.\r\n ;(ctx as unknown as {\r\n inject: (\r\n deps: string[],\r\n cb: (scope: { sessions?: SessionsFace | undefined }) => void,\r\n ) => void\r\n }).inject(['sessions'], (scope) => {\r\n const sessions = scope.sessions\r\n ctx.slots.inject('conversation.view', function* () {\r\n yield ctx.slots.register({\r\n name: 'conversation.view',\r\n id: 'dsh-thinking-levels.effort-trace',\r\n order: 25,\r\n label: () => t('trace.label'),\r\n locale: NS,\r\n inject: (sessionId: string | undefined) => ({ sessionId, sessions, tFallback: t }),\r\n }, EffortTrace)\r\n }) as unknown\r\n })\r\n\r\n // Family settings section (see the SlotMap note above): the contributor\r\n // ledger is projected exactly like the built-in Plugins section projects its\r\n // tab ledger (cache until ledger/locale revision bumps, so useSyncExternalStore\r\n // sees a stable snapshot).\r\n/** Registrant labels arrive as a string or a locale thunk; unwrap either.\r\n * A throwing thunk (e.g. a contributor whose label touches a service its own\r\n * inject never declared) must not kill the whole tab-ledger projection — fall\r\n * back to the entry id. */\r\nconst resolveLabel = (label: unknown, fallback = ''): string => {\r\n try {\r\n if (typeof label === 'function') return (label as () => string)() || fallback\r\n if (typeof label === 'string') return label\r\n } catch { /* bad contributor label — degrade to the fallback */ }\r\n return fallback\r\n}\r\n\r\n let tabsVersion = -1\r\n let tabsRevision = -1\r\n let tabs: readonly FamilyTabEntry[] = []\r\n\r\n // Direct-mount face for contributor tabs on hosts whose settings shell does\r\n // not deliver renderSlot (≤0.1.6): the raw ledger records carry the\r\n // contributor's component and inject face on every line, so the section can\r\n // mount the active tab itself. Every failure mode (entry gone mid-render, a\r\n // throwing inject, a host without the raw view) degrades to an empty panel —\r\n // never a thrown render.\r\n const renderContributor = (id: string): ReactNode => {\r\n try {\r\n const entry = (ctx.slots.entries('dsh-family.tab') as readonly FamilyLedgerEntry[])\r\n .find(candidate => candidate.options.id === id)\r\n if (entry === undefined || entry.component === undefined) return null\r\n const injected = typeof entry.inject === 'function'\r\n ? entry.inject() as Record<string, unknown> | undefined\r\n : undefined\r\n return createElement(entry.component, (injected ?? {}) as Record<string, unknown>)\r\n } catch {\r\n return null\r\n }\r\n }\r\n\r\n const sectionInjected = (): FamilySectionInjected => ({\r\n // The settings namespace IS the composition entry id — the include row id\r\n // the shipped cordis.patch.yml inserts (`dsh-thinking-levels`), NOT this\r\n // plugin's locale NS. The host keys configForms by that id; a handle for\r\n // any other string reports `unavailable` forever. Generation-probed: ≤0.1.6\r\n // hosts register the section as `thinking-levels` (see tlSettingsScopeOf).\r\n scope: tlSettingsScopeOf(scopeOf!) as never,\r\n piAiScope: scopeOf!('llm-pi-ai') as never,\r\n // The official DeepSeek section: the card's context editor when the seat\r\n // takeover is off (4.4.0).\r\n deepseekScope: scopeOf!('llm-deepseek') as never,\r\n // The transport's entry id changed shape across its packaging history\r\n // (`dsh-llm-openai-completions` in the 0.4.0 fragment; earlier manual\r\n // installs used the short form): settle on whichever namespace the host's\r\n // describe document actually carries.\r\n ocScope: ocTransportScopeOf(scopeOf!) as never,\r\n // ≤0.1.6 stand-ins for owner props the settings shell there doesn't\r\n // deliver (see family-tab.tsx): the apply-time EAGER binder stands in for\r\n // the host's PropsLocale `t`, and the direct-mount face stands in for\r\n // renderSlot. Both are ignored on shells that provide the real props.\r\n tFallback: t,\r\n renderContributor,\r\n hooks: {\r\n tabs: {\r\n getSnapshot: () => {\r\n const version = ctx.slots.getVersion('dsh-family.tab')\r\n const revision = ctx.locale.getSnapshot().revision\r\n if (version !== tabsVersion || revision !== tabsRevision) {\r\n tabsVersion = version\r\n tabsRevision = revision\r\n tabs = ctx.slots.entries('dsh-family.tab')\r\n .map(entry => ({\r\n id: entry.options.id ?? '',\r\n order: entry.options.order ?? 0,\r\n label: resolveLabel(entry.options.label, entry.options.id ?? ''),\r\n }))\r\n .sort((a, b) => a.order - b.order)\r\n }\r\n return tabs\r\n },\r\n subscribe: (listener) => {\r\n const offLedger = ctx.slots.subscribe('dsh-family.tab', listener)\r\n const offLocale = ctx.locale.subscribe(listener)\r\n return () => {\r\n offLedger()\r\n offLocale()\r\n }\r\n },\r\n },\r\n },\r\n })\r\n\r\n/** ≤0.1.6 legacy card seat (settings.plugin.item) RETIRED (2026-10-08 family\r\n * insection round 2): the 思考档位 card duplicated the family-tab card on the\r\n * ≤0.1.5 plugins page — all plugin settings now live only in the 起子插件设置\r\n * family tab. The legacy scope namespace (`thinking-levels`) remains what the\r\n * family-tab card reads via `scopeOf` below. */\r\n\r\n /** 0.1.7+/0.2.0 surfaces: family section, plugins-page card, context ring.\r\n * Generation-neutral in practice (route A, 2026-10): the `settings.section`\r\n * entry and its children declaration exist on every host line (the perm-gate\r\n * placeholder render proved the 0.1.5 shell consumes client-contributed\r\n * section bodies), so the settingsScope waist below calls this too — its\r\n * `plugins.bundle.config` inject idles harmlessly where the slot is never\r\n * declared (0.1.7 and older).\r\n *\r\n * Election note (2026-10-08 T20-a revision): the old \"priority-0 head +\r\n * priority-10 shadow\" assumption is dead — ≤0.1.7 shells list EVERY same-id\r\n * entry as its own nav row, so TL + guard double registration showed TWO\r\n * 起子插件设置 rows on all five farm cells. Guard now defers FAMILY_YIELD_MS\r\n * after the declaration and stands down when this entry is already seated;\r\n * symmetric guard here: if a dsh-family entry is somehow already in the\r\n * ledger when our factory fires (host-native surface, future rival), we\r\n * stand down too — exactly one owner, whichever path seated first.\r\n *\r\n * Declare-or-withdraw (2026-10-14): seating this entry WITHOUT the children\r\n * table used to be the fallback, and it was the worst possible outcome — a\r\n * childless container still claims the nav row (so every later claimant sees\r\n * \"dsh-family already seated\" and stands down) while `dsh-family.tab` stays\r\n * undeclared, so every member card silently disappears and only our own tab\r\n * renders. One crippled seat therefore poisons the whole family for the rest\r\n * of the boot. Losing the declaration now means losing the section: we yield\r\n * instead of seating a body that cannot host anyone's tabs.\r\n *\r\n * Rank: this plugin heads the ladder at rank 0 — and it defers like every other\r\n * claimant instead of seating synchronously. Putting the head on the same derived\r\n * formula (200 + 0 * 900 = 200ms) keeps it strictly ahead of guard (1100ms),\r\n * steward (3800ms) and mcp-registry (4700ms) while leaving no special case that\r\n * only this repo obeys, and no rank constant that exists purely to satisfy\r\n * `--check`. The single source of truth for those numbers is\r\n * `mine-dsh-plugins/_tools/family-rank.mjs` (offline, GitHub stars + npm\r\n * downloads) — never re-derive them by feel in a comment. */\r\n /**\r\n * 家族接管分级:本插件 rank 0,但与其他候选**走同一派生式**(不例外地同步坐位),\r\n * 尝试延迟 = BASE + RANK * STEP = 200ms,仍严格早于 guard(1100)/steward(3800)/mcp(4700)。\r\n * 唯一真源是 `mine-dsh-plugins/_tools/family-rank.mjs`,不得在注释/代码里另行推数。 */\r\n const FAMILY_CLAIM_RANK = 0\r\n const FAMILY_CLAIM_BASE_MS = 200\r\n const FAMILY_CLAIM_STEP_MS = 900\r\n const FAMILY_CLAIM_DELAY_MS = FAMILY_CLAIM_BASE_MS + FAMILY_CLAIM_RANK * FAMILY_CLAIM_STEP_MS\r\n\r\n function registerModernSurface(): void {\r\n if (scopeOf === undefined) return\r\n // Idempotence latch: both the configForms and the settingsScope waist call\r\n // this, and a second call would double-inject `settings.section` (same id,\r\n // same priority → the host throws) and double-register the bundle card and\r\n // the input ring. One seating per client load, whichever service dispatches first.\r\n if (modernSurfaceClaimed) return\r\n modernSurfaceClaimed = true\r\n ctx.slots.inject('settings.section', function* () {\r\n console.log('[dsh-thinking-levels] settings.section factory fired (declared)')\r\n // 分级时刻再查账本(与 guard/steward/mcp 同一机制):声明事件内同步抢位在\r\n // 本家能赢,只是因为它 rank 0——把「谁先」交给派生式而不是交给运气。\r\n let claimed: (() => void) | undefined\r\n const timer = setTimeout(() => {\r\n if (ctx.slots.entries('settings.section').some(e => e.options.id === 'dsh-family')) {\r\n console.log('[dsh-thinking-levels] settings.section: dsh-family already seated — stand down')\r\n return\r\n }\r\n const base = {\r\n name: 'settings.section',\r\n id: 'dsh-family',\r\n order: 40,\r\n label: () => t('family.title'),\r\n locale: NS,\r\n inject: sectionInjected,\r\n }\r\n try {\r\n claimed = ctx.slots.register({\r\n ...base,\r\n children: { 'dsh-family.tab': { kind: 'list', scope: 'root' } },\r\n }, FamilySettingsSection) as unknown as (() => void) | undefined\r\n console.log('[dsh-thinking-levels] settings.section: family takeover registered (children declared)')\r\n } catch (error) {\r\n // Declare-or-withdraw: the children table is held by someone else, so a\r\n // section seated here could not render a single member tab. Withdraw\r\n // (no registration) and let the holder serve the family.\r\n console.log('[dsh-thinking-levels] settings.section: children claim lost — withdrawing ('\r\n + (error instanceof Error ? error.message : String(error)) + ')')\r\n }\r\n }, FAMILY_CLAIM_DELAY_MS)\r\n yield () => {\r\n clearTimeout(timer)\r\n if (typeof claimed === 'function') claimed()\r\n }\r\n })\r\n\r\n // Plugins-page configuration card (DSH 0.2.0): same component and same\r\n // inject factory as the family section above, so both surfaces stay one\r\n // source of truth. On 0.1.7 hosts the slot is never declared and this\r\n // inject idles harmlessly.\r\n ctx.slots.inject('plugins.bundle.config', () => ctx.slots.register({\r\n name: 'plugins.bundle.config',\r\n key: 'dsh-thinking-levels',\r\n locale: NS,\r\n inject: sectionInjected,\r\n }, FamilySettingsSection))\r\n\r\n // Context-capacity check ring (conversation.input.right): restores the\r\n // CHECK the model-seat takeover removed. The projection seat arrives via\r\n // the slot's injected props; hosts without it render nothing (the ring is\r\n // a 0.2.0 feature — on the ≤0.1.6 lines the seat props lack the hook).\r\n }\r\n\r\n // Projection data hook (conversation.input.right): this seat's entries DO\r\n // receive the session projection hook (better-er/dsh-cache-billing proved\r\n // the injection there); the model seat does not. The zero-size hook mirrors\r\n // every push into the module store the ring reads.\r\n ctx.slots.inject('conversation.input.right', () => ctx.slots.register({\r\n name: 'conversation.input.right',\r\n id: 'projection-data-hook',\r\n order: 9,\r\n }, ProjectionDataHook))\r\n\r\n // Generation waist (registered last — the callbacks reach the definitions\r\n // above): whichever settings channel the host provides becomes the one scope\r\n // factory. Faces are structurally identical (getSnapshot / subscribe / set /\r\n // unset) — 0.1.7's ConfigForm handle mirrors the ≤0.1.6 settingsScope\r\n // field-for-field. A host missing a generation's service never fires that\r\n // callback, so exactly one path registers its surface.\r\n scopeInject.call(ctx, ['configForms'], (scope) => {\r\n const forms = scope.configForms as { get: <T>(entryId: string) => T } | undefined\r\n if (forms === undefined) return\r\n scopeOf = (<T,>(ns: string) => forms.get<T>(ns)) as typeof scopeOf\r\n registerModernSurface()\r\n // The waist may bind AFTER the seat declaration (the desktop boot order\r\n // that made the static gate fail) — the watch starts here too.\r\n startSeatWatch()\r\n })\r\n scopeInject.call(ctx, ['settingsScope'], (scope) => {\r\n const settingsScope = scope.settingsScope as\r\n | { bind: <T>(spec: { namespace: string }) => T }\r\n | undefined\r\n if (settingsScope === undefined) return\r\n scopeOf = (<T,>(ns: string) => settingsScope.bind<T>({ namespace: ns })) as typeof scopeOf\r\n // Route A (family-tab ledger, 2026-10): the family section body used to be\r\n // configForms-only, leaving ≤0.1.6 hosts with session-guard's nav-level\r\n // takeover and an EMPTY section body. The section entry itself is\r\n // generation-neutral — the component self-degrades where the shell omits\r\n // the owner props (tFallback / hooks-compartment polling / direct-mount\r\n // contributor render).\r\n registerModernSurface()\r\n startSeatWatch()\r\n })\r\n}\r\n"],"mappings":";;;;;;;;;;;EAGA,MAAa,KAAK;;EAGlB,MAAa,KAAK;GAChB,cAAc;GACd,gBAAgB;GAChB,oBAAoB;GACpB,cAAc;GACd,kBAAkB;GAClB,iBAAiB;GACjB,sBAAsB;GACtB,kBAAkB;GAClB,qBAAqB;GACrB,mBAAmB;GACnB,oBAAoB;GACpB,kBAAkB;GAClB,mBAAmB;GACnB,gBAAgB;GAChB,uBAAuB;GACvB,qBAAqB;GACrB,uBAAuB;GACvB,oBAAoB;GACpB,wBAAwB;GACxB,yBAAyB;GACzB,6BAA6B;GAC7B,2BAA2B;GAC3B,gCAAgC;GAChC,0BAA0B;GAC1B,8BAA8B;GAC9B,8BAA8B;GAC9B,2BAA2B;GAC3B,oBAAoB;GACpB,iBAAiB;GACjB,qBAAqB;GACrB,0BAA0B;GAC1B,2BAA2B;GAC3B,iCAAiC;GACjC,0BAA0B;GAC1B,4BAA4B;GAC5B,+BAA+B;GAC/B,mCAAmC;GACnC,oCAAoC;GACpC,mCAAmC;GACnC,4BAA4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,QAAQ;IACV,GAAG,qBAAqB,CAAC;GAM3B;GAMA,IAAI,MAAM,OAAO,kCAAkC,IAAI,MAAM,SAAS;IACpE,MAAM;IACN,IAAI;IACJ,OAAO;GACT,GAAG,kBAAkB,CAAC;GAQtB,YAAY,KAAK,KAAK,CAAC,aAAa,IAAI,UAAU;IAChD,MAAM,QAAQ,MAAM;IACpB,IAAI,UAAU,KAAA,GAAW;IACzB,YAAgB,OAAe,MAAM,IAAO,EAAE;IAC9C,sBAAsB;IAGtB,eAAe;GACjB,CAAC;GACD,YAAY,KAAK,KAAK,CAAC,eAAe,IAAI,UAAU;IAClD,MAAM,gBAAgB,MAAM;IAG5B,IAAI,kBAAkB,KAAA,GAAW;IACjC,YAAgB,OAAe,cAAc,KAAQ,EAAE,WAAW,GAAG,CAAC;IAOtE,sBAAsB;IACtB,eAAe;GACjB,CAAC;EACH"}
1
+ {"version":3,"file":"client.js","names":["triggerStyle","popStyle","headStyle","rowStyle","useSyncExternalStore","useState","useRef","labelStyle","useState","useRef","providerNameStyle","modelRowStyle","labelStyle","providersOf","useSyncExternalStore","useRef","useState","useCallback","useMemo","useMemo","useSyncExternalStore","rowStyle","useState","useCallback","useSyncExternalStore","useState","useState","createElement"],"sources":["../src/client/locales.ts","../src/client/context-ring.tsx","../src/thinking-level.ts","../src/client/whale-mascot.ts","../src/client/effort-slider.tsx","../src/context-window.ts","../src/client/model-panel.tsx","../src/client/projection-value.ts","../src/client/effort-trace.tsx","../src/client/guide.tsx","../src/client/guide-steps.ts","../src/client/card.tsx","../src/client/family-tab.tsx","../src/client/index.ts"],"sourcesContent":["/** `thinking-levels` client dictionaries (zh / en / ja / ko / fr / de / it / ru / es / pt). */\r\n\r\n/** Dictionary namespace owned by this plugin. */\r\nexport const NS = 'thinking-levels'\r\n\r\n/** Simplified Chinese dictionary (the key-set source of truth). */\r\nexport const zh = {\r\n 'card.title': '思考档位',\r\n 'family.title': '起子插件设置',\r\n 'card.description': '在模型选择器中可选 Auto(mask):按工具调用历史自动在 low / high / max 间调度后提交 API。此处配置默认档位、调度边界与模型能力(档位 → 网关线上值映射)。',\r\n 'card.level': '默认档位',\r\n 'card.level.off': 'off — 关闭思考(仅手动,永不自动选择)',\r\n 'card.level.on': 'on — 开启思考(仅 toggle 型模型;只发 enable_thinking,不发 effort)',\r\n 'card.level.minimal': 'minimal — 最低(极轻任务)',\r\n 'card.level.low': 'low — 低(简单任务,廉价轮保持廉价)',\r\n 'card.level.medium': 'medium — 中',\r\n 'card.level.high': 'high — 高(官方默认)',\r\n 'card.level.xhigh': 'xhigh — 特高',\r\n 'card.level.max': 'max — 最大(重任务)',\r\n 'card.level.auto': 'auto — 按工具历史自动调度(默认)',\r\n 'card.enabled': '启用',\r\n 'card.allowDowngrade': '允许降档(auto 可降至 low)',\r\n 'card.allowUpgrade': '允许升档(auto 可升至 max)',\r\n 'card.defaultPricing': '目录外定价',\r\n 'card.simpleTools': '简单工具白名单(auto 降档判定)',\r\n 'card.simpleToolsHint': '逗号或空格分隔的工具名,追加进内置的「廉价确定性工具」判定(如 shell、pwsh、web_fetch)。auto 档据此把仅由这类短小调用构成的步骤降到低档;内置已覆盖 bash/terminal/shell/pwsh 等,此处仅补充宿主专有工具名。',\r\n 'card.simpleToolsRegex': '简单工具 regex 名单(auto 降档判定)',\r\n 'card.simpleToolsRegexHint': '每条一个 JavaScript 正则(不自动加锚点,建议自写 ^;大小写不敏感),与上方字面量名单并存、同一统计。匹配同时测完整工具名与剥 ops_ 后的裸名——「^ops_.*」可一次覆盖整个 dsh-ops 家族。编译失败的条目跳过并告警一次。',\r\n 'card.defaultPricingHint': '定价目录未收录的模型(含其他插件接入的网关型号)如何计价;目录内模型始终按自己的目录价。改价只影响后续新账。',\r\n 'card.defaultPricing.estimate': 'estimate — 典型价兜底估算(未校准·仅供参考,默认)',\r\n 'card.defaultPricing.cn': 'cn — 人民币校准档(目录外仍按典型价估算)',\r\n 'card.defaultPricing.global': 'global — 美元校准档(USD 目录补录前目录外仍为估算)',\r\n 'card.defaultPricing.custom': 'custom — 自填价(未提供整行价时不计价)',\r\n 'card.defaultPricing.off': 'off — 不计价(目录外显示「未计价」)',\r\n 'card.unavailable': '设置命名空间不可用:请确认 dsh-thinking-levels 已装配进 profile。',\r\n 'card.readonly': '只读',\r\n 'card.capabilities': '模型能力(llm-pi-ai 自定义提供方)',\r\n 'card.capabilities.hint': '直接读写 llm-pi-ai 配置:勾选档位并填写发送给网关的线上值(例如 high → ultra);off 留空表示不发送。视觉决定图片输入;思考开关决定 enable_thinking 置位;thinkingFormat 决定 wire 序列化格式。',\r\n 'card.capabilities.empty': 'llm-pi-ai 中没有已配置模型的自定义提供方。请先在「设置 → 模型」添加提供方与模型。',\r\n 'card.capabilities.unavailable': 'llm-pi-ai 设置命名空间不可用。',\r\n 'card.capabilities.none': '(无模型)',\r\n 'card.capabilities.search': '搜索模型(名称或 ID)…',\r\n 'card.capabilities.noMatches': '没有匹配的模型',\r\n 'card.capabilities.quickSettings': '一键设置',\r\n 'card.capabilities.presetOfficial': '应用到全部:Off / High / Max(官方 DeepSeek 风格)',\r\n 'card.capabilities.presetGeneric': '应用到全部:Off / Low / Medium / High(通用)',\r\n 'card.capabilities.vendor': '提供方',\r\n 'card.capabilities.developerRole': '网关不支持 developer 角色',\r\n 'card.capabilities.developerRoleHint': '官方兼容开关(dsh ≥ v0.1.0-rc.8):写入路由级 compat.supportsDeveloperRole: false,系统提示词按 system 角色发送,修复 vLLM / SGLang 等网关的 Unexpected message role 400。取消勾选 = 删除该字段、恢复继承。',\r\n 'card.capabilities.takeover': '第三方接管',\r\n 'card.capabilities.takeoverHint': '勾选后该路由的模型请求改由 dsh-llm-openai-completions 传输层短路发送(多模态真发 + 模态门禁 + 提示词注入),pi-ai 不再参与。写入传输层自身的 providers 名单;取消勾选 = 从名单移除。需已安装该传输层。',\r\n 'card.capabilities.takeoverHintAbsent': '传输层 dsh-llm-openai-completions 未安装——先安装并启用后才能按路由接管。',\r\n 'card.capabilities.expandProvider': '展开提供方',\r\n 'card.capabilities.collapseProvider': '收起提供方',\r\n 'card.capabilities.openModelSettings': '打开模型设置',\r\n 'card.capabilities.closeModelSettings': '收起模型设置',\r\n 'card.capabilities.vision': '视觉模型',\r\n 'card.capabilities.video': '视频输入',\r\n 'card.capabilities.audio': '音频输入',\r\n 'card.capabilities.pdf': 'PDF 输入',\r\n 'card.capabilities.mediaHint': '视频/音频声明写入接管传输层的 extraInputs(宿主模型行 input 枚举仅支持 text|image);仅该路由被接管时生效,勾选后此模型可接收对应内容块,未勾选时遇到即拒绝或按 modalFallback 遮蔽。',\r\n 'card.masterTakeover': '接管主控',\r\n 'card.masterTakeoverHint': '总闸:开启后本开关状态在每次启动时镜像为传输层的 enabled(唯一写入者)。“第三方接管”路由勾只管名单成员、不直接写总闸;主控关闭时勾选路由会自动点亮本开关。',\r\n 'card.capabilities.thinking': '思考模型',\r\n 'card.capabilities.supportsEffort': '支持 think effort',\r\n 'card.capabilities.efforts': '思考档位(勾选后填写线上值)',\r\n 'card.capabilities.wirePlaceholder': '线上值,如 ultra',\r\n 'card.capabilities.offPlaceholder': '留空 = 不发送',\r\n 'card.capabilities.atLeastThinking': '至少需要一个思考档位(off 除外)',\r\n 'card.capabilities.applyLevel': '应用此档位',\r\n 'card.capabilities.restoreDefault': '恢复默认档位',\r\n 'card.capabilities.unsaved': '未保存',\r\n 'card.capabilities.saveChanges': '保存更改',\r\n 'card.capabilities.saved': '已保存',\r\n 'card.capabilities.thinkingFormat': '思考格式',\r\n 'card.capabilities.thinkingFormat.inherit': '继承',\r\n 'card.capabilities.contextWindow': '上下文窗口上限',\r\n 'card.capabilities.contextCustomPlaceholder': '自定义整数,如 256000',\r\n 'card.capabilities.contextClear': '清除',\r\n 'card.capabilities.contextInteger': '上下文长度必须是整数(2000-1000000)',\r\n 'card.capabilities.contextRange': '上下文长度必须在 2000 到 1000000 之间',\r\n 'card.capabilities.contextHint': '选择预设或输入整数(2000–1000000),写入 llm-pi-ai 供上下文压力/压缩使用,无需重启即对下一请求生效。',\r\n 'input.context.title': '上下文窗口',\r\n 'input.context.globalHint': '全局生效:作用于所有使用该模型的会话(清除可恢复默认)',\r\n 'input.context.unset': '未设',\r\n 'input.context.custom': '自定义',\r\n 'input.context.noModel': '暂无会话模型',\r\n 'input.context.customPlaceholder': '自定义整数,如 256000',\r\n 'input.context.apply': '应用',\r\n 'input.context.clear': '清除',\r\n 'input.context.integer': '上下文长度必须是整数(2000-1000000)',\r\n 'input.context.range': '上下文长度必须在 2000 到 1000000 之间',\r\n 'model.panel.choose': '选择模型',\r\n 'model.panel.loading': '模型目录加载中…',\r\n 'model.panel.empty': '没有可用模型',\r\n 'model.panel.window': '窗口',\r\n 'model.panel.noTarget': '该模型没有可写的配置项',\r\n 'model.panel.unavailable': '当前会话的模型目录不可用',\r\n 'input.effort.title': '思考强度',\r\n 'panel.search.placeholder': '搜索模型…',\r\n 'card.takeoverUi': '模型界面接管',\r\n 'card.takeoverUiHint': '开启后由本插件重绘输入框的模型选择面板(含每行上下文/档位编辑与搜索);关闭(默认)保留官方模型弹窗——auto 档位照常出现,搜索与加载由官方界面负责。切换即时生效,无需重载。',\r\n 'card.capabilities.apiUnsupported': '该提供方使用非 openai-completions 协议:thinkingFormat / supportsReasoningEffort 是 openai-completions 专属字段,在这里不提供(写入会被宿主整体拒绝)。思考开关照常可用——它写入 protocol 中立的 reasoningEfforts,由宿主 pi-ai 按协议原生映射。',\r\n 'card.capabilities.thinkingNative': '思考开关在所有协议下都可勾选:写入 protocol 中立的 reasoningEfforts,由宿主 pi-ai 按各协议原生映射(Anthropic 思考预算 / Responses reasoning effort);仅 thinkingFormat / supportsReasoningEffort 为 openai-completions 专属,指明是思考模型且协议为 openai-completions 后才出现。',\r\n 'card.capabilities.staleCompat': '旧版本曾强塞进该模型行的 openai-completions 专属字段',\r\n 'card.capabilities.stripStaleCompat': '清除这些残留字段',\r\n 'card.dsContextTitle': '官方 DeepSeek 模型上下文上限',\r\n 'input.effort.default': '提供方默认',\r\n 'input.effort.reset': '恢复提供方默认',\r\n 'card.capabilities.failed': '保存失败:配置被拒绝或冲突,请检查值。',\r\n 'trace.label': 'Effort 轨迹',\r\n 'trace.empty': '本会话还没有已提交的请求档位。',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': '手动',\r\n 'trace.title': 'Effort 轨迹',\r\n 'trace.subtitle': '本会话每次请求实际发出的档位,连续相同档位折叠为一段(最新在上)。',\r\n 'trace.summary.requests': '次请求',\r\n 'trace.summary.runs': '段',\r\n 'trace.summary.autoRuns': '段由 auto 调度',\r\n 'trace.summary.peak': '峰值',\r\n 'trace.summary.hint': 'T=轮次 · S=步',\r\n 'trace.note.attribution': '注:0.2.2 起宿主禁止在请求阶段改档位,本插件(严格线)会自己写 `model/selection` 提前一步排程——因此「手动」标签只表示日志里最后一笔选择是具体档位,未必是人为点击。',\r\n 'trace.intent.default': '默认',\r\n 'trace.intent.unknown': '未记录',\r\n 'trace.intent.scheduler': '插件调度',\r\n 'trace.intent.unknownHint': '本次档位变化在会话日志里没有对应的选择记录(0.2.2+ 严格线由插件自身写 model/selection,这些写入不进日志)',\r\n 'trace.summary.switches': '模型切换',\r\n 'trace.dir.up': '相对上一段升档,共 %n 次请求',\r\n 'trace.dir.down': '相对上一段降档,共 %n 次请求',\r\n 'trace.dir.flat': '档位不变、选中意图变了,共 %n 次请求',\r\n 'trace.dir.start': '本会话首个档位,共 %n 次请求',\r\n 'ring.title': '上下文检查',\r\n 'ring.used': '已用',\r\n 'ring.remaining': '剩余',\r\n 'ring.window': '窗口容量',\r\n 'ring.percent': '占用',\r\n 'ring.system': '系统提示词',\r\n 'ring.tools': '工具定义',\r\n 'ring.messages': '对话消息',\r\n 'ring.warning': '上下文即将用尽——建议压缩上下文或开启新会话。',\r\n 'ring.aria': '上下文已用 %n',\r\n 'ring.unset': '本轮尚未产生用量',\r\n 'ring.billing': '缓存账单',\r\n 'ring.bill.step': '当前步',\r\n 'ring.bill.turn': '当前轮',\r\n 'ring.bill.session': '会话累计',\r\n 'ring.bill.cacheRead': '缓存命中',\r\n 'ring.bill.cacheMiss': '缓存未命中',\r\n 'ring.bill.output': '输出',\r\n 'ring.bill.fullMiss': '完全失效',\r\n 'ring.bill.rounds': '步',\r\n 'ring.bill.peak': '峰价',\r\n 'ring.bill.offPeak': '谷价',\r\n 'ring.bill.flat': '平价',\r\n 'ring.bill.unpriced': '未计价',\r\n 'ring.bill.custom': '自填价计价',\r\n 'ring.bill.pricedAs': '按 %n 计价',\r\n 'ring.bill.priced': '按目录价计价',\r\n 'ring.bill.estimate': '目录外估算价',\r\n 'ring.bill.uncalibrated': '未校准·仅供参考',\r\n} satisfies Record<string, string>\r\n\r\n/** English dictionary (keys mirror zh). */\r\nexport const en: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Thinking Levels',\r\n 'family.title': 'Qizi Plugin Settings',\r\n 'card.description': 'Pick Auto in the model selector: the plugin schedules low / high / max per tool round before submitting the API effort. Here you configure the default level, scheduler bounds, and per-model capabilities (level → gateway wire value mapping).',\r\n 'card.level': 'Default level',\r\n 'card.level.off': 'off — disable thinking (manual only, never auto-picked)',\r\n 'card.level.on': 'on — enable thinking (toggle-only models only; sends enable_thinking, never an effort)',\r\n 'card.level.minimal': 'minimal — least (very light tasks)',\r\n 'card.level.low': 'low — cheap rounds stay cheap',\r\n 'card.level.medium': 'medium — medium',\r\n 'card.level.high': 'high — the official default',\r\n 'card.level.xhigh': 'xhigh — extra high',\r\n 'card.level.max': 'max — heavy work',\r\n 'card.level.auto': 'auto — schedule from tool history (default)',\r\n 'card.enabled': 'Enabled',\r\n 'card.allowDowngrade': 'Allow downgrade (auto may drop to low)',\r\n 'card.allowUpgrade': 'Allow upgrade (auto may lift to max)',\r\n 'card.defaultPricing': 'Off-catalog pricing',\r\n 'card.simpleTools': 'Simple-tool allowlist (auto downgrade)',\r\n 'card.simpleToolsHint': 'Comma- or space-separated tool names added to the built-in \"cheap and deterministic tool\" set (e.g. shell, pwsh, web_fetch). In auto, a step made only of these short calls drops to low. The built-in set already covers bash/terminal/shell/pwsh; use this for host-specific names.',\r\n 'card.simpleToolsRegex': 'Simple-tool regex list (auto downgrade)',\r\n 'card.simpleToolsRegexHint': 'One JavaScript regex per entry (no auto-anchoring — write your own ^; case-insensitive), alongside the literal list above and counted in the same ratio. Patterns match BOTH the full tool name and the ops_-stripped bare name, so \"^ops_.*\" covers the whole dsh-ops family at once. Invalid entries are skipped with a one-time warning.',\r\n 'card.defaultPricingHint': 'How to price models the catalog does not list (including gateway models brought in by other plugins); catalogued models always use their own rates. Pricing changes only affect new accounting from now on.',\r\n 'card.defaultPricing.estimate': 'estimate — typical-price fallback (uncalibrated, reference only; default)',\r\n 'card.defaultPricing.cn': 'cn — CNY calibration tier (off-catalog still falls back to the typical price)',\r\n 'card.defaultPricing.global': 'global — USD calibration tier (off-catalog stays estimated until USD rows land)',\r\n 'card.defaultPricing.custom': 'custom — self-entered rates (unpriced without a full row)',\r\n 'card.defaultPricing.off': 'off — do not bill (off-catalog shows \"not billed\")',\r\n 'card.unavailable': 'Settings namespace unavailable: make sure dsh-thinking-levels is assembled into this profile.',\r\n 'card.readonly': 'Read-only',\r\n 'card.capabilities': 'Model capabilities (llm-pi-ai custom providers)',\r\n 'card.capabilities.hint': 'Reads and writes the llm-pi-ai config directly: tick a level and enter the exact value sent to the gateway (e.g. high → ultra); leaving off empty means “do not send”. Vision gates image input; the thinking toggle drives enable_thinking; thinkingFormat picks the wire serialization.',\r\n 'card.capabilities.empty': 'No custom provider has models configured in llm-pi-ai. Add a provider and models under Settings → Models first.',\r\n 'card.capabilities.unavailable': 'The llm-pi-ai settings namespace is unavailable.',\r\n 'card.capabilities.none': '(no models)',\r\n 'card.capabilities.search': 'Search models by name or ID…',\r\n 'card.capabilities.noMatches': 'No matching models',\r\n 'card.capabilities.quickSettings': 'Quick settings',\r\n 'card.capabilities.presetOfficial': 'Apply to all: Off / High / Max (official DeepSeek style)',\r\n 'card.capabilities.presetGeneric': 'Apply to all: Off / Low / Medium / High (generic)',\r\n 'card.capabilities.vendor': 'Provider',\r\n 'card.capabilities.developerRole': 'Gateway rejects the developer role',\r\n 'card.capabilities.developerRoleHint': 'Official compat switch (dsh ≥ v0.1.0-rc.8): writes route-level compat.supportsDeveloperRole: false so the system prompt is sent as role system — fixes the Unexpected message role 400 on vLLM / SGLang gateways. Unchecking deletes the field and restores inheritance.',\r\n 'card.capabilities.takeover': 'Third-party takeover',\r\n 'card.capabilities.takeoverHint': 'When checked, the model requests of this route are short-circuited through the dsh-llm-openai-completions transport (multimodal true-send, modality gate, prompt injection) and pi-ai steps out. Writes the providers list of the transport itself; unchecking removes the route. Requires the transport to be installed.',\r\n 'card.capabilities.takeoverHintAbsent': 'The dsh-llm-openai-completions transport is not installed — install and enable it to take routes over per route.',\r\n 'card.capabilities.expandProvider': 'Expand provider',\r\n 'card.capabilities.collapseProvider': 'Collapse provider',\r\n 'card.capabilities.openModelSettings': 'Open model settings',\r\n 'card.capabilities.closeModelSettings': 'Collapse model settings',\r\n 'card.capabilities.vision': 'Vision model',\r\n 'card.capabilities.video': 'Video input',\r\n 'card.capabilities.audio': 'Audio input',\r\n 'card.capabilities.pdf': 'PDF input',\r\n 'card.capabilities.mediaHint': 'Video/audio declarations are written to the taken-over transport’s extraInputs (the host model-row input enum only accepts text|image). Effective only while the route is taken over; when off, matching content blocks are refused or masked per modalFallback.',\r\n 'card.masterTakeover': 'Takeover master',\r\n 'card.masterTakeoverHint': 'Master switch: its state mirrors into the transport’s enabled on every start (the sole writer). The per-route “Third-party takeover” checkboxes own membership only; with the master off, checking a route lights this switch automatically.',\r\n 'card.capabilities.thinking': 'Thinking model',\r\n 'card.capabilities.supportsEffort': 'Supports think effort',\r\n 'card.capabilities.efforts': 'Thinking effort levels (tick, then enter the wire value)',\r\n 'card.capabilities.wirePlaceholder': 'Wire value, e.g. ultra',\r\n 'card.capabilities.offPlaceholder': 'Empty = do not send',\r\n 'card.capabilities.atLeastThinking': 'Select at least one thinking level (other than off)',\r\n 'card.capabilities.applyLevel': 'Apply levels',\r\n 'card.capabilities.restoreDefault': 'Restore defaults',\r\n 'card.capabilities.unsaved': 'Unsaved',\r\n 'card.capabilities.saveChanges': 'Save changes',\r\n 'card.capabilities.saved': 'Saved',\r\n 'card.capabilities.thinkingFormat': 'Thinking format',\r\n 'card.capabilities.thinkingFormat.inherit': 'Inherit',\r\n 'card.capabilities.contextWindow': 'Context window limit',\r\n 'card.capabilities.contextCustomPlaceholder': 'Custom integer, e.g. 256000',\r\n 'card.capabilities.contextClear': 'Clear',\r\n 'card.capabilities.contextInteger': 'Context length must be an integer (2000-1000000)',\r\n 'card.capabilities.contextRange': 'Context length must be between 2000 and 1000000',\r\n 'card.capabilities.contextHint': 'Pick a preset or enter an integer (2000–1000000); written to llm-pi-ai for context pressure/compaction and applied to the next request without a restart.',\r\n 'input.context.title': 'Context window',\r\n 'input.context.globalHint': 'Applies globally to every session using this model (Clear restores the default)',\r\n 'input.context.unset': 'Unset',\r\n 'input.context.custom': 'Custom',\r\n 'input.context.noModel': 'No session model yet',\r\n 'input.context.customPlaceholder': 'Custom integer, e.g. 256000',\r\n 'input.context.apply': 'Apply',\r\n 'input.context.clear': 'Clear',\r\n 'input.context.integer': 'Context length must be an integer (2000-1000000)',\r\n 'input.context.range': 'Context length must be between 2000 and 1000000',\r\n 'model.panel.choose': 'Choose model',\r\n 'model.panel.loading': 'Loading the model directory…',\r\n 'model.panel.empty': 'No models available',\r\n 'model.panel.window': 'Window',\r\n 'model.panel.noTarget': 'No writable config entry for this model',\r\n 'model.panel.unavailable': 'The model directory is unavailable for this session',\r\n 'input.effort.title': 'Reasoning effort',\r\n 'panel.search.placeholder': 'Search models…',\r\n 'card.takeoverUi': 'Model UI takeover',\r\n 'card.takeoverUiHint': 'On: this plugin replaces the composer model picker with its own panel (per-line context/effort editors + search). Off (default): the official popup stays — the auto level still appears, and search and loading remain the shipped selector’s. Changes apply immediately — no reload needed.',\r\n 'card.capabilities.apiUnsupported': 'This provider uses a non-openai-completions protocol: thinkingFormat / supportsReasoningEffort are openai-completions-only fields and are not offered here (a write carrying them is rejected wholesale by the host). The thinking switch is unaffected: it writes the protocol-neutral reasoningEfforts, which pi-ai maps natively per protocol.',\r\n 'card.capabilities.thinkingNative': 'The thinking switch is available on every protocol: it writes the protocol-neutral reasoningEfforts, which pi-ai maps natively (Anthropic thinking budget / Responses reasoning effort). thinkingFormat / supportsReasoningEffort are openai-completions-only and appear only once the model is declared a thinking model on that protocol.',\r\n 'card.capabilities.staleCompat': 'openai-completions-only fields an older version forced onto this model row',\r\n 'card.capabilities.stripStaleCompat': 'Remove these leftovers',\r\n 'card.dsContextTitle': 'Official DeepSeek context windows',\r\n 'input.effort.default': 'Provider default',\r\n 'input.effort.reset': 'Restore provider default',\r\n 'card.capabilities.failed': 'Save failed: the value was rejected or conflicted. Check it.',\r\n 'trace.label': 'Effort trace',\r\n 'trace.empty': 'No committed request levels in this session yet.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manual',\r\n 'trace.title': 'Effort trace',\r\n 'trace.subtitle': 'The level every request in this session actually went out with; consecutive identical levels collapse into one run (newest first).',\r\n 'trace.summary.requests': 'requests',\r\n 'trace.summary.runs': 'runs',\r\n 'trace.summary.autoRuns': 'runs scheduled by auto',\r\n 'trace.summary.peak': 'peak',\r\n 'trace.summary.hint': 'T=turn · S=step',\r\n 'trace.note.attribution': 'Note: from 0.2.2 the host forbids changing the level at request time, so this plugin (strict line) writes `model/selection` itself a step ahead — a “manual” tag therefore only means the last selection in the log was a concrete level, not necessarily a human click.',\r\n 'trace.intent.default': 'default',\r\n 'trace.intent.unknown': 'unrecorded',\r\n 'trace.intent.scheduler': 'scheduler',\r\n 'trace.intent.unknownHint': 'This level change has no matching selection record in the session log (on the 0.2.2+ strict line the plugin itself writes model/selection and those writes never reach the log)',\r\n 'trace.summary.switches': 'model switches',\r\n 'trace.dir.up': 'escalated from the previous run, %n request(s)',\r\n 'trace.dir.down': 'dropped from the previous run, %n request(s)',\r\n 'trace.dir.flat': 'same level, different pick, %n request(s)',\r\n 'trace.dir.start': 'this session’s first level, %n request(s)',\r\n 'ring.title': 'Context check',\r\n 'ring.used': 'Used',\r\n 'ring.remaining': 'Remaining',\r\n 'ring.window': 'Context window',\r\n 'ring.percent': 'Pressure',\r\n 'ring.system': 'System prompt',\r\n 'ring.tools': 'Tool definitions',\r\n 'ring.messages': 'Messages',\r\n 'ring.warning': 'Context is nearly full — compact the context or start a new session.',\r\n 'ring.aria': '%n of context used',\r\n 'ring.unset': 'No usage yet in this turn',\r\n 'ring.billing': 'Cache billing',\r\n 'ring.bill.step': 'This step',\r\n 'ring.bill.turn': 'This turn',\r\n 'ring.bill.session': 'Session total',\r\n 'ring.bill.cacheRead': 'Cache read',\r\n 'ring.bill.cacheMiss': 'Cache miss',\r\n 'ring.bill.output': 'Output',\r\n 'ring.bill.fullMiss': 'Full misses',\r\n 'ring.bill.rounds': 'steps',\r\n 'ring.bill.peak': 'Peak rates',\r\n 'ring.bill.offPeak': 'Off-peak rates',\r\n 'ring.bill.flat': 'Flat rate',\r\n 'ring.bill.unpriced': 'Not billed',\r\n 'ring.bill.custom': 'priced at custom rates',\r\n 'ring.bill.pricedAs': 'priced as %n',\r\n 'ring.bill.priced': 'priced at catalog rates',\r\n 'ring.bill.estimate': 'estimated off-catalog',\r\n 'ring.bill.uncalibrated': 'uncalibrated — reference only',\r\n}\r\n\r\n/** Japanese dictionary (keys mirror zh). */\r\nexport const ja: Record<keyof typeof zh, string> = {\r\n 'card.title': '思考レベル',\r\n 'family.title': '起子プラグイン設定',\r\n 'card.description': 'モデルセレクターで Auto(マスク)を選択すると、ツール呼び出し履歴から low / high / max を自動スケジュールして API に送信します。ここでは既定レベル、スケジューラーの境界、モデル能力(レベル → ゲートウェイ送信値のマッピング)を設定します。',\r\n 'card.level': '既定レベル',\r\n 'card.level.off': 'off — 思考を無効化(手動のみ、自動選択はされません)',\r\n 'card.level.on': 'on — 思考を有効化(トグルのみのモデル向け。enable_thinking のみ送信、effort は送信しません)',\r\n 'card.level.minimal': 'minimal — 最小(非常に軽いタスク)',\r\n 'card.level.low': 'low — 低(軽いラウンドは軽いまま)',\r\n 'card.level.medium': 'medium — 中',\r\n 'card.level.high': 'high — 高(公式既定値)',\r\n 'card.level.xhigh': 'xhigh — 特高',\r\n 'card.level.max': 'max — 最大(重いタスク)',\r\n 'card.level.auto': 'auto — ツール履歴から自動スケジュール(既定)',\r\n 'card.enabled': '有効',\r\n 'card.allowDowngrade': '降格を許可(auto は low まで下げられる)',\r\n 'card.allowUpgrade': '昇格を許可(auto は max まで上げられる)',\r\n 'card.defaultPricing': 'カタログ外モデルの価格',\r\n 'card.simpleTools': '簡易ツール許可リスト(auto ダウングレード)',\r\n 'card.simpleToolsHint': 'カンマまたはスペース区切りのツール名を内蔵の「安価・決定論的ツール」判定に追加します(例: shell、pwsh、web_fetch)。auto ではこれらの短い呼び出しのみのステップは low に下がります。内蔵集合は既に bash/terminal/shell/pwsh を含むため、ここではホスト固有の名前を補完してください。',\r\n 'card.simpleToolsRegex': '簡易ツール正規表現リスト(auto 降格判定)',\r\n 'card.simpleToolsRegexHint': '1 エントリ = 1 つの JavaScript 正規表現(自動アンカーなし — 自前で ^ を書く、大文字小文字を無視)。上のリテラル名単と併存し同一の比率に計上されます。パターンは完全なツール名と ops_ を剥いだ裸名の両方に一致するため、「^ops_.*」だけで dsh-ops ファミリー全体を覆えます。不正なパターンは 1 度だけ警告してスキップされます。',\r\n 'card.defaultPricingHint': '価格カタログに未登録のモデル(他プラグイン経由のゲートウェイモデル含む)の計算方法。登録済みモデルは常にカタログ価格を使用。価格変更は以降の新規記録のみ影響。',\r\n 'card.defaultPricing.estimate': 'estimate — 典型価格でフォールバック見積り(未校正・参考値、デフォルト)',\r\n 'card.defaultPricing.cn': 'cn — 人民元キャリブレーション(カタログ外は典型価格の見積りのまま)',\r\n 'card.defaultPricing.global': 'global — ドルキャリブレーション(USD 行の補録前はカタログ外から見積り)',\r\n 'card.defaultPricing.custom': 'custom — 手入力価格(行が不完全なら未計算)',\r\n 'card.defaultPricing.off': 'off — 計算しない(カタログ外は「未計算」と表示)',\r\n 'card.unavailable': '設定名前空間が利用できません:dsh-thinking-levels が profile に組み込まれているか確認してください。',\r\n 'card.readonly': '読み取り専用',\r\n 'card.capabilities': 'モデル能力(llm-pi-ai カスタムプロバイダー)',\r\n 'card.capabilities.hint': 'llm-pi-ai 設定を直接読み書きします:レベルにチェックを入れ、ゲートウェイに送信する値を入力(例:high → ultra)。off を空欄にすると送信しません。視覚は画像入力を決定、思考トグルは enable_thinking を制御、thinkingFormat は wire シリアライズ形式を選択します。',\r\n 'card.capabilities.empty': 'llm-pi-ai にモデルが設定されたカスタムプロバイダーがありません。先に「設定 → モデル」でプロバイダーとモデルを追加してください。',\r\n 'card.capabilities.unavailable': 'llm-pi-ai の設定名前空間が利用できません。',\r\n 'card.capabilities.none': '(モデルなし)',\r\n 'card.capabilities.search': 'モデル名または ID で検索…',\r\n 'card.capabilities.noMatches': '一致するモデルがありません',\r\n 'card.capabilities.quickSettings': 'クイック設定',\r\n 'card.capabilities.presetOfficial': 'すべてに適用:Off / High / Max(公式 DeepSeek 形式)',\r\n 'card.capabilities.presetGeneric': 'すべてに適用:Off / Low / Medium / High(汎用)',\r\n 'card.capabilities.vendor': 'プロバイダー',\r\n 'card.capabilities.developerRole': 'ゲートウェイは developer ロール非対応',\r\n 'card.capabilities.developerRoleHint': '公式互換スイッチ(dsh ≥ v0.1.0-rc.8):ルートレベルの compat.supportsDeveloperRole: false を書き込み、システムプロンプトを system ロールで送信します。vLLM / SGLang などの Unexpected message role 400 を修正。チェックを外すとフィールドを削除し継承に戻します。',\r\n 'card.capabilities.takeover': 'サードパーティテイクオーバー',\r\n 'card.capabilities.takeoverHint': 'チェックすると、このルートのモデルリクエストは dsh-llm-openai-completions トランスポート経由で短路送信され(マルチモーダル真送信・モーダルゲート・プロンプト注入)、pi-ai は関与しません。トランスポート自身の providers リストに書き込みます。チェック解除でルートを削除。トランスポートのインストールが必要です。',\r\n 'card.capabilities.takeoverHintAbsent': 'トランスポート dsh-llm-openai-completions が未インストールです — ルート単位のテイクオーバーには先にインストールして有効化してください。',\r\n 'card.capabilities.expandProvider': 'プロバイダーを展開',\r\n 'card.capabilities.collapseProvider': 'プロバイダーを折りたたむ',\r\n 'card.capabilities.openModelSettings': 'モデル設定を開く',\r\n 'card.capabilities.closeModelSettings': 'モデル設定を折りたたむ',\r\n 'card.capabilities.vision': '視覚モデル',\r\n 'card.capabilities.video': '動画入力',\r\n 'card.capabilities.audio': '音声入力',\r\n 'card.capabilities.pdf': 'PDF入力',\r\n 'card.capabilities.mediaHint': '動画/音声の宣言は引継ぎトランスポートの extraInputs に書き込まれます(ホストのモデル行 input 列挙は text|image のみ)。ルートが引継ぎ中のときのみ有効で、オフの場合は該当ブロックが拒否されるか modalFallback でマスクされます。',\r\n 'card.masterTakeover': '引継ぎマスター',\r\n 'card.masterTakeoverHint': 'マスタースイッチ:起動ごとにトランスポートの enabled へミラーされます(唯一の書き手)。ルート毎の「サードパーティ引継ぎ」チェックはメンバーのみを担い、マスター OFF でチェックすると自動的に点灯します。',\r\n 'card.capabilities.thinking': '思考モデル',\r\n 'card.capabilities.supportsEffort': 'think effort をサポート',\r\n 'card.capabilities.efforts': '思考レベル(チェック後、送信値を入力)',\r\n 'card.capabilities.wirePlaceholder': '送信値(例:ultra)',\r\n 'card.capabilities.offPlaceholder': '空欄 = 送信しない',\r\n 'card.capabilities.atLeastThinking': '思考レベルを 1 つ以上選択してください(off 以外)',\r\n 'card.capabilities.applyLevel': 'レベルを適用',\r\n 'card.capabilities.restoreDefault': '既定値に戻す',\r\n 'card.capabilities.unsaved': '未保存',\r\n 'card.capabilities.saveChanges': '変更を保存',\r\n 'card.capabilities.saved': '保存済み',\r\n 'card.capabilities.thinkingFormat': '思考形式',\r\n 'card.capabilities.thinkingFormat.inherit': '継承',\r\n 'card.capabilities.contextWindow': 'コンテキストウィンドウ上限',\r\n 'card.capabilities.contextCustomPlaceholder': 'カスタム整数(例:256000)',\r\n 'card.capabilities.contextClear': 'クリア',\r\n 'card.capabilities.contextInteger': 'コンテキスト長は整数で入力してください(2000-1000000)',\r\n 'card.capabilities.contextRange': 'コンテキスト長は 2000 から 1000000 の範囲で指定してください',\r\n 'card.capabilities.contextHint': 'プリセットを選ぶか整数を入力(2000–1000000)。llm-pi-ai に書き込まれ、コンテキスト圧力/圧縮に使用され、再起動なしで次のリクエストに反映されます。',\r\n 'input.context.title': 'コンテキストウィンドウ',\r\n 'input.context.globalHint': 'グローバルに有効:このモデルを使用するすべてのセッションに適用されます(クリアで既定値に戻ります)',\r\n 'input.context.unset': '未設定',\r\n 'input.context.custom': 'カスタム',\r\n 'input.context.noModel': 'セッションモデルがまだありません',\r\n 'input.context.customPlaceholder': 'カスタム整数(例:256000)',\r\n 'input.context.apply': '適用',\r\n 'input.context.clear': 'クリア',\r\n 'input.context.integer': 'コンテキスト長は整数で入力してください(2000-1000000)',\r\n 'input.context.range': 'コンテキスト長は 2000 から 1000000 の範囲で指定してください',\r\n 'model.panel.choose': 'モデルを選択',\r\n 'model.panel.loading': 'モデルディレクトリを読み込み中…',\r\n 'model.panel.empty': '利用可能なモデルがありません',\r\n 'model.panel.window': 'ウィンドウ',\r\n 'model.panel.noTarget': 'このモデルには書き込み可能な設定項目がありません',\r\n 'model.panel.unavailable': 'このセッションのモデルディレクトリは利用できません',\r\n 'input.effort.title': '思考レベル',\r\n 'panel.search.placeholder': 'モデルを検索…',\r\n 'card.takeoverUi': 'モデルUI引き継ぎ',\r\n 'card.takeoverUiHint': 'ON にするとこのプラグインが入力欄のモデル選択を独自パネル(行別のコンテキスト/レベル編集+検索)に置き換えます。OFF(既定)では公式ポップアップが維持され、auto レベルは引き続き表示され、検索と読み込みは標準セレクタの役割です。変更は即時反映されます(再読み込み不要)。',\r\n 'card.capabilities.apiUnsupported': 'このプロバイダーは openai-completions 以外のプロトコルを使用しています:thinkingFormat / supportsReasoningEffort は openai-completions 専用フィールドのためここでは提供しません(書き込むとホストが providers 全体を拒否します)。思考スイッチは影響を受けません — protocol 非依存の reasoningEfforts を書き込み、pi-ai がプロトコルごとにネイティブ変換します。',\r\n 'card.capabilities.thinkingNative': '思考スイッチはすべてのプロトコルでチェックできます:protocol 非依存の reasoningEfforts を書き込み、pi-ai が各プロトコルでネイティブ変換します(Anthropic の思考予算 / Responses の reasoning effort)。thinkingFormat / supportsReasoningEffort は openai-completions 専用で、そのプロトコルで思考モデルと宣言した場合のみ表示されます。',\r\n 'card.capabilities.staleCompat': '旧バージョンがこのモデル行に強制挿入した openai-completions 専用フィールド',\r\n 'card.capabilities.stripStaleCompat': 'この残留フィールドを削除',\r\n 'card.dsContextTitle': '公式 DeepSeek モデルのコンテキスト上限',\r\n 'input.effort.default': 'プロバイダーの既定',\r\n 'input.effort.reset': 'プロバイダーの既定に戻す',\r\n 'card.capabilities.failed': '保存に失敗しました:値が拒否されたか競合しています。確認してください。',\r\n 'trace.label': 'Effort 軌跡',\r\n 'trace.empty': 'このセッションには確定済みリクエストのレベルがまだありません。',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': '手動',\r\n 'trace.title': 'Effort 軌跡',\r\n 'trace.subtitle': 'このセッションで各リクエストが実際に送られたレベル。連続する同一レベルは 1 セグメントにまとめます(新しい順)。',\r\n 'trace.summary.requests': 'リクエスト',\r\n 'trace.summary.runs': 'セグメント',\r\n 'trace.summary.autoRuns': 'セグメントは auto が決定',\r\n 'trace.summary.peak': '最大',\r\n 'trace.summary.hint': 'T=ターン · S=ステップ',\r\n 'trace.note.attribution': '注:0.2.2 以降ホストはリクエスト段階でのレベル変更を禁止するため、本プラグイン(厳格ライン)は 1 ステップ先の `model/selection` を自分で書きます。したがって「手動」はログ上の最後の選択が具体レベルだったことだけを意味し、人手のクリックとは限りません。',\r\n 'trace.intent.default': '既定',\r\n 'trace.intent.unknown': '記録なし',\r\n 'trace.intent.scheduler': 'プラグイン',\r\n 'trace.intent.unknownHint': 'このレベル変更に対応する選択記録がセッションログにありません(0.2.2 以降の厳格ラインではプラグイン自身が model/selection を書き、その書き込みはログに残りません)',\r\n 'trace.summary.switches': 'モデル切替',\r\n 'trace.dir.up': '前のセグメントから上げ、%n リクエスト',\r\n 'trace.dir.down': '前のセグメントから下げ、%n リクエスト',\r\n 'trace.dir.flat': 'レベルは同じで選択のみ変更、%n リクエスト',\r\n 'trace.dir.start': 'このセッションの最初のレベル、%n リクエスト',\r\n 'ring.title': 'コンテキスト確認',\r\n 'ring.used': '使用済み',\r\n 'ring.remaining': '残り',\r\n 'ring.window': 'コンテキストウィンドウ',\r\n 'ring.percent': '占有率',\r\n 'ring.system': 'システムプロンプト',\r\n 'ring.tools': 'ツール定義',\r\n 'ring.messages': '対話メッセージ',\r\n 'ring.warning': 'コンテキストがもうすぐ満杯です。圧縮するか、新しいセッションを開始してください。',\r\n 'ring.aria': 'コンテキスト使用率 %n',\r\n 'ring.unset': 'このターンはまだ使用量がありません',\r\n 'ring.billing': 'キャッシュ請求',\r\n 'ring.bill.step': '現在のステップ',\r\n 'ring.bill.turn': '現在のターン',\r\n 'ring.bill.session': 'セッション累計',\r\n 'ring.bill.cacheRead': 'キャッシュヒット',\r\n 'ring.bill.cacheMiss': 'キャッシュミス',\r\n 'ring.bill.output': '出力',\r\n 'ring.bill.fullMiss': '完全ミス',\r\n 'ring.bill.rounds': 'ステップ',\r\n 'ring.bill.peak': 'ピーク料金',\r\n 'ring.bill.offPeak': 'オフピーク料金',\r\n 'ring.bill.flat': '定額',\r\n 'ring.bill.unpriced': '未計量',\r\n 'ring.bill.custom': 'カスタム料金で計量',\r\n 'ring.bill.pricedAs': '%n として計量',\r\n 'ring.bill.priced': 'カタログ料金で計量',\r\n 'ring.bill.estimate': 'カタログ外の推定料金',\r\n 'ring.bill.uncalibrated': '未較正・参考のみ',\r\n}\r\n\r\n/** Korean dictionary (keys mirror zh). */\r\nexport const ko: Record<keyof typeof zh, string> = {\r\n 'card.title': '사고 수준',\r\n 'family.title': '起子 플러그인 설정',\r\n 'card.description': '모델 선택기에서 Auto(마스크)를 선택하면 도구 호출 기록을 기반으로 low / high / max 를 자동 스케줄링하여 API에 제출합니다. 여기서 기본 수준, 스케줄러 경계, 모델 기능(수준 → 게이트웨이 전송 값 매핑)을 구성합니다.',\r\n 'card.level': '기본 수준',\r\n 'card.level.off': 'off — 사고 비활성화(수동 전용, 자동 선택 안 됨)',\r\n 'card.level.on': 'on — 사고 활성화(토글 전용 모델용. enable_thinking만 전송, effort는 전송하지 않음)',\r\n 'card.level.minimal': 'minimal — 최소(매우 가벼운 작업)',\r\n 'card.level.low': 'low — 낮음(가벼운 라운드는 가볍게 유지)',\r\n 'card.level.medium': 'medium — 중간',\r\n 'card.level.high': 'high — 높음(공식 기본값)',\r\n 'card.level.xhigh': 'xhigh — 특별히 높음',\r\n 'card.level.max': 'max — 최대(무거운 작업)',\r\n 'card.level.auto': 'auto — 도구 기록에서 자동 스케줄링(기본값)',\r\n 'card.enabled': '활성화',\r\n 'card.allowDowngrade': '다운그레이드 허용(auto가 low까지 내릴 수 있음)',\r\n 'card.allowUpgrade': '업그레이드 허용(auto가 max까지 올릴 수 있음)',\r\n 'card.defaultPricing': '카탈로그 외 과금',\r\n 'card.simpleTools': '간단한 도구 허용 목록(auto 강등)',\r\n 'card.simpleToolsHint': '쉼표 또는 공백으로 구분한 도구 이름을 내장 \"저렴하고 결정적인 도구\" 판정에 추가합니다(예: shell, pwsh, web_fetch). auto에서는 이런 짧은 호출만으로 구성된 단계가 low로 내려갑니다. 내장 목록은 이미 bash/terminal/shell/pwsh를 포함하므로 호스트 고유 이름을 보충하세요.',\r\n 'card.simpleToolsRegex': '간단 도구 정규식 목록(auto 강등 판정)',\r\n 'card.simpleToolsRegexHint': '한 줄에 하나의 JavaScript 정규식(자동 앵커 없음 — ^ 를 직접 쓰세요, 대소문자 무시). 위 리터럴 목록과 병행되어 같은 비율에 계산됩니다. 패턴은 전체 도구 이름과 ops_ 를 제거한 이름 모두에 일치하므로 \"^ops_.*\" 하나로 dsh-ops 계열 전체를 커버합니다. 잘못된 항목은 한 번 경고 후 건너뜁니다.',\r\n 'card.defaultPricingHint': '가격 카탈로그에 없는 모델(다른 플러그인으로 유입된 게이트웨이 모델 포함)의 과금 방식. 카탈로그 등재 모델은 항상 자체 등재가 사용. 가격 변경은 이후 신규 기록에만 반영.',\r\n 'card.defaultPricing.estimate': 'estimate — 전형가 폴백 추정(미교정·참고용, 기본)',\r\n 'card.defaultPricing.cn': 'cn — 위안화 보정 등급(카탈로그 외는 여전히 전형가 추정)',\r\n 'card.defaultPricing.global': 'global — 달러 보정 등급(USD 행 보충 전 카탈로그 외는 추정)',\r\n 'card.defaultPricing.custom': 'custom — 직접 입력 가격(행이 불완전하면 미과금)',\r\n 'card.defaultPricing.off': 'off — 미과금(카탈로그 외는 \"미과금\" 표시)',\r\n 'card.unavailable': '설정 네임스페이스를 사용할 수 없습니다: dsh-thinking-levels가 이 profile에 조립되었는지 확인하세요.',\r\n 'card.readonly': '읽기 전용',\r\n 'card.capabilities': '모델 기능(llm-pi-ai 사용자 지정 제공자)',\r\n 'card.capabilities.hint': 'llm-pi-ai 설정을 직접 읽고 씁니다: 수준을 체크하고 게이트웨이에 보낼 값을 입력(예: high → ultra). off를 비워 두면 전송하지 않습니다. 시각은 이미지 입력을 결정하고, 사고 토글은 enable_thinking을 제어하며, thinkingFormat은 wire 직렬화 형식을 선택합니다.',\r\n 'card.capabilities.empty': 'llm-pi-ai에 모델이 구성된 사용자 지정 제공자가 없습니다. 먼저 「설정 → 모델」에서 제공자와 모델을 추가하세요.',\r\n 'card.capabilities.unavailable': 'llm-pi-ai 설정 네임스페이스를 사용할 수 없습니다.',\r\n 'card.capabilities.none': '(모델 없음)',\r\n 'card.capabilities.search': '모델 이름 또는 ID로 검색…',\r\n 'card.capabilities.noMatches': '일치하는 모델이 없습니다',\r\n 'card.capabilities.quickSettings': '빠른 설정',\r\n 'card.capabilities.presetOfficial': '전체에 적용: Off / High / Max(공식 DeepSeek 방식)',\r\n 'card.capabilities.presetGeneric': '전체에 적용: Off / Low / Medium / High(일반 방식)',\r\n 'card.capabilities.vendor': '제공자',\r\n 'card.capabilities.developerRole': '게이트웨이가 developer 역할 미지원',\r\n 'card.capabilities.developerRoleHint': '공식 호환 스위치(dsh ≥ v0.1.0-rc.8): 라우트 수준 compat.supportsDeveloperRole: false 를 기록하여 시스템 프롬프트를 system 역할로 전송합니다. vLLM / SGLang 등의 Unexpected message role 400 을 수정. 체크 해제 시 필드를 삭제하고 상속을 복원합니다.',\r\n 'card.capabilities.takeover': '서드파티 인수',\r\n 'card.capabilities.takeoverHint': '체크하면 이 루트의 모델 요청이 dsh-llm-openai-completions 전송 계층을 통해 단락 전송되고(멀티모달 실전송·모달리티 게이트·프롬프트 주입) pi-ai 는 개입하지 않습니다. 전송 계층 자체의 providers 목록에 기록합니다. 체크 해제 시 루트를 제거합니다. 전송 계층 설치가 필요합니다.',\r\n 'card.capabilities.takeoverHintAbsent': 'dsh-llm-openai-completions 전송 계층이 설치되어 있지 않습니다 — 루트별 인수를 위해 먼저 설치하고 활성화하세요.',\r\n 'card.capabilities.expandProvider': '제공자 펼치기',\r\n 'card.capabilities.collapseProvider': '제공자 접기',\r\n 'card.capabilities.openModelSettings': '모델 설정 열기',\r\n 'card.capabilities.closeModelSettings': '모델 설정 접기',\r\n 'card.capabilities.vision': '시각 모델',\r\n 'card.capabilities.video': '비디오 입력',\r\n 'card.capabilities.audio': '오디오 입력',\r\n 'card.capabilities.pdf': 'PDF 입력',\r\n 'card.capabilities.mediaHint': '비디오/오디오 선언은 인수 transport의 extraInputs에 기록됩니다(호스트 모델 행 input 열거는 text|image만 허용). 해당 라우트가 인수 중일 때만 유효하며, 꺼져 있으면 해당 블록이 거부되거나 modalFallback로 가려집니다.',\r\n 'card.masterTakeover': '인수 마스터',\r\n 'card.masterTakeoverHint': '마스터 스위치: 시작 시마다 transport의 enabled로 미러링됩니다(유일한 기록자). 라우트별 서드파티 인수 체크는 멤버십만 담당하며, 마스터가 꺼진 상태에서 체크하면 자동으로 켜집니다.',\r\n 'card.capabilities.thinking': '사고 모델',\r\n 'card.capabilities.supportsEffort': 'think effort 지원',\r\n 'card.capabilities.efforts': '사고 수준(체크 후 전송 값 입력)',\r\n 'card.capabilities.wirePlaceholder': '전송 값(예: ultra)',\r\n 'card.capabilities.offPlaceholder': '비워 둠 = 전송하지 않음',\r\n 'card.capabilities.atLeastThinking': '사고 수준을 하나 이상 선택하세요(off 제외)',\r\n 'card.capabilities.applyLevel': '수준 적용',\r\n 'card.capabilities.restoreDefault': '기본값 복원',\r\n 'card.capabilities.unsaved': '저장되지 않음',\r\n 'card.capabilities.saveChanges': '변경 사항 저장',\r\n 'card.capabilities.saved': '저장됨',\r\n 'card.capabilities.thinkingFormat': '사고 형식',\r\n 'card.capabilities.thinkingFormat.inherit': '상속',\r\n 'card.capabilities.contextWindow': '컨텍스트 창 상한',\r\n 'card.capabilities.contextCustomPlaceholder': '사용자 지정 정수(예: 256000)',\r\n 'card.capabilities.contextClear': '지우기',\r\n 'card.capabilities.contextInteger': '컨텍스트 길이는 정수여야 합니다 (2000-1000000)',\r\n 'card.capabilities.contextRange': '컨텍스트 길이는 2000에서 1000000 사이여야 합니다',\r\n 'card.capabilities.contextHint': '프리셋을 선택하거나 정수를 입력하세요(2000–1000000). llm-pi-ai에 기록되어 컨텍스트 압력/압축에 사용되며, 재시작 없이 다음 요청에 반영됩니다.',\r\n 'input.context.title': '컨텍스트 창',\r\n 'input.context.globalHint': '전역 적용: 이 모델을 사용하는 모든 세션에 적용됩니다(지우면 기본값 복원)',\r\n 'input.context.unset': '미설정',\r\n 'input.context.custom': '사용자 지정',\r\n 'input.context.noModel': '세션 모델이 아직 없습니다',\r\n 'input.context.customPlaceholder': '사용자 지정 정수(예: 256000)',\r\n 'input.context.apply': '적용',\r\n 'input.context.clear': '지우기',\r\n 'input.context.integer': '컨텍스트 길이는 정수여야 합니다 (2000-1000000)',\r\n 'input.context.range': '컨텍스트 길이는 2000에서 1000000 사이여야 합니다',\r\n 'model.panel.choose': '모델 선택',\r\n 'model.panel.loading': '모델 디렉터리를 불러오는 중…',\r\n 'model.panel.empty': '사용 가능한 모델이 없습니다',\r\n 'model.panel.window': '창',\r\n 'model.panel.noTarget': '이 모델에는 쓰기 가능한 설정 항목이 없습니다',\r\n 'model.panel.unavailable': '이 세션의 모델 디렉터리를 사용할 수 없습니다',\r\n 'input.effort.title': '추론 강도',\r\n 'panel.search.placeholder': '모델 검색…',\r\n 'card.takeoverUi': '모델 UI 인수',\r\n 'card.takeoverUiHint': '켜면 이 플러그인이 입력창의 모델 선택을 자체 패널(행별 컨텍스트/레벨 편집 + 검색)로 대체합니다. 끄면(기본) 공식 팝업이 유지되며 auto 레벨은 계속 표시되고 검색과 로딩은 표준 셀렉터가 담당합니다. 변경이 즉시 반영됩니다(새로고침 불필요).',\r\n 'card.capabilities.apiUnsupported': '이 제공자는 openai-completions 이외 프로토콜을 사용합니다: thinkingFormat / supportsReasoningEffort 는 openai-completions 전용 필드이므로 여기서 제공하지 않습니다(기록하면 호스트가 providers 전체를 거부합니다). 사고 스위치는 영향받지 않습니다 — protocol 중립적인 reasoningEfforts 를 기록하면 pi-ai 가 프로토콜별로 네이티브 변환합니다.',\r\n 'card.capabilities.thinkingNative': '사고 스위치는 모든 프로토콜에서 체크할 수 있습니다: protocol 중립적인 reasoningEfforts 를 기록하고 pi-ai 가 각 프로토콜에서 네이티브 변환합니다(Anthropic 사고 예산 / Responses reasoning effort). thinkingFormat / supportsReasoningEffort 는 openai-completions 전용이며, 해당 프로토콜에서 사고 모델로 선언한 경우에만 표시됩니다.',\r\n 'card.capabilities.staleCompat': '구버전이 이 모델 행에 강제로 주입한 openai-completions 전용 필드',\r\n 'card.capabilities.stripStaleCompat': '이 잔여 필드 제거',\r\n 'card.dsContextTitle': '공식 DeepSeek 모델 컨텍스트 상한',\r\n 'input.effort.default': '공급자 기본값',\r\n 'input.effort.reset': '공급자 기본값으로 복원',\r\n 'card.capabilities.failed': '저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요.',\r\n 'trace.label': 'Effort 궤적',\r\n 'trace.empty': '이 세션에는 아직 확정된 요청 레벨이 없습니다.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': '수동',\r\n 'trace.title': 'Effort 궤적',\r\n 'trace.subtitle': '이 세션에서 각 요청이 실제로 보낸 레벨입니다. 연속된 동일 레벨은 한 구간으로 묶습니다(최신순).',\r\n 'trace.summary.requests': '회 요청',\r\n 'trace.summary.runs': '구간',\r\n 'trace.summary.autoRuns': '구간은 auto 결정',\r\n 'trace.summary.peak': '최고',\r\n 'trace.summary.hint': 'T=턴 · S=단계',\r\n 'trace.note.attribution': '참고: 0.2.2부터 호스트는 요청 단계에서 레벨 변경을 금지하므로, 이 플러그인(엄격 라인)은 한 단계 앞서 `model/selection`을 직접 기록합니다. 따라서 \"수동\"은 로그의 마지막 선택이 구체적 레벨이었다는 뜻일 뿐, 사람의 클릭을 의미하지 않습니다.',\r\n 'trace.intent.default': '기본',\r\n 'trace.intent.unknown': '기록 없음',\r\n 'trace.intent.scheduler': '플러그인',\r\n 'trace.intent.unknownHint': '이 레벨 변경에 대응하는 선택 기록이 세션 로그에 없습니다(0.2.2 이후 엄격 라인에서는 플러그인이 직접 model/selection을 기록하며 그 기록은 로그에 남지 않습니다)',\r\n 'trace.summary.switches': '모델 전환',\r\n 'trace.dir.up': '이전 구간보다 상향, %n회 요청',\r\n 'trace.dir.down': '이전 구간보다 하향, %n회 요청',\r\n 'trace.dir.flat': '레벨은 같고 선택만 변경, %n회 요청',\r\n 'trace.dir.start': '이 세션의 첫 레벨, %n회 요청',\r\n 'ring.title': '컨텍스트 확인',\r\n 'ring.used': '사용됨',\r\n 'ring.remaining': '남음',\r\n 'ring.window': '컨텍스트 창',\r\n 'ring.percent': '점유율',\r\n 'ring.system': '시스템 프롬프트',\r\n 'ring.tools': '도구 정의',\r\n 'ring.messages': '대화 메시지',\r\n 'ring.warning': '컨텍스트가 거의 가득 찼습니다. 컨텍스트를 압축하거나 새 세션을 시작하세요.',\r\n 'ring.aria': '컨텍스트 사용률 %n',\r\n 'ring.unset': '이번 턴에는 아직 사용량이 없습니다',\r\n 'ring.billing': '캐시 과금',\r\n 'ring.bill.step': '현재 단계',\r\n 'ring.bill.turn': '현재 턴',\r\n 'ring.bill.session': '세션 누적',\r\n 'ring.bill.cacheRead': '캐시 적중',\r\n 'ring.bill.cacheMiss': '캐시 미스',\r\n 'ring.bill.output': '출력',\r\n 'ring.bill.fullMiss': '완전 미스',\r\n 'ring.bill.rounds': '단계',\r\n 'ring.bill.peak': '피크 요금',\r\n 'ring.bill.offPeak': '비피크 요금',\r\n 'ring.bill.flat': '정액',\r\n 'ring.bill.unpriced': '미과금',\r\n 'ring.bill.custom': '사용자 지정 요금으로 과금',\r\n 'ring.bill.pricedAs': '%n 요금으로 과금',\r\n 'ring.bill.priced': '카탈로그 요금으로 과금',\r\n 'ring.bill.estimate': '카탈로그 외 추정 요금',\r\n 'ring.bill.uncalibrated': '미보정·참고용',\r\n}\r\n\r\n/** French dictionary (keys mirror zh). */\r\nexport const fr: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Niveaux de réflexion',\r\n 'family.title': 'Paramètres des plugins Qizi',\r\n 'card.description': 'Choisissez Auto dans le sélecteur de modèle : le plugin planifie low / high / max selon l\\'historique des appels d\\'outils avant de soumettre l\\'effort à l\\'API. Configurez ici le niveau par défaut, les limites du planificateur et les capacités par modèle (niveau → valeur envoyée à la passerelle).',\r\n 'card.level': 'Niveau par défaut',\r\n 'card.level.off': 'off — désactiver la réflexion (manuel uniquement, jamais auto-sélectionné)',\r\n 'card.level.on': 'on — activer la réflexion (modèles à bascule uniquement ; envoie enable_thinking, jamais d\\'effort)',\r\n 'card.level.minimal': 'minimal — minimum (tâches très légères)',\r\n 'card.level.low': 'low — bas (tours économiques restent économiques)',\r\n 'card.level.medium': 'medium — moyen',\r\n 'card.level.high': 'high — élevé (valeur officielle par défaut)',\r\n 'card.level.xhigh': 'xhigh — très élevé',\r\n 'card.level.max': 'max — maximum (tâches lourdes)',\r\n 'card.level.auto': 'auto — planification depuis l\\'historique des outils (par défaut)',\r\n 'card.enabled': 'Activé',\r\n 'card.allowDowngrade': 'Autoriser la rétrogradation (auto peut descendre à low)',\r\n 'card.allowUpgrade': 'Autoriser la montée (auto peut monter à max)',\r\n 'card.defaultPricing': 'Tarification hors catalogue',\r\n 'card.simpleTools': 'Liste d\\'outils simples (rétrogradation auto)',\r\n 'card.simpleToolsHint': 'Noms d\\'outils séparés par virgule ou espace, ajoutés à l\\'ensemble interne des « outils bon marché et déterministes » (ex. shell, pwsh, web_fetch). En mode auto, une étape composée uniquement de ces appels courts passe à low. L\\'ensemble interne couvre déjà bash/terminal/shell/pwsh ; utilisez ce champ pour les noms propres à l\\'hôte.',\r\n 'card.simpleToolsRegex': 'Liste regex d\\'outils simples (déclassement auto)',\r\n 'card.simpleToolsRegexHint': 'Une regex JavaScript par entrée (pas d\\'ancrage automatique — écrivez votre ^ ; insensible à la casse), en complément de la liste littérale ci-dessus et comptée dans le même ratio. Les motifs testent à la fois le nom complet et le nom nu sans ops_ — « ^ops_.* » couvre toute la famille dsh-ops d\\'un coup. Les entrées invalides sont ignorées avec un avertissement unique.',\r\n 'card.defaultPricingHint': 'Comment tarifer les modèles absents du catalogue (y compris les modèles de passerelle apportés par d\\'autres plugins) ; les modèles catalogués gardent leurs tarifs. Les changements ne touchent que les nouvelles lignes.',\r\n 'card.defaultPricing.estimate': 'estimate — estimation par prix type (non calibrée, à titre indicatif ; par défaut)',\r\n 'card.defaultPricing.cn': 'cn — palier calibré CNY (hors catalogue : estimation au prix type)',\r\n 'card.defaultPricing.global': 'global — palier calibré USD (hors catalogue estimé tant que les lignes USD manquent)',\r\n 'card.defaultPricing.custom': 'custom — tarifs saisis (non facturé sans ligne complète)',\r\n 'card.defaultPricing.off': 'off — ne pas facturer (hors catalogue affiche « non facturé »)',\r\n 'card.unavailable': 'Espace de noms des paramètres indisponible : assurez-vous que dsh-thinking-levels est assemblé dans ce profil.',\r\n 'card.readonly': 'Lecture seule',\r\n 'card.capabilities': 'Capacités du modèle (fournisseurs personnalisés llm-pi-ai)',\r\n 'card.capabilities.hint': 'Lit et écrit directement la configuration llm-pi-ai : cochez un niveau et saisissez la valeur exacte envoyée à la passerelle (ex. high → ultra) ; laisser off vide signifie « ne pas envoyer ». Vision contrôle l\\'entrée d\\'image ; le bouton de réflexion pilote enable_thinking ; thinkingFormat choisit la sérialisation wire.',\r\n 'card.capabilities.empty': 'Aucun fournisseur personnalisé n\\'a de modèles configurés dans llm-pi-ai. Ajoutez d\\'abord un fournisseur et des modèles dans Paramètres → Modèles.',\r\n 'card.capabilities.unavailable': 'L\\'espace de noms des paramètres llm-pi-ai est indisponible.',\r\n 'card.capabilities.none': '(aucun modèle)',\r\n 'card.capabilities.search': 'Rechercher des modèles par nom ou ID…',\r\n 'card.capabilities.noMatches': 'Aucun modèle correspondant',\r\n 'card.capabilities.quickSettings': 'Paramètres rapides',\r\n 'card.capabilities.presetOfficial': 'Appliquer à tous : Off / High / Max (style officiel DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Appliquer à tous : Off / Low / Medium / High (générique)',\r\n 'card.capabilities.vendor': 'Fournisseur',\r\n 'card.capabilities.developerRole': 'La passerelle rejette le rôle developer',\r\n 'card.capabilities.developerRoleHint': 'Commutateur de compatibilité officiel (dsh ≥ v0.1.0-rc.8) : écrit compat.supportsDeveloperRole: false au niveau de la route pour que le prompt système soit envoyé avec le rôle system — corrige l\\'erreur Unexpected message role 400 sur les passerelles vLLM / SGLang. Décocher supprime le champ et restaure l\\'héritage.',\r\n 'card.capabilities.takeover': 'Prise en charge tierce',\r\n 'card.capabilities.takeoverHint': 'Une fois coché, les requêtes de modèle de cette route passent par le transport dsh-llm-openai-completions (envoi multimodal réel, garde de modalité, injection de prompt) et pi-ai sort. Écrit la liste providers du transport lui-même ; décocher retire la route. Le transport doit être installé.',\r\n 'card.capabilities.takeoverHintAbsent': 'Le transport dsh-llm-openai-completions n est pas installé — installez-le et activez-le pour la prise en charge par route.',\r\n 'card.capabilities.expandProvider': 'Déplier le fournisseur',\r\n 'card.capabilities.collapseProvider': 'Replier le fournisseur',\r\n 'card.capabilities.openModelSettings': 'Ouvrir les paramètres du modèle',\r\n 'card.capabilities.closeModelSettings': 'Replier les paramètres du modèle',\r\n 'card.capabilities.vision': 'Modèle vision',\r\n 'card.capabilities.video': 'Entrée vidéo',\r\n 'card.capabilities.audio': 'Entrée audio',\r\n 'card.capabilities.pdf': 'Entrée PDF',\r\n 'card.capabilities.mediaHint': 'Les déclarations vidéo/audio sont écrites dans les extraInputs du transport repris (l’énumération input du modèle hôte n’accepte que text|image). Effectif uniquement lorsque la route est reprise ; sinon les blocs concernés sont refusés ou masqués selon modalFallback.',\r\n 'card.masterTakeover': 'Prise de contrôle maître',\r\n 'card.masterTakeoverHint': 'Interrupteur maître : son état est reflété dans le enabled du transport à chaque démarrage (seul rédacteur). Les cases de prise de contrôle tierce par route ne gèrent que l’appartenance ; master off, cocher une route allume cet interrupteur.',\r\n 'card.capabilities.thinking': 'Modèle de réflexion',\r\n 'card.capabilities.supportsEffort': 'Prend en charge think effort',\r\n 'card.capabilities.efforts': 'Niveaux de réflexion (cochez, puis saisissez la valeur wire)',\r\n 'card.capabilities.wirePlaceholder': 'Valeur wire, ex. ultra',\r\n 'card.capabilities.offPlaceholder': 'Vide = ne pas envoyer',\r\n 'card.capabilities.atLeastThinking': 'Sélectionnez au moins un niveau de réflexion (autre que off)',\r\n 'card.capabilities.applyLevel': 'Appliquer les niveaux',\r\n 'card.capabilities.restoreDefault': 'Restaurer les valeurs par défaut',\r\n 'card.capabilities.unsaved': 'Non enregistré',\r\n 'card.capabilities.saveChanges': 'Enregistrer les modifications',\r\n 'card.capabilities.saved': 'Enregistré',\r\n 'card.capabilities.thinkingFormat': 'Format de réflexion',\r\n 'card.capabilities.thinkingFormat.inherit': 'Hériter',\r\n 'card.capabilities.contextWindow': 'Limite de fenêtre de contexte',\r\n 'card.capabilities.contextCustomPlaceholder': 'Entier personnalisé, ex. 256000',\r\n 'card.capabilities.contextClear': 'Effacer',\r\n 'card.capabilities.contextInteger': 'La longueur du contexte doit être un entier (2000-1000000)',\r\n 'card.capabilities.contextRange': 'La longueur du contexte doit être comprise entre 2000 et 1000000',\r\n 'card.capabilities.contextHint': 'Choisissez un préréglage ou saisissez un entier (2000–1000000) ; écrit dans llm-pi-ai pour la pression/compression du contexte et appliqué à la requête suivante sans redémarrage.',\r\n 'input.context.title': 'Fenêtre de contexte',\r\n 'input.context.globalHint': 'S\\'applique globalement à toutes les sessions utilisant ce modèle (Effacer restaure la valeur par défaut)',\r\n 'input.context.unset': 'Non défini',\r\n 'input.context.custom': 'Personnalisé',\r\n 'input.context.noModel': 'Aucun modèle de session',\r\n 'input.context.customPlaceholder': 'Entier personnalisé, ex. 256000',\r\n 'input.context.apply': 'Appliquer',\r\n 'input.context.clear': 'Effacer',\r\n 'input.context.integer': 'La longueur du contexte doit être un entier (2000-1000000)',\r\n 'input.context.range': 'La longueur du contexte doit être comprise entre 2000 et 1000000',\r\n 'model.panel.choose': 'Choisir un modèle',\r\n 'model.panel.loading': 'Chargement du répertoire de modèles…',\r\n 'model.panel.empty': 'Aucun modèle disponible',\r\n 'model.panel.window': 'Fenêtre',\r\n 'model.panel.noTarget': 'Aucune entrée de configuration inscriptible pour ce modèle',\r\n 'model.panel.unavailable': 'Le répertoire de modèles est indisponible pour cette session',\r\n 'input.effort.title': 'Effort de raisonnement',\r\n 'panel.search.placeholder': 'Rechercher des modèles…',\r\n 'card.takeoverUi': \"Reprise de l'UI modèle\",\r\n 'card.takeoverUiHint': \"Activé, ce plugin remplace le sélecteur de modèle du composeur par son propre panneau (éditeurs contexte/niveau par ligne + recherche). Désactivé (défaut), la popup officielle reste en place — le niveau auto apparaît toujours, recherche et chargement appartiennent au sélecteur d'origine. Le changement s’applique immédiatement, sans rechargement.\",\r\n 'card.capabilities.apiUnsupported': \"Ce fournisseur utilise un protocole autre qu'openai-completions : thinkingFormat / supportsReasoningEffort sont des champs propres à openai-completions et ne sont pas proposés ici (une écriture qui les porte est rejetée en bloc par l'hôte). L'interrupteur de réflexion n'est pas affecté : il écrit reasoningEfforts, neutre au protocole, que pi-ai traduit nativement.\",\r\n 'card.capabilities.thinkingNative': \"L'interrupteur de réflexion est disponible sur tous les protocoles : il écrit reasoningEfforts, neutre au protocole, que pi-ai traduit nativement (budget de réflexion Anthropic / reasoning effort Responses). thinkingFormat / supportsReasoningEffort sont propres à openai-completions et n'apparaissent qu'une fois le modèle déclaré réflexif sur ce protocole.\",\r\n 'card.capabilities.staleCompat': 'champs propres à openai-completions qu une version antérieure a forcés sur cette ligne de modèle',\r\n 'card.capabilities.stripStaleCompat': 'Supprimer ces résidus',\r\n 'card.dsContextTitle': 'Fenêtres de contexte DeepSeek officielles',\r\n 'input.effort.default': 'Valeur par défaut du fournisseur',\r\n 'input.effort.reset': 'Restaurer la valeur par défaut du fournisseur',\r\n 'card.capabilities.failed': 'Échec de l\\'enregistrement : la valeur a été rejetée ou est en conflit. Vérifiez-la.',\r\n 'trace.label': 'Trace des efforts',\r\n 'trace.empty': 'Aucun niveau de requête validé dans cette session pour l\\'instant.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manuel',\r\n 'trace.title': 'Trace des efforts',\r\n 'trace.subtitle': 'Le niveau réellement envoyé à chaque requête de cette session ; les niveaux identiques consécutifs sont regroupés (le plus récent en haut).',\r\n 'trace.summary.requests': 'requêtes',\r\n 'trace.summary.runs': 'segments',\r\n 'trace.summary.autoRuns': 'segments planifiés par auto',\r\n 'trace.summary.peak': 'pic',\r\n 'trace.summary.hint': 'T=tour · S=étape',\r\n 'trace.note.attribution': 'Remarque : depuis 0.2.2 l’hôte interdit de changer le niveau au moment de la requête ; ce plugin (ligne stricte) écrit donc lui-même `model/selection` une étape à l’avance. L’étiquette « manuel » signifie seulement que la dernière sélection du journal était un niveau concret, pas forcément un clic humain.',\r\n 'trace.intent.default': 'par défaut',\r\n 'trace.intent.unknown': 'non enregistré',\r\n 'trace.intent.scheduler': 'planificateur',\r\n 'trace.intent.unknownHint': 'Ce changement de niveau n’a aucune sélection correspondante dans le journal (depuis 0.2.2, le plugin écrit lui-même model/selection et ces écritures n’atteignent pas le journal)',\r\n 'trace.summary.switches': 'changements de modèle',\r\n 'trace.dir.up': 'montée depuis le segment précédent, %n requête(s)',\r\n 'trace.dir.down': 'descente depuis le segment précédent, %n requête(s)',\r\n 'trace.dir.flat': 'même niveau, choix différent, %n requête(s)',\r\n 'trace.dir.start': 'premier niveau de la session, %n requête(s)',\r\n 'ring.title': 'Vérification du contexte',\r\n 'ring.used': 'Utilisé',\r\n 'ring.remaining': 'Restant',\r\n 'ring.window': 'Fenêtre de contexte',\r\n 'ring.percent': 'Occupation',\r\n 'ring.system': 'Prompt système',\r\n 'ring.tools': 'Définitions d’outils',\r\n 'ring.messages': 'Messages',\r\n 'ring.warning': 'Le contexte est presque plein — compactez le contexte ou démarrez une nouvelle session.',\r\n 'ring.aria': '%n du contexte utilisé',\r\n 'ring.unset': 'Aucune consommation dans ce tour',\r\n 'ring.billing': 'Facturation du cache',\r\n 'ring.bill.step': 'Cette étape',\r\n 'ring.bill.turn': 'Ce tour',\r\n 'ring.bill.session': 'Total de la session',\r\n 'ring.bill.cacheRead': 'Lecture du cache',\r\n 'ring.bill.cacheMiss': 'Échec du cache',\r\n 'ring.bill.output': 'Sortie',\r\n 'ring.bill.fullMiss': 'Échecs complets',\r\n 'ring.bill.rounds': 'étapes',\r\n 'ring.bill.peak': 'Tarifs de pointe',\r\n 'ring.bill.offPeak': 'Tarifs creux',\r\n 'ring.bill.flat': 'Tarif fixe',\r\n 'ring.bill.unpriced': 'Non facturé',\r\n 'ring.bill.custom': 'facturé au tarif personnalisé',\r\n 'ring.bill.pricedAs': 'facturé comme %n',\r\n 'ring.bill.priced': 'facturé au tarif du catalogue',\r\n 'ring.bill.estimate': 'estimé hors catalogue',\r\n 'ring.bill.uncalibrated': 'non calibré — à titre indicatif',\r\n}\r\n\r\n/** German dictionary (keys mirror zh). */\r\nexport const de: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Denkstufen',\r\n 'family.title': 'Qizi-Plugin-Einstellungen',\r\n 'card.description': 'Wählen Sie Auto im Modellselektor: Das Plugin plant low / high / max anhand des Tool-Aufrufverlaufs, bevor der API-Aufwand übermittelt wird. Hier konfigurieren Sie die Standardstufe, Planer-Grenzen und Modellfähigkeiten (Stufe → Gateway-Drahtwert-Zuordnung).',\r\n 'card.level': 'Standardstufe',\r\n 'card.level.off': 'off — Denken deaktivieren (nur manuell, nie automatisch gewählt)',\r\n 'card.level.on': 'on — Denken aktivieren (nur Umschaltmodelle; sendet enable_thinking, nie einen Aufwand)',\r\n 'card.level.minimal': 'minimal — geringst (sehr leichte Aufgaben)',\r\n 'card.level.low': 'low — niedrig (günstige Runden bleiben günstig)',\r\n 'card.level.medium': 'medium — mittel',\r\n 'card.level.high': 'high — hoch (offizieller Standard)',\r\n 'card.level.xhigh': 'xhigh — extra hoch',\r\n 'card.level.max': 'max — maximal (schwere Aufgaben)',\r\n 'card.level.auto': 'auto — Planung aus Tool-Verlauf (Standard)',\r\n 'card.enabled': 'Aktiviert',\r\n 'card.allowDowngrade': 'Herabstufung erlauben (auto kann auf low fallen)',\r\n 'card.allowUpgrade': 'Hochstufung erlauben (auto kann auf max steigen)',\r\n 'card.defaultPricing': 'Preis außerhalb des Katalogs',\r\n 'card.simpleTools': 'Allowlist einfacher Tools (Auto-Downgrade)',\r\n 'card.simpleToolsHint': 'Durch Komma oder Leerzeichen getrennte Tool-Namen, die der internen Menge „billige und deterministische Tools“ hinzugefügt werden (z. B. shell, pwsh, web_fetch). Im Auto-Modus sinkt ein Schritt, der nur aus diesen kurzen Aufrufen besteht, auf low. Die interne Menge enthält bereits bash/terminal/shell/pwsh; nutzen Sie dieses Feld für hostspezifische Namen.',\r\n 'card.simpleToolsRegex': 'Regex-Liste einfacher Tools (Auto-Downgrade)',\r\n 'card.simpleToolsRegexHint': 'Ein JavaScript-Regex pro Eintrag (kein automatischer Anker — ^ selbst schreiben; Groß-/Kleinschreibung ignoriert), neben der Literal-Liste oben und in derselben Quote gezählt. Muster prüfen BOTH den vollständigen Tool-Namen und den ohne ops_ — „^ops_.*“ deckt die ganze dsh-ops-Familie auf einen Schlag ab. Ungültige Einträge werden mit einer einmaligen Warnung übersprungen.',\r\n 'card.defaultPricingHint': 'Bepreisung von Modellen ohne Katalogeintrag (inkl. Gateway-Modelle anderer Plugins); katalogisierte Modelle nutzen immer ihre Katalogpreise. Änderungen wirken nur auf neue Buchungen.',\r\n 'card.defaultPricing.estimate': 'estimate — Schätzung über Typicalpreis (unkalibriert, nur Referenz; Standard)',\r\n 'card.defaultPricing.cn': 'cn — Kalibrierungsstufe CNY (ohne Katalogeintrag weiterhin Typicalpreis-Schätzung)',\r\n 'card.defaultPricing.global': 'global — Kalibrierungsstufe USD (ohne Katalogeintrag geschätzt, bis USD-Zeilen ergänzt sind)',\r\n 'card.defaultPricing.custom': 'custom — eigene Preise (ohne vollständige Zeile unbestückt)',\r\n 'card.defaultPricing.off': 'off — nicht abrechnen (ohne Katalogeintrag „nicht abgerechnet“)',\r\n 'card.unavailable': 'Einstellungs-Namensraum nicht verfügbar: Stellen Sie sicher, dass dsh-thinking-levels in diesem Profil eingebunden ist.',\r\n 'card.readonly': 'Schreibgeschützt',\r\n 'card.capabilities': 'Modellfähigkeiten (llm-pi-ai benutzerdefinierte Anbieter)',\r\n 'card.capabilities.hint': 'Liest und schreibt die llm-pi-ai-Konfiguration direkt: Aktivieren Sie eine Stufe und geben Sie den genauen Wert ein, der an das Gateway gesendet wird (z. B. high → ultra); off leer lassen bedeutet „nicht senden\". Vision steuert die Bild-Eingabe; der Denk-Schalter treibt enable_thinking; thinkingFormat wählt die Wire-Serialisierung.',\r\n 'card.capabilities.empty': 'Kein benutzerdefinierter Anbieter hat Modelle in llm-pi-ai konfiguriert. Fügen Sie zuerst einen Anbieter und Modelle unter Einstellungen → Modelle hinzu.',\r\n 'card.capabilities.unavailable': 'Der llm-pi-ai Einstellungs-Namensraum ist nicht verfügbar.',\r\n 'card.capabilities.none': '(keine Modelle)',\r\n 'card.capabilities.search': 'Modelle nach Name oder ID suchen…',\r\n 'card.capabilities.noMatches': 'Keine passenden Modelle',\r\n 'card.capabilities.quickSettings': 'Schnelleinstellungen',\r\n 'card.capabilities.presetOfficial': 'Auf alle anwenden: Off / High / Max (offizieller DeepSeek-Stil)',\r\n 'card.capabilities.presetGeneric': 'Auf alle anwenden: Off / Low / Medium / High (generisch)',\r\n 'card.capabilities.vendor': 'Anbieter',\r\n 'card.capabilities.developerRole': 'Gateway lehnt die Entwickler-Rolle ab',\r\n 'card.capabilities.developerRoleHint': 'Offizieller Kompatibilitätsschalter (dsh ≥ v0.1.0-rc.8): Schreibt compat.supportsDeveloperRole: false auf Routenebene, damit der System-Prompt als Rolle system gesendet wird — behebt den Unexpected message role 400 auf vLLM / SGLang Gateways. Deaktivieren löscht das Feld und stellt die Vererbung wieder her.',\r\n 'card.capabilities.takeover': 'Third-Party-Übernahme',\r\n 'card.capabilities.takeoverHint': 'Ist dies aktiviert, werden die Modellanfragen dieser Route durch die dsh-llm-openai-completions-Transportschicht geleitet (echtes Multimodal-Senden, Modalitäts-Gate, Prompt-Injection) und pi-ai tritt zurück. Schreibt die providers-Liste der Transportschicht selbst; Deaktivieren entfernt die Route. Die Transportschicht muss installiert sein.',\r\n 'card.capabilities.takeoverHintAbsent': 'Die Transportschicht dsh-llm-openai-completions ist nicht installiert — bitte zuerst installieren und aktivieren, um Routen gezielt zu übernehmen.',\r\n 'card.capabilities.expandProvider': 'Anbieter aufklappen',\r\n 'card.capabilities.collapseProvider': 'Anbieter einklappen',\r\n 'card.capabilities.openModelSettings': 'Modelleinstellungen öffnen',\r\n 'card.capabilities.closeModelSettings': 'Modelleinstellungen einklappen',\r\n 'card.capabilities.vision': 'Vision-Modell',\r\n 'card.capabilities.video': 'Videoeingabe',\r\n 'card.capabilities.audio': 'Audioeingabe',\r\n 'card.capabilities.pdf': 'PDF-Eingabe',\r\n 'card.capabilities.mediaHint': 'Video/Audio-Deklarationen werden in die extraInputs des übernommenen Transports geschrieben (die Input-Enumeration der Host-Modellzeile akzeptiert nur text|image). Nur wirksam, während die Route übernommen ist; andernfalls werden passende Blöcke abgelehnt oder per modalFallback maskiert.',\r\n 'card.masterTakeover': 'Übernahme-Master',\r\n 'card.masterTakeoverHint': 'Hauptschalter: Der Zustand wird bei jedem Start in das enabled des Transports gespiegelt (einziger Schreiber). Die Routen-Häkchen der Übernahme durch Drittanbieter steuern nur die Mitgliedschaft; bei ausgeschaltetem Master leuchtet er beim Häkchen automatisch auf.',\r\n 'card.capabilities.thinking': 'Denkmodell',\r\n 'card.capabilities.supportsEffort': 'Unterstützt think effort',\r\n 'card.capabilities.efforts': 'Denkstufen (aktivieren, dann Drahtwert eingeben)',\r\n 'card.capabilities.wirePlaceholder': 'Drahtwert, z. B. ultra',\r\n 'card.capabilities.offPlaceholder': 'Leer = nicht senden',\r\n 'card.capabilities.atLeastThinking': 'Wählen Sie mindestens eine Denkstufe (außer off)',\r\n 'card.capabilities.applyLevel': 'Stufen anwenden',\r\n 'card.capabilities.restoreDefault': 'Standardwerte wiederherstellen',\r\n 'card.capabilities.unsaved': 'Ungespeichert',\r\n 'card.capabilities.saveChanges': 'Änderungen speichern',\r\n 'card.capabilities.saved': 'Gespeichert',\r\n 'card.capabilities.thinkingFormat': 'Denkformat',\r\n 'card.capabilities.thinkingFormat.inherit': 'Erben',\r\n 'card.capabilities.contextWindow': 'Kontextfenster-Limit',\r\n 'card.capabilities.contextCustomPlaceholder': 'Benutzerdefinierte Ganzzahl, z. B. 256000',\r\n 'card.capabilities.contextClear': 'Löschen',\r\n 'card.capabilities.contextInteger': 'Kontextlänge muss eine Ganzzahl sein (2000-1000000)',\r\n 'card.capabilities.contextRange': 'Kontextlänge muss zwischen 2000 und 1000000 liegen',\r\n 'card.capabilities.contextHint': 'Wählen Sie eine Voreinstellung oder geben Sie eine Ganzzahl ein (2000–1000000); wird in llm-pi-ai geschrieben für Kontextdruck/Komprimierung und gilt ab der nächsten Anfrage ohne Neustart.',\r\n 'input.context.title': 'Kontextfenster',\r\n 'input.context.globalHint': 'Gilt global für alle Sitzungen mit diesem Modell (Löschen stellt den Standard wieder her)',\r\n 'input.context.unset': 'Nicht festgelegt',\r\n 'input.context.custom': 'Benutzerdefiniert',\r\n 'input.context.noModel': 'Noch kein Sitzungsmodell',\r\n 'input.context.customPlaceholder': 'Benutzerdefinierte Ganzzahl, z. B. 256000',\r\n 'input.context.apply': 'Anwenden',\r\n 'input.context.clear': 'Löschen',\r\n 'input.context.integer': 'Kontextlänge muss eine Ganzzahl sein (2000-1000000)',\r\n 'input.context.range': 'Kontextlänge muss zwischen 2000 und 1000000 liegen',\r\n 'model.panel.choose': 'Modell wählen',\r\n 'model.panel.loading': 'Modellverzeichnis wird geladen…',\r\n 'model.panel.empty': 'Keine Modelle verfügbar',\r\n 'model.panel.window': 'Fenster',\r\n 'model.panel.noTarget': 'Kein beschreibbarer Konfigurationseintrag für dieses Modell',\r\n 'model.panel.unavailable': 'Das Modellverzeichnis ist für diese Sitzung nicht verfügbar',\r\n 'input.effort.title': 'Schlussfolgerungsaufwand',\r\n 'panel.search.placeholder': 'Modelle suchen…',\r\n 'card.takeoverUi': 'Modell-UI-Übernahme',\r\n 'card.takeoverUiHint': 'Ein: dieses Plugin ersetzt die Modellauswahl des Composers durch ein eigenes Panel (Kontext-/Stufen-Editoren je Zeile + Suche). Aus (Standard): die offizielle Popup bleibt — die auto-Stufe erscheint weiterhin; Suche und Laden übernimmt der mitgelieferte Wähler. Änderungen wirken sofort — neu laden ist nicht nötig.',\r\n 'card.capabilities.apiUnsupported': 'Dieser Provider nutzt ein anderes Protokoll als openai-completions: thinkingFormat / supportsReasoningEffort sind openai-completions-exklusive Felder und werden hier nicht angeboten (eine Schreiboperation damit wird vom Host als Ganzes abgelehnt). Der Thinking-Schalter ist nicht betroffen: er schreibt protokollneutral reasoningEfforts, die pi-ai protokollweit nativ übersetzt.',\r\n 'card.capabilities.thinkingNative': 'Der Thinking-Schalter ist auf jedem Protokoll verfügbar: er schreibt protokollneutral reasoningEfforts, die pi-ai nativ übersetzt (Anthropic-Thinking-Budget / Responses reasoning effort). thinkingFormat / supportsReasoningEffort sind openai-completions-exklusiv und erscheinen erst, wenn das Modell auf diesem Protokoll als Thinking-Modell deklariert ist.',\r\n 'card.capabilities.staleCompat': 'openai-completions-exklusive Felder, die eine ältere Version in diese Modellzeile gezwungen hat',\r\n 'card.capabilities.stripStaleCompat': 'Diese Reste entfernen',\r\n 'card.dsContextTitle': 'Kontextfenster der offiziellen DeepSeek-Modelle',\r\n 'input.effort.default': 'Anbieterstandard',\r\n 'input.effort.reset': 'Auf Anbieterstandard zurücksetzen',\r\n 'card.capabilities.failed': 'Speichern fehlgeschlagen: Der Wert wurde abgelehnt oder steht in Konflikt. Bitte überprüfen.',\r\n 'trace.label': 'Effort-Verlauf',\r\n 'trace.empty': 'In dieser Sitzung gibt es noch keine übermittelten Request-Stufen.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manuell',\r\n 'trace.title': 'Effort-Verlauf',\r\n 'trace.subtitle': 'Die Stufe, mit der jede Anfrage dieser Sitzung tatsächlich gesendet wurde; aufeinanderfolgende gleiche Stufen werden zusammengefasst (neueste oben).',\r\n 'trace.summary.requests': 'Anfragen',\r\n 'trace.summary.runs': 'Abschnitte',\r\n 'trace.summary.autoRuns': 'Abschnitte von auto geplant',\r\n 'trace.summary.peak': 'Spitze',\r\n 'trace.summary.hint': 'T=Turn · S=Schritt',\r\n 'trace.note.attribution': 'Hinweis: Ab 0.2.2 verbietet der Host das Ändern der Stufe zur Request-Zeit; dieses Plugin (strikte Linie) schreibt `model/selection` daher selbst einen Schritt im Voraus. „Manuell“ heißt also nur, dass die letzte Auswahl im Log eine konkrete Stufe war — nicht zwingend ein menschlicher Klick.',\r\n 'trace.intent.default': 'Standard',\r\n 'trace.intent.unknown': 'nicht erfasst',\r\n 'trace.intent.scheduler': 'Planer',\r\n 'trace.intent.unknownHint': 'Für diese Stufenänderung gibt es keine passende Auswahl im Sitzungsprotokoll (ab 0.2.2 schreibt das Plugin selbst model/selection und diese Schreibvorgänge erreichen das Protokoll nicht)',\r\n 'trace.summary.switches': 'Modellwechsel',\r\n 'trace.dir.up': 'gegenüber dem vorigen Abschnitt erhöht, %n Anfrage(n)',\r\n 'trace.dir.down': 'gegenüber dem vorigen Abschnitt gesenkt, %n Anfrage(n)',\r\n 'trace.dir.flat': 'gleiche Stufe, andere Auswahl, %n Anfrage(n)',\r\n 'trace.dir.start': 'erste Stufe der Sitzung, %n Anfrage(n)',\r\n 'ring.title': 'Kontextprüfung',\r\n 'ring.used': 'Verwendet',\r\n 'ring.remaining': 'Verbleibend',\r\n 'ring.window': 'Kontextfenster',\r\n 'ring.percent': 'Auslastung',\r\n 'ring.system': 'System-Prompt',\r\n 'ring.tools': 'Werkzeugdefinitionen',\r\n 'ring.messages': 'Nachrichten',\r\n 'ring.warning': 'Der Kontext ist fast voll — verdichten Sie den Kontext oder starten Sie eine neue Sitzung.',\r\n 'ring.aria': '%n des Kontexts verbraucht',\r\n 'ring.unset': 'In diesem Zug noch keine Nutzung',\r\n 'ring.billing': 'Cache-Abrechnung',\r\n 'ring.bill.step': 'Aktueller Schritt',\r\n 'ring.bill.turn': 'Aktueller Zug',\r\n 'ring.bill.session': 'Sitzungssumme',\r\n 'ring.bill.cacheRead': 'Cache-Treffer',\r\n 'ring.bill.cacheMiss': 'Cache-Fehltreffer',\r\n 'ring.bill.output': 'Ausgabe',\r\n 'ring.bill.fullMiss': 'Vollständige Fehltreffer',\r\n 'ring.bill.rounds': 'Schritte',\r\n 'ring.bill.peak': 'Spitzentarif',\r\n 'ring.bill.offPeak': 'Nebentarif',\r\n 'ring.bill.flat': 'Pauschaltarif',\r\n 'ring.bill.unpriced': 'Nicht abgerechnet',\r\n 'ring.bill.custom': 'zu eigenen Sätzen abgerechnet',\r\n 'ring.bill.pricedAs': 'als %n abgerechnet',\r\n 'ring.bill.priced': 'zu Katalogsätzen abgerechnet',\r\n 'ring.bill.estimate': 'außerhalb des Katalogs geschätzt',\r\n 'ring.bill.uncalibrated': 'unkalibriert — nur als Richtwert',\r\n}\r\n\r\n/** Italian dictionary (keys mirror zh). */\r\nexport const it: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Livelli di ragionamento',\r\n 'family.title': 'Impostazioni plugin Qizi',\r\n 'card.description': 'Scegli Auto nel selettore del modello: il plugin pianifica low / high / max in base alla cronologia delle chiamate degli strumenti prima di inviare l\\'effort all\\'API. Qui configuri il livello predefinito, i limiti dello scheduler e le capacità per modello (livello → valore wire inviato al gateway).',\r\n 'card.level': 'Livello predefinito',\r\n 'card.level.off': 'off — disabilita il ragionamento (solo manuale, mai scelto automaticamente)',\r\n 'card.level.on': 'on — abilita il ragionamento (solo modelli a commutazione; invia enable_thinking, mai un effort)',\r\n 'card.level.minimal': 'minimal — minimo (compiti molto leggeri)',\r\n 'card.level.low': 'low — basso (i round economici restano economici)',\r\n 'card.level.medium': 'medium — medio',\r\n 'card.level.high': 'high — alto (predefinito ufficiale)',\r\n 'card.level.xhigh': 'xhigh — molto alto',\r\n 'card.level.max': 'max — massimo (compiti pesanti)',\r\n 'card.level.auto': 'auto — pianificazione dalla cronologia strumenti (predefinito)',\r\n 'card.enabled': 'Abilitato',\r\n 'card.allowDowngrade': 'Consenti declassamento (auto può scendere a low)',\r\n 'card.allowUpgrade': 'Consenti avanzamento (auto può salire a max)',\r\n 'card.defaultPricing': 'Prezzi fuori catalogo',\r\n 'card.simpleTools': 'Elenco strumenti semplici (downgrade automatico)',\r\n 'card.simpleToolsHint': 'Nomi di strumenti separati da virgole o spazi, aggiunti all\\'insieme interno degli \"strumenti economici e deterministici\" (es. shell, pwsh, web_fetch). In modalità auto, un passo composto solo da queste chiamate brevi scende a low. L\\'insieme interno copre già bash/terminal/shell/pwsh; usa questo campo per nomi specifici dell\\'host.',\r\n 'card.simpleToolsRegex': 'Lista regex strumenti semplici (downgrade auto)',\r\n 'card.simpleToolsRegexHint': 'Una regex JavaScript per voce (nessun ancoraggio automatico — scrivi tu il ^; insensibile a maiuscole), a fianco della lista letterale sopra e conteggiata nello stesso rapporto. I pattern testano sia il nome completo sia il nome nudo senza ops_ — «^ops_.*» copre l\\'intera famiglia dsh-ops in una volta. Le voci non valide vengono saltate con un avviso una tantum.',\r\n 'card.defaultPricingHint': 'Come fatturare i modelli assenti dal catalogo (inclusi i modelli gateway di altri plugin); i modelli in catalogo usano sempre i propri prezzi. Le modifiche valgono solo per le nuove registrazioni.',\r\n 'card.defaultPricing.estimate': 'estimate — stima a prezzo tipico (non calibrata, solo indicativa; predefinito)',\r\n 'card.defaultPricing.cn': 'cn — livello calibrato CNY (fuori catalogo resta la stima a prezzo tipico)',\r\n 'card.defaultPricing.global': 'global — livello calibrato USD (fuori catalogo stimato finché mancano le righe USD)',\r\n 'card.defaultPricing.custom': 'custom — prezzi inseriti a mano (non fatturato senza riga completa)',\r\n 'card.defaultPricing.off': 'off — non fatturare (fuori catalogo mostra \"non fatturato\")',\r\n 'card.unavailable': 'Namespace delle impostazioni non disponibile: assicurati che dsh-thinking-levels sia integrato in questo profilo.',\r\n 'card.readonly': 'Sola lettura',\r\n 'card.capabilities': 'Capacità del modello (provider personalizzati llm-pi-ai)',\r\n 'card.capabilities.hint': 'Legge e scrive direttamente la configurazione llm-pi-ai: spunta un livello e inserisci il valore esatto inviato al gateway (es. high → ultra); lasciare off vuoto significa «non inviare». Vision controlla l\\'input immagine; l\\'interruttore di ragionamento guida enable_thinking; thinkingFormat sceglie la serializzazione wire.',\r\n 'card.capabilities.empty': 'Nessun provider personalizzato ha modelli configurati in llm-pi-ai. Aggiungi prima un provider e dei modelli in Impostazioni → Modelli.',\r\n 'card.capabilities.unavailable': 'Il namespace delle impostazioni llm-pi-ai non è disponibile.',\r\n 'card.capabilities.none': '(nessun modello)',\r\n 'card.capabilities.search': 'Cerca modelli per nome o ID…',\r\n 'card.capabilities.noMatches': 'Nessun modello corrispondente',\r\n 'card.capabilities.quickSettings': 'Impostazioni rapide',\r\n 'card.capabilities.presetOfficial': 'Applica a tutti: Off / High / Max (stile ufficiale DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Applica a tutti: Off / Low / Medium / High (generico)',\r\n 'card.capabilities.vendor': 'Provider',\r\n 'card.capabilities.developerRole': 'Il gateway rifiuta il ruolo developer',\r\n 'card.capabilities.developerRoleHint': 'Interruttore di compatibilità ufficiale (dsh ≥ v0.1.0-rc.8): scrive compat.supportsDeveloperRole: false a livello di rotta così il prompt di sistema viene inviato come ruolo system — corregge l\\'errore Unexpected message role 400 su gateway vLLM / SGLang. Deselezionare elimina il campo e ripristina l\\'ereditarietà.',\r\n 'card.capabilities.takeover': 'Takeover di terze parti',\r\n 'card.capabilities.takeoverHint': 'Se selezionato, le richieste di modello di questa rotta passano per il trasporto dsh-llm-openai-completions (invio multimodale reale, gate di modalita, iniezione del prompt) e pi-ai esce. Scrive la lista providers del trasporto stesso; deselezionare rimuove la rotta. Richiede il trasporto installato.',\r\n 'card.capabilities.takeoverHintAbsent': 'Il trasporto dsh-llm-openai-completions non è installato — installarlo e attivarlo per il takeover per rotta.',\r\n 'card.capabilities.expandProvider': 'Espandi provider',\r\n 'card.capabilities.collapseProvider': 'Comprimi provider',\r\n 'card.capabilities.openModelSettings': 'Apri impostazioni modello',\r\n 'card.capabilities.closeModelSettings': 'Comprimi impostazioni modello',\r\n 'card.capabilities.vision': 'Modello vision',\r\n 'card.capabilities.video': 'Input video',\r\n 'card.capabilities.audio': 'Input audio',\r\n 'card.capabilities.pdf': 'Input PDF',\r\n 'card.capabilities.mediaHint': 'Le dichiarazioni video/audio vengono scritte negli extraInputs del transport preso in carico (l’enumerazione input della riga modello dell’host accetta solo text|image). Effettivo solo mentre la route è presa in carico; altrimenti i blocchi corrispondenti vengono rifiutati o mascherati secondo modalFallback.',\r\n 'card.masterTakeover': 'Takeover principale',\r\n 'card.masterTakeoverHint': 'Interruttore principale: lo stato viene specchiato nel enabled del transport a ogni avvio (unico scrittore). I check di takeover di terze parti per route gestiscono solo l’appartenenza; con il master spento, spuntando una route si accende automaticamente.',\r\n 'card.capabilities.thinking': 'Modello di ragionamento',\r\n 'card.capabilities.supportsEffort': 'Supporta think effort',\r\n 'card.capabilities.efforts': 'Livelli di ragionamento (spunta, poi inserisci il valore wire)',\r\n 'card.capabilities.wirePlaceholder': 'Valore wire, es. ultra',\r\n 'card.capabilities.offPlaceholder': 'Vuoto = non inviare',\r\n 'card.capabilities.atLeastThinking': 'Seleziona almeno un livello di ragionamento (diverso da off)',\r\n 'card.capabilities.applyLevel': 'Applica livelli',\r\n 'card.capabilities.restoreDefault': 'Ripristina predefiniti',\r\n 'card.capabilities.unsaved': 'Non salvato',\r\n 'card.capabilities.saveChanges': 'Salva modifiche',\r\n 'card.capabilities.saved': 'Salvato',\r\n 'card.capabilities.thinkingFormat': 'Formato di ragionamento',\r\n 'card.capabilities.thinkingFormat.inherit': 'Eredita',\r\n 'card.capabilities.contextWindow': 'Limite finestra di contesto',\r\n 'card.capabilities.contextCustomPlaceholder': 'Intero personalizzato, es. 256000',\r\n 'card.capabilities.contextClear': 'Cancella',\r\n 'card.capabilities.contextInteger': 'La lunghezza del contesto deve essere un intero (2000-1000000)',\r\n 'card.capabilities.contextRange': 'La lunghezza del contesto deve essere compresa tra 2000 e 1000000',\r\n 'card.capabilities.contextHint': 'Scegli un predefinito o inserisci un intero (2000–1000000); scritto in llm-pi-ai per la pressione/compressione del contesto e applicato alla richiesta successiva senza riavvio.',\r\n 'input.context.title': 'Finestra di contesto',\r\n 'input.context.globalHint': 'Si applica globalmente a tutte le sessioni che usano questo modello (Cancella ripristina il predefinito)',\r\n 'input.context.unset': 'Non impostato',\r\n 'input.context.custom': 'Personalizzato',\r\n 'input.context.noModel': 'Nessun modello di sessione',\r\n 'input.context.customPlaceholder': 'Intero personalizzato, es. 256000',\r\n 'input.context.apply': 'Applica',\r\n 'input.context.clear': 'Cancella',\r\n 'input.context.integer': 'La lunghezza del contesto deve essere un intero (2000-1000000)',\r\n 'input.context.range': 'La lunghezza del contesto deve essere compresa tra 2000 e 1000000',\r\n 'model.panel.choose': 'Scegli modello',\r\n 'model.panel.loading': 'Caricamento directory modelli…',\r\n 'model.panel.empty': 'Nessun modello disponibile',\r\n 'model.panel.window': 'Finestra',\r\n 'model.panel.noTarget': 'Nessuna voce di configurazione scrivibile per questo modello',\r\n 'model.panel.unavailable': 'La directory dei modelli non è disponibile per questa sessione',\r\n 'input.effort.title': 'Sforzo di ragionamento',\r\n 'panel.search.placeholder': 'Cerca modelli…',\r\n 'card.takeoverUi': 'Sostituzione UI modello',\r\n 'card.takeoverUiHint': \"Se attivo, questo plugin sostituisce il selettore modelli del compositore con un pannello proprio (editor contesto/livello per riga + ricerca). Se spento (predefinito) resta il popup ufficiale: il livello auto è comunque visibile, ricerca e caricamento sono a carico del selettore originale. La modifica ha effetto immediato, senza ricaricare.\",\r\n 'card.capabilities.apiUnsupported': 'Questo provider usa un protocollo diverso da openai-completions: thinkingFormat / supportsReasoningEffort sono campi esclusivi di openai-completions e qui non vengono offerti (una scrittura che li contiene viene rifiutata in blocco dall host). L interruttore thinking non è interessato: scrive reasoningEfforts, neutro rispetto al protocollo, che pi-ai traduce nativamente.',\r\n 'card.capabilities.thinkingNative': 'L interruttore thinking è disponibile su ogni protocollo: scrive reasoningEfforts, neutro rispetto al protocollo, che pi-ai traduce nativamente (budget thinking Anthropic / reasoning effort Responses). thinkingFormat / supportsReasoningEffort sono esclusivi di openai-completions e compaiono solo dopo che il modello è dichiarato thinking su quel protocollo.',\r\n 'card.capabilities.staleCompat': 'campi esclusivi di openai-completions che una versione precedente ha forzato su questa riga di modello',\r\n 'card.capabilities.stripStaleCompat': 'Rimuovi questi residui',\r\n 'card.dsContextTitle': 'Finestra di contesto dei modelli DeepSeek ufficiali',\r\n 'input.effort.default': 'Predefinito del provider',\r\n 'input.effort.reset': 'Ripristina il predefinito del provider',\r\n 'card.capabilities.failed': 'Salvataggio non riuscito: il valore è stato rifiutato o è in conflitto. Verifica.',\r\n 'trace.label': 'Traccia degli effort',\r\n 'trace.empty': 'Nessun livello di richiesta confermato in questa sessione.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manuale',\r\n 'trace.title': 'Traccia degli effort',\r\n 'trace.subtitle': 'Il livello realmente inviato a ogni richiesta di questa sessione; livelli identici consecutivi vengono raggruppati (più recenti in alto).',\r\n 'trace.summary.requests': 'richieste',\r\n 'trace.summary.runs': 'segmenti',\r\n 'trace.summary.autoRuns': 'segmenti pianificati da auto',\r\n 'trace.summary.peak': 'picco',\r\n 'trace.summary.hint': 'T=turno · S=passo',\r\n 'trace.note.attribution': 'Nota: dalla 0.2.2 l’host vieta di cambiare livello al momento della richiesta, quindi questo plugin (linea rigorosa) scrive `model/selection` da sé con un passo di anticipo. L’etichetta «manuale» significa solo che l’ultima selezione nel log era un livello concreto, non necessariamente un clic umano.',\r\n 'trace.intent.default': 'predefinito',\r\n 'trace.intent.unknown': 'non registrato',\r\n 'trace.intent.scheduler': 'pianificatore',\r\n 'trace.intent.unknownHint': 'Questo cambio di livello non ha una selezione corrispondente nel log (dalla 0.2.2 il plugin scrive da sé model/selection e queste scritture non arrivano al log)',\r\n 'trace.summary.switches': 'cambi di modello',\r\n 'trace.dir.up': 'salito rispetto al segmento precedente, %n richiesta/e',\r\n 'trace.dir.down': 'sceso rispetto al segmento precedente, %n richiesta/e',\r\n 'trace.dir.flat': 'stesso livello, scelta diversa, %n richiesta/e',\r\n 'trace.dir.start': 'primo livello della sessione, %n richiesta/e',\r\n 'ring.title': 'Controllo contesto',\r\n 'ring.used': 'Usato',\r\n 'ring.remaining': 'Rimanente',\r\n 'ring.window': 'Finestra di contesto',\r\n 'ring.percent': 'Occupazione',\r\n 'ring.system': 'Prompt di sistema',\r\n 'ring.tools': 'Definizioni degli strumenti',\r\n 'ring.messages': 'Messaggi',\r\n 'ring.warning': 'Il contesto è quasi pieno — compatta il contesto o avvia una nuova sessione.',\r\n 'ring.aria': '%n del contesto usato',\r\n 'ring.unset': 'Nessun consumo in questo turno',\r\n 'ring.billing': 'Addebito cache',\r\n 'ring.bill.step': 'Questo passo',\r\n 'ring.bill.turn': 'Questo turno',\r\n 'ring.bill.session': 'Totale sessione',\r\n 'ring.bill.cacheRead': 'Lettura cache',\r\n 'ring.bill.cacheMiss': 'Mancato riscontro cache',\r\n 'ring.bill.output': 'Output',\r\n 'ring.bill.fullMiss': 'Mancati riscontri completi',\r\n 'ring.bill.rounds': 'passi',\r\n 'ring.bill.peak': 'Tariffe di picco',\r\n 'ring.bill.offPeak': 'Tariffe fuori picco',\r\n 'ring.bill.flat': 'Tariffa fissa',\r\n 'ring.bill.unpriced': 'Non addebitato',\r\n 'ring.bill.custom': 'addebitato a tariffe personalizzate',\r\n 'ring.bill.pricedAs': 'addebitato come %n',\r\n 'ring.bill.priced': 'addebitato a tariffe di catalogo',\r\n 'ring.bill.estimate': 'stimato fuori catalogo',\r\n 'ring.bill.uncalibrated': 'non calibrato — solo indicativo',\r\n}\r\n\r\n/** Russian dictionary (keys mirror zh). */\r\nexport const ru: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Уровни мышления',\r\n 'family.title': 'Настройки плагинов Qizi',\r\n 'card.description': 'Выберите Auto в селекторе модели: плагин планирует low / high / max по истории вызовов инструментов перед отправкой effort в API. Здесь настраивается уровень по умолчанию, границы планировщика и возможности модели (уровень → значение, отправляемое шлюзу).',\r\n 'card.level': 'Уровень по умолчанию',\r\n 'card.level.off': 'off — отключить мышление (только вручную, никогда не выбирается автоматически)',\r\n 'card.level.on': 'on — включить мышление (только модели с переключателем; отправляет enable_thinking, без effort)',\r\n 'card.level.minimal': 'minimal — минимальный (очень лёгкие задачи)',\r\n 'card.level.low': 'low — низкий (дешёвые раунды остаются дешёвыми)',\r\n 'card.level.medium': 'medium — средний',\r\n 'card.level.high': 'high — высокий (официальное значение по умолчанию)',\r\n 'card.level.xhigh': 'xhigh — особо высокий',\r\n 'card.level.max': 'max — максимальный (тяжёлые задачи)',\r\n 'card.level.auto': 'auto — планирование по истории инструментов (по умолчанию)',\r\n 'card.enabled': 'Включено',\r\n 'card.allowDowngrade': 'Разрешить понижение (auto может снизить до low)',\r\n 'card.allowUpgrade': 'Разрешить повышение (auto может поднять до max)',\r\n 'card.defaultPricing': 'Внекаталожное ценообразование',\r\n 'card.simpleTools': 'Список простых инструментов (понижение auto)',\r\n 'card.simpleToolsHint': 'Имена инструментов через запятую или пробел, добавляемые во встроенный набор «дешёвых и детерминированных инструментов» (напр. shell, pwsh, web_fetch). В режиме auto шаг из таких коротких вызовов понижается до low. Встроенный набор уже включает bash/terminal/shell/pwsh; используйте это поле для имён, специфичных для хоста.',\r\n 'card.simpleToolsRegex': 'Regex-список простых инструментов (понижение auto)',\r\n 'card.simpleToolsRegexHint': 'Одно регулярное выражение JavaScript на запись (без автозаякоривания — ^ пишите сами; без учёта регистра), рядом со литеральным списком выше и в той же доле. Шаблоны проверяют и полное имя инструмента, и имя без ops_ — «^ops_.*» покрывает всё семейство dsh-ops разом. Некорректные записи пропускаются с однократным предупреждением.',\r\n 'card.defaultPricingHint': 'Как считать модели, которых нет в каталоге цен (включая шлюзовые модели из других плагинов); каталожные модели всегда считаются по своему прайсу. Изменения влияют только на новые записи.',\r\n 'card.defaultPricing.estimate': 'estimate — оценка по типовой цене (не откалибровано, справочно; по умолчанию)',\r\n 'card.defaultPricing.cn': 'cn — калибровка CNY (вне каталога всё равно оценка по типовой цене)',\r\n 'card.defaultPricing.global': 'global — калибровка USD (вне каталога оценивается, пока строки USD не добавлены)',\r\n 'card.defaultPricing.custom': 'custom — свои цены (без полной строки — без расчёта)',\r\n 'card.defaultPricing.off': 'off — не считать (вне каталога показ «не оплачено»)',\r\n 'card.unavailable': 'Пространство имён настроек недоступно: убедитесь, что dsh-thinking-levels подключён к этому профилю.',\r\n 'card.readonly': 'Только чтение',\r\n 'card.capabilities': 'Возможности модели (пользовательские провайдеры llm-pi-ai)',\r\n 'card.capabilities.hint': 'Напрямую читает и пишет конфигурацию llm-pi-ai: отметьте уровень и введите точное значение, отправляемое шлюзу (напр. high → ultra); пустое поле off означает «не отправлять». Vision управляет вводом изображений; переключатель мышления управляет enable_thinking; thinkingFormat задаёт формат сериализации wire.',\r\n 'card.capabilities.empty': 'Ни один пользовательский провайдер не имеет настроенных моделей в llm-pi-ai. Сначала добавьте провайдер и модели в Настройки → Модели.',\r\n 'card.capabilities.unavailable': 'Пространство имён настроек llm-pi-ai недоступно.',\r\n 'card.capabilities.none': '(нет моделей)',\r\n 'card.capabilities.search': 'Поиск моделей по имени или ID…',\r\n 'card.capabilities.noMatches': 'Нет подходящих моделей',\r\n 'card.capabilities.quickSettings': 'Быстрые настройки',\r\n 'card.capabilities.presetOfficial': 'Применить ко всем: Off / High / Max (официальный стиль DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Применить ко всем: Off / Low / Medium / High (общий)',\r\n 'card.capabilities.vendor': 'Провайдер',\r\n 'card.capabilities.developerRole': 'Шлюз отклоняет роль developer',\r\n 'card.capabilities.developerRoleHint': 'Официальный переключатель совместимости (dsh ≥ v0.1.0-rc.8): записывает compat.supportsDeveloperRole: false на уровне маршрута, чтобы системный промпт отправлялся с ролью system — исправляет Unexpected message role 400 на шлюзах vLLM / SGLang. Снятие флажка удаляет поле и восстанавливает наследование.',\r\n 'card.capabilities.takeover': 'Сторонний перехват',\r\n 'card.capabilities.takeoverHint': 'Если включено, запросы модели этого маршрута направляются через транспорт dsh-llm-openai-completions (истинная мультимодальная отправка, шлюз модальностей, инъекция промпта), а pi-ai устраняется. Записывает список providers самого транспорта; снятие флажка убирает маршрут. Требуется установленный транспорт.',\r\n 'card.capabilities.takeoverHintAbsent': 'Транспорт dsh-llm-openai-completions не установлен — установите и включите его для перехвата по маршрутам.',\r\n 'card.capabilities.expandProvider': 'Развернуть провайдер',\r\n 'card.capabilities.collapseProvider': 'Свернуть провайдер',\r\n 'card.capabilities.openModelSettings': 'Открыть настройки модели',\r\n 'card.capabilities.closeModelSettings': 'Свернуть настройки модели',\r\n 'card.capabilities.vision': 'Модель с vision',\r\n 'card.capabilities.video': 'Видеовход',\r\n 'card.capabilities.audio': 'Аудиовход',\r\n 'card.capabilities.pdf': 'Вход PDF',\r\n 'card.capabilities.mediaHint': 'Объявления видео/аудио записываются в extraInputs перехваченного транспорта (перечисление input строки модели хоста допускает только text|image). Действует, только пока маршрут перехвачен; иначе соответствующие блоки отклоняются или маскируются согласно modalFallback.',\r\n 'card.masterTakeover': 'Мастер перехвата',\r\n 'card.masterTakeoverHint': 'Главный выключатель: состояние зеркалится в enabled транспорта при каждом запуске (единственный писатель). Галочки стороннего перехвата у маршрутов управляют только членством; при выключенном мастере отметка маршрута автоматически включает его.',\r\n 'card.capabilities.thinking': 'Модель с мышлением',\r\n 'card.capabilities.supportsEffort': 'Поддерживает think effort',\r\n 'card.capabilities.efforts': 'Уровни мышления (отметьте, затем введите значение wire)',\r\n 'card.capabilities.wirePlaceholder': 'Значение wire, напр. ultra',\r\n 'card.capabilities.offPlaceholder': 'Пусто = не отправлять',\r\n 'card.capabilities.atLeastThinking': 'Выберите хотя бы один уровень мышления (кроме off)',\r\n 'card.capabilities.applyLevel': 'Применить уровни',\r\n 'card.capabilities.restoreDefault': 'Восстановить значения по умолчанию',\r\n 'card.capabilities.unsaved': 'Не сохранено',\r\n 'card.capabilities.saveChanges': 'Сохранить изменения',\r\n 'card.capabilities.saved': 'Сохранено',\r\n 'card.capabilities.thinkingFormat': 'Формат мышления',\r\n 'card.capabilities.thinkingFormat.inherit': 'Наследовать',\r\n 'card.capabilities.contextWindow': 'Лимит контекстного окна',\r\n 'card.capabilities.contextCustomPlaceholder': 'Пользовательское целое число, напр. 256000',\r\n 'card.capabilities.contextClear': 'Очистить',\r\n 'card.capabilities.contextInteger': 'Длина контекста должна быть целым числом (2000-1000000)',\r\n 'card.capabilities.contextRange': 'Длина контекста должна быть от 2000 до 1000000',\r\n 'card.capabilities.contextHint': 'Выберите пресет или введите целое число (2000–1000000); записывается в llm-pi-ai для давления/сжатия контекста и применяется к следующему запросу без перезапуска.',\r\n 'input.context.title': 'Контекстное окно',\r\n 'input.context.globalHint': 'Применяется глобально ко всем сессиям с этой моделью (Очистить восстанавливает значение по умолчанию)',\r\n 'input.context.unset': 'Не задано',\r\n 'input.context.custom': 'Пользовательское',\r\n 'input.context.noModel': 'Модель сессии ещё не выбрана',\r\n 'input.context.customPlaceholder': 'Пользовательское целое число, напр. 256000',\r\n 'input.context.apply': 'Применить',\r\n 'input.context.clear': 'Очистить',\r\n 'input.context.integer': 'Длина контекста должна быть целым числом (2000-1000000)',\r\n 'input.context.range': 'Длина контекста должна быть от 2000 до 1000000',\r\n 'model.panel.choose': 'Выбрать модель',\r\n 'model.panel.loading': 'Загрузка каталога моделей…',\r\n 'model.panel.empty': 'Нет доступных моделей',\r\n 'model.panel.window': 'Окно',\r\n 'model.panel.noTarget': 'Нет записываемой записи конфигурации для этой модели',\r\n 'model.panel.unavailable': 'Каталог моделей недоступен для этой сессии',\r\n 'input.effort.title': 'Усилие рассуждения',\r\n 'panel.search.placeholder': 'Поиск моделей…',\r\n 'card.takeoverUi': 'Перехват UI модели',\r\n 'card.takeoverUiHint': 'Включено: этот плагин заменяет выбор модели в композиторе собственной панелью (редакторы контекста/уровня в строках + поиск). Выключено (по умолчанию) остаётся официальное popup-окно — уровень auto по-прежнему виден, поиск и загрузка обеспечиваются штатным селектором. Изменения применяются сразу, без перезагрузки.',\r\n 'card.capabilities.apiUnsupported': 'Этот провайдер использует протокол, отличный от openai-completions: thinkingFormat / supportsReasoningEffort доступны только на openai-completions и здесь не предлагаются (запись с ними отклоняется хостом целиком). Переключатель thinking не затронут: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно.',\r\n 'card.capabilities.thinkingNative': 'Переключатель thinking доступен на всех протоколах: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно (бюджет thinking Anthropic / reasoning effort Responses). thinkingFormat / supportsReasoningEffort доступны только на openai-completions и появляются лишь после того, как модель объявлена thinking на этом протоколе.',\r\n 'card.capabilities.staleCompat': 'поля, доступные только на openai-completions, которые старая версия принудительно записала в эту строку модели',\r\n 'card.capabilities.stripStaleCompat': 'Удалить эти остатки',\r\n 'card.dsContextTitle': 'Лимиты контекста официальных моделей DeepSeek',\r\n 'input.effort.default': 'Значение провайдера по умолчанию',\r\n 'input.effort.reset': 'Вернуть значение провайдера по умолчанию',\r\n 'card.capabilities.failed': 'Ошибка сохранения: значение отклонено или конфликтует. Проверьте его.',\r\n 'trace.label': 'Трасса усилий',\r\n 'trace.empty': 'В этой сессии ещё нет зафиксированных уровней запросов.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'вручную',\r\n 'trace.title': 'Трасса усилий',\r\n 'trace.subtitle': 'Уровень, с которым реально ушёл каждый запрос этой сессии; одинаковые подряд уровни схлопнуты в один отрезок (сверху новее).',\r\n 'trace.summary.requests': 'запросов',\r\n 'trace.summary.runs': 'отрезков',\r\n 'trace.summary.autoRuns': 'отрезков выбрал auto',\r\n 'trace.summary.peak': 'пик',\r\n 'trace.summary.hint': 'T=ход · S=шаг',\r\n 'trace.note.attribution': 'Примечание: с 0.2.2 хост запрещает менять уровень на этапе запроса, поэтому плагин (строгая линия) сам пишет `model/selection` на шаг вперёд. Метка «вручную» означает лишь то, что последний выбор в журнале был конкретным уровнем, а не обязательно клик человека.',\r\n 'trace.intent.default': 'по умолчанию',\r\n 'trace.intent.unknown': 'не записано',\r\n 'trace.intent.scheduler': 'планировщик',\r\n 'trace.intent.unknownHint': 'Для этого изменения уровня в журнале нет соответствующего выбора (с 0.2.2 плагин сам пишет model/selection, и эти записи не попадают в журнал)',\r\n 'trace.summary.switches': 'смен модели',\r\n 'trace.dir.up': 'повышение относительно прошлого отрезка, %n запрос(ов)',\r\n 'trace.dir.down': 'понижение относительно прошлого отрезка, %n запрос(ов)',\r\n 'trace.dir.flat': 'уровень тот же, выбор другой, %n запрос(ов)',\r\n 'trace.dir.start': 'первый уровень сессии, %n запрос(ов)',\r\n 'ring.title': 'Проверка контекста',\r\n 'ring.used': 'Использовано',\r\n 'ring.remaining': 'Осталось',\r\n 'ring.window': 'Окно контекста',\r\n 'ring.percent': 'Заполнено',\r\n 'ring.system': 'Системный промпт',\r\n 'ring.tools': 'Определения инструментов',\r\n 'ring.messages': 'Сообщения',\r\n 'ring.warning': 'Контекст почти заполнен — сожмите контекст или начните новый сеанс.',\r\n 'ring.aria': 'Использовано %n контекста',\r\n 'ring.unset': 'В этом ходе расхода ещё нет',\r\n 'ring.billing': 'Расчёт кэша',\r\n 'ring.bill.step': 'Текущий шаг',\r\n 'ring.bill.turn': 'Текущий ход',\r\n 'ring.bill.session': 'Итого по сеансу',\r\n 'ring.bill.cacheRead': 'Чтение из кэша',\r\n 'ring.bill.cacheMiss': 'Промах кэша',\r\n 'ring.bill.output': 'Вывод',\r\n 'ring.bill.fullMiss': 'Полные промахи',\r\n 'ring.bill.rounds': 'шаг(ов)',\r\n 'ring.bill.peak': 'Пиковые тарифы',\r\n 'ring.bill.offPeak': 'Внепиковые тарифы',\r\n 'ring.bill.flat': 'Фиксированный тариф',\r\n 'ring.bill.unpriced': 'Без оплаты',\r\n 'ring.bill.custom': 'по собственному тарифу',\r\n 'ring.bill.pricedAs': 'по тарифу %n',\r\n 'ring.bill.priced': 'по тарифу каталога',\r\n 'ring.bill.estimate': 'оценка вне каталога',\r\n 'ring.bill.uncalibrated': 'без калибровки — только справка',\r\n}\r\n\r\n/** Spanish dictionary (keys mirror zh). */\r\nexport const es: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Niveles de razonamiento',\r\n 'family.title': 'Configuración de plugins Qizi',\r\n 'card.description': 'Elige Auto en el selector de modelo: el plugin planifica low / high / max según el historial de llamadas de herramientas antes de enviar el effort a la API. Aquí configuras el nivel predeterminado, los límites del planificador y las capacidades por modelo (nivel → valor wire enviado al gateway).',\r\n 'card.level': 'Nivel predeterminado',\r\n 'card.level.off': 'off — desactivar razonamiento (solo manual, nunca seleccionado automáticamente)',\r\n 'card.level.on': 'on — activar razonamiento (solo modelos de conmutación; envía enable_thinking, nunca un effort)',\r\n 'card.level.minimal': 'minimal — mínimo (tareas muy ligeras)',\r\n 'card.level.low': 'low — bajo (las rondas económicas siguen siendo económicas)',\r\n 'card.level.medium': 'medium — medio',\r\n 'card.level.high': 'high — alto (predeterminado oficial)',\r\n 'card.level.xhigh': 'xhigh — extra alto',\r\n 'card.level.max': 'max — máximo (tareas pesadas)',\r\n 'card.level.auto': 'auto — planificación desde el historial de herramientas (predeterminado)',\r\n 'card.enabled': 'Activado',\r\n 'card.allowDowngrade': 'Permitir degradación (auto puede bajar a low)',\r\n 'card.allowUpgrade': 'Permitir mejora (auto puede subir a max)',\r\n 'card.defaultPricing': 'Precio fuera del catálogo',\r\n 'card.simpleTools': 'Lista de herramientas simples (degradación auto)',\r\n 'card.simpleToolsHint': 'Nombres de herramientas separados por comas o espacios, añadidos al conjunto interno de \"herramientas baratas y deterministas\" (p. ej. shell, pwsh, web_fetch). En modo auto, un paso compuesto solo por estas llamadas cortas baja a low. El conjunto interno ya cubre bash/terminal/shell/pwsh; use este campo para nombres propios del host.',\r\n 'card.simpleToolsRegex': 'Lista regex de herramientas simples (bajada auto)',\r\n 'card.simpleToolsRegexHint': 'Una expresión regular de JavaScript por entrada (sin anclaje automático — escriba su propio ^; insensible a mayúsculas), junto a la lista literal de arriba y contada en la misma proporción. Los patrones prueban tanto el nombre completo como el nombre sin ops_ — «^ops_.*» cubre toda la familia dsh-ops de una vez. Las entradas inválidas se omiten con un aviso único.',\r\n 'card.defaultPricingHint': 'Cómo facturar los modelos sin entrada en el catálogo (incluidos modelos de puerta de enlace de otros plugins); los modelos catalogados usan siempre sus precios. Los cambios solo afectan a registros nuevos.',\r\n 'card.defaultPricing.estimate': 'estimate — estimación a precio típico (sin calibrar, solo referencia; predeterminado)',\r\n 'card.defaultPricing.cn': 'cn — nivel calibrado en CNY (fuera del catálogo sigue siendo estimación a precio típico)',\r\n 'card.defaultPricing.global': 'global — nivel calibrado en USD (fuera del catálogo estimado hasta que lleguen las filas USD)',\r\n 'card.defaultPricing.custom': 'custom — precios introducidos (sin factura si falta la fila completa)',\r\n 'card.defaultPricing.off': 'off — no facturar (fuera del catálogo muestra «sin facturar»)',\r\n 'card.unavailable': 'Espacio de nombres de configuración no disponible: asegúrate de que dsh-thinking-levels esté ensamblado en este perfil.',\r\n 'card.readonly': 'Solo lectura',\r\n 'card.capabilities': 'Capacidades del modelo (proveedores personalizados llm-pi-ai)',\r\n 'card.capabilities.hint': 'Lee y escribe directamente la configuración de llm-pi-ai: marca un nivel e introduce el valor exacto enviado al gateway (ej. high → ultra); dejar off vacío significa «no enviar». Vision controla la entrada de imágenes; el interruptor de razonamiento gestiona enable_thinking; thinkingFormat elige la serialización wire.',\r\n 'card.capabilities.empty': 'Ningún proveedor personalizado tiene modelos configurados en llm-pi-ai. Añade primero un proveedor y modelos en Configuración → Modelos.',\r\n 'card.capabilities.unavailable': 'El espacio de nombres de configuración de llm-pi-ai no está disponible.',\r\n 'card.capabilities.none': '(sin modelos)',\r\n 'card.capabilities.search': 'Buscar modelos por nombre o ID…',\r\n 'card.capabilities.noMatches': 'No hay modelos coincidentes',\r\n 'card.capabilities.quickSettings': 'Configuración rápida',\r\n 'card.capabilities.presetOfficial': 'Aplicar a todos: Off / High / Max (estilo oficial DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Aplicar a todos: Off / Low / Medium / High (genérico)',\r\n 'card.capabilities.vendor': 'Proveedor',\r\n 'card.capabilities.developerRole': 'El gateway rechaza el rol developer',\r\n 'card.capabilities.developerRoleHint': 'Interruptor de compatibilidad oficial (dsh ≥ v0.1.0-rc.8): escribe compat.supportsDeveloperRole: false a nivel de ruta para que el prompt del sistema se envíe con rol system — corrige el error Unexpected message role 400 en gateways vLLM / SGLang. Desmarcar elimina el campo y restaura la herencia.',\r\n 'card.capabilities.takeover': 'Toma de control de terceros',\r\n 'card.capabilities.takeoverHint': 'Al marcarlo, las peticiones de modelo de esta ruta se envian a traves del transporte dsh-llm-openai-completions (envio multimodal real, puerta de modalidad, inyeccion de prompt) y pi-ai sale. Escribe la lista providers del propio transporte; desmarcar elimina la ruta. Requiere el transporte instalado.',\r\n 'card.capabilities.takeoverHintAbsent': 'El transporte dsh-llm-openai-completions no esta instalado — instalalo y activalo para la toma de control por ruta.',\r\n 'card.capabilities.expandProvider': 'Expandir proveedor',\r\n 'card.capabilities.collapseProvider': 'Contraer proveedor',\r\n 'card.capabilities.openModelSettings': 'Abrir configuración del modelo',\r\n 'card.capabilities.closeModelSettings': 'Contraer configuración del modelo',\r\n 'card.capabilities.vision': 'Modelo de visión',\r\n 'card.capabilities.video': 'Entrada de video',\r\n 'card.capabilities.audio': 'Entrada de audio',\r\n 'card.capabilities.pdf': 'Entrada de PDF',\r\n 'card.capabilities.mediaHint': 'Las declaraciones de vídeo/audio se escriben en los extraInputs del transport tomado (la enumeración input de la fila de modelo del host solo acepta text|image). Efectivo solo mientras la ruta esté tomada; si no, los bloques correspondientes se rechazan o se enmascaran según modalFallback.',\r\n 'card.masterTakeover': 'Maestro de toma de control',\r\n 'card.masterTakeoverHint': 'Interruptor maestro: su estado se refleja en el enabled del transport en cada arranque (único escritor). Las casillas de toma de control de terceros por ruta solo gestionan pertenencia; con el maestro apagado, marcar una ruta lo enciende automáticamente.',\r\n 'card.capabilities.thinking': 'Modelo de razonamiento',\r\n 'card.capabilities.supportsEffort': 'Soporta think effort',\r\n 'card.capabilities.efforts': 'Niveles de razonamiento (marca, luego introduce el valor wire)',\r\n 'card.capabilities.wirePlaceholder': 'Valor wire, ej. ultra',\r\n 'card.capabilities.offPlaceholder': 'Vacío = no enviar',\r\n 'card.capabilities.atLeastThinking': 'Selecciona al menos un nivel de razonamiento (distinto de off)',\r\n 'card.capabilities.applyLevel': 'Aplicar niveles',\r\n 'card.capabilities.restoreDefault': 'Restaurar valores predeterminados',\r\n 'card.capabilities.unsaved': 'Sin guardar',\r\n 'card.capabilities.saveChanges': 'Guardar cambios',\r\n 'card.capabilities.saved': 'Guardado',\r\n 'card.capabilities.thinkingFormat': 'Formato de razonamiento',\r\n 'card.capabilities.thinkingFormat.inherit': 'Heredar',\r\n 'card.capabilities.contextWindow': 'Límite de ventana de contexto',\r\n 'card.capabilities.contextCustomPlaceholder': 'Entero personalizado, ej. 256000',\r\n 'card.capabilities.contextClear': 'Borrar',\r\n 'card.capabilities.contextInteger': 'La longitud del contexto debe ser un entero (2000-1000000)',\r\n 'card.capabilities.contextRange': 'La longitud del contexto debe estar entre 2000 y 1000000',\r\n 'card.capabilities.contextHint': 'Elige un ajuste predefinido o introduce un entero (2000–1000000); se escribe en llm-pi-ai para la presión/compresión del contexto y se aplica a la siguiente solicitud sin reiniciar.',\r\n 'input.context.title': 'Ventana de contexto',\r\n 'input.context.globalHint': 'Se aplica globalmente a todas las sesiones que usan este modelo (Borrar restaura el valor predeterminado)',\r\n 'input.context.unset': 'Sin definir',\r\n 'input.context.custom': 'Personalizado',\r\n 'input.context.noModel': 'Aún no hay modelo de sesión',\r\n 'input.context.customPlaceholder': 'Entero personalizado, ej. 256000',\r\n 'input.context.apply': 'Aplicar',\r\n 'input.context.clear': 'Borrar',\r\n 'input.context.integer': 'La longitud del contexto debe ser un entero (2000-1000000)',\r\n 'input.context.range': 'La longitud del contexto debe estar entre 2000 y 1000000',\r\n 'model.panel.choose': 'Elegir modelo',\r\n 'model.panel.loading': 'Cargando el directorio de modelos…',\r\n 'model.panel.empty': 'No hay modelos disponibles',\r\n 'model.panel.window': 'Ventana',\r\n 'model.panel.noTarget': 'No hay entrada de configuración escribible para este modelo',\r\n 'model.panel.unavailable': 'El directorio de modelos no está disponible para esta sesión',\r\n 'input.effort.title': 'Esfuerzo de razonamiento',\r\n 'panel.search.placeholder': 'Buscar modelos…',\r\n 'card.takeoverUi': 'Relevo de la UI de modelo',\r\n 'card.takeoverUiHint': 'Si está activo, este plugin sustituye el selector de modelos del compositor por un panel propio (editores de contexto/nivel por línea + búsqueda). Si está desactivado (predeterminado) se mantiene el popup oficial: el nivel auto sigue apareciendo y la búsqueda y la carga corresponden al selector nativo. El cambio se aplica de inmediato, sin recargar.',\r\n 'card.capabilities.apiUnsupported': 'Este proveedor usa un protocolo distinto de openai-completions: thinkingFormat / supportsReasoningEffort son campos exclusivos de openai-completions y aquí no se ofrecen (una escritura que los lleve es rechazada en bloque por el host). El interruptor de thinking no se ve afectado: escribe reasoningEfforts, neutral respecto al protocolo, que pi-ai traduce de forma nativa.',\r\n 'card.capabilities.thinkingNative': 'El interruptor de thinking está disponible en todos los protocolos: escribe reasoningEfforts, neutral respecto al protocolo, que pi-ai traduce de forma nativa (presupuesto de thinking de Anthropic / reasoning effort de Responses). thinkingFormat / supportsReasoningEffort son exclusivos de openai-completions y solo aparecen cuando el modelo se declara de thinking en ese protocolo.',\r\n 'card.capabilities.staleCompat': 'campos exclusivos de openai-completions que una versión anterior forzó en esta fila de modelo',\r\n 'card.capabilities.stripStaleCompat': 'Eliminar estos restos',\r\n 'card.dsContextTitle': 'Ventana de contexto de los modelos DeepSeek oficiales',\r\n 'input.effort.default': 'Predeterminado del proveedor',\r\n 'input.effort.reset': 'Restaurar el valor predeterminado del proveedor',\r\n 'card.capabilities.failed': 'Error al guardar: el valor fue rechazado o está en conflicto. Verifícalo.',\r\n 'trace.label': 'Trazado de esfuerzo',\r\n 'trace.empty': 'Aún no hay niveles de solicitud confirmados en esta sesión.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manual',\r\n 'trace.title': 'Trazado de esfuerzo',\r\n 'trace.subtitle': 'El nivel con el que realmente salió cada solicitud de esta sesión; los niveles idénticos consecutivos se agrupan (lo más reciente arriba).',\r\n 'trace.summary.requests': 'solicitudes',\r\n 'trace.summary.runs': 'tramos',\r\n 'trace.summary.autoRuns': 'tramos planificados por auto',\r\n 'trace.summary.peak': 'pico',\r\n 'trace.summary.hint': 'T=turno · S=paso',\r\n 'trace.note.attribution': 'Nota: desde 0.2.2 el host prohíbe cambiar el nivel en el momento de la solicitud, así que este plugin (línea estricta) escribe `model/selection` por sí mismo un paso antes. La etiqueta «manual» solo significa que la última selección del registro era un nivel concreto, no necesariamente un clic humano.',\r\n 'trace.intent.default': 'predeterminado',\r\n 'trace.intent.unknown': 'sin registro',\r\n 'trace.intent.scheduler': 'planificador',\r\n 'trace.intent.unknownHint': 'Este cambio de nivel no tiene una selección correspondiente en el registro (desde 0.2.2 el plugin escribe model/selection por sí mismo y esas escrituras no llegan al registro)',\r\n 'trace.summary.switches': 'cambios de modelo',\r\n 'trace.dir.up': 'subió respecto al tramo anterior, %n solicitud(es)',\r\n 'trace.dir.down': 'bajó respecto al tramo anterior, %n solicitud(es)',\r\n 'trace.dir.flat': 'mismo nivel, elección distinta, %n solicitud(es)',\r\n 'trace.dir.start': 'primer nivel de la sesión, %n solicitud(es)',\r\n 'ring.title': 'Comprobación de contexto',\r\n 'ring.used': 'Usado',\r\n 'ring.remaining': 'Restante',\r\n 'ring.window': 'Ventana de contexto',\r\n 'ring.percent': 'Ocupación',\r\n 'ring.system': 'Mensaje de sistema',\r\n 'ring.tools': 'Definiciones de herramientas',\r\n 'ring.messages': 'Mensajes',\r\n 'ring.warning': 'El contexto está casi lleno: compacta el contexto o inicia una sesión nueva.',\r\n 'ring.aria': '%n del contexto usado',\r\n 'ring.unset': 'Aún no hay consumo en este turno',\r\n 'ring.billing': 'Facturación de caché',\r\n 'ring.bill.step': 'Este paso',\r\n 'ring.bill.turn': 'Este turno',\r\n 'ring.bill.session': 'Total de la sesión',\r\n 'ring.bill.cacheRead': 'Lectura de caché',\r\n 'ring.bill.cacheMiss': 'Fallo de caché',\r\n 'ring.bill.output': 'Salida',\r\n 'ring.bill.fullMiss': 'Fallos completos',\r\n 'ring.bill.rounds': 'pasos',\r\n 'ring.bill.peak': 'Tarifas punta',\r\n 'ring.bill.offPeak': 'Tarifas valle',\r\n 'ring.bill.flat': 'Tarifa plana',\r\n 'ring.bill.unpriced': 'Sin facturar',\r\n 'ring.bill.custom': 'facturado a tarifa propia',\r\n 'ring.bill.pricedAs': 'facturado como %n',\r\n 'ring.bill.priced': 'facturado a tarifa de catálogo',\r\n 'ring.bill.estimate': 'estimado fuera de catálogo',\r\n 'ring.bill.uncalibrated': 'sin calibrar — solo orientativo',\r\n}\r\n\r\n/** Portuguese (pt-BR) dictionary (keys mirror zh). */\r\nexport const pt: Record<keyof typeof zh, string> = {\r\n 'card.title': 'Níveis de raciocínio',\r\n 'family.title': 'Configurações dos plugins Qizi',\r\n 'card.description': 'Escolha Auto no seletor de modelo: o plugin programa low / high / max conforme o histórico de chamadas de ferramentas antes de enviar o effort à API. Aqui você configura o nível padrão, os limites do agendador e as capacidades por modelo (nível → valor wire enviado ao gateway).',\r\n 'card.level': 'Nível padrão',\r\n 'card.level.off': 'off — desativar o raciocínio (somente manual, nunca selecionado automaticamente)',\r\n 'card.level.on': 'on — ativar o raciocínio (somente modelos de alternância; envia enable_thinking, nunca um effort)',\r\n 'card.level.minimal': 'minimal — mínimo (tarefas muito leves)',\r\n 'card.level.low': 'low — baixo (rodadas baratas continuam baratas)',\r\n 'card.level.medium': 'medium — médio',\r\n 'card.level.high': 'high — alto (padrão oficial)',\r\n 'card.level.xhigh': 'xhigh — extra alto',\r\n 'card.level.max': 'max — máximo (tarefas pesadas)',\r\n 'card.level.auto': 'auto — programação a partir do histórico de ferramentas (padrão)',\r\n 'card.enabled': 'Ativado',\r\n 'card.allowDowngrade': 'Permitir rebaixamento (auto pode descer para low)',\r\n 'card.allowUpgrade': 'Permitir elevação (auto pode subir para max)',\r\n 'card.defaultPricing': 'Preço fora do catálogo',\r\n 'card.simpleTools': 'Lista de ferramentas simples (rebaixamento automático)',\r\n 'card.simpleToolsHint': 'Nomes de ferramentas separados por vírgula ou espaço, adicionados ao conjunto interno de \"ferramentas baratas e determinísticas\" (por exemplo shell, pwsh, web_fetch). No modo auto, uma etapa composta apenas por essas chamadas curtas desce para low. O conjunto interno já cobre bash/terminal/shell/pwsh; use este campo para nomes próprios do host.',\r\n 'card.simpleToolsRegex': 'Lista regex de ferramentas simples (rebaixamento auto)',\r\n 'card.simpleToolsRegexHint': 'Uma expressão regular JavaScript por entrada (sem âncora automática — escreva o seu ^; insensível a maiúsculas), ao lado da lista literal acima e contada na mesma razão. Os padrões testam tanto o nome completo quanto o nome sem ops_ — «^ops_.*» cobre toda a família dsh-ops de uma vez. Entradas inválidas são ignoradas com um aviso único.',\r\n 'card.defaultPricingHint': 'Como cobrar modelos sem entrada no catálogo (incluindo modelos de gateway de outros plugins); modelos catalogados usam sempre os próprios preços. Alterações afetam apenas registros novos.',\r\n 'card.defaultPricing.estimate': 'estimate — estimativa a preço típico (não calibrado, só referência; padrão)',\r\n 'card.defaultPricing.cn': 'cn — nível calibrado em CNY (fora do catálogo continua sendo estimativa a preço típico)',\r\n 'card.defaultPricing.global': 'global — nível calibrado em USD (fora do catálogo estimado até chegarem as linhas USD)',\r\n 'card.defaultPricing.custom': 'custom — preços informados (sem cobrança se faltar a linha completa)',\r\n 'card.defaultPricing.off': 'off — não cobrar (fora do catálogo mostra \"sem cobrança\")',\r\n 'card.unavailable': 'Namespace de configurações indisponível: confirme que dsh-thinking-levels está montado neste perfil.',\r\n 'card.readonly': 'Somente leitura',\r\n 'card.capabilities': 'Capacidades do modelo (provedores personalizados llm-pi-ai)',\r\n 'card.capabilities.hint': 'Lê e grava diretamente a configuração do llm-pi-ai: marque um nível e informe o valor exato enviado ao gateway (por exemplo high → ultra); deixar off vazio significa \"não enviar\". Vision controla a entrada de imagens; o interruptor de raciocínio gerencia enable_thinking; thinkingFormat escolhe a serialização wire.',\r\n 'card.capabilities.empty': 'Nenhum provedor personalizado tem modelos configurados no llm-pi-ai. Adicione primeiro um provedor e modelos em Configurações → Modelos.',\r\n 'card.capabilities.unavailable': 'O namespace de configurações do llm-pi-ai não está disponível.',\r\n 'card.capabilities.none': '(sem modelos)',\r\n 'card.capabilities.search': 'Buscar modelos por nome ou ID…',\r\n 'card.capabilities.noMatches': 'Nenhum modelo correspondente',\r\n 'card.capabilities.quickSettings': 'Configuração rápida',\r\n 'card.capabilities.presetOfficial': 'Aplicar a todos: Off / High / Max (estilo oficial DeepSeek)',\r\n 'card.capabilities.presetGeneric': 'Aplicar a todos: Off / Low / Medium / High (genérico)',\r\n 'card.capabilities.vendor': 'Provedor',\r\n 'card.capabilities.developerRole': 'O gateway rejeita a função developer',\r\n 'card.capabilities.developerRoleHint': 'Interruptor de compatibilidade oficial (dsh ≥ v0.1.0-rc.8): grava compat.supportsDeveloperRole: false no nível da rota para que o prompt de sistema seja enviado com a função system — corrige o erro Unexpected message role 400 em gateways vLLM / SGLang. Desmarcar remove o campo e restaura a herança.',\r\n 'card.capabilities.takeover': 'Assunção por terceiros',\r\n 'card.capabilities.takeoverHint': 'Ao marcar, as requisições de modelo desta rota passam a ser enviadas pela camada de transporte dsh-llm-openai-completions (envio multimodal real, porta de modalidade e injeção de prompt) e o pi-ai sai de cena. Grava na própria lista providers do transporte; desmarcar remove a rota. Requer o transporte instalado.',\r\n 'card.capabilities.takeoverHintAbsent': 'O transporte dsh-llm-openai-completions não está instalado — instale-o e ative-o para permitir a assunção por rota.',\r\n 'card.capabilities.expandProvider': 'Expandir provedor',\r\n 'card.capabilities.collapseProvider': 'Recolher provedor',\r\n 'card.capabilities.openModelSettings': 'Abrir configurações do modelo',\r\n 'card.capabilities.closeModelSettings': 'Recolher configurações do modelo',\r\n 'card.capabilities.vision': 'Modelo de visão',\r\n 'card.capabilities.video': 'Entrada de vídeo',\r\n 'card.capabilities.audio': 'Entrada de áudio',\r\n 'card.capabilities.pdf': 'Entrada de PDF',\r\n 'card.capabilities.mediaHint': 'As declarações de vídeo/áudio são gravadas em extraInputs do transporte assumido (a enumeração input da linha de modelo do host aceita apenas text|image). Valem apenas enquanto a rota estiver assumida; caso contrário os blocos correspondentes são rejeitados ou mascarados conforme modalFallback.',\r\n 'card.masterTakeover': 'Assunção mestre',\r\n 'card.masterTakeoverHint': 'Interruptor geral: o estado é espelhado no enabled do transporte a cada inicialização (único escritor). As caixas de assunção por terceiros gerenciam apenas a pertença à lista; com o mestre desligado, marcar uma rota acende este interruptor automaticamente.',\r\n 'card.capabilities.thinking': 'Modelo de raciocínio',\r\n 'card.capabilities.supportsEffort': 'Suporta think effort',\r\n 'card.capabilities.efforts': 'Níveis de raciocínio (marque e informe o valor wire)',\r\n 'card.capabilities.wirePlaceholder': 'Valor wire, por exemplo ultra',\r\n 'card.capabilities.offPlaceholder': 'Vazio = não enviar',\r\n 'card.capabilities.atLeastThinking': 'Selecione pelo menos um nível de raciocínio (exceto off)',\r\n 'card.capabilities.applyLevel': 'Aplicar níveis',\r\n 'card.capabilities.restoreDefault': 'Restaurar valores padrão',\r\n 'card.capabilities.unsaved': 'Não salvo',\r\n 'card.capabilities.saveChanges': 'Salvar alterações',\r\n 'card.capabilities.saved': 'Salvo',\r\n 'card.capabilities.thinkingFormat': 'Formato de raciocínio',\r\n 'card.capabilities.thinkingFormat.inherit': 'Herdar',\r\n 'card.capabilities.contextWindow': 'Limite da janela de contexto',\r\n 'card.capabilities.contextCustomPlaceholder': 'Inteiro personalizado, por exemplo 256000',\r\n 'card.capabilities.contextClear': 'Limpar',\r\n 'card.capabilities.contextInteger': 'O comprimento do contexto deve ser um inteiro (2000-1000000)',\r\n 'card.capabilities.contextRange': 'O comprimento do contexto deve estar entre 2000 e 1000000',\r\n 'card.capabilities.contextHint': 'Escolha um predefinido ou informe um inteiro (2000–1000000); é gravado em llm-pi-ai para a pressão/compactação de contexto e vale para a próxima requisição, sem reiniciar.',\r\n 'input.context.title': 'Janela de contexto',\r\n 'input.context.globalHint': 'Vale globalmente para todas as sessões que usam este modelo (Limpar restaura o padrão)',\r\n 'input.context.unset': 'Não definido',\r\n 'input.context.custom': 'Personalizado',\r\n 'input.context.noModel': 'Ainda não há modelo de sessão',\r\n 'input.context.customPlaceholder': 'Inteiro personalizado, por exemplo 256000',\r\n 'input.context.apply': 'Aplicar',\r\n 'input.context.clear': 'Limpar',\r\n 'input.context.integer': 'O comprimento do contexto deve ser um inteiro (2000-1000000)',\r\n 'input.context.range': 'O comprimento do contexto deve estar entre 2000 e 1000000',\r\n 'model.panel.choose': 'Escolher modelo',\r\n 'model.panel.loading': 'Carregando o diretório de modelos…',\r\n 'model.panel.empty': 'Nenhum modelo disponível',\r\n 'model.panel.window': 'Janela',\r\n 'model.panel.noTarget': 'Não há entrada de configuração gravável para este modelo',\r\n 'model.panel.unavailable': 'O diretório de modelos não está disponível para esta sessão',\r\n 'input.effort.title': 'Esforço de raciocínio',\r\n 'panel.search.placeholder': 'Buscar modelos…',\r\n 'card.takeoverUi': 'Assunção da interface de modelo',\r\n 'card.takeoverUiHint': 'Quando ativo, este plugin substitui o seletor de modelos do compositor por um painel próprio (editores de contexto/nível por linha + busca). Quando desativado (padrão), o pop-up oficial permanece: o nível auto continua aparecendo e a busca e o carregamento ficam a cargo do seletor nativo. A mudança vale imediatamente, sem recarregar.',\r\n 'card.capabilities.apiUnsupported': 'Este provedor usa um protocolo diferente de openai-completions: thinkingFormat / supportsReasoningEffort são campos exclusivos de openai-completions e não aparecem aqui (uma gravação que os leve é rejeitada em bloco pelo host). O interruptor de thinking não é afetado: grava reasoningEfforts, neutro quanto ao protocolo, que o pi-ai traduz nativamente.',\r\n 'card.capabilities.thinkingNative': 'O interruptor de thinking está disponível em todos os protocolos: grava reasoningEfforts, neutro quanto ao protocolo, que o pi-ai traduz nativamente (orçamento de thinking da Anthropic / reasoning effort do Responses). thinkingFormat / supportsReasoningEffort são exclusivos de openai-completions e só aparecem quando o modelo é declarado de thinking nesse protocolo.',\r\n 'card.capabilities.staleCompat': 'campos exclusivos de openai-completions que uma versão anterior forçou nesta linha de modelo',\r\n 'card.capabilities.stripStaleCompat': 'Remover esses resíduos',\r\n 'card.dsContextTitle': 'Janela de contexto dos modelos DeepSeek oficiais',\r\n 'input.effort.default': 'Padrão do provedor',\r\n 'input.effort.reset': 'Restaurar o padrão do provedor',\r\n 'card.capabilities.failed': 'Falha ao salvar: o valor foi rejeitado ou está em conflito. Verifique-o.',\r\n 'trace.label': 'Trilha de esforço',\r\n 'trace.empty': 'Ainda não há níveis de solicitação confirmados nesta sessão.',\r\n 'trace.intent.auto': 'auto',\r\n 'trace.intent.manual': 'manual',\r\n 'trace.title': 'Trilha de esforço',\r\n 'trace.subtitle': 'O nível com que cada requisição desta sessão realmente saiu; níveis idênticos consecutivos são agrupados (mais recente no topo).',\r\n 'trace.summary.requests': 'requisições',\r\n 'trace.summary.runs': 'trechos',\r\n 'trace.summary.autoRuns': 'trechos agendados pelo auto',\r\n 'trace.summary.peak': 'pico',\r\n 'trace.summary.hint': 'T=turno · S=passo',\r\n 'trace.note.attribution': 'Nota: desde 0.2.2 o host proíbe mudar o nível no momento da requisição, então este plugin (linha estrita) escreve `model/selection` por conta própria um passo antes. O rótulo «manual» significa apenas que a última seleção no log era um nível concreto, não necessariamente um clique humano.',\r\n 'trace.intent.default': 'padrão',\r\n 'trace.intent.unknown': 'não registrado',\r\n 'trace.intent.scheduler': 'agendador',\r\n 'trace.intent.unknownHint': 'Esta mudança de nível não tem seleção correspondente no log (desde 0.2.2 o plugin escreve model/selection por conta própria e essas escrituras não chegam ao log)',\r\n 'trace.summary.switches': 'trocas de modelo',\r\n 'trace.dir.up': 'subiu em relação ao trecho anterior, %n requisição(ões)',\r\n 'trace.dir.down': 'desceu em relação ao trecho anterior, %n requisição(ões)',\r\n 'trace.dir.flat': 'mesmo nível, escolha diferente, %n requisição(ões)',\r\n 'trace.dir.start': 'primeiro nível da sessão, %n requisição(ões)',\r\n 'ring.title': 'Verificação de contexto',\r\n 'ring.used': 'Usado',\r\n 'ring.remaining': 'Restante',\r\n 'ring.window': 'Janela de contexto',\r\n 'ring.percent': 'Ocupação',\r\n 'ring.system': 'Prompt de sistema',\r\n 'ring.tools': 'Definições de ferramentas',\r\n 'ring.messages': 'Mensagens',\r\n 'ring.warning': 'O contexto está quase cheio — compacte o contexto ou inicie uma nova sessão.',\r\n 'ring.aria': '%n do contexto usado',\r\n 'ring.unset': 'Ainda sem consumo neste turno',\r\n 'ring.billing': 'Cobrança de cache',\r\n 'ring.bill.step': 'Este passo',\r\n 'ring.bill.turn': 'Este turno',\r\n 'ring.bill.session': 'Total da sessão',\r\n 'ring.bill.cacheRead': 'Leitura de cache',\r\n 'ring.bill.cacheMiss': 'Falha de cache',\r\n 'ring.bill.output': 'Saída',\r\n 'ring.bill.fullMiss': 'Falhas completas',\r\n 'ring.bill.rounds': 'passos',\r\n 'ring.bill.peak': 'Tarifas de pico',\r\n 'ring.bill.offPeak': 'Tarifas fora de pico',\r\n 'ring.bill.flat': 'Tarifa fixa',\r\n 'ring.bill.unpriced': 'Não cobrado',\r\n 'ring.bill.custom': 'cobrado a tarifa personalizada',\r\n 'ring.bill.pricedAs': 'cobrado como %n',\r\n 'ring.bill.priced': 'cobrado a tarifa de catálogo',\r\n 'ring.bill.estimate': 'estimado fora do catálogo',\r\n 'ring.bill.uncalibrated': 'não calibrado — apenas referência',\r\n}\r\n\r\n/** Combined dictionary map — all 10 languages, single-call registration. */\r\nexport const dictionaries: Record<string, Record<string, string>> = { zh, en, ja, ko, fr, de, it, ru, es, pt }\r\n","/**\n * Context-capacity check ring for the composer tool row\n * (`conversation.input.right`, the seat just left of the send button —\n * the same seat the retired context-window pill used, and the same side of\n * the composer where the shipped ContextMeter lived).\n *\n * Why this exists: the model-seat panel replaced the shipped `ModelSelect`\n * trigger and popup, and with them went the shipped context meter — the\n * \"how full is this window\" read. The editor part moved into the model\n * panel's per-model lines; the CHECK part (used vs. window, pressure, a\n * breakdown, a warning before you run out) is what this ring restores.\n * Layout language follows better-er/dsh-cache-billing (rows with a color\n * swatch, token counts right-aligned, a muted footer note), which itself\n * pins into the shipped meter's popup.\n *\n * Data: the session projection seats. `useProjection('contextPressure')`\n * is the same feed the shipped meter consumes (`{ usedTokens, contextWindow,\n * percent }`), `useProjection('contextBreakdown')` the three-way split\n * (`{ systemTokens, toolsTokens, messageTokens }`). Both are optional on the\n * props and defensively read: a harness without the projection seat, or a\n * session before its first request, renders nothing here instead of a dead\n * control (the retired pill's discipline). Values refresh live while the\n * projection pushes — no polling.\n *\n * Zero host coupling beyond react + the injected seats: plain SVG + HTML\n * with token-based inline styling; copy comes from the plugin dictionary\n * (`ring.*`), delivered as the `t` thunk from the model panel — a ru/es host\n * then reads its own language instead of the old inline zh/en pair.\n */\nimport { useEffect, useRef, useState, useSyncExternalStore } from 'react'\nimport type { CSSProperties, JSX } from 'react'\n\n/** The pressure projection slice — the token-meter wire view's own fields. */\nexport interface ContextPressureLike {\n /** Post-usage pressure: the last usage sample's prompt-side token count. */\n pressureTokens?: number\n /** The request-projected estimate (pressure + uncommitted surface). */\n projectedTokens?: number\n contextWindow?: number\n}\n\n/** The breakdown projection slice (shipped meter's three-way split). */\nexport interface ContextBreakdownLike {\n systemTokens?: number\n toolsTokens?: number\n messageTokens?: number\n}\n\n/**\n * One session projection seat: a selector hook over the host's projection\n * store. Absent on harnesses without the projection module — the component\n * then renders nothing.\n */\nexport type ProjectionHook = <T>(key: string) => T | undefined\n\n/** The tlCacheBilling projection wire view (full field set). */\nexport interface CacheBillingLike {\n available?: boolean\n cost?: number\n missCost?: number\n outputCost?: number\n currency?: string\n cacheReadTokens?: number\n totalInputTokens?: number\n outputTokens?: number\n hitRate?: number | null\n model?: string | null\n provider?: string | null\n matchedModel?: string | null\n modelMatched?: boolean\n tier?: 'peak' | 'offPeak' | 'flat' | null\n unitPricePerM?: number | null\n /** 目录化新增字段(全部 optional:旧 view 落新客户端时保守回退)。 */\n priced?: boolean\n pricingSource?: 'estimate' | 'cn' | 'global' | 'custom' | 'off' | 'catalog-miss' | null\n /** 金额为兜底典型价估算(未校准,仅供参考)。 */\n estimated?: boolean\n catalogKey?: string | null\n catalogLabel?: string | null\n priceRow?: { inputMiss: number; inputCacheHit: number; output: number } | null\n sessionByCurrency?: Array<{ currency: string; hitCost: number; missCost: number; outputCost: number }>\n mixedCurrency?: boolean\n turn?: number | null\n step?: number | null\n turnCost?: number\n turnHitCost?: number\n turnMissCost?: number\n turnOutputCost?: number\n turnTokens?: number\n turnCacheReadTokens?: number\n turnInputTokens?: number\n turnOutputTokens?: number\n sessionCacheHitCost?: number\n sessionMissCost?: number\n sessionOutputCost?: number\n sessionInputTokens?: number\n sessionCacheReadTokens?: number\n sessionOutputTokens?: number\n sessionRounds?: number\n sessionMissSteps?: number\n sessionWriteTokens?: number\n sessionFullMissSteps?: number\n}\n\n/** Full props of the ring entry (all optional — data comes from the store). */\nexport interface ContextRingProps {\n /** The session id of the slot's owning conversation (standard seat). */\n sessionId?: string\n /**\n * Capacity fallback from the model catalog: when the contextPressure\n * projection carries no contextWindow (some sessions never see the\n * request/context event), the declared window of the ACTIVE model fills in.\n */\n contextWindowFallback?: number\n /**\n * Dictionary thunk (`locale.bind(NS)` in the model panel, or the host's own\n * `PropsLocale` seat). Optional: a caller without it renders keys, never\n * Chinese — degrade to keys rather than to a language nobody asked for.\n */\n t?: (key: string) => string\n}\n\n/* ── inline styling (no CSS modules in the client bundle) ──────────────── */\n\nconst RING_SIZE = 18\nconst RING_STROKE = 2.5\n\nconst triggerStyle: CSSProperties = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '5px',\n height: '24px',\n padding: '0 6px',\n background: 'transparent',\n border: 'none',\n borderRadius: '6px',\n cursor: 'pointer',\n color: 'var(--dsw-alias-label-secondary, inherit)',\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '11px',\n lineHeight: '16px',\n whiteSpace: 'nowrap',\n}\n\nconst popStyle: CSSProperties = {\n position: 'absolute',\n bottom: 'calc(100% + 8px)',\n right: 0,\n zIndex: 1200,\n minWidth: '264px',\n padding: '10px 12px',\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\n color: 'var(--dsw-alias-label-primary, inherit)',\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.25))',\n borderRadius: '10px',\n boxShadow: '0 8px 24px rgba(0,0,0,0.14)',\n fontSize: '12px',\n lineHeight: '18px',\n}\n\nconst headStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'baseline',\n gap: '8px',\n fontWeight: 600,\n marginBottom: '4px',\n}\n\nconst figureStyle: CSSProperties = {\n fontVariantNumeric: 'tabular-nums',\n fontFamily: 'var(--ds-font-family-code, monospace)',\n}\n\nconst rowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n padding: '2px 0',\n}\n\nconst rowLabelStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n color: 'var(--dsw-alias-label-secondary, inherit)',\n}\n\nconst rowValueStyle: CSSProperties = {\n marginLeft: 'auto',\n fontVariantNumeric: 'tabular-nums',\n fontWeight: 500,\n textAlign: 'right' as const,\n}\n\nconst swatchStyle = (color: string): CSSProperties => ({\n display: 'inline-block',\n width: '8px',\n height: '8px',\n borderRadius: '2px',\n marginRight: '6px',\n flex: 'none',\n background: color,\n})\n\nconst warnStyle: CSSProperties = {\n marginTop: '6px',\n color: '#f43f5e',\n fontSize: '11px',\n lineHeight: '16px',\n}\n\nconst footStyle: CSSProperties = {\n marginTop: '6px',\n color: 'var(--dsw-alias-label-caption, inherit)',\n fontSize: '11px',\n lineHeight: '16px',\n}\n\nconst BREAKDOWN_COLORS = { system: '#8b5cf6', tools: '#0ea5e9', messages: '#10b981' } as const\n\n/** Pressure color: calm → amber → red (cache-billing's foot/warn palette). */\nexport function pressureColor(percent: number): string {\n if (percent >= 85) return '#f43f5e'\n if (percent >= 70) return '#f59e0b'\n return 'var(--dsw-alias-label-secondary, currentColor)'\n}\n\n/** Format a token count compactly (12.3k / 1.24M). */\nexport function formatTokens(n: number): string {\n if (n >= 1_000_000) return `${Math.round((n / 1_000_000) * 100) / 100}M`\n if (n >= 1000) return `${Math.round((n / 1000) * 10) / 10}k`\n return String(Math.round(n))\n}\n\nconst BILL_COLORS = { hit: '#10b981', miss: '#f59e0b', output: '#3b82f6' } as const\n\n/** One nested billing sub-row (cache-billing's indented swatch row). */\nfunction BillSubRow({ label, tokens, amount, color }: { label: string; tokens: number; amount: string; color: string }): JSX.Element {\n return (\n <div style={{ ...rowStyle, paddingLeft: '16px' }}>\n <dt style={rowLabelStyle}><span style={swatchStyle(color)} />{label}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>\n <span style={{ color: 'var(--dsw-alias-label-caption, inherit)', fontWeight: 400, marginRight: '6px' }}>{formatTokens(tokens)} tok</span>\n {amount}\n </dd>\n </div>\n )\n}\n\n/** 币种符号:目录原样不折算;未知币种回退 ISO 码。 */\nfunction currencySymbol(currency: string | undefined): string {\n if (currency === 'USD') return '$'\n if (currency !== undefined && currency !== 'CNY') return `${currency} `\n return '¥'\n}\n\n/** Format an amount: four decimals for a step, fewer for the totals. */\nfunction formatMoney(amount: number, digits: number, currency?: string): string {\n return `${currencySymbol(currency)}${amount.toFixed(digits)}`\n}\n\n/**\n * The module-level projection store. The ring renders inside the model seat,\n * whose entry props do NOT carry the projection hook — the hook lives on a\n * zero-size data hook mounted at `conversation.input.right` (the seat where\n * better-er/dsh-cache-billing proved the hook injection), which mirrors every\n * push into this store. The ring subscribes like any external store.\n */\ninterface ProjectionSnapshot {\n /** Set once the data hook mounts anywhere — the 0.2.0+ seat marker. */\n seatMounted?: boolean\n pressure?: ContextPressureLike\n breakdown?: ContextBreakdownLike\n billing?: CacheBillingLike\n}\n\nlet store: ProjectionSnapshot = {}\nconst listeners = new Set<() => void>()\n\n/** Immutable replacement — useSyncExternalStore compares snapshots by\n * reference, so in-place mutation would never re-render subscribers. */\nfunction publish(patch: Partial<ProjectionSnapshot>): void {\n store = { ...store, ...patch }\n for (const listener of listeners) listener()\n}\n\nfunction subscribeStore(listener: () => void): () => void {\n listeners.add(listener)\n return () => { listeners.delete(listener) }\n}\n\nfunction getStore(): ProjectionSnapshot {\n return store\n}\n\n/**\n * The zero-size data hook: props delivered by the slot renderer carry the\n * session projection hook; every push lands in the module store.\n */\nexport function ProjectionDataHook(props: { useProjection?: ProjectionHook }): JSX.Element {\n const pressure = props.useProjection?.('contextPressure') as ContextPressureLike | undefined\n const breakdown = props.useProjection?.('contextBreakdown') as ContextBreakdownLike | undefined\n const billing = props.useProjection?.('tlCacheBilling') as CacheBillingLike | undefined\n useEffect(() => {\n // The seat marker rides the first publish: the ring re-renders on every\n // publish, so a marker arriving after the ring's first render still\n // flips it from hidden to visible.\n publish({ seatMounted: true, pressure, breakdown, billing })\n })\n return <span data-dsh-thinking-levels=\"projection-hook\" style={{ display: 'none' }} />\n}\n\n/** The SVG ring: one background track + one pressure arc. */\nfunction Ring({ percent, color }: { percent: number; color: string }): JSX.Element {\n const r = (RING_SIZE - RING_STROKE) / 2\n const c = 2 * Math.PI * r\n const clamped = Math.max(0, Math.min(100, percent))\n return (\n <svg width={RING_SIZE} height={RING_SIZE} viewBox={`0 0 ${RING_SIZE} ${RING_SIZE}`} aria-hidden=\"true\">\n <circle cx={RING_SIZE / 2} cy={RING_SIZE / 2} r={r} fill=\"none\"\n stroke=\"var(--dsw-alias-border-l2, rgba(127,127,127,0.3))\" strokeWidth={RING_STROKE} />\n <circle cx={RING_SIZE / 2} cy={RING_SIZE / 2} r={r} fill=\"none\"\n stroke={color} strokeWidth={RING_STROKE} strokeLinecap=\"round\"\n strokeDasharray={`${(c * clamped) / 100} ${c}`}\n transform={`rotate(-90 ${RING_SIZE / 2} ${RING_SIZE / 2})`} />\n </svg>\n )\n}\n\n/** One breakdown row (cache-billing's swatch-row layout). */\nfunction BreakdownRow({ label, value, color }: { label: string; value: number; color: string }): JSX.Element {\n return (\n <div style={rowStyle}>\n <dt style={rowLabelStyle}><span style={swatchStyle(color)} />{label}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>{formatTokens(value)}</dd>\n </div>\n )\n}\n\n/**\n * The cache-billing block (catalog era). 未计价(priced===false)时保留 token\n * 读数、金额位换「未计价」文案;旧 view 缺 priced 字段 → 按历史行为计价。\n * 混币种会话不给跨币种合计,改按币种分行。\n */\nfunction BillingBlock({ billing, t }: { billing: CacheBillingLike; t: (key: string) => string }): JSX.Element {\n /** `ring.*` 读取(字典里只有一个 `%n` 占位符,有值就填)。 */\n const c = (key: string, value?: string): string => {\n const text = t(key)\n return value === undefined ? text : text.replace('%n', value)\n }\n const cur = billing.currency\n const priced = billing.priced !== false\n const money = (amount: number | undefined, digits: number): JSX.Element | string =>\n priced\n ? formatMoney(amount ?? 0, digits, cur)\n : <span style={{ color: 'var(--dsw-alias-label-caption, inherit)' }}>{c('ring.bill.unpriced')}</span>\n const dash = priced ? undefined : '—'\n const buckets = Array.isArray(billing.sessionByCurrency) ? billing.sessionByCurrency : []\n const sessionTotal: JSX.Element | string = !priced\n ? <span style={{ color: 'var(--dsw-alias-label-caption, inherit)' }}>{c('ring.bill.unpriced')}</span>\n : billing.mixedCurrency === true && buckets.length > 1\n // 跨币种不相加:逐桶展示(主币种取 session* 字段,其余补列)\n ? buckets.map((b) => `${currencySymbol(b.currency)}${(b.hitCost + b.missCost + b.outputCost).toFixed(2)}`).join(' + ')\n : formatMoney((billing.sessionCacheHitCost ?? 0) + (billing.sessionMissCost ?? 0) + (billing.sessionOutputCost ?? 0), 2, cur)\n return (\n <dl style={{ margin: '4px 0 0', padding: '6px 0 0', borderTop: '1px solid var(--dsw-alias-border-l3, rgba(127,127,127,0.18))' }}>\n <div style={rowStyle}>\n <dt style={{ ...rowLabelStyle, color: '#a78bfa' }}>{c('ring.bill.step')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>\n {formatTokens((billing.totalInputTokens ?? 0) + (billing.outputTokens ?? 0))} tok {money(billing.cost, 4)}\n </dd>\n </div>\n <BillSubRow label={c('ring.bill.cacheRead')} tokens={billing.cacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.cost ?? 0, 4, cur)} color={BILL_COLORS.hit} />\n <BillSubRow label={c('ring.bill.cacheMiss')} tokens={(billing.totalInputTokens ?? 0) - (billing.cacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.missCost ?? 0, 4, cur)} color={BILL_COLORS.miss} />\n <BillSubRow label={c('ring.bill.output')} tokens={billing.outputTokens ?? 0} amount={dash ?? formatMoney(billing.outputCost ?? 0, 4, cur)} color={BILL_COLORS.output} />\n <div style={rowStyle}>\n <dt style={{ ...rowLabelStyle, color: '#22d3ee' }}>{c('ring.bill.turn')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>\n {formatTokens(billing.turnTokens ?? 0)} tok {money(billing.turnCost, 3)}\n </dd>\n </div>\n <BillSubRow label={c('ring.bill.cacheRead')} tokens={billing.turnCacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.turnHitCost ?? 0, 3, cur)} color={BILL_COLORS.hit} />\n <BillSubRow label={c('ring.bill.cacheMiss')} tokens={(billing.turnInputTokens ?? 0) - (billing.turnCacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.turnMissCost ?? 0, 3, cur)} color={BILL_COLORS.miss} />\n <BillSubRow label={c('ring.bill.output')} tokens={billing.turnOutputTokens ?? 0} amount={dash ?? formatMoney(billing.turnOutputCost ?? 0, 3, cur)} color={BILL_COLORS.output} />\n <div style={rowStyle}>\n <dt style={{ ...rowLabelStyle, color: '#f472b6' }}>\n {c('ring.bill.session')}{billing.sessionRounds ? ` · ${billing.sessionRounds} ${c('ring.bill.rounds')}` : ''}\n </dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>\n {formatTokens((billing.sessionInputTokens ?? 0) + (billing.sessionOutputTokens ?? 0))} tok {sessionTotal}\n </dd>\n </div>\n <BillSubRow label={c('ring.bill.cacheRead')} tokens={billing.sessionCacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.sessionCacheHitCost ?? 0, 2, cur)} color={BILL_COLORS.hit} />\n <BillSubRow label={c('ring.bill.cacheMiss')} tokens={(billing.sessionInputTokens ?? 0) - (billing.sessionCacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.sessionMissCost ?? 0, 2, cur)} color={BILL_COLORS.miss} />\n <BillSubRow label={c('ring.bill.output')} tokens={billing.sessionOutputTokens ?? 0} amount={dash ?? formatMoney(billing.sessionOutputCost ?? 0, 2, cur)} color={BILL_COLORS.output} />\n {(billing.sessionFullMissSteps ?? 0) > 0 && (\n <div style={rowStyle}>\n <dt style={{ ...rowLabelStyle, color: '#f43f5e' }}>{c('ring.bill.fullMiss')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>{billing.sessionFullMissSteps}</dd>\n </div>\n )}\n </dl>\n )\n}\n\n/**\n * The ring entry: pressure arc trigger + the check popover. Renders nothing\n * without a projection seat or before the session has any reading.\n */\nexport function ContextRing(props: ContextRingProps): JSX.Element | null {\n // Two distinct invisible cases, handled differently: a host WITHOUT the\n // projection hook seat (≤0.1.6 lines — the data hook never mounts) hides the\n // ring, the retired pill's discipline — a permanently dead control helps\n // nobody there. A host WITH the hook but no reading yet (fresh session)\n // renders the dimmed unset state — fail-visible, because a hidden control is\n // indistinguishable from a dead registration, which cost a debug round-trip\n // once already.\n const live = useSyncExternalStore(subscribeStore, getStore)\n const hasSeat = live.seatMounted === true\n const [open, setOpen] = useState(false)\n const rootRef = useRef<HTMLDivElement | null>(null)\n const pressure = live.pressure\n const breakdown = live.breakdown\n const billing = live.billing\n // The official meter's own occupancy mapping (contextOccupancy): the\n // projected estimate wins, the raw pressure sample is the floor.\n const used = typeof pressure?.projectedTokens === 'number'\n ? pressure.projectedTokens\n : typeof pressure?.pressureTokens === 'number' ? pressure.pressureTokens : undefined\n const window_ = typeof pressure?.contextWindow === 'number' && pressure.contextWindow > 0\n ? pressure.contextWindow\n : typeof props.contextWindowFallback === 'number' && props.contextWindowFallback > 0\n ? props.contextWindowFallback\n : undefined\n const hasReading = used !== undefined && window_ !== undefined && window_ > 0\n\n /** Dictionary thunk: the model panel passes `locale.bind(NS)`; without it keys render. */\n const t = props.t ?? ((key: string) => key)\n /** `ring.*` 读取(字典里只有一个 `%n` 占位符,有值就填)。 */\n const c = (key: string, value?: string): string => {\n const text = t(key)\n return value === undefined ? text : text.replace('%n', value)\n }\n const percent = hasReading\n ? Math.min(100, Math.round(((used as number) / (window_ as number)) * 100))\n : 0\n const color = pressureColor(percent)\n const remaining = hasReading ? Math.max(0, (window_ as number) - (used as number)) : 0\n const rows: Array<{ label: string; value: number | undefined; color: string }> = !hasReading || breakdown === undefined\n ? []\n : [\n { label: c('ring.system'), value: breakdown.systemTokens, color: BREAKDOWN_COLORS.system },\n { label: c('ring.tools'), value: breakdown.toolsTokens, color: BREAKDOWN_COLORS.tools },\n { label: c('ring.messages'), value: breakdown.messageTokens, color: BREAKDOWN_COLORS.messages },\n ]\n\n // Hosts without the projection hook seat (≤0.1.6) can never produce a\n // reading — hide the control entirely rather than show a permanently dead\n // dial (the discipline in the comment at hasSeat). A host with the seat\n // flips `seatMounted` during the hook's own mount, so the gap is one store\n // tick before the first real re-render.\n if (!hasSeat) return null\n\n return (\n <div ref={rootRef} style={{ position: 'relative', display: 'inline-flex' }}>\n <button\n type=\"button\"\n style={hasReading ? triggerStyle : { ...triggerStyle, opacity: 0.55 }}\n aria-label={hasReading ? c('ring.aria', `${percent}%`) : c('ring.unset')}\n aria-haspopup={hasReading ? 'dialog' : undefined}\n aria-expanded={open}\n onClick={() => { if (hasReading) setOpen(state => !state) }}\n >\n <Ring percent={percent} color={color} />\n <span style={{ ...figureStyle, color: hasReading ? color : 'var(--dsw-alias-label-caption, inherit)' }}>\n {hasReading ? `${percent}%` : '–'}\n </span>\n </button>\n {open && hasReading && (\n <div style={popStyle} role=\"dialog\" aria-label={c('ring.title')}>\n <div style={headStyle}>\n {c('ring.title')}\n <span style={{ ...rowValueStyle, ...figureStyle }}>~{formatTokens(used)} / {formatTokens(window_)}</span>\n </div>\n <div style={rowStyle}>\n <dt style={rowLabelStyle}>{c('ring.percent')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0, color }}>{percent}%</dd>\n </div>\n <div style={rowStyle}>\n <dt style={rowLabelStyle}>{c('ring.remaining')}</dt>\n <dd style={{ ...rowValueStyle, margin: 0 }}>{formatTokens(remaining)}</dd>\n </div>\n {rows.every(row => typeof row.value === 'number') && rows.length > 0 && (\n <dl style={{ margin: '4px 0 0', padding: '6px 0 0', borderTop: '1px solid var(--dsw-alias-border-l3, rgba(127,127,127,0.18))' }}>\n {rows.map(row => <BreakdownRow key={row.label} label={row.label} value={row.value as number} color={row.color} />)}\n </dl>\n )}\n {billing?.available === true && <BillingBlock billing={billing} t={t} />}\n {percent >= 85 && <div style={warnStyle}>{c('ring.warning')}</div>}\n <div style={footStyle}>\n {c('ring.window')}: {hasReading ? (window_ as number).toLocaleString() : c('ring.unset')}\n {billing?.available === true\n ? ` · ${billing.tier === 'peak' ? c('ring.bill.peak') : billing.tier === 'offPeak' ? c('ring.bill.offPeak') : billing.tier === 'flat' ? c('ring.bill.flat') : c('ring.bill.unpriced')} · ${\n billing.priced === false\n ? c('ring.bill.unpriced')\n : billing.estimated === true\n ? c('ring.bill.uncalibrated')\n : typeof billing.catalogLabel === 'string'\n ? c('ring.bill.pricedAs', billing.catalogLabel)\n : billing.pricingSource === 'custom'\n ? c('ring.bill.custom')\n : billing.modelMatched === false\n ? c('ring.bill.estimate')\n : c('ring.bill.priced')\n }`\n : ''}\n </div>\n </div>\n )}\n </div>\n )\n}\n","/**\r\n * Pure thinking-level decision for the dsh-thinking-levels plugin.\r\n *\r\n * The measured bottleneck of tool calls in dsh is the model's THINKING phase\r\n * (~90% of the wall-clock time for simple tasks), not the tool execution\r\n * itself. DeepSeek's API exposes `reasoning_effort` in wire levels\r\n * (off / low / high / max; low shipped 2026-08-13 in dsh rc.7 — rc.6 and\r\n * older adapters only accept off / high / max).\r\n *\r\n * The plugin offers EIGHT standard levels aligned with dsh-thinking-effort's\r\n * level set, plus the scheduler sentinel:\r\n * - `off` : thinking disabled (manual only — never auto-picked).\r\n * - `on` : thinking enabled at the model's default strength. Toggle-only\r\n * models (Qwen3.6-style) surface Off/On; `on` lifts to the\r\n * advertised `high` (or the highest thinking level the model\r\n * takes) instead of an exact wire level.\r\n * - `minimal` / `low` / `medium` / `high` / `xhigh` / `max` : strength\r\n * gradients. Each maps to a wire value via the model's `reasoningEfforts`\r\n * table (customizable per model — e.g. `high` → `ultra`); levels the model\r\n * does not advertise are clamped to its highest thinking level or stripped.\r\n * - `auto` : schedule per step from the recent tool-call history, between\r\n * `low` / `high` / `max` (never `off`, never `auto` itself).\r\n *\r\n * A request-level guard decides whether an effort may be injected at all:\r\n * models that do not advertise reasoning metadata (custom openai-completions\r\n * routes such as Qwen3.6 with no `reasoningEfforts`) must never receive a\r\n * `reasoningEffort` — dsh rejects it per request with\r\n * UNSUPPORTED_REASONING_EFFORT. Unsupported fields are stripped, not sent.\r\n *\r\n * Kept dependency-free (pure inputs -> output) so the policy is unit-testable\r\n * in isolation; the plugin host feeds it the live session's recent calls.\r\n */\r\n\r\n/** The user-facing thinking levels: the eight standard levels plus the scheduler sentinel. */\r\nexport type EffortId = 'off' | 'on' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto'\r\n\r\n/** Wire levels the auto scheduler may pick (never `off`, never `auto`). */\r\nexport type AutoEffort = 'low' | 'high' | 'max'\r\n\r\n/** The eight standard levels (excluding the `auto` scheduler sentinel). */\r\nexport const STANDARD_LEVELS: readonly EffortId[] = [\r\n 'off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',\r\n] as const\r\n\r\n/** Runtime guard: is this a level the plugin understands? */\r\nexport function isEffortId(value: unknown): value is EffortId {\r\n return STANDARD_LEVELS.includes(value as EffortId) || value === 'auto'\r\n}\r\n\r\n/**\r\n * Fail-loud config validation: reject an out-of-band level (e.g. a stray\r\n * value from an old profile) instead of silently injecting it into the\r\n * model request, where dsh would throw `UNSUPPORTED_REASONING_EFFORT`.\r\n */\r\nexport function assertEffortId(value: unknown, where: string): asserts value is EffortId {\r\n if (!isEffortId(value)) {\r\n throw new TypeError(\r\n `${where}: invalid thinking level ${JSON.stringify(value)} `\r\n + '(expected off | on | minimal | low | medium | high | xhigh | max | auto)',\r\n )\r\n }\r\n}\r\n\r\n/** One observed tool call of the current/last step. */\r\nexport interface ToolCallSample {\r\n /** Tool name, e.g. 'bash', 'fs_write', 'web_search', 'mcp__...'. */\r\n name: string\r\n /** Approximate argument size in characters (payload heft). */\r\n argsSize: number\r\n}\r\n\r\n/**\r\n * Everything the policy needs to decide one request's level.\r\n */\r\nexport interface EffortDecisionInput {\r\n /** Recent tool calls of the step (oldest first); empty for a fresh prompt. */\r\n recentCalls: readonly ToolCallSample[]\r\n /** The user-selected level: a fixed wire level, or `auto` for scheduling. */\r\n selected: EffortId\r\n /** Scheduler preference: allow the scheduler to drop below the hub (`high`). */\r\n allowDowngrade: boolean\r\n /** User preference: allow the scheduler to lift above the hub to `max`. */\r\n allowUpgrade: boolean\r\n /**\r\n * Extra tool names treated as cheap-and-deterministic, merged with the\r\n * built-in set (each matched after the `ops_` namespace strip). Empty/omitted\r\n * leaves the built-in classification untouched (issue #8 `Config.simpleTools`).\r\n */\r\n extraSimpleTools?: readonly string[]\r\n /**\r\n * Extra RAW REGEX patterns treated as cheap-and-deterministic, merged with\r\n * the literal list and the built-in set (issue #12 `Config.simpleToolsRegex`).\r\n * Each entry compiles as written (`i` flag, no auto-anchoring — the hint\r\n * suggests `^`); invalid entries are skipped with a one-time warning. The\r\n * matcher tests the full name and the bare name, so a family pattern like\r\n * `ops_.*` hits the whole namespace.\r\n */\r\n extraSimpleRegex?: readonly string[]\r\n}\r\n\r\n/**\r\n * Deterministic tool names that are cheap to reason about (word-boundary\r\n * anchored). `shell`/`pwsh`/`cmd`/`sh` sit alongside `bash`/`terminal` — every\r\n * one of them is a \"run this command\" entry, so a step made only of short calls\r\n * to any of them is cheap-and-deterministic (issue #8 follow-up: on hosts whose\r\n * command tool is named `shell`/`pwsh` rather than `bash`, auto used to sit\r\n * permanently on `high`).\r\n */\r\nconst SIMPLE_TOOL_RE = /^(?:fs|bash|terminal|shell|pwsh|cmd|sh|code|text|todo|job|skill|read|list|search|write|grep|glob|edit|ls|cat|rm|mv|cp|touch|mkdir|pwd|head|tail)(?:_|$)/i\r\n\r\n/**\r\n * Known tool-wrapper namespaces (issue #8). `ops_` is the prefix the dsh-ops\r\n * plugin family puts on its tools (`ops_bash`, `ops_grep`, `ops_shell`,\r\n * `ops_read_files`); the wrapped tool is just as cheap-and-deterministic as its\r\n * bare name, so the prefix is stripped before the simple-tool check. Only an\r\n * explicit table is stripped: a generic `word_` catch-all would misread\r\n * look-alike heavy names such as `codebase_search` as simple (see the\r\n * classification-boundary test).\r\n */\r\nconst TOOL_NAMESPACE_RE = /^(?:ops_)+/i\r\n\r\n/** Hefty payloads signal non-trivial work no matter the tool name. */\r\nconst HEAVY_ARGS = 800\r\n\r\n/** Escape a user-supplied token for embedding in a RegExp source. */\r\nfunction escapeRe(source: string): string {\r\n return source.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\r\n}\r\n\r\n/**\r\n * The merged cheap-and-deterministic classifier over both extra lists\r\n * (issue #12): literal entries (`Config.simpleTools`, anchored exactly as\r\n * before) plus raw regex entries (`Config.simpleToolsRegex`, compiled as\r\n * written — invalid ones skipped with a one-time warning, never thrown).\r\n *\r\n * `test` matches the FULL tool name AND the namespace-stripped bare name: a\r\n * family pattern like `ops_.*` can only ever hit the full name (the bare name\r\n * carries no `ops_` prefix), while a literal entry like `ops_bash` used to be\r\n * dead on arrival against the bare name alone — the dual face repairs it as a\r\n * side effect. The BUILT-IN table keeps its bare-name-only semantics (the\r\n * issue #8 contract); only the extra lists gained the second face.\r\n */\r\nexport interface SimpleToolMatcher {\r\n test(name: string): boolean\r\n}\r\n\r\n/**\r\n * Compiled matchers, memoised by content. The config arrays may be fresh\r\n * references on every read (volatile `.get()`), so key on the joined contents\r\n * rather than identity to avoid recompiling per request.\r\n */\r\nconst SIMPLE_MATCHER_CACHE = new Map<string, SimpleToolMatcher | null>()\r\n\r\n/**\r\n * Compile the two extra lists into one classifier, or `null` when both are\r\n * empty (the built-in classification then stands alone). A compile is pure\r\n * apart from the one-time `console.warn` for invalid regex entries — the\r\n * cache keys on content, so the warning fires once per configuration, not\r\n * once per request.\r\n */\r\nexport function compileSimpleToolsMatcher(\r\n literal: readonly string[] | undefined,\r\n regex: readonly string[] | undefined,\r\n): SimpleToolMatcher | null {\r\n const literalKey = (literal ?? []).join('\\u0000')\r\n const regexKey = (regex ?? []).join('\\u0000')\r\n if (literalKey === '' && regexKey === '') return null\r\n const key = `${literalKey}\\u0001${regexKey}`\r\n const hit = SIMPLE_MATCHER_CACHE.get(key)\r\n if (hit !== undefined) return hit\r\n const matcher = buildSimpleToolsMatcher(literal ?? [], regex ?? [])\r\n SIMPLE_MATCHER_CACHE.set(key, matcher)\r\n return matcher\r\n}\r\n\r\nfunction buildSimpleToolsMatcher(literal: readonly string[], regex: readonly string[]): SimpleToolMatcher | null {\r\n const cleaned = literal.map(token => token.trim()).filter(token => token !== '')\r\n const literalRe = cleaned.length === 0\r\n ? null\r\n : new RegExp(`^(?:${cleaned.map(escapeRe).join('|')})(?:_|$)`, 'i')\r\n const rawRes: RegExp[] = []\r\n const failed: string[] = []\r\n for (const pattern of regex) {\r\n const trimmed = pattern.trim()\r\n if (trimmed === '') continue\r\n try {\r\n rawRes.push(new RegExp(trimmed, 'i'))\r\n } catch {\r\n failed.push(trimmed)\r\n }\r\n }\r\n if (failed.length > 0) {\r\n console.warn(`[dsh-thinking-levels] Config.simpleToolsRegex: skipped invalid pattern(s) (they must compile as JavaScript RegExp): ${failed.map(p => `/${p}/`).join(', ')}`)\r\n }\r\n if (literalRe === null && rawRes.length === 0) return null\r\n return {\r\n test(name: string): boolean {\r\n const bare = name.replace(TOOL_NAMESPACE_RE, '')\r\n return (literalRe !== null && (literalRe.test(name) || literalRe.test(bare)))\r\n || rawRes.some(re => re.test(name) || re.test(bare))\r\n },\r\n }\r\n}\r\n\r\n/** Whether a tool name looks cheap-and-deterministic: the built-in table reads\r\n * the namespace-stripped bare name (issue #8 semantics, untouched); the extra\r\n * matcher carries its own dual face (full name ∥ bare name, issue #12). */\r\nfunction isSimpleToolName(name: string, extra?: SimpleToolMatcher | null): boolean {\r\n const bare = name.replace(TOOL_NAMESPACE_RE, '')\r\n return SIMPLE_TOOL_RE.test(bare) || (extra !== undefined && extra !== null && extra.test(name))\r\n}\r\n\r\n/** Count how many of the recent calls look cheap-and-deterministic. */\r\nfunction simpleRatio(calls: readonly ToolCallSample[], extra?: SimpleToolMatcher | null): number {\r\n if (calls.length === 0) return 1\r\n const simple = calls.filter(call =>\r\n isSimpleToolName(call.name, extra) && call.argsSize < HEAVY_ARGS,\r\n ).length\r\n return simple / calls.length\r\n}\r\n\r\n/**\r\n * Auto schedule: map a recent tool-call history to the wire level the NEXT\r\n * model request of that step should use.\r\n *\r\n * Hub is `high` (the official default). Rules:\r\n * - No tool calls yet (the session's FIRST request) -> `high`, ALWAYS.\r\n * - All/mostly simple tools -> `low` (when downgrades are allowed) — `low` is\r\n * the floor the scheduler may ever reach.\r\n * - Mixed or heavy tools -> `high` (the hub).\r\n * - Very heavy context (huge args) -> `max` (when upgrades are allowed).\r\n *\r\n * Why the first request sits on the hub instead of the old `low`: the first\r\n * step has no tool history to justify a downgrade, and it is the step that\r\n * decides the plan — tool choice, payload shape, decomposition. An\r\n * under-thought first step produces a plan the rest of the turn inherits, and\r\n * the measured saving of one cheap step does not pay for a re-plan. Downgrades\r\n * therefore require evidence: `low` needs at least one observed simple tool\r\n * call, so `allowDowngrade` no longer moves the no-sample branch.\r\n *\r\n * The scheduler MAY pick `low`: the request-level capability guard strips any\r\n * effort from models that do not support it, so a scheduled `low` only ever\r\n * reaches models that advertise the level.\r\n *\r\n * @param calls - recent tool calls of the step.\r\n * @param allowDowngrade - may drop below `high` once tool evidence exists.\r\n * @param allowUpgrade - may lift above `high`.\r\n * @returns a wire level; never `off` (off is manual-only) and never `auto`.\r\n */\r\nfunction scheduleEffort(\r\n calls: readonly ToolCallSample[],\r\n allowDowngrade: boolean,\r\n allowUpgrade: boolean,\r\n extra?: SimpleToolMatcher | null,\r\n): AutoEffort {\r\n // The no-sample branch is the first request of the session: start at the hub\r\n // regardless of `allowDowngrade` (see the rationale above).\r\n if (calls.length === 0) return 'high'\r\n\r\n const ratio = simpleRatio(calls, extra)\r\n const heaviest = calls.reduce((max, call) => Math.max(max, call.argsSize), 0)\r\n\r\n if (ratio >= 0.75 && allowDowngrade) return 'low'\r\n if (heaviest >= HEAVY_ARGS * 4 && allowUpgrade) return 'max'\r\n return 'high'\r\n}\r\n\r\n/**\r\n * Map the user's selected level to the level injected into the next\r\n * `agent/request`. Manual levels (off / low / high / max) pass through\r\n * unchanged — `low` is the manual pick for simple chat tasks. `auto`\r\n * delegates to the tool-history scheduler.\r\n *\r\n * @param input - recent calls, the selected level and the user's toggles.\r\n * @returns The level to inject; `auto` is resolved before returning.\r\n */\r\nexport function decideEffort(input: EffortDecisionInput): EffortId {\r\n const { recentCalls, selected, allowDowngrade, allowUpgrade, extraSimpleTools, extraSimpleRegex } = input\r\n if (selected !== 'auto') return selected\r\n return scheduleEffort(recentCalls, allowDowngrade, allowUpgrade, compileSimpleToolsMatcher(extraSimpleTools, extraSimpleRegex))\r\n}\r\n\r\n/**\r\n * Whether a model's resolved metadata advertises reasoning-effort support.\r\n * dsh resolves `reasoning` to `undefined` for non-reasoning models (e.g. a\r\n * hand-declared openai-completions route without `reasoningEfforts`), and\r\n * rejects any requested effort for them per request. An empty efforts list is\r\n * equally incapable and is treated as unsupported.\r\n * @param reasoning - the `reasoning` field of a resolved model info.\r\n * @returns true when the model advertises at least one effort level.\r\n */\r\nexport function reasoningEffortSupported(reasoning: unknown): boolean {\r\n if (typeof reasoning !== 'object' || reasoning === null) return false\r\n const efforts = (reasoning as { efforts?: unknown }).efforts\r\n return Array.isArray(efforts) && efforts.length > 0\r\n}\r\n\r\n/** One request-level injection decision. */\r\nexport interface EffortInjectionInput {\r\n /** Whether the target model advertises reasoning-effort support. */\r\n supportsReasoning: boolean\r\n /**\r\n * The level this request was ASKED for: the session's explicit pick (folded\r\n * from `model/selection`) when present, else the plugin-configured default.\r\n *\r\n * Never derive this from the request seed. From dsh 0.1.2-rc.1 on, the host\r\n * seeds `reasoningEffort` from the previous `request/header` — which is this\r\n * plugin's own output (`core/agent-loop/src/agent.ts:573-581`). Reading it as\r\n * a manual pick made `auto` resolve once and then stay frozen for the rest of\r\n * the session (issue #6, bug 2).\r\n */\r\n requested: EffortId\r\n /**\r\n * The `reasoningEffort` already present on the request seed (host echo of a\r\n * previous header, or route inheritance). Used ONLY to recognise the `on`\r\n * toggle and to strip an inherited effort from a model that cannot take one —\r\n * never as a manual-pick signal.\r\n */\r\n seedEffort: unknown\r\n /** Recent tool calls of the step, for the auto scheduler. */\r\n recentCalls: readonly ToolCallSample[]\r\n /** Scheduler preference: allow the scheduler to drop below `high`. */\r\n allowDowngrade: boolean\r\n /** Scheduler preference: allow lifting above `high` to `max`. */\r\n allowUpgrade: boolean\r\n /**\r\n * Extra tool names merged into the built-in cheap-and-deterministic set for\r\n * the `auto` scheduler (issue #8 `Config.simpleTools`).\r\n */\r\n extraSimpleTools?: readonly string[]\r\n /**\r\n * Extra raw regex patterns for the same set (issue #12\r\n * `Config.simpleToolsRegex`), compiled as written, invalid ones skipped.\r\n */\r\n extraSimpleRegex?: readonly string[]\r\n /** The model's advertised effort ids (including plugin masks like `auto`). */\r\n efforts: readonly string[]\r\n /**\r\n * The model takes only an on/off thinking toggle (Qwen3.6 / mimo-v2.5\r\n * style): `off` must be stripped (pi-ai expresses it by omitting the effort,\r\n * not by sending an `off` value), and `on` maps to the advertised `high`\r\n * level (pi-ai serializes it as enable_thinking, no reasoning_effort).\r\n */\r\n toggleOnly: boolean\r\n}\r\n\r\n/** The resolved action for one `agent/request`. */\r\nexport interface EffortInjectionDecision {\r\n /** Keep/inject a `reasoningEffort` on the request (false = strip it). */\r\n inject: boolean\r\n /** The wire level to set, present when `inject` is true. */\r\n level?: EffortId\r\n}\r\n\r\n/**\r\n * Clamp a level to the ones the model actually advertises. The adapter rejects\r\n * any other value per request (UNSUPPORTED_REASONING_EFFORT), so an unsupported\r\n * scheduled level is lifted to the model's highest advertised thinking level\r\n * (a toggle-only model advertises off/high → a scheduled low becomes `high`,\r\n * which enables thinking without sending a think effort), and a model\r\n * advertising no thinking level at all yields nothing (strip).\r\n * @param level - the scheduled or manually selected level.\r\n * @param efforts - the model's advertised effort ids (escalation-ordered).\r\n * @returns the level to inject, or `undefined` when the model cannot take it.\r\n */\r\nexport function clampToEfforts(level: EffortId, efforts: readonly string[]): EffortId | undefined {\r\n if (efforts.includes(level)) return level\r\n // off and auto are not thinking levels; the advertised list is\r\n // escalation-ordered.\r\n const thinking = efforts.filter(id => id !== 'off' && id !== 'auto')\r\n if (thinking.length === 0) return undefined\r\n return thinking[thinking.length - 1] as EffortId\r\n}\r\n\r\n/**\r\n * Decide what one model request should do with `reasoningEffort`.\r\n *\r\n * - A model without reasoning support never receives the field: dsh would\r\n * throw UNSUPPORTED_REASONING_EFFORT, so the seed's inherited effort (from a\r\n * previous route or session header) is stripped.\r\n * - A manual wire selection (`requested`) passes through unchanged when the\r\n * model advertises it; an unsupported manual pick is stripped rather than\r\n * clamped (the user asked for that exact level).\r\n * - `on` is the enable-thinking toggle, never a wire level: on a toggle-only\r\n * model it injects the advertised thinking level (`high`), which the wire\r\n * serializes as enable_thinking without a reasoning_effort; an\r\n * effort-capable model does not advertise `on`, so it is stripped.\r\n * - `auto` resolves through the scheduler; the result is clamped to the\r\n * model's advertised levels, so a scheduled `low` on a model that only takes\r\n * off/high (Qwen3.6) becomes `high` instead of an error.\r\n *\r\n * The manual/auto branch reads `requested` only. The seed no longer influences\r\n * it, so a header echoed back by the host cannot masquerade as a user pick.\r\n *\r\n * @param input - model capability plus the requested level and the seed's effort.\r\n * @returns whether to inject and the level to set.\r\n */\r\nexport function resolveEffortInjection(input: EffortInjectionInput): EffortInjectionDecision {\r\n const { supportsReasoning, requested, efforts, toggleOnly } = input\r\n if (!supportsReasoning) return { inject: false }\r\n if (toggleOnly) {\r\n // Toggle-only model (Qwen3.6 / mimo-v2.5 style): thinking is an on/off\r\n // switch expressed through the provider's enable_thinking semantics.\r\n // - Off → inject `off`: the provider maps it to thinking disabled.\r\n // - On / any other request → inject `high` (the advertised toggle level):\r\n // the short-circuit adapter serializes a non-off effort as\r\n // enable_thinking true — an explicit \"thinking on\" signal the wire needs.\r\n // (A request with NO effort at all is the ambiguous case: leaving it\r\n // absent relies on the provider default, which some gateways read as off.)\r\n return { inject: true, level: requested === 'off' ? 'off' : 'high' }\r\n }\r\n if (requested === 'on' || input.seedEffort === 'on') {\r\n // A stray On on an effort-capable model: never a wire level, stripped.\r\n return { inject: false }\r\n }\r\n if (requested !== 'auto') {\r\n // A manual pick is the user asking for that exact level: pass it through\r\n // only when the model advertises it, strip it otherwise (no clamping of an\r\n // explicit choice).\r\n return efforts.includes(requested)\r\n ? { inject: true, level: requested }\r\n : { inject: false }\r\n }\r\n const level = decideEffort({\r\n recentCalls: input.recentCalls,\r\n selected: 'auto',\r\n allowDowngrade: input.allowDowngrade,\r\n allowUpgrade: input.allowUpgrade,\r\n extraSimpleTools: input.extraSimpleTools,\r\n extraSimpleRegex: input.extraSimpleRegex,\r\n })\r\n const clamped = clampToEfforts(level, efforts)\r\n return clamped === undefined ? { inject: false } : { inject: true, level: clamped }\r\n}\r\n\r\n/** Wall-clock delta of one tool call, for the timing telemetry. */\r\nexport function toolDurationMs(startedAt: number, finishedAt: number): number {\r\n return Math.max(0, finishedAt - startedAt)\r\n}\r\n\r\n/* ── effort slider ordering & placement (client face, kept pure for tests) ── */\r\n\r\n/**\r\n * Display rank of the effort slider stops: `auto` is the scheduler sentinel and\r\n * sits LEFTMOST regardless of whether the model allows disabling thinking;\r\n * `off` / `on` follow, then the strength gradient. Ids outside the standard set\r\n * (custom gateway wire values such as `ultra`) rank last, in arrival order.\r\n */\r\nexport const EFFORT_SLIDER_RANK: Readonly<Record<string, number>> = {\r\n auto: 0, off: 1, on: 2, minimal: 3, low: 4, medium: 5, high: 6, xhigh: 7, max: 8,\r\n} as const\r\n\r\n/** Fallback rank for ids outside the standard table. */\r\nconst EFFORT_SLIDER_RANK_TAIL = 100\r\n\r\n/**\r\n * Order a model's advertised efforts for the slider track (left → right).\r\n * Stable sort: unknown ids keep their relative arrival order after the known\r\n * ranks, so a gateway's custom wire values are never dropped or reordered\r\n * against each other.\r\n */\r\nexport function orderEffortsForSlider<T extends { id: string }>(efforts: readonly T[]): T[] {\r\n return [...efforts].sort((a, b) => {\r\n const rankA = EFFORT_SLIDER_RANK[a.id] ?? EFFORT_SLIDER_RANK_TAIL\r\n const rankB = EFFORT_SLIDER_RANK[b.id] ?? EFFORT_SLIDER_RANK_TAIL\r\n return rankA - rankB\r\n })\r\n}\r\n\r\n/**\r\n * Map the line's effective effort to a stop index of the ordered track: exact\r\n * id match wins; an unmatched id (e.g. a defaultEffort the track does not\r\n * advertise) parks on the nearest stop by display rank, ties resolving to the\r\n * stronger level (higher index); an absent value parks on stop 0 (the neutral\r\n * left end — `auto` when advertised) and an empty track always yields 0, so the\r\n * caller never faces an out-of-range thumb.\r\n */\r\nexport function nearestEffortStopIndex(\r\n stops: readonly { id: string }[],\r\n value: string | undefined,\r\n): number {\r\n if (stops.length === 0) return 0\r\n if (value === undefined) return 0\r\n const exact = stops.findIndex(stop => stop.id === value)\r\n if (exact >= 0) return exact\r\n const rank = EFFORT_SLIDER_RANK[value] ?? EFFORT_SLIDER_RANK_TAIL\r\n let best = 0\r\n let bestDistance = Number.POSITIVE_INFINITY\r\n stops.forEach((stop, index) => {\r\n const stopRank = EFFORT_SLIDER_RANK[stop.id] ?? EFFORT_SLIDER_RANK_TAIL\r\n const distance = Math.abs(stopRank - rank)\r\n // `<=` resolves ties toward the stronger (right-most) level.\r\n if (distance <= bestDistance) {\r\n bestDistance = distance\r\n best = index\r\n }\r\n })\r\n return best\r\n}\r\n","/**\r\n * Whale-girl runner strip (鲸鱼娘侧面奔跑立绘, original left-facing\r\n * orientation — she rides the thumb looking back along the track),\r\n * inlined as a palette PNG data URL — the client bundle purity gate\r\n * forbids non-inline assets. Source: HanaAyane/dsh-reasoning-effort\r\n * assets/chibi-runner-strip.png (community whale-girl derivative);\r\n * regenerate via `python tools/whale-mascot.py`.\r\n */\r\nexport const WHALE_RUN_STRIP_SRC = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhgAAABcCAMAAAAbDDxxAAADAFBMVEXr3J9mYlupp5kfJ1mmnGkeHBxhYmloXS4pJStgZYWmi3OKdlj45W1fKBlqJGwuLTeUk6DVr2U3XWRwdo6csdYgIChrcYTQoJaSdVtfW2lepdw3cMaRkJDSs5RfX2Y8Qk+e0fPc4dyrmC6ZZxk+QVI3VHuEe2lINzhrk7JFRDxBPkb/AAB1h5PvnBR4eYM8g8VKddDCrcUzOWZiRzsPNWF7wfPYn2SMi40A//+qquyEgnr/AP/h3/H/fwCBfoZ/f/+hyclDPz/0xHjlzBnPv88eMoBCPFFBP0YAfwA/cJ+IgXgsLlaCaYWqVap///9//38AAABSZKYwNm1JWJX7+Pdth8vw6OlldrYlKVVISW04SIlZc7dMXaJUVXLPyMw3RHR0lNZVVVV+fn5SYpetqK6Mh480NlUmLGb///5tZ3Q9PT3q2NV1doza1NZkfMI6VZK4tLccI1QWG03l2+NlW2+XlJhpaoiWl6dLRlVBTYnz49tWhspUecXFu8VISFLHuLdVVViJeHhGR1QAAFWlm6d2c3nR2Oi2uMeEe4pISE9XVlWqmJZJSU1whLU8PHpoZ2gAAH+EltJRWHBFSmZVWGhTV2hlZWsxO4VtZ1Pa5fM7WaQbJmVDPFFUVFphbqwVFzg4O041OE4AAP9pZmzNwrwFAgVoV1ZERld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Kkmbc4N/ZFTcXzV2T0Ig4/UD0XC3lXy7nVm1rOXOg0CzC7r89cdYyTMxmIicOzk9w3Pkho52bv+3r3HmSmHdikJsrLthr/u2fv6L/KPfv8sID2KZnxNMToyYmuerEss8kdv/7AKOu9WFm3bXHzot+gjuj3m8+X3m2cdw54btRDLvPye/+e74u//ck9t8B0EcbXpoTp2MAAAAASUVORK5CYII='\r\n\r\n/** Frame geometry of the strip, in asset pixels (2x the CSS display size). */\r\nexport const WHALE_RUN_STRIP = {\r\n frames: 8,\r\n frameW: 67,\r\n frameH: 92,\r\n} as const\r\n","/**\r\n * Segment slider for one model line's reasoning effort (the 改造 of the retired\r\n * per-line `<select>`).\r\n *\r\n * Interaction follows the approved dsh-reasoning-effort visual spec: the thumb\r\n * follows the pointer CONTINUOUSLY and snaps to a stop on release (one\r\n * `directory.select` per gesture), the plain thumb is pure white in every\r\n * theme, the full thumb stays visible at both track endpoints, and\r\n * reduced-motion freezes motion. Deviations requested for this plugin: the\r\n * stop count adapts to the model's advertised efforts (not a fixed triple),\r\n * `auto` is pinned leftmost (see `orderEffortsForSlider`), and the whale-girl\r\n * runner thumb is per-line — DeepSeek lines run the 8-frame strip, every other\r\n * model gets the plain knob.\r\n *\r\n * The track carries the reference plugin's signature FX, ported from its\r\n * published bundle: a procedural canvas \"radiation\" (three sine waves with a\r\n * sharp crest, exponential trail decay from the thumb, a 4px pixel grid with\r\n * grain, 14 particle streaks flying left, and a radial glow at the thumb — all\r\n * clipped LEFT of the thumb, screen-blended over the track, pixelated), a CSS\r\n * flare at the thumb, theme-split tracks via `body[data-ds-dark-theme]`, a\r\n * light-theme progress fill, and a `[data-top]` breathe pulse. Dragging speeds\r\n * and brightens everything. The canvas runs a rAF loop unless\r\n * `prefers-reduced-motion` is set (then single frames on change).\r\n *\r\n * Inline styling only (no CSS modules in the client bundle) — everything a\r\n * stylesheet needs (pseudo-elements, keyframes, theme selectors, blend modes)\r\n * is injected once into `document.head` under a plugin-prefixed id. All math\r\n * is defensive: a render throw here would abdicate the whole model-seat entry\r\n * back to the shipped selector.\r\n */\r\nimport { useEffect, useRef, useState } from 'react'\r\nimport type { CSSProperties, JSX, KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from 'react'\r\nimport { nearestEffortStopIndex } from '../thinking-level.ts'\r\nimport { WHALE_RUN_STRIP, WHALE_RUN_STRIP_SRC } from './whale-mascot.ts'\r\n\r\n/** One ordered stop of the track (already run through `orderEffortsForSlider`). */\r\nexport interface EffortStop {\r\n id: string\r\n name: string\r\n}\r\n\r\nexport interface EffortSliderProps {\r\n /** Ordered left → right; `auto` first, unknown wire values last. */\r\n stops: readonly EffortStop[]\r\n /** The line's effective effort (current selection, else the model default). */\r\n value: string | undefined\r\n /** true = whale-girl runner thumb (DeepSeek lines); false = plain white knob. */\r\n mascot: boolean\r\n /** Frozen while a route write is in flight. */\r\n disabled: boolean\r\n /** Commit the picked stop id (once per gesture / keypress). */\r\n onCommit: (id: string) => void\r\n /** Locale copy thunk. */\r\n t: (key: string) => string\r\n}\r\n\r\n/* ── geometry (CSS px) ──────────────────────────────────────────────────── */\r\n\r\n/** Editor-row zone height: label row + track + headroom for the standing girl. */\r\nconst ZONE_H = 74\r\n/** Track thickness; sits `TRACK_B` px above the zone bottom (above the 14px label row).\r\n * Proportioned like the reference (track ≈ knob height), not a thin wire. */\r\nconst TRACK_H = 24\r\nconst TRACK_B = 16\r\n/** Horizontal inset keeping the thumb fully visible at both endpoint stops. */\r\nconst PAD_MASCOT = 18\r\nconst PAD_KNOB = 14\r\n/** Thumb metrics. */\r\nconst GIRL_W = WHALE_RUN_STRIP.frameW / 2\r\nconst GIRL_H = WHALE_RUN_STRIP.frameH / 2\r\nconst GIRL_B = TRACK_B + TRACK_H / 2 - 4\r\nconst KNOB = 28\r\n/** Flare pill sized to OUR track (the reference's 78×46 assumed a 30px track). */\r\nconst FLARE_W = 60\r\nconst FLARE_H = 36\r\n/** Label row height under the track. */\r\nconst LABEL_H = 14\r\n/** Strip footprint in CSS px (asset is 2x). */\r\nconst STRIP_CSS_W = (WHALE_RUN_STRIP.frameW * WHALE_RUN_STRIP.frames) / 2\r\nconst STRIP_CSS_H = WHALE_RUN_STRIP.frameH / 2\r\n\r\nconst KEYFRAMES_ID = 'dsh-thinking-levels-effort-slider'\r\nconst ZONE_CLASS = 'dsh-tl-zone'\r\nconst RUN_CLASS = 'dsh-tl-run'\r\nconst GIRL_CLASS = 'dsh-tl-girl'\r\nconst KNOB_CLASS = 'dsh-tl-knob'\r\nconst TRACK_CLASS = 'dsh-tl-track'\r\nconst FILL_CLASS = 'dsh-tl-fill'\r\nconst CANVAS_CLASS = 'dsh-tl-canvas'\r\nconst FLARE_CLASS = 'dsh-tl-flare'\r\nconst RUN_KEYFRAMES = 'dsh-tl-whale-run-keyframes'\r\n\r\n/**\r\n * The effect stylesheet: radiation track themes (dark violet gradient vs pale\r\n * blue + progress fill), the screen-blended pixelated canvas, the flare with\r\n * its cross streaks, dragging boosts, the `[data-top]` breathe pulses, the\r\n * girl's run cycle with drop-shadow glow, and the reduced-motion freezes.\r\n */\r\nconst EFFECT_CSS = `\r\n.${ZONE_CLASS}:focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary); outline-offset: 2px; }\r\n.${TRACK_CLASS} {\r\n border-radius: 999px;\r\n overflow: hidden;\r\n isolation: isolate;\r\n background: linear-gradient(100deg, #03040a 0%, #071126 22%, #101d4c 45%, #302262 70%, #5d35a0 100%);\r\n box-shadow:\r\n inset 0 1px 0 rgba(189, 199, 255, .15),\r\n inset 0 -1px 0 rgba(0, 0, 0, .55),\r\n 0 3px 10px rgba(12, 17, 55, .34);\r\n}\r\nbody[data-ds-dark-theme] .${TRACK_CLASS}::after {\r\n content: \"\";\r\n position: absolute;\r\n inset: 0;\r\n pointer-events: none;\r\n background:\r\n radial-gradient(circle at 18% 45%, rgba(82, 130, 255, .12), transparent 24%),\r\n linear-gradient(90deg, rgba(0, 0, 0, .28), transparent 42%, rgba(168, 113, 255, .12));\r\n}\r\nbody:not([data-ds-dark-theme]) .${TRACK_CLASS} {\r\n /* Gradient base even at 0% progress: LIGHT blue at the left deepening\r\n toward DARK blue at the right (matches the progress direction). */\r\n background: linear-gradient(90deg, #d9eafc 0%, #b3d3f5 40%, #6ba6e8 78%, #4080d8 100%);\r\n box-shadow:\r\n inset 0 1px 0 rgba(255, 255, 255, .9),\r\n inset 0 0 0 1px rgba(80, 133, 194, .14),\r\n 0 3px 10px rgba(48, 101, 165, .13);\r\n}\r\n.${FILL_CLASS} {\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n width: var(--dsh-tl-progress, 0%);\r\n border-radius: inherit;\r\n background: linear-gradient(90deg, #ffffff 0%, #d7eaff 18%, #75afea 54%, #0751ad 100%);\r\n transition: width 190ms cubic-bezier(.22, 1, .36, 1);\r\n display: none;\r\n}\r\nbody:not([data-ds-dark-theme]) .${FILL_CLASS} { display: block; }\r\n.${CANVAS_CLASS} {\r\n position: absolute;\r\n inset: 0;\r\n width: 100%;\r\n height: 100%;\r\n image-rendering: pixelated;\r\n mix-blend-mode: screen;\r\n pointer-events: none;\r\n transition: filter 140ms ease;\r\n}\r\n/* Screen only LIGHTENS — over the pale light-theme track it would wash the\r\n radiation out; paint it directly there. */\r\nbody:not([data-ds-dark-theme]) .${CANVAS_CLASS} { mix-blend-mode: normal; }\r\n.${FLARE_CLASS} {\r\n position: absolute;\r\n width: ${FLARE_W}px;\r\n height: ${FLARE_H}px;\r\n border-radius: 50%;\r\n background: radial-gradient(ellipse at 100% 50%, rgba(255,255,255,.96) 0 4%, rgba(188,189,255,.8) 11%, rgba(106,87,255,.5) 28%, rgba(105,31,255,.2) 49%, transparent 74%);\r\n filter: blur(1.5px) saturate(1.25);\r\n mix-blend-mode: screen;\r\n transform: translate(-100%, -50%);\r\n transition: left 70ms linear, filter 140ms ease;\r\n pointer-events: none;\r\n}\r\n.${FLARE_CLASS}::before,\r\n.${FLARE_CLASS}::after {\r\n content: \"\";\r\n position: absolute;\r\n inset: 50% auto auto 100%;\r\n border-radius: 999px;\r\n transform: translate(-50%, -50%);\r\n}\r\n.${FLARE_CLASS}::before {\r\n width: 52px;\r\n height: 1px;\r\n background: linear-gradient(90deg, transparent, rgba(100,160,255,.42), #f1ecff, rgba(193,82,255,.65), transparent);\r\n box-shadow: 0 0 7px #9b7cff, 0 0 13px rgba(72,132,255,.64);\r\n}\r\n.${FLARE_CLASS}::after {\r\n width: 1px;\r\n height: 20px;\r\n background: linear-gradient(180deg, transparent, rgba(196,190,255,.84), transparent);\r\n box-shadow: 0 0 7px #9c7cff;\r\n}\r\n.${ZONE_CLASS}[data-drag=\"1\"] .${CANVAS_CLASS} { filter: saturate(1.45) brightness(1.28) contrast(1.06); }\r\n.${ZONE_CLASS}[data-drag=\"1\"] .${FLARE_CLASS} { filter: blur(1.5px) saturate(1.6) brightness(1.42); transition: none; }\r\n.${KNOB_CLASS} {\r\n border-radius: 50%;\r\n background: #fff;\r\n border: 1px solid rgba(255, 255, 255, .94);\r\n box-shadow:\r\n 0 0 0 2px rgba(92, 105, 255, .12),\r\n 0 0 14px rgba(121, 82, 255, .48),\r\n 0 2px 7px rgba(0, 0, 0, .3);\r\n transition: left 190ms cubic-bezier(.22, 1, .36, 1), transform 160ms ease, box-shadow 180ms ease;\r\n}\r\n.${ZONE_CLASS}[data-drag=\"1\"] .${KNOB_CLASS} {\r\n transform: translateX(-50%) scale(1.07);\r\n transition: none;\r\n box-shadow:\r\n 0 0 0 3px rgba(113, 115, 255, .25),\r\n 0 0 20px rgba(74, 145, 255, .86),\r\n 0 0 31px rgba(171, 53, 255, .66),\r\n 0 3px 8px rgba(0, 0, 0, .32);\r\n}\r\n.${ZONE_CLASS}[data-top=\"1\"] .${TRACK_CLASS} { animation: dsh-tl-dark-breathe 1.9s ease-in-out infinite; }\r\n@keyframes dsh-tl-dark-breathe {\r\n 0%, 100% { box-shadow: inset 0 1px 0 rgba(196,204,255,.16), 0 3px 10px rgba(18,25,72,.4); }\r\n 50% { box-shadow: inset 0 1px 0 rgba(220,214,255,.24), 0 0 21px rgba(111,66,255,.5); }\r\n}\r\nbody:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top=\"1\"] .${TRACK_CLASS} { animation-name: dsh-tl-light-breathe; }\r\n@keyframes dsh-tl-light-breathe {\r\n 0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(67,124,193,.16), 0 3px 10px rgba(48,101,165,.13); }\r\n 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(67,124,193,.22), 0 3px 10px rgba(31,102,190,.22), 0 0 19px rgba(31,105,201,.24); }\r\n}\r\n.${RUN_CLASS} { animation: ${RUN_KEYFRAMES} 0.72s steps(8, end) infinite alternate; }\r\n@keyframes ${RUN_KEYFRAMES} {\r\n from { background-position-x: 0; }\r\n to { background-position-x: -${STRIP_CSS_W}px; }\r\n}\r\n.${GIRL_CLASS} {\r\n filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .28)) drop-shadow(0 0 5px rgba(92, 105, 255, .34));\r\n transform-origin: 50% 68%;\r\n transition: left 190ms cubic-bezier(.22, 1, .36, 1);\r\n}\r\n.${ZONE_CLASS}[data-drag=\"1\"] .${GIRL_CLASS} {\r\n animation-duration: 0.42s;\r\n transition: none;\r\n filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .28)) drop-shadow(0 0 8px rgba(87, 137, 255, .68));\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .${ZONE_CLASS}[data-top=\"1\"] .${TRACK_CLASS} { animation: none; }\r\n .${RUN_CLASS} { animation: none; }\r\n .${FLARE_CLASS}, .${FILL_CLASS}, .${KNOB_CLASS} { transition: none; }\r\n}\r\n`\r\n\r\nlet styleInjected = false\r\n\r\n/** Inject the effect stylesheet once per document. */\r\nfunction ensureEffectStyle(): void {\r\n if (styleInjected || document.getElementById(KEYFRAMES_ID) !== null) {\r\n styleInjected = true\r\n return\r\n }\r\n const style = document.createElement('style')\r\n style.id = KEYFRAMES_ID\r\n style.textContent = EFFECT_CSS\r\n document.head.appendChild(style)\r\n styleInjected = true\r\n}\r\n\r\nconst clamp01 = (value: number): number => Math.min(1, Math.max(0, value))\r\n\r\n/* ── the radiation canvas (ported from dsh-reasoning-effort) ────────────── */\r\n\r\ninterface RadiationState {\r\n /** Thumb x in canvas CSS px (already padded). */\r\n origin: number\r\n dragging: boolean\r\n}\r\n\r\n/**\r\n * Draw one frame of the track FX: sine-wave columns with a sharp crest and an\r\n * exponential trail decaying from the thumb, a 4px pixel grid with grain and a\r\n * radial halo around the thumb, particle streaks streaming LEFT, and a radial\r\n * glow at the origin — everything clipped LEFT of the thumb, theme-split by\r\n * the harness `data-ds-dark-theme` body attribute.\r\n */\r\nfunction drawRadiation(\r\n context: CanvasRenderingContext2D,\r\n width: number,\r\n height: number,\r\n time: number,\r\n state: RadiationState,\r\n): void {\r\n const origin = state.origin\r\n const isDark = document.body.hasAttribute('data-ds-dark-theme')\r\n const cell = 4\r\n const speed = state.dragging ? 2.8 : 1\r\n context.clearRect(0, 0, width, height)\r\n if (origin <= 0) return\r\n context.save()\r\n context.beginPath()\r\n context.rect(0, 0, origin, height)\r\n context.clip()\r\n for (let x = 0; x < origin; x += cell) {\r\n const delta = x + cell * 0.5 - origin\r\n const distance = Math.abs(delta)\r\n const phaseA = distance / 10 - time * 74e-4 * speed\r\n const phaseB = distance / 23 - time * 41e-4 * speed + 1.7\r\n const phaseC = distance / 40 - time * 22e-4 * speed + 3.4\r\n const sinA = Math.max(0, Math.sin(phaseA))\r\n const sinB = Math.max(0, Math.sin(phaseB))\r\n const sinC = Math.max(0, Math.sin(phaseC))\r\n const waveA = Math.pow(sinA, 2.6)\r\n const waveB = Math.pow(sinB, 3.2)\r\n const waveC = Math.pow(sinC, 4)\r\n const crest = Math.pow(sinA, 15) + Math.pow(sinB, 18) * 0.78\r\n const wave = Math.min(1, waveA * 0.76 + waveB * 0.58 + waveC * 0.32)\r\n const trail = 0.38 + 0.62 * Math.exp(-distance / Math.max(55, width * 0.72))\r\n const pillar = Math.pow(Math.max(0, Math.sin(x / 20 + time * 16e-4)), 3) * 0.27\r\n const columnEnergy = trail * (wave * 1.04 + pillar + crest * 0.32)\r\n if (columnEnergy > 0.012) {\r\n const nearness = Math.max(0, 1 - distance / Math.max(1, width * 0.78))\r\n const red = isDark ? Math.round(42 + 124 * nearness + 75 * wave) : Math.round(28 + 58 * nearness + 15 * wave)\r\n const green = isDark ? Math.round(56 + 58 * nearness + 44 * crest) : Math.round(88 + 72 * nearness + 30 * crest)\r\n const blue = isDark ? Math.round(175 + 72 * nearness + 8 * wave) : Math.round(182 + 62 * nearness)\r\n const alpha = isDark ? Math.min(0.88, columnEnergy * 0.72) : Math.min(0.9, columnEnergy * 0.85)\r\n context.fillStyle = `rgba(${red}, ${green}, ${blue}, ${alpha})`\r\n context.fillRect(x, 0, cell - 1, height)\r\n }\r\n for (let y = 0; y < height; y += cell) {\r\n const deltaY = y + cell * 0.5 - height * 0.5\r\n const radial = Math.hypot(delta / 38, deltaY / 11)\r\n const halo = Math.exp(-radial * 0.96) * 1.08\r\n const verticalShape = 0.58 + 0.42 * Math.cos(deltaY / height * Math.PI)\r\n const grain = 0.72 + 0.28 * Math.sin(x * 0.73 + y * 1.31 + time * 6e-3)\r\n const alpha = Math.min(0.96, (columnEnergy * 0.88 + halo + crest * 0.19) * verticalShape * grain)\r\n if (alpha < 0.035) continue\r\n const hot = Math.max(0, 1 - radial / 2.4)\r\n const red = isDark ? Math.round(54 + 148 * hot + 42 * wave + 35 * crest) : Math.round(20 + 92 * hot + 18 * wave)\r\n const green = isDark ? Math.round(68 + 78 * hot + 46 * crest) : Math.round(78 + 80 * hot + 30 * crest)\r\n const blue = isDark ? Math.round(186 + 64 * hot) : Math.round(188 + 62 * hot)\r\n context.fillStyle = `rgba(${red}, ${green}, ${blue}, ${isDark ? alpha : alpha * 0.95})`\r\n context.fillRect(x, y, cell - 1, cell - 1)\r\n }\r\n }\r\n for (let i = 0; i < 14; i += 1) {\r\n const travel = (time * (state.dragging ? 0.16 : 0.065) * (0.78 + i % 5 * 0.09) + i * 23) % Math.max(30, origin + 64)\r\n const particleX = origin - travel\r\n if (particleX < -24 || particleX > width + 16) continue\r\n const particleY = 3 + (i * 13 + Math.sin(time * 3e-3 + i) * 5) % Math.max(7, height - 6)\r\n const length = 4 + i % 4 * 4 + (state.dragging ? 6 : 0)\r\n const alpha = 0.28 + i % 5 * 0.1\r\n const streak = context.createLinearGradient(particleX, 0, particleX + length, 0)\r\n streak.addColorStop(0, isDark ? 'rgba(72,118,255,0)' : 'rgba(24,94,184,0)')\r\n streak.addColorStop(0.68, isDark ? `rgba(112,135,255,${alpha})` : `rgba(36,108,202,${alpha * 0.72})`)\r\n streak.addColorStop(1, isDark ? `rgba(236,222,255,${Math.min(1, alpha + 0.26)})` : `rgba(103,175,248,${Math.min(0.82, alpha + 0.18)})`)\r\n context.fillStyle = streak\r\n context.fillRect(particleX, particleY, length, i % 3 === 0 ? 2 : 1)\r\n }\r\n const glow = context.createRadialGradient(origin, height / 2, 0, origin, height / 2, 24)\r\n glow.addColorStop(0, isDark ? 'rgba(255,255,255,.82)' : 'rgba(255,255,255,.86)')\r\n glow.addColorStop(0.14, isDark ? 'rgba(183,190,255,.54)' : 'rgba(162,210,255,.48)')\r\n glow.addColorStop(0.44, isDark ? 'rgba(103,74,255,.28)' : 'rgba(37,112,207,.22)')\r\n glow.addColorStop(1, isDark ? 'rgba(86,31,210,0)' : 'rgba(25,91,181,0)')\r\n context.fillStyle = glow\r\n context.fillRect(origin - 26, 0, 52, height)\r\n context.restore()\r\n}\r\n\r\n/* ── inline styles (positioning only; looks live in the injected sheet) ─── */\r\n\r\nconst zoneStyle: CSSProperties = {\r\n position: 'relative',\r\n flex: '1 1 auto',\r\n minWidth: '100px',\r\n height: `${ZONE_H}px`,\r\n // Contain the screen-blended canvas/flare layers: they must blend with the\r\n // track only, never with sibling model rows, and the zone must not lose the\r\n // stacking race against neighboring popup content.\r\n isolation: 'isolate',\r\n zIndex: 1,\r\n touchAction: 'none',\r\n userSelect: 'none',\r\n WebkitUserSelect: 'none',\r\n}\r\n\r\nconst zoneDisabledStyle: CSSProperties = { ...zoneStyle, opacity: 0.55, cursor: 'default' }\r\nconst zoneActiveStyle: CSSProperties = { ...zoneStyle, cursor: 'pointer' }\r\n\r\nconst girlStyle: CSSProperties = {\r\n position: 'absolute',\r\n width: `${GIRL_W}px`,\r\n height: `${GIRL_H}px`,\r\n backgroundImage: `url(${WHALE_RUN_STRIP_SRC})`,\r\n backgroundSize: `${STRIP_CSS_W}px ${STRIP_CSS_H}px`,\r\n backgroundRepeat: 'no-repeat',\r\n transform: 'translateX(-50%)',\r\n pointerEvents: 'none',\r\n}\r\n\r\nconst knobStyle: CSSProperties = {\r\n position: 'absolute',\r\n width: `${KNOB}px`,\r\n height: `${KNOB}px`,\r\n transform: 'translateX(-50%)',\r\n pointerEvents: 'none',\r\n boxSizing: 'border-box',\r\n}\r\n\r\nconst labelStyle: CSSProperties = {\r\n position: 'absolute',\r\n bottom: '0',\r\n height: `${LABEL_H}px`,\r\n lineHeight: `${LABEL_H}px`,\r\n fontSize: '10px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n whiteSpace: 'nowrap',\r\n transform: 'translateX(-50%)',\r\n pointerEvents: 'none',\r\n}\r\n\r\nconst labelActiveStyle: CSSProperties = {\r\n ...labelStyle,\r\n color: 'var(--dsw-alias-state-business-primary)',\r\n fontWeight: 600,\r\n}\r\n\r\n/**\r\n * The effort slider for one model line. Renders `null` for an empty stop list —\r\n * a thrown render would abdicate the whole model-seat entry.\r\n */\r\nexport function EffortSlider({ stops, value, mascot, disabled, onCommit, t }: EffortSliderProps): JSX.Element | null {\r\n const [dragPos, setDragPos] = useState<number | null>(null)\r\n // Mirror for the pointer handlers: React state can lag one native event, which\r\n // would make a fast down→move→up gesture drop frames (or the release no-op).\r\n const dragRef = useRef<number | null>(null)\r\n const [keyIndex, setKeyIndex] = useState<number | null>(null)\r\n const canvasRef = useRef<HTMLCanvasElement | null>(null)\r\n // Live FX state for the canvas loop, immune to stale handler closures.\r\n const fractionRef = useRef(0)\r\n const draggingRef = useRef(false)\r\n const padRef = useRef(mascot ? PAD_MASCOT : PAD_KNOB)\r\n // Set by the canvas effect; one static frame per render under reduced motion.\r\n const redrawRef = useRef<(() => void) | null>(null)\r\n\r\n useEffect(() => {\r\n redrawRef.current?.()\r\n })\r\n\r\n /**\r\n * The canvas FX loop: dpr-aware resize, theme-following redraws, one rAF\r\n * frame per tick — or static single frames when the user prefers reduced\r\n * motion. Everything dies with the effect (the editor row unmount). Mounted\r\n * before the empty-stops early return: hooks must run unconditionally (with\r\n * no stops the canvas never renders and the effect no-ops).\r\n */\r\n useEffect(() => {\r\n const canvas = canvasRef.current\r\n if (canvas === null) return\r\n const context = canvas.getContext('2d')\r\n if (context === null) return\r\n const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)')\r\n let width = 1\r\n let height = 1\r\n let frame = 0\r\n const resize = (): void => {\r\n const bounds = canvas.getBoundingClientRect()\r\n const ratio = Math.min(window.devicePixelRatio || 1, 2)\r\n width = Math.max(1, bounds.width)\r\n height = Math.max(1, bounds.height)\r\n canvas.width = Math.max(1, Math.round(width * ratio))\r\n canvas.height = Math.max(1, Math.round(height * ratio))\r\n context.setTransform(ratio, 0, 0, ratio, 0, 0)\r\n }\r\n const draw = (time = performance.now()): void => {\r\n // The canvas fills the padded track, so the thumb's fraction maps\r\n // directly onto the canvas width (no extra pad offset here).\r\n drawRadiation(context, width, height, time, {\r\n origin: fractionRef.current * width,\r\n dragging: draggingRef.current,\r\n })\r\n }\r\n const loop = (time: number): void => {\r\n draw(time)\r\n frame = window.requestAnimationFrame(loop)\r\n }\r\n const redraw = (): void => {\r\n if (reducedMotion.matches) draw()\r\n }\r\n const resizeObserver = new ResizeObserver(() => {\r\n resize()\r\n draw()\r\n })\r\n const themeObserver = new MutationObserver(() => draw())\r\n resizeObserver.observe(canvas)\r\n themeObserver.observe(document.body, { attributes: true, attributeFilter: ['data-ds-dark-theme'] })\r\n redrawRef.current = redraw\r\n resize()\r\n draw()\r\n if (!reducedMotion.matches) frame = window.requestAnimationFrame(loop)\r\n return () => {\r\n window.cancelAnimationFrame(frame)\r\n resizeObserver.disconnect()\r\n themeObserver.disconnect()\r\n redrawRef.current = null\r\n }\r\n }, [])\r\n\r\n if (stops.length === 0) return null\r\n ensureEffectStyle()\r\n\r\n const pad = mascot ? PAD_MASCOT : PAD_KNOB\r\n padRef.current = pad\r\n const count = stops.length\r\n const indexOf = (fraction: number): number =>\r\n count <= 1 ? 0 : Math.min(count - 1, Math.max(0, Math.round(fraction * (count - 1))))\r\n const fractionOf = (index: number): number => (count <= 1 ? 0 : index / (count - 1))\r\n\r\n const committedIndex = nearestEffortStopIndex(stops, value)\r\n const shownFraction = dragPos ?? fractionOf(keyIndex ?? committedIndex)\r\n const shownIndex = indexOf(shownFraction)\r\n fractionRef.current = shownFraction\r\n draggingRef.current = dragPos !== null\r\n\r\n /** Pointer → 0..1 fraction within the padded rail of the zone's box. */\r\n const fractionFromEvent = (event: ReactPointerEvent<HTMLDivElement>): number => {\r\n const rect = event.currentTarget.getBoundingClientRect()\r\n if (rect.width <= 2 * pad) return 0\r\n return clamp01((event.clientX - rect.left - pad) / (rect.width - 2 * pad))\r\n }\r\n\r\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>): void => {\r\n if (disabled) return\r\n event.preventDefault()\r\n event.stopPropagation()\r\n event.currentTarget.setPointerCapture(event.pointerId)\r\n const fraction = fractionFromEvent(event)\r\n dragRef.current = fraction\r\n setDragPos(fraction)\r\n }\r\n\r\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>): void => {\r\n if (disabled || dragRef.current === null) return\r\n event.stopPropagation()\r\n const fraction = fractionFromEvent(event)\r\n dragRef.current = fraction\r\n setDragPos(fraction)\r\n }\r\n\r\n const settle = (event: ReactPointerEvent<HTMLDivElement>): void => {\r\n if (disabled || dragRef.current === null) return\r\n event.stopPropagation()\r\n const index = indexOf(dragRef.current)\r\n dragRef.current = null\r\n setDragPos(null)\r\n const id = stops[index]?.id\r\n if (id !== undefined && id !== value) onCommit(id)\r\n }\r\n\r\n const onKeyDown = (event: ReactKeyboardEvent<HTMLDivElement>): void => {\r\n if (disabled) return\r\n const current = keyIndex ?? committedIndex\r\n let next: number | undefined\r\n if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') next = Math.max(0, current - 1)\r\n else if (event.key === 'ArrowRight' || event.key === 'ArrowUp') next = Math.min(count - 1, current + 1)\r\n else if (event.key === 'Home') next = 0\r\n else if (event.key === 'End') next = count - 1\r\n else return\r\n event.preventDefault()\r\n event.stopPropagation()\r\n setKeyIndex(next)\r\n }\r\n\r\n const onKeyUp = (event: ReactKeyboardEvent<HTMLDivElement>): void => {\r\n if (disabled || keyIndex === null) return\r\n const moved = event.key === 'ArrowLeft' || event.key === 'ArrowRight'\r\n || event.key === 'ArrowUp' || event.key === 'ArrowDown'\r\n || event.key === 'Home' || event.key === 'End'\r\n event.stopPropagation()\r\n if (!moved) return\r\n const id = stops[keyIndex]?.id\r\n setKeyIndex(null)\r\n if (id !== undefined && id !== value) onCommit(id)\r\n }\r\n\r\n /**\r\n * Tick/label/thumb x position inside the padded rail (percent of the zone).\r\n */\r\n const at = (fraction: number): string =>\r\n `calc(${pad}px + ${fraction} * (100% - ${2 * pad}px))`\r\n\r\n const dragging = dragPos !== null\r\n\r\n return (\r\n <div\r\n role=\"slider\"\r\n className={ZONE_CLASS}\r\n tabIndex={disabled ? -1 : 0}\r\n aria-label={t('input.effort.title')}\r\n aria-valuemin={0}\r\n aria-valuemax={count - 1}\r\n aria-valuenow={shownIndex}\r\n aria-valuetext={stops[shownIndex]?.name ?? stops[committedIndex]?.id ?? ''}\r\n data-drag={dragging ? '1' : '0'}\r\n data-top={shownIndex === count - 1 ? '1' : '0'}\r\n style={disabled ? zoneDisabledStyle : zoneActiveStyle}\r\n onPointerDown={onPointerDown}\r\n onPointerMove={onPointerMove}\r\n onPointerUp={settle}\r\n onPointerCancel={settle}\r\n onKeyDown={onKeyDown}\r\n onKeyUp={onKeyUp}\r\n >\r\n <div\r\n className={TRACK_CLASS}\r\n style={{\r\n position: 'absolute',\r\n left: `${pad}px`,\r\n right: `${pad}px`,\r\n bottom: `${TRACK_B}px`,\r\n height: `${TRACK_H}px`,\r\n // Drives the light-theme progress fill (dark theme is canvas-carried).\r\n '--dsh-tl-progress': `${shownFraction * 100}%`,\r\n } as CSSProperties}\r\n >\r\n <div className={FILL_CLASS} />\r\n <canvas ref={canvasRef} className={CANVAS_CLASS} />\r\n {/* Flare lives INSIDE the track: the pill's overflow:hidden clips the\r\n glow to the pill (it used to bleed above/beside it). Left is the\r\n fraction of the padded rail = percent of the track width. */}\r\n <div\r\n className={FLARE_CLASS}\r\n style={{ left: `${shownFraction * 100}%`, top: '50%' }}\r\n />\r\n {/* Interior stops only: the rounded end caps swallow edge dots. */}\r\n {stops.slice(1, -1).map((stop, offset) => {\r\n const index = offset + 1\r\n return (\r\n <div\r\n key={stop.id}\r\n style={{\r\n position: 'absolute',\r\n bottom: `${TRACK_H / 2 - 3.5}px`,\r\n left: `${(index / Math.max(1, count - 1)) * 100}%`,\r\n width: '7px',\r\n height: '7px',\r\n borderRadius: '50%',\r\n background: '#fff',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n boxSizing: 'border-box',\r\n transform: 'translateX(-50%)',\r\n pointerEvents: 'none',\r\n zIndex: 2,\r\n opacity: index <= shownIndex ? 1 : 0.65,\r\n }}\r\n />\r\n )\r\n })}\r\n </div>\r\n {mascot\r\n ? (\r\n <div\r\n className={`${RUN_CLASS} ${GIRL_CLASS}`}\r\n style={{ ...girlStyle, left: at(shownFraction), bottom: `${GIRL_B}px` }}\r\n />\r\n )\r\n : (\r\n <div\r\n className={KNOB_CLASS}\r\n style={{ ...knobStyle, left: at(shownFraction), bottom: `${TRACK_B + TRACK_H / 2 - KNOB / 2}px` }}\r\n />\r\n )}\r\n {count <= 6 && stops.map((stop, index) => (\r\n <div\r\n key={stop.id}\r\n style={{\r\n ...(index === shownIndex ? labelActiveStyle : labelStyle),\r\n left: at(fractionOf(index)),\r\n }}\r\n >\r\n {stop.name}\r\n </div>\r\n ))}\r\n </div>\r\n )\r\n}\r\n\r\nexport default EffortSlider\r\n","/**\n * Pure context-window helpers for the dsh-thinking-levels plugin.\n *\n * The context-window limit of a custom gateway model is declared in the\n * llm-pi-ai model entry (`contextWindow`, a positive integer). The harness\n * consumes it through `resolveModelInfo(...).context.contextWindow` for\n * compaction thresholds, context-overflow detection and context-pressure\n * projections — a settings write takes effect on the next request without a\n * restart. This module centralizes the legal range, the common presets and\n * the display formatting shared by the config schema, the settings card and\n * the tests. Kept dependency-free (pure inputs -> output).\n */\n\n/** Smallest accepted context window (tokens), aligned with dsh-thinking-effort. */\nexport const CONTEXT_WINDOW_MIN = 2000\n/** Largest accepted context window (tokens), e.g. third-party DeepSeek 1M. */\nexport const CONTEXT_WINDOW_MAX = 1_000_000\n\n/** One selectable context-window preset. */\nexport interface ContextWindowPreset {\n /** Human-readable label shown on the card button and the model badge. */\n label: string\n /** The token count written to the llm-pi-ai model entry. */\n value: number\n}\n\n/** The multi-level context-window presets, in ascending order. */\nexport const CONTEXT_WINDOW_PRESETS: readonly ContextWindowPreset[] = [\n { label: '64K', value: 64_000 },\n { label: '128K', value: 131_072 },\n { label: '256K', value: 256_000 },\n { label: '400K', value: 400_000 },\n { label: '512K', value: 524_288 },\n { label: '1M', value: 1_000_000 },\n] as const\n\n/** Format a token count as a readable label (exact presets keep their label). */\nexport function formatContextWindow(value: number): string {\n const preset = CONTEXT_WINDOW_PRESETS.find(candidate => candidate.value === value)\n if (preset !== undefined) return preset.label\n if (value >= CONTEXT_WINDOW_MAX) return '1M'\n if (value >= 1024) return `${Math.round(value / 1024)}K`\n return String(value)\n}\n\n/** The result of validating a context-window value. */\nexport type ContextWindowValidation =\n | { ok: true; value: number }\n | { ok: false; reason: 'integer' | 'range' }\n\n/**\n * Validate a context-window candidate (number or numeric string). Accepts only\n * base-10 integers inside [CONTEXT_WINDOW_MIN, CONTEXT_WINDOW_MAX]; anything\n * else (float, 'abc', '1e3', out-of-range) is rejected with a reason.\n */\nexport function validateContextWindow(value: unknown): ContextWindowValidation {\n const raw = typeof value === 'string' ? value.trim() : value\n const asString = typeof raw === 'string' ? raw : String(raw)\n if (!/^\\d+$/.test(asString)) return { ok: false, reason: 'integer' }\n const numeric = Number(asString)\n if (!Number.isSafeInteger(numeric)) return { ok: false, reason: 'integer' }\n if (numeric < CONTEXT_WINDOW_MIN || numeric > CONTEXT_WINDOW_MAX) {\n return { ok: false, reason: 'range' }\n }\n return { ok: true, value: numeric }\n}\n","/**\r\n * Model-seat panel for the composer (`conversation.input.model`).\r\n *\r\n * Why this seat: the shipped `ModelSelect` renders no slots inside its popup,\r\n * so a plugin can never contribute *into* that panel — the working pattern\r\n * (proven by dsh-reasoning-effort) is to occupy the model seat itself: one\r\n * registered entry named after the seat with `priority: -1` replaces the\r\n * shipped trigger and popup outright. This component then renders its own\r\n * picker over the harness's shared model directory (`modelDirectories`\r\n * service), so model switching keeps working, and adds what the official\r\n * popup cannot offer: a context-window editor on every model line.\r\n *\r\n * Per-line context window (the \"max context window\" moved into each line):\r\n * each model row carries a compact chip showing the model's effective\r\n * `contextWindow`; clicking it opens an inline editor row (preset slider,\r\n * custom-integer input, Clear). Writes follow the same two-family discipline\r\n * the retired composer pill used (both consumed live by\r\n * `resolveModelInfo(...).context.contextWindow`, effective on the next\r\n * request without a restart):\r\n * - Custom gateways (`llm-pi-ai` providers): writes the model entry's\r\n * `contextWindow` under `providers[provider].models[i]`; a gateway model\r\n * missing from the config has no write target and renders the chip disabled.\r\n * - Official DeepSeek (`deepseek-official`, the `llm-deepseek` entry): writes\r\n * the catalog model's `contextWindow` when listed, otherwise caps via\r\n * `defaultContextWindow`.\r\n *\r\n * Per-line reasoning effort (the 改造 panel): the retired per-line `<select>`\r\n * became an effort chip that expands an inline segment slider\r\n * (`EffortSlider`) under the model line — stop count adapts to the model's\r\n * advertised efforts, `auto` sits leftmost, the thumb follows the pointer and\r\n * snaps on release. DeepSeek lines run the whale-girl runner strip as the\r\n * thumb (`isDeepSeekLine`); every other model gets the plain white knob. The\r\n * select's \"provider default\" reset survives as the ↺ button of the slider\r\n * row (submits the declared `defaultEffort`).\r\n *\r\n * Graceful degradation: when the harness provides no `modelDirectories`\r\n * service (older lines) the registration is skipped entirely and the shipped\r\n * model selector stays untouched.\r\n */\r\nimport { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react'\r\nimport type { CSSProperties, JSX } from 'react'\r\nimport type { SettingsScope } from './scope-face.ts'\r\nimport { ContextRing } from './context-ring.tsx'\r\nimport { EffortSlider } from './effort-slider.tsx'\r\nimport { orderEffortsForSlider } from '../thinking-level.ts'\r\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\r\n\r\n/** The official DeepSeek provider route owned by the llm-deepseek adapter. */\r\nconst DEEPSEEK_PROVIDER = 'deepseek-official'\r\n/** llm-deepseek's native default context capacity (DEFAULT_CONTEXT_WINDOW).\r\n * exported for the settings-card editor (4.4.0, takeoverUi off). */\r\nexport const DEEPSEEK_DEFAULT_WINDOW = 1_000_000\r\n/** Slider stop an unset window parks on: the thumb needs a position, the readout stays \"unset\". */\r\nconst UNSET_STOP_INDEX = CONTEXT_WINDOW_PRESETS.findIndex(preset => preset.value === 256_000)\r\n\r\n/**\r\n * Whether one model line gets the whale-girl runner thumb: the official\r\n * DeepSeek route plus any gateway model whose id or display name says\r\n * deepseek (custom \"DeepSeek\"-named providers). Every other line gets the\r\n * plain white knob.\r\n */\r\nconst isDeepSeekLine = (provider: string, modelId: string, name: string | undefined): boolean =>\r\n provider === DEEPSEEK_PROVIDER || /deepseek/i.test(modelId) || /deepseek/i.test(name ?? '')\r\n\r\n/** Snapshot shown when the session's directory face is unavailable. */\r\nconst UNAVAILABLE_STATE: ModelDirectoryState = {\r\n status: 'loading',\r\n groups: [],\r\n current: null,\r\n error: null,\r\n}\r\n\r\n/**\r\n * The absent-own-settings-scope snapshot: a module-level CONSTANT —\r\n * `useSyncExternalStore` demands a stable getSnapshot value, an inline\r\n * literal re-renders forever (the #185 pattern proven on the capability\r\n * card's transport face).\r\n */\r\nconst TL_ABSENT_SNAPSHOT = Object.freeze({\r\n status: 'unavailable' as const,\r\n value: undefined,\r\n revision: undefined,\r\n writable: false,\r\n base: undefined,\r\n user: undefined,\r\n mode: 'memory' as const,\r\n})\r\n\r\n/** One injected face: the shared model directory plus the two config forms. */\r\nexport interface ModelPanelInjected {\r\n /**\r\n * The session's shared model directory store, loader and selector.\r\n * Undefined when the resolver refused this session (odd session shape):\r\n * the panel renders its unavailable notice instead of crashing — a thrown\r\n * render abdicates the seat entry and the shipped selector comes back.\r\n */\r\n directory: ModelDirectoryFace | undefined\r\n /** The `llm-pi-ai` config form (custom gateway models). */\r\n piAiScope: SettingsScope<unknown>\r\n /** The `llm-deepseek` config form (official DeepSeek models). */\r\n deepseekScope: SettingsScope<unknown>\r\n /**\r\n * The plugin's OWN settings scope: the trigger chip reads the configured\r\n * `level` as the user-intent source (issue #5). Absent on hosts without the\r\n * settings channel — the chip then falls back to the directory value.\r\n */\r\n tlScope?: SettingsScope<unknown>\r\n /**\r\n * The effort the session's last committed request actually carried, folded\r\n * from our own `tlAutoSchedule` projection (issue #11). Undefined when the\r\n * projection channel is absent or the session has no committed request yet —\r\n * the chip then shows the plain intent label.\r\n *\r\n * Distinct from `directory.current.reasoningEffort`, which is the host's\r\n * `modelSelection.next` (user intent): with `auto` selected that value stays\r\n * `'auto'` forever, which is exactly why the chip used to show \"Auto\" while\r\n * requests went out as `high`.\r\n */\r\n lastEffectiveEffort?: string\r\n}\r\n\r\n/** Full props: the injected face + the session standard seat + locale copy. */\r\nexport interface ModelPanelProps extends ModelPanelInjected {\r\n /** The session id of the slot's owning conversation (standard seat). */\r\n sessionId: string\r\n /** Locale copy thunk. */\r\n t: (key: string) => string\r\n}\r\n\r\n/* ── shared inline styling (no CSS modules in the client bundle) ───────── */\r\n\r\nconst rootStyle: CSSProperties = { position: 'relative', display: 'inline-flex' }\r\n\r\nconst triggerStyle: CSSProperties = {\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n gap: '6px',\r\n height: '26px',\r\n padding: '0 10px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '8px',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n cursor: 'pointer',\r\n whiteSpace: 'nowrap',\r\n maxWidth: '220px',\r\n}\r\n\r\nconst triggerNameStyle: CSSProperties = {\r\n minWidth: 0,\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n}\r\n\r\nconst triggerEffortStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n maxWidth: '72px',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\nconst chevronStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n fontSize: '9px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\nconst popStyle: CSSProperties = {\r\n position: 'absolute',\r\n bottom: 'calc(100% + 8px)',\r\n left: '0',\r\n // Above host chrome (the composer tool rows render z-indexed FABs); capped\r\n // by the viewport so a narrow chat column can still reach every row.\r\n zIndex: 1300,\r\n width: 'min(320px, calc(100vw - 24px))',\r\n padding: '8px',\r\n background: 'var(--dsw-alias-bg-layer-3)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '10px',\r\n boxShadow: '0 8px 28px rgba(0,0,0,0.18)',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '4px',\r\n}\r\n\r\nconst backdropStyle: CSSProperties = { position: 'fixed', inset: 0, zIndex: 1299 }\r\n\r\nconst modelsStyle: CSSProperties = { maxHeight: '320px', overflowY: 'auto', display: 'flex', flexDirection: 'column', gap: '2px' }\r\n\r\nconst providerToggleStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '6px',\r\n width: '100%',\r\n padding: '6px 8px',\r\n border: 'none',\r\n borderRadius: '6px',\r\n background: 'transparent',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n font: 'inherit',\r\n fontSize: '12px',\r\n cursor: 'pointer',\r\n textAlign: 'left',\r\n}\r\n\r\nconst providerNameStyle: CSSProperties = { flex: '1 1 auto', fontWeight: 600 }\r\n\r\nconst providerMetaStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n fontSize: '11px',\r\n}\r\n\r\n/** The model-line row CONTAINER: highlight surface + flex parent of pick/select/chip.\r\n* Wraps so the inline window editor (a flex item too) takes its own full line. */\r\nconst modelRowStyle: CSSProperties = {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n alignItems: 'center',\r\n gap: '6px',\r\n width: '100%',\r\n borderRadius: '6px',\r\n}\r\n\r\nconst modelRowActiveStyle: CSSProperties = {\r\n ...modelRowStyle,\r\n background: 'var(--dsw-alias-state-business-primary-weak, var(--dsw-alias-interactive-bg-hover, transparent))',\r\n}\r\n\r\n/** The pick button inside the row: name/description/✓, keeps the row's old padding. */\r\nconst modelPickStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n minWidth: 0,\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '6px',\r\n padding: '6px 4px 6px 18px',\r\n border: 'none',\r\n background: 'transparent',\r\n color: 'var(--dsw-alias-label-primary)',\r\n font: 'inherit',\r\n fontSize: '12px',\r\n cursor: 'pointer',\r\n textAlign: 'left',\r\n}\r\n\r\nconst modelCopyStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n minWidth: 0,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '1px',\r\n}\r\n\r\nconst modelNameStyle: CSSProperties = { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }\r\n\r\nconst checkStyle: CSSProperties = { flex: '0 0 auto', color: 'var(--dsw-alias-state-business-primary)' }\r\n\r\nconst chipStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n height: '18px',\r\n padding: '0 6px',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '5px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontVariantNumeric: 'tabular-nums',\r\n cursor: 'pointer',\r\n whiteSpace: 'nowrap',\r\n marginRight: '8px',\r\n}\r\n\r\nconst chipDisabledStyle: CSSProperties = { ...chipStyle, cursor: 'default', opacity: 0.55 }\r\n\r\n/** The per-line effort chip (ex-select): shows the line's effective level name. */\r\nconst effortChipStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n height: '18px',\r\n maxWidth: '96px',\r\n padding: '0 6px',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '5px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n cursor: 'pointer',\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n userSelect: 'none',\r\n}\r\n\r\nconst editorRowStyle: CSSProperties = {\r\n flex: '1 1 100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '6px',\r\n margin: '2px 8px 6px 18px',\r\n padding: '6px',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '6px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n fontSize: '12px',\r\n // Stack above the neighboring model rows: the slider's girl/flare layers\r\n // must not lose the paint order against the row containers below it.\r\n position: 'relative',\r\n zIndex: 2,\r\n}\r\n\r\nconst labelStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n whiteSpace: 'nowrap',\r\n}\r\n\r\nconst sliderStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n minWidth: '48px',\r\n maxWidth: '170px',\r\n height: '14px',\r\n margin: '0',\r\n padding: '0',\r\n accentColor: 'var(--dsw-alias-state-business-primary)',\r\n cursor: 'pointer',\r\n}\r\n\r\nconst valueStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n minWidth: '24px',\r\n textAlign: 'right',\r\n color: 'var(--dsw-alias-label-primary)',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontVariantNumeric: 'tabular-nums',\r\n}\r\n\r\nconst actionButtonStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n height: '18px',\r\n padding: '0 6px',\r\n border: '1px solid transparent',\r\n borderRadius: '4px',\r\n background: 'transparent',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n font: 'inherit',\r\n cursor: 'pointer',\r\n}\r\n\r\nconst inputStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n padding: '2px 6px',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '5px',\r\n background: 'var(--dsw-alias-bg-layer-1)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n font: 'inherit',\r\n}\r\n\r\nconst errorStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n color: 'var(--dsw-alias-state-error-primary)',\r\n fontSize: '11px',\r\n}\r\n\r\nconst statusStyle: CSSProperties = {\r\n padding: '10px 8px',\r\n fontSize: '12px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\nconst errorBannerStyle: CSSProperties = {\r\n padding: '6px 8px',\r\n borderRadius: '6px',\r\n background: 'var(--dsw-alias-interactive-bg-hover-danger)',\r\n color: 'var(--dsw-alias-state-error-primary)',\r\n fontSize: '11px',\r\n}\r\n\r\n/* ── helpers over the settings user layer ──────────────────────────────── */\r\n\r\n/** The user-layer `providers` value of the llm-pi-ai namespace, when present. */\r\nfunction providersOf(snapshot: unknown): Record<string, unknown> {\r\n if (typeof snapshot !== 'object' || snapshot === null) return {}\r\n // 0.1.7+ snapshots carry the user layer; ≤0.1.6 settingsScope snapshots\r\n // carry the merged section as `value` — read whichever the host provides.\r\n const user = (snapshot as { user?: unknown }).user\r\n ?? (snapshot as { value?: unknown }).value\r\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\r\n const providers = (user as Record<string, unknown>)['providers']\r\n return typeof providers === 'object' && providers !== null && !Array.isArray(providers)\r\n ? providers as Record<string, unknown>\r\n : {}\r\n}\r\n\r\n/** The user-layer `models`/`defaultContextWindow` of the llm-deepseek namespace. */\r\nexport function deepseekSectionOf(snapshot: unknown): {\r\n models?: Record<string, unknown>[]\r\n defaultContextWindow?: number\r\n} {\r\n if (typeof snapshot !== 'object' || snapshot === null) return {}\r\n const user = (snapshot as { user?: unknown }).user\r\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\r\n const section = user as { models?: unknown; defaultContextWindow?: unknown }\r\n const models = Array.isArray(section.models)\r\n ? section.models.filter((model): model is Record<string, unknown> =>\r\n typeof model === 'object' && model !== null && !Array.isArray(model))\r\n : undefined\r\n const defaultContextWindow = typeof section.defaultContextWindow === 'number'\r\n ? section.defaultContextWindow\r\n : undefined\r\n return {\r\n ...models === undefined ? {} : { models },\r\n ...defaultContextWindow === undefined ? {} : { defaultContextWindow },\r\n }\r\n}\r\n\r\n/** One model entry's declared contextWindow, when present. */\r\nexport function contextWindowOf(model: Record<string, unknown>): number | undefined {\r\n const value = model['contextWindow']\r\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : undefined\r\n}\r\n\r\n/** A provider's model entry in the llm-pi-ai user layer, when present. */\r\nfunction piModelEntry(\r\n providers: Record<string, unknown>,\r\n provider: string,\r\n model: string,\r\n): Record<string, unknown> | undefined {\r\n const profile = providers[provider] as { models?: unknown[] } | undefined\r\n const entry = profile !== undefined && Array.isArray(profile.models)\r\n ? profile.models.find((candidate): candidate is Record<string, unknown> =>\r\n typeof candidate === 'object' && candidate !== null && (candidate as Record<string, unknown>)['id'] === model)\r\n : undefined\r\n return entry\r\n}\r\n\r\n/** The slider stop nearest to a committed token count. */\r\nfunction stopIndexOf(value: number | undefined): number {\r\n if (value === undefined) return Math.max(0, UNSET_STOP_INDEX)\r\n let best = 0\r\n let bestDistance = Number.POSITIVE_INFINITY\r\n CONTEXT_WINDOW_PRESETS.forEach((preset, index) => {\r\n const distance = Math.abs(preset.value - value)\r\n if (distance < bestDistance) {\r\n bestDistance = distance\r\n best = index\r\n }\r\n })\r\n return best\r\n}\r\n\r\n/**\r\n * The model-seat panel: replaces the shipped model selector on this seat and\r\n * renders one picker whose every model line carries a context-window chip\r\n * (the \"max context window\" editor moved into each line).\r\n * @param props - injected directory + config forms, session seat, copy.\r\n */\r\nexport function ModelPanel({ directory, piAiScope, deepseekScope, tlScope, sessionId, lastEffectiveEffort, t }: ModelPanelProps): JSX.Element {\r\n const state = useSyncExternalStore(\r\n listener => directory?.store.subscribe(listener) ?? (() => {}),\r\n () => directory?.store.getSnapshot() ?? UNAVAILABLE_STATE,\r\n )\r\n const piSnapshot = useSyncExternalStore(\r\n listener => piAiScope.subscribe(listener),\r\n () => piAiScope.getSnapshot(),\r\n )\r\n const dsSnapshot = useSyncExternalStore(\r\n listener => deepseekScope.subscribe(listener),\r\n () => deepseekScope.getSnapshot(),\r\n )\r\n const tlSnapshot = useSyncExternalStore(\r\n listener => tlScope?.subscribe(listener) ?? (() => {}),\r\n () => (tlScope === undefined ? TL_ABSENT_SNAPSHOT : tlScope.getSnapshot()),\r\n )\r\n /** The configured default level: the chip's user-intent fallback (issue #5). */\r\n const configLevel = (tlSnapshot.status === 'ready'\r\n ? (tlSnapshot.value as { level?: string } | undefined)?.level\r\n : undefined) ?? 'auto'\r\n\r\n /**\r\n * The effort explicitly picked in THIS mount — the authoritative intent\r\n * until the session changes (issue #5). The directory's merged `current`\r\n * cannot tell a persisted `auto` pending from a scheduler-resolved wire\r\n * level apart; a local pick can, so it wins whenever it exists.\r\n */\r\n const selectedEffortRef = useRef<string | undefined>(undefined)\r\n\r\n const [open, setOpen] = useState(false)\r\n const [expanded, setExpanded] = useState<ReadonlySet<string>>(() => new Set())\r\n // One inline editor at a time: the context-window editor or the effort slider,\r\n // expanded under their own model line (the row wraps it onto its own line).\r\n const [editing, setEditing] = useState<{ provider: string; model: string; kind: 'context' | 'effort' } | null>(null)\r\n const [draft, setDraft] = useState<number | null>(null)\r\n const [custom, setCustom] = useState(false)\r\n const [raw, setRaw] = useState('')\r\n const [error, setError] = useState<string | null>(null)\r\n const [busy, setBusy] = useState(false)\r\n // Popup filter query (issue #3: the official popup's search must survive\r\n // the takeover; the threshold `> 4` mirrors the shipped selector's rule).\r\n const [query, setQuery] = useState('')\r\n const rootRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n if (!open) return\r\n directory?.load().catch(() => { /* surfaced on the shared store */ })\r\n }, [directory, open])\r\n\r\n // Intent is per-session: a new conversation starts with no local pick.\r\n useEffect(() => { selectedEffortRef.current = undefined }, [sessionId])\r\n\r\n const close = useCallback((): void => {\r\n setOpen(false)\r\n setEditing(null)\r\n setError(null)\r\n setQuery('')\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (!open) return\r\n const onOutside = (event: globalThis.MouseEvent): void => {\r\n const target = event.target\r\n if (target instanceof Node && rootRef.current?.contains(target)) return\r\n close()\r\n }\r\n document.addEventListener('mousedown', onOutside)\r\n return () => document.removeEventListener('mousedown', onOutside)\r\n }, [close, open])\r\n\r\n const writable = piSnapshot.status === 'ready' && piSnapshot.writable\r\n && dsSnapshot.status === 'ready' && dsSnapshot.writable\r\n\r\n const current = useMemo(() => {\r\n if (state.current === null) return undefined\r\n for (const group of state.groups) {\r\n if (group.id !== state.current.provider) continue\r\n const model = group.models.find(candidate => candidate.id === state.current?.model)\r\n if (model !== undefined) return { model, name: model.name, provider: group.id }\r\n }\r\n return undefined\r\n }, [state])\r\n\r\n const providers = useMemo(() => providersOf(piSnapshot), [piSnapshot])\r\n const dsSection = useMemo(() => deepseekSectionOf(dsSnapshot), [dsSnapshot])\r\n\r\n // Popup filtering (issue #3): the takeover popup must offer what the\r\n // shipped popup offers — a search row once the catalog outgrows quick\r\n // scanning (`> 4`, the shipped rule), matching name/id case-insensitively\r\n // and keeping the provider grouping. An empty needle rides the full list.\r\n const needle = query.trim().toLowerCase()\r\n const totalModels = useMemo(\r\n () => state.groups.reduce((count, group) => count + group.models.length, 0),\r\n [state.groups],\r\n )\r\n const showSearch = totalModels > 4\r\n const visibleGroups = useMemo(() => (needle === ''\r\n ? state.groups\r\n : state.groups\r\n .map(group => ({\r\n ...group,\r\n models: group.models.filter(model =>\r\n model.name.toLowerCase().includes(needle) || model.id.toLowerCase().includes(needle)),\r\n }))\r\n .filter(group => group.models.length > 0)), [state.groups, needle])\r\n\r\n /** The effective window of one model line, resolved against its family.\r\n * Declared BEFORE activeWindow: the ring's window-fallback memo calls this\r\n * in its factory, and a const arrow below the first caller would be a\r\n * temporal-dead-zone ReferenceError on every mount with a selected model\r\n * (the seat then abdicates and the shipped selector takes over). */\r\n const windowOf = (provider: string, model: string): number | undefined => {\r\n if (provider === DEEPSEEK_PROVIDER) {\r\n const models = dsSection.models ?? []\r\n const index = models.findIndex(entry => entry['id'] === model)\r\n return index >= 0 ? contextWindowOf(models[index]) : dsSection.defaultContextWindow\r\n }\r\n const entry = piModelEntry(providers, provider, model)\r\n return entry === undefined ? undefined : contextWindowOf(entry)\r\n }\r\n\r\n /** The active model's declared capacity — the ring's window fallback. */\r\n const activeWindow = useMemo(() => {\r\n if (current === undefined) return undefined\r\n return windowOf(current.provider, current.model.id ?? current.model.name ?? '')\r\n }, [current, providers, dsSection]) as number | undefined\r\n\r\n /** Whether one model line has a config write target. */\r\n const writableLine = (provider: string, model: string): boolean => {\r\n if (!writable) return false\r\n if (provider === DEEPSEEK_PROVIDER) return true\r\n return piModelEntry(providers, provider, model) !== undefined\r\n }\r\n\r\n /** Commit (or delete) one model line's context window. */\r\n const commitWindow = (provider: string, model: string, value: number | undefined): void => {\r\n setBusy(true)\r\n const done = (): void => { setBusy(false); setDraft(null) }\r\n if (provider === DEEPSEEK_PROVIDER) {\r\n const models = (deepseekSectionOf(dsSnapshot).models ?? []).map(entry => ({ ...entry }))\r\n const index = models.findIndex(entry => entry['id'] === model)\r\n const commit = index >= 0\r\n ? deepseekScope.set('models', models.map((entry, at) => {\r\n if (at !== index) return entry\r\n if (value === undefined) {\r\n const rest = { ...entry }\r\n delete rest['contextWindow']\r\n return rest\r\n }\r\n return { ...entry, contextWindow: value }\r\n }))\r\n : deepseekScope.set('defaultContextWindow', value === undefined ? DEEPSEEK_DEFAULT_WINDOW : value)\r\n commit.then(done, done)\r\n return\r\n }\r\n const next = structuredClone(providers)\r\n const entry = piModelEntry(next, provider, model)\r\n if (entry === undefined) {\r\n setBusy(false)\r\n setDraft(null)\r\n return\r\n }\r\n if (value === undefined) delete entry['contextWindow']\r\n else entry['contextWindow'] = value\r\n piAiScope.set('providers', next).then(done, done)\r\n }\r\n\r\n /** Validate and commit the custom input; empty clears. */\r\n const applyCustom = (): void => {\r\n if (editing === null) return\r\n const trimmed = raw.trim()\r\n if (trimmed === '') {\r\n setError(null)\r\n commitWindow(editing.provider, editing.model, undefined)\r\n return\r\n }\r\n const validation = validateContextWindow(trimmed)\r\n if (!validation.ok) {\r\n setError(t(validation.reason === 'integer' ? 'input.context.integer' : 'input.context.range'))\r\n return\r\n }\r\n setError(null)\r\n commitWindow(editing.provider, editing.model, validation.value)\r\n }\r\n\r\n const openEditor = (provider: string, model: string): void => {\r\n setEditing({ provider, model, kind: 'context' })\r\n setDraft(null)\r\n setCustom(false)\r\n setRaw('')\r\n setError(null)\r\n }\r\n\r\n /** Toggle one line's inline effort slider (the ex-select). */\r\n const toggleEffortEditor = (provider: string, model: string): void => {\r\n setEditing(previous =>\r\n previous !== null && previous.provider === provider && previous.model === model && previous.kind === 'effort'\r\n ? null\r\n : { provider, model, kind: 'effort' })\r\n }\r\n\r\n const toggleProvider = (provider: string): void => {\r\n setExpanded(previous => {\r\n const next = new Set(previous)\r\n if (next.has(provider)) next.delete(provider)\r\n else next.add(provider)\r\n return next\r\n })\r\n }\r\n\r\n const chooseModel = (provider: string, model: string): void => {\r\n if (busy || directory === undefined) return\r\n setBusy(true)\r\n directory.select({ provider, model })\r\n .then(() => { setBusy(false); close() })\r\n .catch(() => { setBusy(false) })\r\n }\r\n\r\n /** Commit one model line's reasoning effort; empty string = provider default (omit the field). */\r\n const chooseEffort = (provider: string, model: string, effort: string): void => {\r\n if (busy || directory === undefined) return\r\n setBusy(true)\r\n selectedEffortRef.current = effort === '' ? undefined : effort\r\n directory.select({ provider, model, ...(effort === '' ? {} : { reasoningEffort: effort }) })\r\n .then(() => { setBusy(false) })\r\n .catch(() => { setBusy(false) })\r\n }\r\n\r\n const triggerLabel = current?.name ?? state.current?.model ?? t('model.panel.choose')\r\n\r\n const currentReasoning = current?.model.reasoning\r\n // Issue #5: the chip shows the USER intent, never the masked wire level the\r\n // scheduler last sent alone. Chain: this mount's explicit pick > a merged\r\n // value that IS `auto` (a persisted pending auto survives while it differs\r\n // from the resolved level) > the configured default when the model\r\n // advertises the mask > the directory's merged value. When the intent is\r\n // the mask, the step's resolved level rides along as a secondary hint.\r\n const resolvedEffort = state.current?.reasoningEffort\r\n /**\r\n * Issue #11: what the last request ACTUALLY carried.\r\n *\r\n * `resolvedEffort` above is the host's `modelSelection.next` — the user's\r\n * intent — so with `auto` picked it stays `'auto'` and the `→ level` hint\r\n * could never appear. The projection's `lastEffective` is the committed\r\n * header's resolved level. Fall back to `resolvedEffort` for hosts without the\r\n * projection so a non-auto pick keeps its previous hint behaviour.\r\n */\r\n const actualEffort = lastEffectiveEffort ?? resolvedEffort\r\n const autoAdvertised = currentReasoning?.efforts.some(effort => effort.id === 'auto') === true\r\n const intentEffort = selectedEffortRef.current\r\n ?? (resolvedEffort === 'auto' || (autoAdvertised && configLevel === 'auto')\r\n ? 'auto'\r\n : resolvedEffort ?? currentReasoning?.defaultEffort)\r\n const effortName = (id: string): string =>\r\n currentReasoning?.efforts.find(level => level.id === id)?.name ?? id\r\n const effortLabel = currentReasoning === undefined\r\n ? undefined\r\n : intentEffort === undefined\r\n ? t('input.effort.default')\r\n : effortName(intentEffort)\r\n const resolvedHint = currentReasoning !== undefined\r\n && intentEffort === 'auto'\r\n && actualEffort !== undefined\r\n && actualEffort !== 'auto'\r\n ? `→ ${effortName(actualEffort)}`\r\n : undefined\r\n\r\n return (\r\n <div ref={rootRef} style={rootStyle}>\r\n <button\r\n type=\"button\"\r\n style={triggerStyle}\r\n aria-expanded={open}\r\n aria-haspopup=\"dialog\"\r\n aria-label={t('model.panel.choose')}\r\n title={state.current === null ? triggerLabel : `${state.current.provider}/${triggerLabel}`}\r\n onClick={() => { if (open) close(); else { setOpen(true); setError(null) } }}\r\n >\r\n <span style={triggerNameStyle}>{triggerLabel}</span>\r\n {effortLabel !== undefined && <span style={triggerEffortStyle}>{effortLabel}</span>}\r\n {resolvedHint !== undefined && <span style={triggerEffortStyle}>{resolvedHint}</span>}\r\n <span style={chevronStyle}>{open ? '▲' : '▼'}</span>\r\n </button>\r\n {/* The context-capacity check ring: user-placed to the RIGHT of the\r\n model selector. Lives inside the seat this panel owns, so the\r\n position is exact; on hosts without the projection seat it renders\r\n nothing. */}\r\n {/* The context-capacity check ring: user-placed to the RIGHT of the\r\n model selector. Lives inside the seat this panel owns, so the\r\n position is exact. Capacity falls back to the ACTIVE model's\r\n declared window when the pressure projection carries none. */}\r\n <ContextRing contextWindowFallback={activeWindow} t={t} />\r\n {open\r\n ? (\r\n <>\r\n <div style={backdropStyle} onClick={close} />\r\n <div style={popStyle} role=\"dialog\" aria-label={t('model.panel.choose')}>\r\n {showSearch && (\r\n <input\r\n type=\"text\"\r\n value={query}\r\n placeholder={t('panel.search.placeholder')}\r\n aria-label={t('panel.search.placeholder')}\r\n style={{ ...inputStyle, width: '100%', boxSizing: 'border-box', margin: '2px 0 6px' }}\r\n onChange={event => setQuery(event.currentTarget.value)}\r\n />\r\n )}\r\n <div style={modelsStyle}>\r\n {directory === undefined && (\r\n <div style={statusStyle}>{t('model.panel.unavailable')}</div>\r\n )}\r\n {directory !== undefined && state.status === 'loading' && state.groups.length === 0 && (\r\n <div style={statusStyle}>{t('model.panel.loading')}</div>\r\n )}\r\n {directory !== undefined && visibleGroups.map(group => {\r\n const isExpanded = needle !== '' || expanded.has(group.id)\r\n const name = group.name ?? group.label ?? group.id\r\n const activeModel = state.current?.provider === group.id ? state.current.model : undefined\r\n return (\r\n <section key={group.id}>\r\n <button\r\n type=\"button\"\r\n style={providerToggleStyle}\r\n aria-expanded={isExpanded}\r\n onClick={() => toggleProvider(group.id)}\r\n >\r\n <span style={providerNameStyle}>{name}</span>\r\n <span style={providerMetaStyle}>{group.models.length}</span>\r\n <span style={chevronStyle}>{isExpanded ? '▼' : '▶'}</span>\r\n </button>\r\n {isExpanded && group.models.map(model => {\r\n const active = activeModel === model.id\r\n const lineWritable = writableLine(group.id, model.id)\r\n const lineWindow = windowOf(group.id, model.id)\r\n const isContextEditing = editing !== null\r\n && editing.provider === group.id\r\n && editing.model === model.id\r\n && editing.kind === 'context'\r\n const isEffortEditing = editing !== null\r\n && editing.provider === group.id\r\n && editing.model === model.id\r\n && editing.kind === 'effort'\r\n const lineEffort = active\r\n ? state.current?.reasoningEffort ?? model.reasoning?.defaultEffort\r\n : model.reasoning?.defaultEffort\r\n // Slider stops adapt to the model's advertised efforts;\r\n // `auto` (when the directory masks it in) sits leftmost.\r\n const lineStops = model.reasoning === undefined\r\n ? []\r\n : orderEffortsForSlider(model.reasoning.efforts)\r\n const lineEffortName = lineEffort === undefined\r\n ? t('input.effort.default')\r\n : lineStops.find(stop => stop.id === lineEffort)?.name ?? lineEffort\r\n return (\r\n <div key={group.id + ':' + model.id} style={active ? modelRowActiveStyle : modelRowStyle}>\r\n <button\r\n type=\"button\"\r\n role=\"option\"\r\n aria-selected={active}\r\n style={modelPickStyle}\r\n disabled={busy}\r\n onClick={() => chooseModel(group.id, model.id)}\r\n >\r\n <span style={modelCopyStyle}>\r\n <span style={modelNameStyle}>{model.name}</span>\r\n </span>\r\n {active && <span style={checkStyle} aria-hidden=\"true\">✓</span>}\r\n </button>\r\n {(model.reasoning?.efforts.length ?? 0) > 0 && (\r\n <span\r\n role=\"button\"\r\n tabIndex={0}\r\n aria-label={t('input.effort.title')}\r\n title={t('input.effort.title')}\r\n aria-expanded={isEffortEditing}\r\n style={effortChipStyle}\r\n onClick={event => {\r\n event.stopPropagation()\r\n if (!busy) toggleEffortEditor(group.id, model.id)\r\n }}\r\n onKeyDown={event => {\r\n if (event.key !== 'Enter' && event.key !== ' ') return\r\n event.preventDefault()\r\n event.stopPropagation()\r\n if (!busy) toggleEffortEditor(group.id, model.id)\r\n }}\r\n >\r\n {lineEffortName}\r\n </span>\r\n )}\r\n {isEffortEditing && model.reasoning !== undefined && (\r\n <div style={editorRowStyle} onClick={event => event.stopPropagation()}>\r\n <span style={labelStyle}>{t('input.effort.title')}</span>\r\n <EffortSlider\r\n stops={lineStops}\r\n value={lineEffort}\r\n mascot={isDeepSeekLine(group.id, model.id, model.name)}\r\n disabled={busy}\r\n onCommit={id => chooseEffort(group.id, model.id, id)}\r\n t={t}\r\n />\r\n {model.reasoning.defaultEffort !== undefined && (\r\n <button\r\n type=\"button\"\r\n disabled={busy}\r\n aria-label={t('input.effort.reset')}\r\n title={t('input.effort.reset')}\r\n style={actionButtonStyle}\r\n onClick={event => {\r\n event.stopPropagation()\r\n const target = model.reasoning?.defaultEffort\r\n if (target !== undefined) chooseEffort(group.id, model.id, target)\r\n }}\r\n >\r\n ↺\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n <span\r\n role=\"button\"\r\n tabIndex={0}\r\n aria-label={t('input.context.title')}\r\n title={lineWritable\r\n ? t('input.context.globalHint')\r\n : t('model.panel.noTarget')}\r\n style={lineWritable && !busy ? chipStyle : chipDisabledStyle}\r\n onClick={event => {\r\n event.stopPropagation()\r\n if (!lineWritable || busy) return\r\n if (isContextEditing) { setEditing(null); return }\r\n openEditor(group.id, model.id)\r\n }}\r\n onKeyDown={event => {\r\n if (event.key !== 'Enter' && event.key !== ' ') return\r\n event.preventDefault()\r\n event.stopPropagation()\r\n if (!lineWritable || busy) return\r\n openEditor(group.id, model.id)\r\n }}\r\n >\r\n {lineWindow === undefined\r\n ? t('input.context.unset')\r\n : formatContextWindow(lineWindow)}\r\n </span>\r\n {isContextEditing && (\r\n <div style={editorRowStyle}>\r\n <span style={labelStyle} title={t('input.context.globalHint')}>\r\n {t('model.panel.window')}\r\n </span>\r\n <input\r\n type=\"range\"\r\n min={0}\r\n max={CONTEXT_WINDOW_PRESETS.length - 1}\r\n step={1}\r\n value={draft ?? stopIndexOf(lineWindow)}\r\n disabled={busy}\r\n aria-label={t('input.context.title')}\r\n style={sliderStyle}\r\n onChange={event => { setDraft(Number(event.currentTarget.value)) }}\r\n onPointerUp={() => {\r\n if (draft === null) return\r\n commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value)\r\n }}\r\n onKeyUp={() => {\r\n if (draft === null) return\r\n commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value)\r\n }}\r\n />\r\n <span style={valueStyle}>\r\n {draft === null\r\n ? lineWindow === undefined ? t('input.context.unset') : formatContextWindow(lineWindow)\r\n : formatContextWindow(CONTEXT_WINDOW_PRESETS[draft]?.value ?? 0)}\r\n </span>\r\n {custom\r\n ? (\r\n <>\r\n <input\r\n type=\"text\"\r\n inputMode=\"numeric\"\r\n value={raw}\r\n disabled={busy}\r\n placeholder={t('input.context.customPlaceholder')}\r\n aria-label={t('input.context.customPlaceholder')}\r\n style={inputStyle}\r\n onChange={event => { setRaw(event.currentTarget.value) }}\r\n onKeyDown={event => { if (event.key === 'Enter') applyCustom() }}\r\n />\r\n <button\r\n type=\"button\"\r\n disabled={busy}\r\n style={actionButtonStyle}\r\n onClick={applyCustom}\r\n >\r\n {t('input.context.apply')}\r\n </button>\r\n </>\r\n )\r\n : (\r\n <>\r\n <button\r\n type=\"button\"\r\n disabled={busy}\r\n aria-label={t('input.context.custom')}\r\n title={t('input.context.custom')}\r\n style={actionButtonStyle}\r\n onClick={() => { setCustom(true); setError(null) }}\r\n >\r\n ⋯\r\n </button>\r\n <button\r\n type=\"button\"\r\n disabled={busy || lineWindow === undefined}\r\n style={{\r\n ...actionButtonStyle,\r\n opacity: lineWindow === undefined ? 0.55 : 1,\r\n }}\r\n onClick={() => {\r\n setDraft(null)\r\n setError(null)\r\n commitWindow(group.id, model.id, undefined)\r\n }}\r\n >\r\n {t('input.context.clear')}\r\n </button>\r\n </>\r\n )}\r\n {error !== null && <span style={errorStyle}>{error}</span>}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n })}\r\n </section>\r\n )\r\n })}\r\n {directory !== undefined && state.status !== 'loading' && state.groups.length === 0 && (\r\n <div style={statusStyle}>{t('model.panel.empty')}</div>\r\n )}\r\n {directory !== undefined && needle !== '' && visibleGroups.length === 0 && state.groups.length > 0 && (\r\n <div style={statusStyle}>{t('model.panel.empty')}</div>\r\n )}\r\n </div>\r\n {directory !== undefined && state.error !== null && <div style={errorBannerStyle} role=\"status\">{state.error}</div>}\r\n </div>\r\n </>\r\n )\r\n : null}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ModelPanel\r\n","/**\n * One helper shared by every client read of a HOST projection face.\n *\n * The host's `ProjectionValueStore` face is built as\n * `{ getSnapshot: () => rows.get(key)?.value, subscribe }` — i.e. `getSnapshot()`\n * returns the projection STATE ITSELF, bare:\n *\n * ```ts\n * binding.session.projections.faceOf('tlAutoSchedule').getSnapshot()\n * // => { samples, userEffort, lastEffective, trace }\n * ```\n *\n * (`packages/api/session-controller/src/client/sessions/projection-store.ts`,\n * `channel()`; every in-tree consumer casts the snapshot straight to its\n * projection type — `faceOf('permissions').getSnapshot() as PermissionSelection`,\n * `faceOf('goal').getSnapshot() as GoalProjection | null | undefined`, ….)\n *\n * The `{ status, value }` wrapper belongs to a DIFFERENT API — the settings\n * handles (`configForms` / `settingsScope`), which is why `card.tsx` /\n * `model-panel.tsx` unwrap `.value` there. Reading a projection face with that\n * assumption yields `undefined` on every real host: the effort tab then renders\n * its empty state (\"本会话还没有已提交的请求档位。\") while the projection holds a\n * perfectly good trace, and the chip loses `lastEffective` (the issue #11\n * symptom coming back). Verified live on 4.6.0 against a session whose\n * `tlAutoSchedule` row had `[{high,manual,1},{low,manual,1}]`.\n *\n * Both shapes are still accepted, because a patched/older host wrapper or a\n * test double must not turn a cosmetic read into a dead one. The bare state is\n * recognized POSITIVELY — our projection always carries at least one of the\n * four known keys — so a wrapper is never mistaken for state and vice versa.\n */\n\n/** The projection-state keys `tlAutoSchedule` always carries (any one identifies the bare value). */\nconst STATE_KEYS = ['trace', 'lastEffective', 'userEffort', 'samples'] as const\n\n/**\n * Unwrap one projection face's `getSnapshot()` result into the state record.\n *\n * @param snapshot - the face snapshot, as the host returns it.\n * @returns the projection state, or undefined for an absent/unrecognizable value.\n */\nexport function projectionValueOf(snapshot: unknown): Record<string, unknown> | undefined {\n if (typeof snapshot !== 'object' || snapshot === null) return undefined\n const record = snapshot as Record<string, unknown>\n for (const key of STATE_KEYS) {\n if (key in record) return record\n }\n // Wrapper shape (`{ value }`) — accepted for older hosts / test doubles.\n const inner = record['value']\n return typeof inner === 'object' && inner !== null ? (inner as Record<string, unknown>) : undefined\n}\n","/**\r\n * Effort-trace tab — the `conversation.view` face of dsh-thinking-levels,\r\n * following the conversation-view pattern dsh-perm-gate's history tab\r\n * demonstrates (runtime slot declared by the conversation UI package; the\r\n * typed SlotMap merge lives in `types/contracts.d.ts`).\r\n *\r\n * A run-length timeline of the effort levels this session's requests ACTUALLY\r\n * went out with — the `tlAutoSchedule` projection's `trace` (stateVersion 4),\r\n * the same durable fold the composer chip's `lastEffective` reads. Consecutive\r\n * requests with the same level AND intent collapse into one run, so even a\r\n * 95-step session reads as a handful of rows:\r\n *\r\n * ↑ auto max ×1 T4·S7 14:03:22\r\n * = auto high ×12 T3·S2 13:58:10\r\n * ↓ auto low ×3 T1·S1 13:44:31\r\n *\r\n * The ↑/↓/= glyph is the transition against the escalation rank of the\r\n * previous (older) run; the run text shows the intent (`auto`/`manual`,\r\n * neutral when the session never picked and the configured default applied)\r\n * plus the repetition count and the turn·step the run STARTED in.\r\n *\r\n * ## Which \"node\" a run belongs to\r\n *\r\n * A run's position stamp is the `turn/start` / `step/start` pair preceding its\r\n * first `request/header`. The plugin's decision itself happens EARLIER — at\r\n * `agent/pre-step`, before the host appends `step/start` (agent-loop\r\n * `agent.ts`: `preStep()` then `session.append('step/start')`) — so the stamp\r\n * names the step the level was chosen FOR, which is exactly the node the user\r\n * sees in the timeline.\r\n *\r\n * Data source: the session's projection face — NO HTTP feed. The projection is\r\n * a pure fold over the session log, so a cold read rebuilds historical\r\n * sessions for free. Everything is best-effort: a missing projection face, an\r\n * empty trace or a throwing face read renders the empty state — a thrown\r\n * render would abdicate the whole tab, which is never acceptable for a\r\n * cosmetic view.\r\n *\r\n * Presentation mirrors perm-gate's approval history on purpose (title +\r\n * subtitle header, a summary strip, then one card per run with a circled glyph\r\n * on a connected rail, a colored intent tag, meta chips and a right-aligned\r\n * clock): the two tabs sit next to each other in the same tab row and must not\r\n * look like two different products.\r\n */\r\nimport { useMemo, useSyncExternalStore } from 'react'\r\nimport type { CSSProperties, JSX } from 'react'\r\nimport { EFFORT_SLIDER_RANK } from '../thinking-level.ts'\r\nimport type { EffortRun } from '../auto-schedule-projection.ts'\r\nimport { projectionValueOf } from './projection-value.ts'\r\n\r\n/** Props the slot's `inject` option delivers (index.ts closes over the faces). */\r\nexport interface EffortTraceInjected {\r\n sessionId?: unknown\r\n /** The sessions face captured by the client assembly (same face the chip reads). */\r\n sessions?: SessionsFace | undefined\r\n}\r\n\r\n/** The tab's full props: injected faces + the locale seat with its fallback. */\r\nexport interface EffortTraceProps extends EffortTraceInjected {\r\n /** Host locale delivery (0.1.7+ `PropsLocale` seat). Absent on ≤0.1.6. */\r\n t?: ((key: string) => string) | undefined\r\n /** Injected eager binder fallback (`locale.bind(NS)`, index.ts). */\r\n tFallback?: ((key: string) => string) | undefined\r\n}\r\n\r\n/** One display row of the trace timeline (newest first). */\r\nexport interface TraceRow {\r\n run: EffortRun\r\n /** Transition from the previous (older) run, by escalation rank. */\r\n dir: 'up' | 'down' | 'flat' | 'start'\r\n}\r\n\r\n/** Transition glyph per direction (mirrors perm-gate's glyph table pattern). */\r\nconst GLYPH: Record<TraceRow['dir'], string> = { up: '↑', down: '↓', flat: '=', start: '•' }\r\n\r\n/**\r\n * Rail/glyph color per DIRECTION — a rise is green, a drop is red, flat/start\r\n * are muted/blue.\r\n *\r\n * These are LITERAL colors, not theme tokens, on purpose. A direction is a\r\n * fixed semantic (up = more thinking, down = less), so it must read the same on\r\n * every theme; the token defaults were also what made it look washed out — the\r\n * active theme's `--dsw-alias-state-success-primary` / `-warn-*` resolve to\r\n * muted tints meant for large surfaces, not for an 18px ring and a one-glyph\r\n * rail. `down` is red rather than amber for the same reason: amber next to a\r\n * green up-arrow reads as \"caution\", while a downgrade is simply the opposite\r\n * direction and should be the opposite color.\r\n */\r\nconst TONE: Record<TraceRow['dir'], { color: string; bg: string }> = {\r\n up: {\r\n color: '#18a058',\r\n bg: 'rgba(24,160,88,0.12)',\r\n },\r\n down: {\r\n color: '#d03050',\r\n bg: 'rgba(208,48,80,0.12)',\r\n },\r\n flat: {\r\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.9))',\r\n bg: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\r\n },\r\n start: {\r\n color: '#2b6cb0',\r\n bg: 'rgba(43,108,176,0.10)',\r\n },\r\n}\r\n\r\n/**\r\n * Tag tone per ATTRIBUTION — deliberately separate from the direction tone.\r\n *\r\n * `unknown` is amber, never grey: it is not a verdict about the level, it says\r\n * the log does not explain the change, and that deserves attention. Colouring\r\n * it like a decision would be the same lie as labelling it \"manual\".\r\n */\r\nconst INTENT_TONE: Record<EffortRun['intent'], { color: string; bg: string }> = {\r\n auto: {\r\n color: '#18a058',\r\n bg: 'rgba(24,160,88,0.12)',\r\n },\r\n manual: {\r\n color: '#2b6cb0',\r\n bg: 'rgba(43,108,176,0.10)',\r\n },\r\n default: {\r\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.9))',\r\n bg: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\r\n },\r\n unknown: {\r\n color: '#d48806',\r\n bg: 'rgba(212,136,6,0.14)',\r\n },\r\n scheduler: {\r\n // Proven plugin output: the strongest, most saturated green of the set —\r\n // this is the \"we know exactly who wrote it\" state and should look it.\r\n color: '#0e9f6e',\r\n bg: 'rgba(14,159,110,0.16)',\r\n },\r\n}\r\n\r\n/** Unknown ids rank after the standard table (same tail semantics as the slider). */\r\nconst rankOf = (level: string): number => EFFORT_SLIDER_RANK[level] ?? 100\r\n\r\n/** `HH:MM:SS` in the viewer's zone; empty for an absent stamp. */\r\nfunction clockOf(ms: number | undefined): string {\r\n if (typeof ms !== 'number' || !Number.isFinite(ms)) return ''\r\n const d = new Date(ms)\r\n const pad = (n: number): string => String(n).padStart(2, '0')\r\n return `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`\r\n}\r\n\r\n/** `T{turn}·S{step}` for a stamped run, empty when the run carries no position. */\r\nfunction positionOf(run: EffortRun): string {\r\n if (typeof run.turn !== 'number') return ''\r\n return typeof run.step === 'number' ? `T${run.turn}·S${run.step}` : `T${run.turn}`\r\n}\r\n\r\n/**\r\n * Build the display rows: newest run first, each carrying the transition\r\n * against its chronological predecessor. Pure — the component is a straight\r\n * map over this.\r\n * @param trace - the folded run-length trace, oldest run first.\r\n * @returns rows newest first; empty for an absent or empty trace.\r\n */\r\nexport function traceRows(trace: readonly EffortRun[] | undefined): TraceRow[] {\r\n if (trace === undefined || trace.length === 0) return []\r\n const rows: TraceRow[] = []\r\n for (let i = trace.length - 1; i >= 0; i -= 1) {\r\n const run = trace[i]!\r\n const prev = i > 0 ? trace[i - 1] : undefined\r\n if (prev === undefined) {\r\n rows.push({ run, dir: 'start' })\r\n continue\r\n }\r\n const from = rankOf(prev.level)\r\n const to = rankOf(run.level)\r\n rows.push({ run, dir: to > from ? 'up' : to < from ? 'down' : 'flat' })\r\n }\r\n return rows\r\n}\r\n\r\n/** The whole-session summary the header strip shows. */\r\nexport interface TraceSummary {\r\n /** Committed requests covered by the trace (sum of run counts). */\r\n requests: number\r\n /** How many distinct runs are kept. */\r\n runs: number\r\n /** Highest escalation rank the session ever reached, if any. */\r\n highest: string | undefined\r\n /** How many of those runs came from the `auto` sentinel (rather than a manual lock). */\r\n autoRuns: number\r\n /** How many runs the log cannot attribute (see {@link EffortRun.intent}). */\r\n unknownRuns: number\r\n /** Provider/model switches across the session's committed requests. */\r\n switches: number\r\n}\r\n\r\n/**\r\n * Summarize a trace for the header strip. Pure.\r\n * @param trace - the folded trace, oldest run first.\r\n * @param modelSwitches - route switches folded by the projection (0 when absent).\r\n * @returns the summary; zeroed for an absent trace.\r\n */\r\nexport function summarize(trace: readonly EffortRun[] | undefined, modelSwitches = 0): TraceSummary {\r\n if (trace === undefined || trace.length === 0) {\r\n return { requests: 0, runs: 0, highest: undefined, autoRuns: 0, unknownRuns: 0, switches: modelSwitches }\r\n }\r\n let requests = 0\r\n let highest: string | undefined\r\n let autoRuns = 0\r\n let unknownRuns = 0\r\n for (const run of trace) {\r\n requests += run.count\r\n if (run.intent === 'auto') autoRuns += 1\r\n if (run.intent === 'unknown') unknownRuns += 1\r\n if (highest === undefined || rankOf(run.level) > rankOf(highest)) highest = run.level\r\n }\r\n return { requests, runs: trace.length, highest, autoRuns, unknownRuns, switches: modelSwitches }\r\n}\r\n\r\n/**\r\n * Read the folded trace off the session's projection face — the exact read\r\n * path the composer chip's `lastEffective` uses. Returns `undefined` — never\r\n * throws — when the session id, the face or the field is absent (older hosts,\r\n * cold sessions, odd shapes).\r\n * @param sessions - the sessions face.\r\n * @param sessionId - the owning session.\r\n * @returns the folded run-length trace, or undefined.\r\n */\r\nexport function traceOf(\r\n sessions: SessionsFace | undefined,\r\n sessionId: string | undefined,\r\n): readonly EffortRun[] | undefined {\r\n try {\r\n if (typeof sessionId !== 'string' || sessionId.length === 0) return undefined\r\n const face = sessions?.binding(sessionId)?.session?.projections?.faceOf?.('tlAutoSchedule')\r\n const snapshot = typeof face?.getSnapshot === 'function' ? face.getSnapshot() : undefined\r\n // The face snapshot IS the state (no `{ value }` wrapper — see\r\n // projection-value.ts); reading `.value` here rendered the empty state\r\n // over a filled trace on every real host.\r\n const raw = projectionValueOf(snapshot)?.['trace']\r\n return Array.isArray(raw) ? raw as readonly EffortRun[] : undefined\r\n } catch {\r\n // A thrown cosmetic read must never escape: degrade to \"no data\".\r\n return undefined\r\n }\r\n}\r\n\r\n/** The whole projection slice this tab renders (trace + route bookkeeping). */\r\nexport interface TraceSlice {\r\n trace: readonly EffortRun[]\r\n /** Provider/model of the last committed request, for the summary strip. */\r\n lastProvider: string | null\r\n lastModel: string | null\r\n /** How many route switches the session shows. */\r\n modelSwitches: number\r\n}\r\n\r\n/**\r\n * Read the whole slice off the projection face. `undefined` — never a throw —\r\n * when the face or its trace is absent; a trace with no route bookkeeping still\r\n * renders (the older cached row simply has no switch count).\r\n *\r\n * ## Reference stability is mandatory here\r\n *\r\n * `useSyncExternalStore` requires `getSnapshot()` to return the SAME reference\r\n * until the underlying value changes. The projection face hands out the bare\r\n * state object and only swaps it on a real publish, so the slice is memoized on\r\n * that state identity: building a fresh `{ trace, … }` per call would make every\r\n * render look like a change and spin React into an infinite re-render.\r\n * @param sessions - the sessions face.\r\n * @param sessionId - the owning session.\r\n * @returns the slice, or undefined when there is nothing to render.\r\n */\r\nexport function traceSliceOf(\r\n sessions: SessionsFace | undefined,\r\n sessionId: string | undefined,\r\n): TraceSlice | undefined {\r\n try {\r\n if (typeof sessionId !== 'string' || sessionId.length === 0) return undefined\r\n const face = sessions?.binding(sessionId)?.session?.projections?.faceOf?.('tlAutoSchedule')\r\n const snapshot = typeof face?.getSnapshot === 'function' ? face.getSnapshot() : undefined\r\n const state = projectionValueOf(snapshot)\r\n if (state === undefined) return undefined\r\n const raw = state['trace']\r\n if (!Array.isArray(raw)) return undefined\r\n const cached = sliceCache.get(state)\r\n if (cached !== undefined) return cached\r\n const provider = state['lastProvider']\r\n const model = state['lastModel']\r\n const switches = state['modelSwitches']\r\n const slice: TraceSlice = {\r\n trace: raw as readonly EffortRun[],\r\n lastProvider: typeof provider === 'string' && provider.length > 0 ? provider : null,\r\n lastModel: typeof model === 'string' && model.length > 0 ? model : null,\r\n modelSwitches: typeof switches === 'number' && Number.isFinite(switches) ? switches : 0,\r\n }\r\n sliceCache.set(state, slice)\r\n return slice\r\n } catch {\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Memo for {@link traceSliceOf}: one slice per projection state identity. The\r\n * face is shared by every reader of this key (the chip and the tab), so the\r\n * memo lives at module level; entries die with the state objects themselves, so\r\n * it cannot grow without bound.\r\n */\r\nconst sliceCache = new WeakMap<object, TraceSlice>()\r\n\r\n/**\r\n * Subscribe to the trace over the projection face's store when it offers one;\r\n * a one-shot read otherwise (the conversation re-renders around every request\r\n * anyway, so the one-shot cadence still tracks). `useSyncExternalStore` needs\r\n * a cached snapshot — the projection registry gates republishes on\r\n * `Object.is`, so the face's `value.trace` reference is stable between\r\n * publishes and the read wrapper stays honest.\r\n */\r\nfunction useTrace(sessions: SessionsFace | undefined, sessionId: unknown): TraceSlice | undefined {\r\n const id = typeof sessionId === 'string' && sessionId.length > 0 ? sessionId : undefined\r\n const face = useMemo(() => {\r\n try {\r\n return id === undefined ? undefined : sessions?.binding(id)?.session?.projections?.faceOf?.('tlAutoSchedule')\r\n } catch {\r\n return undefined\r\n }\r\n }, [sessions, id])\r\n const getSnapshot = useMemo(() => () => traceSliceOf(sessions, id), [sessions, id])\r\n const subscribe = useMemo(() => (listener: () => void): (() => void) => {\r\n try {\r\n return typeof face?.subscribe === 'function' ? face.subscribe(listener) : () => {}\r\n } catch {\r\n return () => {}\r\n }\r\n }, [face])\r\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot)\r\n}\r\n\r\n/* ── styles (perm-gate history parity) ─────────────────────────────────── */\r\n\r\nconst pageStyle: CSSProperties = {\r\n boxSizing: 'border-box',\r\n maxWidth: '720px',\r\n margin: '0 auto',\r\n padding: '8px 4px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '8px',\r\n font: 'inherit',\r\n overflowY: 'auto',\r\n}\r\n\r\nconst titleStyle: CSSProperties = {\r\n fontSize: '14px',\r\n fontWeight: 600,\r\n color: 'var(--dsw-alias-label-primary)',\r\n}\r\n\r\nconst subtitleStyle: CSSProperties = {\r\n marginTop: '2px',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n color: 'var(--dsw-alias-label-secondary, var(--dsw-alias-label-primary))',\r\n}\r\n\r\n/** The summary strip: the same rounded bar perm-gate's snapshot inventory uses. */\r\nconst barStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '10px',\r\n flexWrap: 'wrap',\r\n padding: '6px 10px',\r\n borderRadius: '8px',\r\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\nconst barStatStyle: CSSProperties = {\r\n display: 'inline-flex',\r\n alignItems: 'baseline',\r\n gap: '4px',\r\n}\r\n\r\nconst barValueStyle: CSSProperties = {\r\n fontWeight: 600,\r\n color: 'var(--dsw-alias-label-primary)',\r\n fontVariantNumeric: 'tabular-nums',\r\n}\r\n\r\nconst barSepStyle: CSSProperties = {\r\n width: '1px',\r\n height: '10px',\r\n background: 'var(--dsw-alias-border-l2, rgba(127,127,127,0.3))',\r\n}\r\n\r\nconst rowStyle: CSSProperties = {\r\n display: 'flex',\r\n gap: '10px',\r\n padding: '6px 10px',\r\n borderRadius: '8px',\r\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\r\n}\r\n\r\nconst railStyle: CSSProperties = {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n flex: '0 0 auto',\r\n width: '20px',\r\n}\r\n\r\nconst markStyle: CSSProperties = {\r\n width: '18px',\r\n height: '18px',\r\n marginTop: '3px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n fontWeight: 700,\r\n borderRadius: '999px',\r\n borderStyle: 'solid',\r\n // 1.5px + a 700-weight glyph: at 1px the ring and the arrow both washed out\r\n // against the translucent row background, which is what made \"which way did\r\n // it move\" hard to read at a glance.\r\n borderWidth: '1.5px',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n}\r\n\r\nconst railLineStyle: CSSProperties = {\r\n flex: '1 1 auto',\r\n width: '1px',\r\n minHeight: '10px',\r\n background: 'var(--dsw-alias-border-l2, rgba(127,127,127,0.3))',\r\n}\r\n\r\nconst bodyStyle: CSSProperties = { flex: '1 1 auto', minWidth: 0, paddingBottom: '10px' }\r\n\r\nconst headStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '8px',\r\n flexWrap: 'wrap',\r\n}\r\n\r\nconst levelStyle: CSSProperties = {\r\n font: '600 12px/18px var(--ds-font-family-code, monospace)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n}\r\n\r\nconst tagStyle: CSSProperties = {\r\n fontSize: '11px',\r\n lineHeight: '18px',\r\n padding: '0 8px',\r\n borderRadius: '9px',\r\n fontWeight: 600,\r\n}\r\n\r\nconst metaStyle: CSSProperties = {\r\n fontSize: '11px',\r\n lineHeight: '18px',\r\n padding: '0 6px',\r\n borderRadius: '9px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.3))',\r\n fontVariantNumeric: 'tabular-nums',\r\n}\r\n\r\nconst clockStyle: CSSProperties = {\r\n marginLeft: 'auto',\r\n flex: '0 0 auto',\r\n fontSize: '11px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n fontVariantNumeric: 'tabular-nums',\r\n}\r\n\r\nconst noteStyle: CSSProperties = {\r\n marginTop: '2px',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n color: 'var(--dsw-alias-label-secondary, inherit)',\r\n overflowWrap: 'anywhere',\r\n}\r\n\r\nconst emptyStyle: CSSProperties = {\r\n padding: '16px 0',\r\n fontSize: '13px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n}\r\n\r\n/** The summary strip above the timeline. */\r\nfunction SummaryBar(props: { t: (key: string) => string; summary: TraceSummary }): JSX.Element {\r\n const { t, summary } = props\r\n return (\r\n <div style={barStyle}>\r\n <span style={barStatStyle}>\r\n <span style={barValueStyle}>{summary.requests}</span>\r\n <span>{t('trace.summary.requests')}</span>\r\n </span>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={barStatStyle}>\r\n <span style={barValueStyle}>{summary.runs}</span>\r\n <span>{t('trace.summary.runs')}</span>\r\n </span>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={barStatStyle}>\r\n <span style={barValueStyle}>{summary.autoRuns}</span>\r\n <span>{t('trace.summary.autoRuns')}</span>\r\n </span>\r\n {summary.unknownRuns === 0\r\n ? null\r\n : (\r\n <>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={{ ...barStatStyle, color: '#d48806' }}>\r\n <span style={barValueStyle}>{summary.unknownRuns}</span>\r\n <span>{t('trace.intent.unknown')}</span>\r\n </span>\r\n </>\r\n )}\r\n {summary.switches === 0\r\n ? null\r\n : (\r\n <>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={barStatStyle}>\r\n <span style={barValueStyle}>{summary.switches}</span>\r\n <span>{t('trace.summary.switches')}</span>\r\n </span>\r\n </>\r\n )}\r\n {summary.highest === undefined\r\n ? null\r\n : (\r\n <>\r\n <span aria-hidden style={barSepStyle} />\r\n <span style={barStatStyle}>\r\n <span>{t('trace.summary.peak')}</span>\r\n <span style={{ ...barValueStyle, fontFamily: 'var(--ds-font-family-code, monospace)' }}>\r\n {summary.highest}\r\n </span>\r\n </span>\r\n </>\r\n )}\r\n <span style={{ marginLeft: 'auto' }}>{t('trace.summary.hint')}</span>\r\n </div>\r\n )\r\n}\r\n\r\n/** The tab body: summary strip + timeline rows newest first, or the empty state. */\r\nexport function EffortTrace(props: EffortTraceProps): JSX.Element {\r\n const t = props.t ?? props.tFallback ?? ((key: string) => key)\r\n const slice = useTrace(props.sessions, props.sessionId)\r\n const trace = slice?.trace ?? []\r\n const rows = traceRows(trace)\r\n if (slice === undefined || rows.length === 0) {\r\n return (\r\n <div style={pageStyle}>\r\n <div>\r\n <div style={titleStyle}>{t('trace.title')}</div>\r\n <div style={subtitleStyle}>{t('trace.subtitle')}</div>\r\n </div>\r\n <span style={{ ...emptyStyle, fontSize: '13px' }}>{t('trace.empty')}</span>\r\n </div>\r\n )\r\n }\r\n return (\r\n <div style={pageStyle}>\r\n <div>\r\n <div style={titleStyle}>{t('trace.title')}</div>\r\n <div style={subtitleStyle}>{t('trace.subtitle')}</div>\r\n </div>\r\n <SummaryBar t={t} summary={summarize(trace, slice.modelSwitches)} />\r\n {/*\r\n * Attribution honesty: on the 0.2.2+ strict line THIS plugin is itself a\r\n * `model/selection` writer (it must fix the next step's level before\r\n * preparation), so a concrete level in the log cannot be proven to be a\r\n * human click. Say so instead of labelling scheduler output \"manual\".\r\n */}\r\n <div style={{ fontSize: '11px', lineHeight: '16px', color: 'var(--dsw-alias-label-tertiary)' }}>\r\n {t('trace.note.attribution')}\r\n </div>\r\n <div style={{ display: 'flex', flexDirection: 'column', gap: '6px' }}>\r\n {rows.map((row, i) => {\r\n const tone = TONE[row.dir]\r\n const intentTone = INTENT_TONE[row.run.intent]\r\n const position = positionOf(row.run)\r\n const clock = clockOf(row.run.time)\r\n const intentLabel = t(`trace.intent.${row.run.intent}`)\r\n const route = row.run.model === undefined\r\n ? ''\r\n : row.run.provider === undefined ? row.run.model : `${row.run.provider}/${row.run.model}`\r\n return (\r\n <div key={`${row.run.level}-${row.run.turn ?? 'x'}-${row.run.step ?? 'x'}-${trace.length - i}`} style={rowStyle}>\r\n <div style={railStyle}>\r\n <span aria-hidden style={{ ...markStyle, borderColor: tone.color, color: tone.color }}>\r\n {GLYPH[row.dir]}\r\n </span>\r\n <span aria-hidden style={railLineStyle} />\r\n </div>\r\n <div style={bodyStyle}>\r\n <div style={headStyle}>\r\n <code style={levelStyle}>{row.run.level}</code>\r\n <span\r\n style={{ ...tagStyle, color: intentTone.color, background: intentTone.bg }}\r\n title={row.run.intent === 'unknown' ? t('trace.intent.unknownHint') : undefined}\r\n >\r\n {intentLabel}\r\n </span>\r\n {row.run.count > 1\r\n ? <span style={metaStyle}>{`× ${row.run.count}`}</span>\r\n : null}\r\n {position === '' ? null : <span style={metaStyle}>{position}</span>}\r\n {/*\r\n * The model the level was sent to. Recorded from the request\r\n * header, never inferred — without it a run cannot say which\r\n * route it belonged to.\r\n */}\r\n {route === '' ? null : <span style={{ ...metaStyle, fontFamily: 'var(--ds-font-family-code, monospace)' }}>{route}</span>}\r\n {clock === '' ? null : <span style={clockStyle}>{clock}</span>}\r\n </div>\r\n <div style={noteStyle}>\r\n {t(`trace.dir.${row.dir}`).replace('%n', String(row.run.count))}\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n </div>\r\n )\r\n}\r\n","/**\n * ⚠️ 生成副本 —— 请勿手改。真源:mine-dsh-plugins/_tools/guide-kit/guide.tsx\n * 重新同步:node _tools/guide-kit/sync.mjs\n */\n/**\n * guide-kit —— 九插件共用的「首次使用引导」件(**生成副本,勿手改**)。\n *\n * 唯一真源:`mine-dsh-plugins/_tools/guide-kit/guide.tsx`\n * 同步命令:`node _tools/guide-kit/sync.mjs`(会覆盖本文件;改这里等于白改)\n *\n * 六条契约(见 .agents/plans/unified-i18n-onboarding/spec.md §2):\n * 1. Skip 恒定可见,任何步骤都能退;\n * 2. 永远有字:引导外壳(标题/按钮/步进)自带 10 语词表,按 <html lang> 取词,\n * 认不出的一律落 en;步骤正文按「本语 → en → zh → 任意可用」逐级回退,绝不留空白;\n * 3. 重启入口:`GuideRestartButton`(或自己调 `resetGuide(ns)` + setOpen(true))就地重开;\n * 4. 零依赖:只 react + localStorage,不 import 平台包,不抢宿主设置表单;\n * 5. 引导自己绝不能成为卡面渲染的失败点:样式注入与存储访问全部 try/catch + 能力探测;\n * 6. 外壳词表与步骤正文分离:外壳跨插件统一(本文件),正文每插件一份 `guide-steps.ts`。\n */\nimport { useEffect, useState } from 'react'\nimport type { CSSProperties, JSX } from 'react'\n\nexport interface GuideStep {\n title: string\n body: string\n}\n\nexport interface GuideLabels {\n title: string\n skip: string\n next: string\n prev: string\n done: string\n restart: string\n stepOf: (_current: number, _total: number) => string\n}\n\n/** 生态通用的十个语言码(与各插件 `locale/*.json`、README 的十语镜像同口径)。 */\nexport const GUIDE_LOCALES = ['zh', 'en', 'ja', 'ko', 'fr', 'de', 'it', 'ru', 'es', 'pt'] as const\nexport type GuideLocale = (typeof GUIDE_LOCALES)[number]\n\n/**\n * 引导外壳词表(10 语)。\n *\n * 为什么不塞进各插件 locales:这七个词是**跨插件同一套**,塞进九个字典要重复翻译\n * 9×10 次,且一旦措辞调整就得动九个仓。外壳留在本文件,正文留各插件。\n */\nexport const GUIDE_COPY: Record<GuideLocale, GuideLabels> = {\n zh: {\n title: '快速上手',\n skip: '跳过引导',\n next: '下一步',\n prev: '上一步',\n done: '开始使用',\n restart: '重新查看引导',\n stepOf: (current, total) => `第 ${current} / ${total} 步`,\n },\n en: {\n title: 'Quick start',\n skip: 'Skip guide',\n next: 'Next',\n prev: 'Back',\n done: 'Get started',\n restart: 'Show guide again',\n stepOf: (current, total) => `Step ${current} of ${total}`,\n },\n ja: {\n title: 'クイックスタート',\n skip: 'ガイドをスキップ',\n next: '次へ',\n prev: '戻る',\n done: 'はじめる',\n restart: 'ガイドをもう一度表示',\n stepOf: (current, total) => `ステップ ${current} / ${total}`,\n },\n ko: {\n title: '빠른 시작',\n skip: '가이드 건너뛰기',\n next: '다음',\n prev: '이전',\n done: '시작하기',\n restart: '가이드 다시 보기',\n stepOf: (current, total) => `${current} / ${total} 단계`,\n },\n fr: {\n title: 'Démarrage rapide',\n skip: 'Ignorer le guide',\n next: 'Suivant',\n prev: 'Retour',\n done: 'Commencer',\n restart: 'Revoir le guide',\n stepOf: (current, total) => `Étape ${current} sur ${total}`,\n },\n de: {\n title: 'Schnellstart',\n skip: 'Anleitung überspringen',\n next: 'Weiter',\n prev: 'Zurück',\n done: 'Loslegen',\n restart: 'Anleitung erneut anzeigen',\n stepOf: (current, total) => `Schritt ${current} von ${total}`,\n },\n it: {\n title: 'Avvio rapido',\n skip: 'Salta la guida',\n next: 'Avanti',\n prev: 'Indietro',\n done: 'Inizia',\n restart: 'Rivedi la guida',\n stepOf: (current, total) => `Passo ${current} di ${total}`,\n },\n ru: {\n title: 'Быстрый старт',\n skip: 'Пропустить руководство',\n next: 'Далее',\n prev: 'Назад',\n done: 'Начать',\n restart: 'Показать руководство снова',\n stepOf: (current, total) => `Шаг ${current} из ${total}`,\n },\n es: {\n title: 'Inicio rápido',\n skip: 'Omitir la guía',\n next: 'Siguiente',\n prev: 'Atrás',\n done: 'Empezar',\n restart: 'Ver la guía de nuevo',\n stepOf: (current, total) => `Paso ${current} de ${total}`,\n },\n pt: {\n title: 'Início rápido',\n skip: 'Ignorar o guia',\n next: 'Próximo',\n prev: 'Voltar',\n done: 'Começar',\n restart: 'Ver o guia novamente',\n stepOf: (current, total) => `Passo ${current} de ${total}`,\n },\n}\n\n/** 语言标签 → 语言码:只认主标签,认不出的落 null(由调用方回退 en)。 */\nexport function normalizeGuideLocale(tag: string): GuideLocale | null {\n const primary = tag.toLowerCase().trim().split(/[-_]/)[0] ?? ''\n return (GUIDE_LOCALES as readonly string[]).includes(primary) ? (primary as GuideLocale) : null\n}\n\nfunction htmlLang(): string {\n try {\n return typeof document === 'undefined' ? '' : (document.documentElement?.lang ?? '')\n } catch {\n return ''\n }\n}\n\n/**\n * 当前引导语言:以宿主 `<html lang>` 为准(语言切换会改写这个属性)。\n *\n * 认不出 → en:引导是「帮助」面,宁可给英文也不能给空白或中文硬串。\n */\nexport function currentGuideLocale(): GuideLocale {\n return normalizeGuideLocale(htmlLang()) ?? 'en'\n}\n\n/** 兼容旧调用(1.x 版本只区分 zh/en):需要细分语种请用 `currentGuideLocale()`。 */\nexport function guideLang(): GuideLocale {\n return currentGuideLocale()\n}\n\n/** 引导外壳取词。 */\nexport function guideLabels(locale: GuideLocale = currentGuideLocale()): GuideLabels {\n return GUIDE_COPY[locale] ?? GUIDE_COPY.en\n}\n\n/**\n * 步骤正文取词:本语 → en → zh → 表里第一个可用。\n *\n * 为什么需要回退链:九插件分批补语种,某个插件可能只有 zh/en 而宿主是 ru;\n * 这时给英文是可用的,给空白等于「引导坏了」。`undefined` 步骤表按空表处理。\n */\nexport function guideSteps(\n map: Partial<Record<GuideLocale, readonly GuideStep[]>> | undefined,\n): readonly GuideStep[] {\n if (map === undefined) return []\n const order: (GuideLocale | undefined)[] = [currentGuideLocale(), 'en', 'zh']\n for (const key of order) {\n const hit = key === undefined ? undefined : map[key]\n if (hit !== undefined && hit.length > 0) return hit\n }\n for (const key of GUIDE_LOCALES) {\n const hit = map[key]\n if (hit !== undefined && hit.length > 0) return hit\n }\n return []\n}\n\nfunction guideStorageKey(ns: string): string {\n return `dsh.guide.${ns}.skipped`\n}\n\n/** 是否已跳过(存储不可用时按「未跳过」处理:宁可多教一次,不要静默不教)。 */\nexport function isGuideSkipped(ns: string): boolean {\n try {\n return typeof localStorage !== 'undefined' && localStorage.getItem(guideStorageKey(ns)) === '1'\n } catch {\n return false\n }\n}\n\n/** 记下跳过;写失败不抛(隐私模式 / 存储禁用)。 */\nexport function skipGuide(ns: string): void {\n try {\n localStorage?.setItem(guideStorageKey(ns), '1')\n } catch {\n /* ignore */\n }\n}\n\n/** 清标记 = 允许重新教学。 */\nexport function resetGuide(ns: string): void {\n try {\n localStorage?.removeItem(guideStorageKey(ns))\n } catch {\n /* ignore */\n }\n}\n\nconst GUIDE_CSS = `\n.sgGuide{border:1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.28));background:var(--dsw-alias-bg-layer-2, rgba(127,127,127,.06));border-radius:12px;padding:14px 16px;margin:0 0 12px}\n.sgGuideHead{display:flex;align-items:center;gap:8px;margin:0 0 10px}\n.sgGuideTitle{font-size:14px;font-weight:600;color:var(--dsw-alias-label-primary, currentColor)}\n.sgGuideStep{font-size:12px;color:var(--dsw-alias-label-tertiary, rgba(127,127,127,.9));margin-left:auto}\n.sgGuideBody{font-size:13px;line-height:1.6;color:var(--dsw-alias-label-secondary, currentColor);min-height:52px}\n.sgGuideBody b{color:var(--dsw-alias-label-primary, currentColor);font-weight:600}\n.sgGuideDots{display:flex;gap:6px;margin:10px 0 0}\n.sgGuideDot{width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-border-l2, rgba(127,127,127,.3))}\n.sgGuideDot-on{background:var(--dsw-alias-button-primary-fill, #4d6bfe)}\n.sgGuideFoot{display:flex;align-items:center;gap:8px;margin:12px 0 0}\n.sgGuideBtn{appearance:none;font:inherit;font-size:12px;padding:5px 12px;border-radius:8px;border:1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.3));background:transparent;color:var(--dsw-alias-label-primary, currentColor);cursor:pointer}\n.sgGuideBtn-primary{background:var(--dsw-alias-button-primary-fill, #4d6bfe);border-color:transparent;color:#fff}\n.sgGuideBtn-skip{margin-right:auto;color:var(--dsw-alias-label-tertiary, rgba(127,127,127,.9));border-color:transparent;text-decoration:underline}\n.sgGuideRestart{appearance:none;font:inherit;font-size:12px;padding:0;border:0;background:transparent;color:var(--dsw-alias-link-primary, #4d6bfe);cursor:pointer;text-decoration:underline}\n`\n\nfunction injectGuideCss(): void {\n // 宿主是浏览器,但**测试替身**常常只给一个残缺的 document(无 querySelector /\n // 无 head)——样式注入是纯装饰,任何缺失都安静跳过,绝不让引导把卡面炸掉。\n try {\n if (typeof document === 'undefined') return\n if (typeof document.querySelector !== 'function') return\n if (typeof document.createElement !== 'function') return\n if (!document.head) return\n if (document.querySelector('style[data-plugin-css=\"guide-kit\"]') !== null) return\n const tag = document.createElement('style')\n tag.dataset.pluginCss = 'guide-kit'\n tag.textContent = GUIDE_CSS\n document.head.appendChild(tag)\n } catch {\n /* 残缺 DOM:跳过样式,行为不受影响 */\n }\n}\n\n/** 语言变更订阅:语言切换后重渲染词表(引导是短生命周期,直接跟随 <html lang>)。 */\nfunction useLangTick(): void {\n const [, setTick] = useState(0)\n useEffect(() => {\n try {\n if (typeof MutationObserver === 'undefined' || typeof document === 'undefined') return\n if (!document.documentElement) return\n const observer = new MutationObserver(() => setTick((n) => n + 1))\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] })\n return () => observer.disconnect()\n } catch {\n return\n }\n }, [])\n}\n\n/**\n * 引导主体:≤10 步的小教学(惯例:末条讲「用量端点」贴士)+ 恒定可见的 Skip。\n *\n * `onClose` 由宿主卡面传:Skip/Done 都会调用它(Skip 同时写标记)。\n */\nexport function GuidePanel(props: {\n ns: string\n steps: readonly GuideStep[]\n onClose: () => void\n}): JSX.Element | null {\n const { ns, steps, onClose } = props\n const [index, setIndex] = useState(0)\n useLangTick()\n const labels = guideLabels()\n useEffect(() => {\n injectGuideCss()\n }, [])\n if (steps.length === 0) return null\n const current = steps[Math.min(index, steps.length - 1)]!\n const last = index >= steps.length - 1\n // Skip 与 Done 都写标记:**「看过」= 不再自动弹**。只给 Skip 写字会让点\n // 「开始使用」走完的用户每次进设置面都被再教一遍(认真看完的人最烦这个)。\n const finish = (): void => {\n skipGuide(ns)\n onClose()\n }\n return (\n <section className=\"sgGuide\" aria-label={labels.title}>\n <header className=\"sgGuideHead\">\n <span className=\"sgGuideTitle\">{labels.title}</span>\n <span className=\"sgGuideStep\">{labels.stepOf(index + 1, steps.length)}</span>\n </header>\n <div className=\"sgGuideBody\">\n <b>{current.title}</b>\n <div>{current.body}</div>\n </div>\n <div className=\"sgGuideDots\" aria-hidden=\"true\">\n {steps.map((step, i) => (\n <span key={step.title} className={'sgGuideDot' + (i === index ? ' sgGuideDot-on' : '')} />\n ))}\n </div>\n <footer className=\"sgGuideFoot\">\n <button type=\"button\" className=\"sgGuideBtn sgGuideBtn-skip\" onClick={() => finish()}>\n {labels.skip}\n </button>\n {index > 0 && (\n <button type=\"button\" className=\"sgGuideBtn\" onClick={() => setIndex(index - 1)}>\n {labels.prev}\n </button>\n )}\n {last ? (\n <button type=\"button\" className=\"sgGuideBtn sgGuideBtn-primary\" onClick={() => finish()}>\n {labels.done}\n </button>\n ) : (\n <button type=\"button\" className=\"sgGuideBtn sgGuideBtn-primary\" onClick={() => setIndex(index + 1)}>\n {labels.next}\n </button>\n )}\n </footer>\n </section>\n )\n}\n\n/**\n * 重启入口:清标记 + 就地重开引导。\n *\n * 统一件,避免九插件各写一份(措辞/样式/清标记时机容易走样)。跳过之后\n * 用户想再看一次,不需要去清浏览器存储。\n */\nexport function GuideRestartButton(props: {\n ns: string\n onOpen: () => void\n style?: CSSProperties\n}): JSX.Element {\n const { ns, onOpen, style } = props\n useLangTick()\n return (\n <button\n type=\"button\"\n className=\"sgGuideRestart\"\n style={style}\n onClick={() => {\n resetGuide(ns)\n onOpen()\n }}\n >\n {guideLabels().restart}\n </button>\n )\n}\n","/**\n * dsh-thinking-levels 的首次使用引导文案(3 步)。\n *\n * 与 `guide.tsx`(生成副本)分文件:副本会被 `_tools/guide-kit/sync.mjs` 覆盖。\n */\nimport type { GuideLocale, GuideStep } from './guide.tsx'\n\nexport const THINKING_GUIDE_STEPS: Partial<Record<GuideLocale, readonly GuideStep[]>> = {\n zh: [\n {\n title: '它决定「想多深」',\n body: '按请求难度自动挑思考档位:简单问答降到 low,复杂任务抬到 high。默认「自动」就够用,别一上来钉死 max——贵且慢。',\n },\n {\n title: '允许上浮比允许下调更重要',\n body: '「允许上调」打开后遇到难题会自动加深思考;「允许降级」则会为了省钱往下压。想稳就先只开上调。',\n },\n {\n title: '看实时档位在环上',\n body: '输入框右侧的圆环显示当前上下文占用与压力档;点开模型面板能看到本次请求实际发出的思考档位与理由。',\n },\n ],\n en: [\n {\n title: 'It decides how deeply to think',\n body: 'Picks a reasoning effort per request by difficulty: easy Q&A drops to low, hard tasks rise to high. \"Auto\" is enough — don\\'t pin max from the start, it is slow and expensive.',\n },\n {\n title: 'Allowing upgrades matters more than allowing downgrades',\n body: 'With \"allow upgrade\" on, hard problems get more thinking automatically; \"allow downgrade\" pushes thinking down to save money. For stability, turn on upgrade only.',\n },\n {\n title: 'The ring shows the live gear',\n body: 'The ring right of the composer shows context usage and pressure; open the model panel to see the effort actually sent with this request and why.',\n },\n ],\n}\n","/**\n * Thinking-levels settings card — the family settings tab face of the\n * dsh-thinking-levels plugin.\n *\n * The card binds this plugin's entry config through the `configForms` cordis\n * service and renders its fields: the level picker\n * (off / on / minimal / low / medium / high / xhigh / max / auto) plus the\n * scheduler toggles. Every change commits immediately through the scope (no\n * staged form): the decision is read per model request, so a committed change\n * applies to the next request without a restart.\n *\n * Below the scheduler rows, a \"model capabilities\" block edits the\n * `llm-pi-ai` namespace directly (read + write through the same settings\n * transport), borrowing dsh-thinking-effort's presentation: providers group\n * their models, each model row shows capability badges and expands into a\n * per-level editor where a level is ticked and its gateway wire value entered\n * (e.g. `high` → `ultra`); `off` left empty means \"do not send\". A search box\n * filters models and one-click presets apply official/generic level sets to\n * every thinking model.\n *\n * Kept dependency-free beyond react: the scopes are subscribed with\n * `useSyncExternalStore`, and the controls are plain HTML so the client bundle\n * needs no CSS modules and no primitives value import.\n */\nimport { useCallback, useState, useSyncExternalStore } from 'react'\nimport type { CSSProperties, JSX } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { SettingsScope } from './scope-face.ts'\nimport type { EffortId } from '../thinking-level.ts'\nimport type { PricingPolicy } from '../price-catalog.ts'\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\nimport { contextWindowOf, deepseekSectionOf, DEEPSEEK_DEFAULT_WINDOW } from './model-panel.tsx'\nimport type { ThinkingLevelsConfig } from '../index.ts'\nimport { GuidePanel, GuideRestartButton, guideSteps, isGuideSkipped } from './guide.tsx'\nimport { THINKING_GUIDE_STEPS } from './guide-steps.ts'\n\n/** One injected face: the plugin's own scope plus the llm-pi-ai namespace scope. */\nexport interface ThinkingLevelsCardInjected {\n scope: SettingsScope<ThinkingLevelsConfig>\n /** The `llm-pi-ai` settings namespace, read and written for model capabilities. */\n piAiScope: SettingsScope<unknown>\n /**\n * The openai-completions transport's section (`llm-openai-completions`):\n * read for the per-route takeover state, written by the route-head takeover\n * checkbox (`enabled` + the manual `providers` list). Absent face = the\n * transport is not composed; the checkbox then renders disabled.\n */\n ocScope?: SettingsScope<unknown>\n /**\n * The `llm-deepseek` section: with the seat takeover off (4.4.0 default)\n * the official-model context editor lives on this card instead of the\n * ModelPanel lines. Absent on hosts without the namespace.\n */\n deepseekScope?: SettingsScope<unknown>\n}\n\n/** Full props: locale seat + the injected scopes. */\nexport type ThinkingLevelsCardProps = PropsLocale<'thinking-levels'> & ThinkingLevelsCardInjected\n\n/** The user-facing levels, in picker order: eight standard levels plus the auto scheduler sentinel. */\nconst EFFORT_OPTIONS: readonly EffortId[] = [\n 'off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'auto',\n]\n\n/** 计价兜底档,in picker order:缺省 estimate(典型价估算,未校准仅供参考)。 */\nconst PRICING_OPTIONS: readonly PricingPolicy[] = [\n 'estimate', 'cn', 'global', 'custom', 'off',\n]\n\n/**\n * The levels the capability editor offers. This is the llm-pi-ai\n * `reasoningEfforts` table-key space — pi-ai's fixed seven levels (schema\n * rejects any other key). `on` (the enable-thinking toggle) is a selector /\n * injection-level concept, expressed here by the `off` + `high` pair\n * (enable_thinking false/true), so it has no table key of its own.\n */\nconst CAPABILITY_LEVELS: readonly EffortId[] = [\n 'off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',\n] as const\n\n/** One-click presets, mirroring dsh-thinking-effort: official DeepSeek style and a generic set. */\nconst PRESETS: readonly { key: 'official' | 'generic'; levels: Record<string, unknown> }[] = [\n { key: 'official', levels: { off: null, high: 'high', max: 'max' } },\n { key: 'generic', levels: { off: null, low: 'low', medium: 'medium', high: 'high' } },\n]\n\n/** The wire thinking formats offered (llm-pi-ai's nameable set, incl. qwen-chat-template). */\nconst THINKING_FORMATS = [\n 'openai', 'deepseek', 'openrouter', 'together', 'zai', 'qwen',\n 'qwen-chat-template', 'string-thinking', 'ant-ling',\n] as const\n\n/* ── shared row styling (inline; keeps the client bundle CSS-free) ──────── */\n\nconst rowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '12px',\n padding: '6px 0',\n fontSize: '13px',\n lineHeight: '20px',\n}\n\nconst labelStyle: CSSProperties = { margin: 0, color: 'var(--dsw-alias-label-primary)' }\n\n/** Native form controls (the select's dropdown popup) follow `color-scheme`,\n * which the ≤0.1.6 shells never set — derive it from the body luminance once\n * at bundle eval so dark-theme hosts get dark popups without a media query\n * (the app theme isn't the OS theme, so prefers-color-scheme would lie). */\nconst controlColorScheme: 'dark' | 'light' = (() => {\n try {\n const rgb = getComputedStyle(document.body).backgroundColor.match(/\\d+/g) ?? ['255', '255', '255']\n const [r, g, b] = rgb.map(Number)\n return (r * 299 + g * 587 + b * 114) / 1000 < 128 ? 'dark' : 'light'\n } catch { return 'light' }\n})()\n\nconst controlStyle: CSSProperties = {\n // Translucent fallback: the alias tokens don't exist on the ≤0.1.6 shells,\n // and the old `#fff` fallback painted white controls onto dark dialogs.\n background: 'var(--dsw-alias-bg-surface, rgba(127,127,127,0.12))',\n color: 'var(--dsw-alias-label-primary, inherit)',\n colorScheme: controlColorScheme,\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '3px 8px',\n fontSize: '13px',\n}\n\nconst sectionStyle: CSSProperties = {\n marginTop: '14px',\n paddingTop: '12px',\n borderTop: '1px solid var(--dsw-alias-border-l2)',\n}\n\nconst fieldStyle: CSSProperties = { display: 'flex', flexDirection: 'column', gap: '4px' }\n\nconst fieldLabelStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\n\nconst hintStyle: CSSProperties = { margin: '6px 0 0', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\n\n/** Provider group shell: an outlined row grouping its models. */\nconst providerStyle: CSSProperties = {\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '8px',\n margin: '8px 0 0',\n overflow: 'hidden',\n}\n\nconst providerHeadStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '7px 10px',\n background: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\n}\n\nconst providerNameStyle: CSSProperties = {\n margin: 0,\n flex: '1 1 auto',\n minWidth: 0,\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '12px',\n lineHeight: '18px',\n fontWeight: 600,\n color: 'var(--dsw-alias-label-primary)',\n overflowWrap: 'anywhere',\n}\n\nconst providerBadgeStyle: CSSProperties = {\n margin: 0,\n fontSize: '10px',\n lineHeight: '16px',\n color: 'var(--dsw-alias-label-tertiary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '0 5px',\n whiteSpace: 'nowrap',\n}\n\nconst iconButtonStyle: CSSProperties = {\n background: 'none',\n border: 'none',\n color: 'var(--dsw-alias-label-tertiary)',\n cursor: 'pointer',\n padding: '2px 4px',\n display: 'inline-flex',\n alignItems: 'center',\n}\n\n/** One model row inside a provider group. */\nconst modelRowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '7px 10px',\n borderTop: '1px solid var(--dsw-alias-border-l2)',\n}\n\nconst modelIdStyle: CSSProperties = {\n margin: 0,\n flex: '1 1 auto',\n minWidth: 0,\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '12px',\n lineHeight: '18px',\n color: 'var(--dsw-alias-label-secondary)',\n overflowWrap: 'anywhere',\n}\n\n/** Capability badge chips (text / image / context). */\nconst badgeStyle: CSSProperties = {\n fontSize: '10px',\n lineHeight: '16px',\n color: 'var(--dsw-alias-label-tertiary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '0 5px',\n whiteSpace: 'nowrap',\n}\n\n/** The per-level editor grid: one row per level with a toggle, a label and a wire input. */\nconst levelRowStyle: CSSProperties = {\n display: 'grid',\n gridTemplateColumns: 'auto 92px minmax(0, 1fr)',\n alignItems: 'center',\n gap: '8px',\n padding: '4px 0',\n fontSize: '13px',\n}\n\nconst levelNameStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-secondary)' }\n\nconst wireInputStyle: CSSProperties = {\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-primary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '3px 8px',\n fontSize: '12px',\n width: '100%',\n boxSizing: 'border-box',\n}\n\n/* ── helpers over the llm-pi-ai user layer ─────────────────────────────── */\n\n/** A row's `reasoningEfforts` as stored in the user layer. */\nfunction effortsOf(model: Record<string, unknown>): false | Record<string, unknown> | undefined {\n const value = model['reasoningEfforts']\n if (value === false) return false\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n return value as Record<string, unknown>\n }\n return undefined\n}\n\n/**\n * Build a `reasoningEfforts` table from a level→wire draft. `off` maps to\n * `null` (omit the reasoning option → enable_thinking false) unless the user\n * typed a wire value; every other ticked level keeps its typed wire value.\n * pi-ai rejects a table offering nothing beyond `off`, so a selection of only\n * `off` falls back to the default `high` level.\n */\nfunction effortTableOf(draft: Record<string, string | null>): Record<string, unknown> {\n const table: Record<string, unknown> = {}\n for (const level of CAPABILITY_LEVELS) {\n const wire = draft[level]\n if (wire === undefined || wire === null) continue\n const trimmed = typeof wire === 'string' ? wire.trim() : ''\n if (level === 'off') table[level] = trimmed === '' ? null : trimmed\n else if (trimmed !== '') table[level] = trimmed\n }\n if (Object.keys(table).length === 0 || Object.keys(table).every(level => table[level] === null)) {\n return { ...table, high: 'high' }\n }\n return table\n}\n\n/** Whether a row declares `compat.supportsReasoningEffort` (the wire sends reasoning_effort). */\nfunction supportsEffortOf(model: Record<string, unknown>): boolean {\n const compat = model['compat']\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\n return (compat as Record<string, unknown>)['supportsReasoningEffort'] === true\n}\n\n/** Patch one row's `compat` object, merging rather than replacing sibling fields. */\nfunction patchCompat(\n row: Record<string, unknown>,\n patch: (compat: Record<string, unknown>) => void,\n): void {\n const compat = typeof row['compat'] === 'object' && row['compat'] !== null && !Array.isArray(row['compat'])\n ? { ...(row['compat'] as Record<string, unknown>) }\n : {}\n patch(compat)\n if (Object.keys(compat).length === 0) delete row['compat']\n else row['compat'] = compat\n}\n\n/** The user-layer `providers` value of the llm-pi-ai namespace, when present. */\nfunction providersOf(snapshot: unknown): Record<string, unknown> {\n if (typeof snapshot !== 'object' || snapshot === null) return {}\n // 0.1.7+ snapshots carry the user layer; ≤0.1.6 settingsScope snapshots\n // carry the merged section as `value` — read whichever the host provides.\n const user = (snapshot as { user?: unknown }).user\n ?? (snapshot as { value?: unknown }).value\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\n const providers = (user as Record<string, unknown>)['providers']\n return typeof providers === 'object' && providers !== null && !Array.isArray(providers)\n ? providers as Record<string, unknown>\n : {}\n}\n\n/** Whether a route-level profile declares `compat.supportsDeveloperRole: false`. */\nfunction developerRoleDisabledOf(profile: unknown): boolean {\n if (typeof profile !== 'object' || profile === null) return false\n const compat = (profile as Record<string, unknown>)['compat']\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\n return (compat as Record<string, unknown>)['supportsDeveloperRole'] === false\n}\n\n/**\n * Whether the transport currently takes this route over: its master switch on\n * AND the route in its manual providers list. Pure membership — the checkbox\n * is the single per-route truth, so dispatch uses the same set.\n */\nfunction takeoverActiveOf(section: { enabled?: unknown; providers?: unknown }, providerId: string): boolean {\n if (section.enabled !== true) return false\n return Array.isArray(section.providers) && (section.providers as unknown[]).includes(providerId)\n}\n\n/**\n * The transport's `extraInputs` dict ('provider/model' → modality list), from\n * its own section. The host llm-pi-ai schema caps a model row's `input` enum\n * at text|image, so video/audio declarations for omni models live here —\n * the taken-over transport unions them into the model's effective input.\n */\nfunction extraInputsOf(section: { extraInputs?: unknown }): Record<string, string[]> {\n if (typeof section.extraInputs !== 'object' || section.extraInputs === null || Array.isArray(section.extraInputs)) return {}\n const out: Record<string, string[]> = {}\n for (const [key, value] of Object.entries(section.extraInputs as Record<string, unknown>)) {\n if (Array.isArray(value)) out[key] = value.filter((m): m is string => typeof m === 'string')\n }\n return out\n}\n\n/**\n * One settings write with a single self-heal retry. A false return means the\n * host refused the optimistic lock — and the client has ALREADY completed its\n * recover() (a fresh describe folded into the mirror) by the time resolve\n * lands, so an immediate second attempt carries a fresh revision: the machine\n * equivalent of the user's proven \"click it twice\" workaround.\n */\nasync function setWithRetry(scope: SettingsScope<unknown>, field: string, value: unknown): Promise<{ ok: boolean; retried: boolean }> {\n const ok1 = await scope.set(field, value).catch(() => false)\n if (ok1) return { ok: true, retried: false }\n await new Promise((resolve) => setTimeout(resolve, 350))\n const ok2 = await scope.set(field, value).catch(() => false)\n return { ok: ok2, retried: true }\n}\n\n/** One flattened capability entry: a provider's model at an array index. */\ninterface CapabilityEntry {\n providerId: string\n index: number\n model: Record<string, unknown>\n modelId: string\n /** The provider-level `compat`, applied to models that declare none (display parity). */\n providerCompat?: unknown\n /** The provider-level `defaultInput`, applied to models that declare none (display parity). */\n providerInput?: unknown[]\n /** The provider-level `api` (wire protocol): the host's compat gates differ per protocol. */\n providerApi?: unknown\n}\n\n/** The effective `compat` of an entry: its own `compat` merged over the provider-level `compat`. */\nfunction compatOf(entry: CapabilityEntry): Record<string, unknown> {\n const base = typeof entry.providerCompat === 'object' && entry.providerCompat !== null\n ? entry.providerCompat as Record<string, unknown>\n : {}\n const own = entry.model['compat']\n return typeof own === 'object' && own !== null && !Array.isArray(own)\n ? { ...base, ...(own as Record<string, unknown>) }\n : base\n}\n\n/**\n * Whether this entry's wire protocol takes the model-level\n * openai-completions compat fields (`compat.thinkingFormat`,\n * `compat.supportsReasoningEffort`). The host llm-pi-ai gate (`COMPAT_GATES`)\n * offers them ONLY on openai-completions, and a MODEL-level write carrying one\n * on a Responses/Anthropic route fails the WHOLE providers payload\n * (`not configurable here`). An absent `api` keeps pi-ai's\n * openai-completions default, so the row stays editable.\n *\n * Scoped to the FIELD, never to thinking: the thinking DECLARATION\n * (`reasoningEfforts`) is protocol-neutral and stays editable everywhere — a\n * non-completions route merely must not carry the completions-only compat\n * fields alongside it (issue #6).\n * (exported for the gate's unit regression, issues #2/#6)\n */\nexport function completionsCompatConfigurable(entry: CapabilityEntry): boolean {\n return typeof entry.providerApi !== 'string' || entry.providerApi === 'openai-completions'\n}\n\n/**\n * The pre-#6 spelling of {@link completionsCompatConfigurable}, kept exported\n * because the 4.4.x line published it.\n * @deprecated use {@link completionsCompatConfigurable}.\n */\nexport const effortCompatConfigurable = completionsCompatConfigurable\n\n/**\n * Write the Thinking checkbox's declaration onto ONE model row (the caller\n * hands the row inside its cloned providers payload). Protocol-aware on\n * purpose (issue #6):\n *\n * - `reasoningEfforts` is protocol-NEUTRAL: the host llm-pi-ai resolves it to\n * `reasoning: true` + `thinkingLevelMap` for every wire protocol, and pi-ai\n * then maps the levels natively (Anthropic thinking budget, Responses\n * reasoning effort). Thinking is therefore declarable on all three protocol\n * families — it is the prerequisite of the effort selector.\n * - the `off` wire value is where the protocols DIVERGE. `off: null` marks the\n * level unsupported to pi-ai (`getSupportedThinkingLevels` drops it), which\n * is the completions transport's \"send nothing\" toggle — fine there, but on\n * a pi-ai-served route it would leave thinking un-turn-off-able. A\n * non-completions route therefore keeps `off` SELECTABLE with the\n * providers' own \"no reasoning\" token: Anthropic only needs it non-null\n * (`thinking: {type:'disabled'}`), Responses sends `effort: 'none'`.\n * - the qwen `thinkingFormat` autofill is an openai-completions-ONLY compat\n * field: writing it on a Responses/Anthropic route makes the host reject the\n * whole providers payload, so it is skipped there and the format simply\n * stays inherited.\n * @param entry - the capability entry whose provider protocol decides the gate.\n * @param row - the model row to mutate.\n * @param next - the new Thinking state.\n */\nexport function writeThinkingRow(\n entry: CapabilityEntry,\n row: Record<string, unknown>,\n next: boolean,\n): void {\n if (!next) {\n // Thinking off: a non-reasoning model never takes an effort.\n row['reasoningEfforts'] = false\n return\n }\n // Thinking on: a table must exist so the wire drives enable_thinking /\n // reasoning_effort. Start from the persisted table or the default high\n // set; a toggle model (no effort) keeps supportsReasoningEffort false.\n const effortCapable = supportsEffortOf(row)\n const completions = completionsCompatConfigurable(entry)\n if (effortCapable) {\n row['reasoningEfforts'] = effortTableOf({ high: 'high' })\n } else if (completions) {\n row['reasoningEfforts'] = { off: null, high: 'high' }\n } else {\n row['reasoningEfforts'] = { off: 'none', high: 'high' }\n }\n // Toggle-style thinking models need the official qwen format so pi-ai\n // sends enable_thinking (early vLLM thinking models return no thinking\n // content without that flag, and reject reasoning_effort). Only fills\n // an absent format — an explicit choice is never clobbered — and only on\n // the one protocol whose compat takes the field.\n if (!effortCapable && completions) {\n patchCompat(row, (compat) => {\n if (compat['thinkingFormat'] === undefined) compat['thinkingFormat'] = 'qwen-chat-template'\n })\n }\n}\n\n/**\n * The two compat switches that exist ONLY on the openai-completions protocol.\n * Both are model-level writes; on any other protocol the host's\n * `resolveModelCompat` refuses the entry and fails the WHOLE providers payload\n * (`model \"x\" sets compat \"…\", but its api is \"…\", which does not take it`).\n */\nexport const THINKING_COMPAT_FIELDS = ['thinkingFormat', 'supportsReasoningEffort'] as const\n\n/**\n * The openai-completions-only compat fields an entry's OWN model row still\n * carries while its route speaks another protocol — i.e. leftovers from a\n * version that offered those switches on every route (4.4.0–4.4.2), or a\n * hand-edited `cordis.yml`. They are a hard write blocker: the next save of\n * ANY model switch on this route fails wholesale until they are removed.\n *\n * This is the \"split the force-written format out and check it\" half of issue\n * #7: the fields are no longer offered on such routes, so what remains is\n * exactly this audit + one-click cleanup.\n * @param entry - the capability entry (model row + its route's protocol).\n * @returns the offending field names, in {@link THINKING_COMPAT_FIELDS} order.\n */\nexport function staleThinkingCompatFields(entry: CapabilityEntry): string[] {\n if (completionsCompatConfigurable(entry)) return []\n const own = entry.model['compat']\n if (typeof own !== 'object' || own === null || Array.isArray(own)) return []\n const compat = own as Record<string, unknown>\n return THINKING_COMPAT_FIELDS.filter(field => compat[field] !== undefined)\n}\n\n/**\n * Remove those leftovers from ONE model row, returning what was removed (empty\n * when the row was already clean, so the caller can skip the write). Sibling\n * compat fields survive; an emptied compat object is deleted rather than left\n * as `{}`.\n * @param entry - the capability entry whose protocol decides what is stale.\n * @param row - the model row to mutate.\n * @returns the removed field names.\n */\nexport function stripThinkingCompat(entry: CapabilityEntry, row: Record<string, unknown>): string[] {\n const removed = staleThinkingCompatFields({ ...entry, model: row })\n if (removed.length === 0) return []\n const own = row['compat'] as Record<string, unknown>\n const compat = { ...own }\n for (const field of removed) delete compat[field]\n if (Object.keys(compat).length === 0) delete row['compat']\n else row['compat'] = compat\n return removed\n}\n\n/** Flatten the user-layer providers into capability entries (models arrays only). */\nfunction entriesOf(providers: Record<string, unknown>): CapabilityEntry[] {\n return Object.entries(providers).flatMap(([providerId, profile]) => {\n const raw = profile as Record<string, unknown>\n const models = raw['models']\n if (!Array.isArray(models)) return []\n const providerCompat = raw['compat']\n const providerInput = Array.isArray(raw['defaultInput']) ? raw['defaultInput'] as unknown[] : undefined\n return models.map((model, index) => ({\n providerId,\n index,\n model: (typeof model === 'object' && model !== null && !Array.isArray(model)\n ? model as Record<string, unknown>\n : {}),\n modelId: typeof model === 'object' && model !== null && typeof (model as Record<string, unknown>)['id'] === 'string'\n ? (model as Record<string, unknown>)['id'] as string\n : `#${index + 1}`,\n providerCompat,\n providerInput,\n providerApi: raw['api'],\n }))\n })\n}\n\n/** Human-readable capability summary of one entry (input modalities + declared context window). */\nfunction summaryOf(entry: CapabilityEntry): { text: boolean; image: boolean; context: string | null } {\n // Modalities fall back to the provider-level `defaultInput` so a vision\n // gateway declared once on the route shows every model as vision, matching\n // llm-pi-ai's resolution and the adapter's runtime gate.\n const input = Array.isArray(entry.model['input'])\n ? entry.model['input'] as unknown[]\n : entry.providerInput\n const text = !Array.isArray(input) || input.length === 0 || input.includes('text')\n const image = Array.isArray(input) && input.includes('image')\n const contextWindow = entry.model['contextWindow']\n const context = typeof contextWindow === 'number' && Number.isFinite(contextWindow) && contextWindow > 0\n ? formatContextWindow(contextWindow)\n : null\n return { text, image, context }\n}\n\n/** A tiny inline chevron icon (no CSS modules). */\nfunction ChevronIcon({ open }: { open: boolean }): JSX.Element {\n return (\n <svg\n width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" aria-hidden\n style={{ transform: open ? 'rotate(180deg)' : 'none', transition: 'transform 0.16s' }}\n >\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )\n}\n\n/**\n * Horizontal pill toggle: the real checkbox stays the a11y control (sr-only),\n * the drawn track/knob reflects `checked` — which the card feeds from its\n * optimistic overlay, so the pill flips the instant the user clicks and rolls\n * back on a refused write (same pendingTl contract as every other field).\n */\nfunction PillToggle(props: {\n id: string\n checked: boolean\n disabled: boolean\n title?: string\n onChange: (next: boolean) => void\n}): JSX.Element {\n const { id, checked, disabled, title, onChange } = props\n return (\n <label\n htmlFor={id}\n title={title}\n style={{ display: 'inline-flex', alignItems: 'center', cursor: disabled ? 'default' : 'pointer' }}\n >\n <input\n id={id}\n type=\"checkbox\"\n checked={checked}\n disabled={disabled}\n onChange={(event) => onChange(event.currentTarget.checked)}\n style={{ position: 'absolute', width: 1, height: 1, margin: 0, opacity: 0, pointerEvents: 'none' }}\n />\n <span\n aria-hidden\n style={{\n display: 'inline-block',\n width: '36px',\n height: '20px',\n borderRadius: '999px',\n flex: '0 0 auto',\n position: 'relative',\n background: checked\n ? 'var(--dsw-alias-bg-control-primary, #4d6bfe)'\n : 'var(--dsw-alias-fill-input-primary, rgba(127,127,127,0.25))',\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\n transition: 'background 0.16s',\n }}\n >\n <span\n style={{\n position: 'absolute',\n top: '1px',\n left: checked ? '17px' : '1px',\n width: '16px',\n height: '16px',\n borderRadius: '50%',\n background: '#fff',\n boxShadow: '0 1px 2px rgba(0,0,0,0.25)',\n transition: 'left 0.16s',\n }}\n />\n </span>\n </label>\n )\n}\n\n/**\n * The llm-pi-ai model-capability editor block (dsh-thinking-effort style:\n * provider groups, model rows with badges, per-level wire editors, search and\n * one-click presets).\n * @param scope - the `llm-pi-ai` namespace scope.\n * @param t - copy lookup.\n * @param readonly - whether writes are forbidden.\n * @returns the capabilities block, or a placeholder when nothing is configured.\n */\n/**\n * The absent-transport snapshot: a module-level CONSTANT. `useSyncExternalStore`\n * requires getSnapshot to return a STABLE value — an inline fallback literal is\n * a new object on every call, and React spins an infinite update loop (#185)\n * the moment this block renders with no transport handle (the ready branch's\n * first-ever mount crash).\n */\nconst OC_ABSENT_SNAPSHOT = Object.freeze({\n status: 'unavailable' as const,\n value: undefined,\n revision: undefined,\n writable: false,\n base: undefined,\n user: undefined,\n mode: 'memory' as const,\n})\n\nfunction ModelCapabilities(props: {\n scope: SettingsScope<unknown>\n ocScope?: SettingsScope<unknown>\n /** The plugin's OWN settings scope (TL namespace): hosts the takeover master switch write. */\n tlScope?: SettingsScope<unknown>\n t: (key: string) => string\n readonly: boolean\n}): JSX.Element {\n const { scope, ocScope, tlScope, t, readonly } = props\n // Stable subscription identities: inline lambdas make React resubscribe on\n // every render, and the host controller folds a fresh decoded snapshot into\n // its store on every subscribe — each resubscription would then look like a\n // store change and re-render forever.\n const subscribe = useCallback((listener: () => void) => scope.subscribe(listener), [scope])\n const getSnapshot = useCallback(() => scope.getSnapshot(), [scope])\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\n // The transport's live section: drives the per-route takeover checkbox.\n const ocSubscribe = useCallback(\n (listener: () => void) => ocScope?.subscribe(listener) ?? (() => {}),\n [ocScope],\n )\n const ocGetSnapshot = useCallback(\n () => (ocScope !== undefined ? ocScope.getSnapshot() : OC_ABSENT_SNAPSHOT),\n [ocScope],\n )\n const ocSnapshot = useSyncExternalStore(ocSubscribe, ocGetSnapshot)\n const ocSection = (ocSnapshot.status === 'ready' && typeof ocSnapshot.value === 'object' && ocSnapshot.value !== null\n ? ocSnapshot.value\n : {}) as { enabled?: unknown; providers?: unknown; extraInputs?: unknown }\n const ocWritable = ocSnapshot.status === 'ready' && ocSnapshot.writable && !readonly\n // Optimistic overlay (plan tl-write-immediacy §B): pending values shadow the\n // snapshots until their write settles. resolve(true) implies the client has\n // already accepted the new mirror view, so clearing the pending entry then\n // is gap-free; resolve(false) rolls the overlay back AND surfaces the error\n // banner. Optimistic writes deliberately do NOT touch `busy` — a 350ms\n // grey-out would defeat the instant-flip this overlay exists for.\n const [pendingOc, setPendingOc] = useState<Partial<{ enabled: boolean; providers: string[]; extraInputs: Record<string, string[]> }>>({})\n const [pendingPi, setPendingPi] = useState<Record<string, unknown> | undefined>(undefined)\n const [writeError, setWriteError] = useState<string | null>(null)\n const viewOc = { ...ocSection, ...pendingOc } as { enabled?: unknown; providers?: unknown; extraInputs?: unknown }\n const unavailable = snapshot.status === 'unavailable'\n const providers = snapshot.status === 'ready' ? providersOf(snapshot) : {}\n // H1: the overlay must sit at the SOURCE of the model-row derivation chain —\n // thinking / vision / effort / context all flow from entriesOf(...).\n const viewProviders = { ...providers, ...pendingPi }\n // Every llm-pi-ai provider is listed with its models — no list gating: the\n // official compat surface (dsh ≥ rc.8) means pi-ai serves every route\n // natively, so each model is editable right here.\n const allEntries = entriesOf(viewProviders)\n\n // UI-only state: provider/model expansion, the wire drafts, and the query.\n const [query, setQuery] = useState('')\n const [expandedProviders, setExpandedProviders] = useState<Record<string, boolean>>({})\n const [expandedModels, setExpandedModels] = useState<Record<string, boolean>>({})\n const [drafts, setDrafts] = useState<Record<string, Record<string, string | null>>>({})\n // `busy` has no writer by design (see the optimistic-write note above) —\n // every write path is optimistic with its own inline rollback, so the\n // disabled states below are currently pure `readonly` mirrors.\n const [busy] = useState(false)\n const [contextRaw, setContextRaw] = useState<Record<string, string>>({})\n const [contextError, setContextError] = useState<Record<string, string>>({})\n\n const entryKey = (entry: CapabilityEntry): string => `${entry.providerId}\\u0000${entry.index}`\n\n /** Commit one patch over the user-layer providers (optimistic + self-heal retry). */\n const commitProviders = (mutate: (current: Record<string, unknown>) => Record<string, unknown>): void => {\n if (snapshot.status !== 'ready' || readonly) return\n const next = mutate(structuredClone(viewProviders))\n setPendingPi(next)\n void setWithRetry(scope, 'providers', next).then(({ ok }) => {\n setPendingPi(undefined)\n if (!ok) setWriteError(t('card.writeError'))\n })\n }\n\n /** Toggle the route-level official compat flag: unchecked = inherit (unset). */\n const toggleDeveloperRole = (providerId: string, next: boolean): void => {\n commitProviders((current) => {\n const profile = current[providerId] as Record<string, unknown> | undefined\n if (profile === undefined) return current\n const compat = typeof profile['compat'] === 'object' && profile['compat'] !== null && !Array.isArray(profile['compat'])\n ? { ...(profile['compat'] as Record<string, unknown>) }\n : {}\n if (next) compat['supportsDeveloperRole'] = false\n else delete compat['supportsDeveloperRole']\n if (Object.keys(compat).length === 0) delete profile['compat']\n else profile['compat'] = compat\n return current\n })\n }\n\n /**\n * Toggle the per-route third-party takeover. Ownership split (plan §D): this\n * checkbox writes MEMBERSHIP only — `OC.enabled`'s sole writer is the host\n * mirror of TL's `takeover` master. Checking a route while the master is off\n * lights the master through ONE TL-namespace write instead of the old direct\n * OC.enabled write that used to fight the mirror and bounce the checkbox.\n */\n const toggleTakeover = (providerId: string, next: boolean): void => {\n if (ocScope === undefined || !ocWritable) return\n const currentProviders = Array.isArray(viewOc.providers)\n ? (viewOc.providers as unknown[]).filter((id): id is string => typeof id === 'string')\n : []\n const providers = next\n ? [...new Set([...currentProviders, providerId])]\n : currentProviders.filter((id) => id !== providerId)\n setPendingOc((cur) => ({ ...cur, providers }))\n // Master-off detection reads TL's OWN snapshot, never viewOc.enabled: the\n // enabled field folds lazily (host mirror timing) and reads stale-true\n // right after a master-off click, which would skip the auto-light. The\n // TL snapshot folds on the master write itself, so it is always fresh.\n const tlTakeoverNow = (tlScope?.getSnapshot().value as { takeover?: unknown } | undefined)?.takeover === true\n if (next && !tlTakeoverNow && tlScope !== undefined) {\n // Light the master AND carry OC.enabled with it in-session: the host\n // mirror only reconciles at boot reliably, so the card writes both sides\n // of the lighting (same value — no fight with the mirror is possible).\n void setWithRetry(tlScope, 'takeover', true).then(({ ok }) => {\n if (!ok) setWriteError(t('card.writeError'))\n })\n void setWithRetry(ocScope, 'enabled', true).then(({ ok }) => {\n if (!ok) setWriteError(t('card.writeError'))\n })\n }\n void setWithRetry(ocScope, 'providers', providers).then(({ ok }) => {\n setPendingOc((cur) => {\n const rest = { ...cur }\n delete rest['providers']\n return rest\n })\n if (!ok) {\n setPendingOc((cur) => ({ ...cur, providers: currentProviders }))\n setWriteError(t('card.writeError'))\n }\n })\n }\n\n /** The model's extra input modalities declared on the transport ('provider/model' key). */\n const modelExtrasOf = (providerId: string, modelId: string): string[] =>\n extraInputsOf(viewOc)[`${providerId}/${modelId}`] ?? []\n\n /** Toggle one model's video/audio/pdf declaration on the transport's extraInputs.\n * The host pi-ai schema caps model-row `input` at text|image, so omni\n * modalities live here — effective only while the route is taken over. */\n const toggleModelModality = (providerId: string, modelId: string, modality: 'video' | 'audio' | 'pdf', next: boolean): void => {\n if (ocScope === undefined || !ocWritable) return\n const current = extraInputsOf(viewOc)\n const modelKey = `${providerId}/${modelId}`\n const entry = Array.isArray(current[modelKey]) ? [...current[modelKey]] : []\n const nextEntry = next ? [...new Set([...entry, modality])] : entry.filter((m) => m !== modality)\n const nextDict: Record<string, string[]> = { ...current }\n if (nextEntry.length > 0) nextDict[modelKey] = nextEntry\n else delete nextDict[modelKey]\n setPendingOc((cur) => ({ ...cur, extraInputs: nextDict }))\n void setWithRetry(ocScope, 'extraInputs', nextDict).then(({ ok }) => {\n setPendingOc((cur) => {\n const rest = { ...cur }\n delete rest['extraInputs']\n return rest\n })\n if (!ok) {\n setPendingOc((cur) => ({ ...cur, extraInputs: current }))\n setWriteError(t('card.writeError'))\n }\n })\n }\n\n /** Patch one model row of one provider. */\n const patchModel = (\n providerId: string,\n index: number,\n patch: (model: Record<string, unknown>) => void,\n ): void => {\n commitProviders((current) => {\n const profile = current[providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) return current\n const model = profile.models[index]\n if (typeof model !== 'object' || model === null) return current\n patch(model as Record<string, unknown>)\n return current\n })\n }\n\n /**\n * Toggle whether a model is a thinking model (`reasoningEfforts` table vs\n * false). Delegates the row patch to {@link writeThinkingRow}: thinking is\n * declared on every protocol, only the completions-only format autofill is\n * protocol-gated.\n */\n const toggleThinking = (entry: CapabilityEntry, next: boolean): void => {\n patchModel(entry.providerId, entry.index, (row) => writeThinkingRow(entry, row, next))\n }\n\n /**\n * Toggle whether a model accepts reasoning_effort levels.\n *\n * openai-completions only, by construction: the checkbox is no longer\n * rendered anywhere else (issue #7), so this writer can never be reached with\n * a route whose protocol would refuse the field.\n */\n const toggleEffortCapable = (entry: CapabilityEntry, next: boolean): void => {\n if (!completionsCompatConfigurable(entry)) return\n patchModel(entry.providerId, entry.index, (row) => {\n patchCompat(row, (compat) => {\n compat['supportsReasoningEffort'] = next\n // Counterpart of the auto-fill in toggleThinking: effort-capable rows\n // need reasoning_effort on the wire, so drop the toggle-style qwen\n // format when effort turns on (it would drive enable_thinking instead).\n if (next && compat['thinkingFormat'] === 'qwen-chat-template') delete compat['thinkingFormat']\n })\n })\n }\n\n /** Remove the completions-only compat leftovers from one model row (issue\n * #7's cleanup half). The audit lives in {@link staleThinkingCompatFields};\n * this is the one-click repair, and it is a no-op when the row is already\n * clean. */\n const stripStaleCompat = (entry: CapabilityEntry): void => {\n patchModel(entry.providerId, entry.index, (row) => {\n stripThinkingCompat(entry, row)\n })\n }\n\n /**\n * Sweep every stale row in one providers write (card-level audit button).\n * One write instead of N: the host validates the whole payload, so a\n * half-cleaned section could still be refused by a row the sweep had not\n * reached yet.\n */\n const stripAllStaleCompat = (): void => {\n commitProviders((current) => {\n for (const entry of entriesOf(current)) {\n const profile = current[entry.providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) continue\n const row = profile.models[entry.index]\n if (typeof row !== 'object' || row === null) continue\n stripThinkingCompat(entry, row as Record<string, unknown>)\n }\n return current\n })\n }\n\n /** Apply one model's wire draft as its `reasoningEfforts` table. */\n const applyDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n const draft = drafts[key]\n if (draft === undefined) return\n const table = effortTableOf(draft)\n patchModel(entry.providerId, entry.index, (row) => {\n row['reasoningEfforts'] = table\n // The `supportsReasoningEffort` side effect is a COMPLETIONS-ONLY concern\n // (issue #8): it tells pi-ai's completions wire to send a reasoning_effort\n // string. Anthropic/Responses derive their dispatch from the\n // thinkingLevelMap alone, and the host refuses the field on those\n // protocols — writing it here would reject the WHOLE providers payload,\n // i.e. ticking one level would silently fail the save.\n if (!completionsCompatConfigurable(entry)) return\n // Mark effort support only when the model already had it or the user\n // ticked a reasoning_effort-only level (minimal/low/medium/xhigh/max).\n // A toggle-only model (Qwen3.6: off/high = enable_thinking) must keep\n // supportsReasoningEffort false — flipping it would make the adapter\n // send a reasoning_effort the gateway rejects (400).\n const extended = Object.keys(table).some(level => level !== 'off' && level !== 'on' && level !== 'high')\n if (supportsEffortOf(row) || extended) {\n patchCompat(row, (compat) => {\n compat['supportsReasoningEffort'] = true\n })\n }\n })\n }\n\n /** Reset a model's draft to its persisted table (or the default high set). */\n const resetDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setDrafts(current => {\n const next = { ...current }\n const table = effortsOf(entry.model)\n if (typeof table === 'object' && table !== null) {\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\n level,\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\n ]))\n } else {\n next[key] = { off: '', high: 'high' }\n }\n return next\n })\n }\n\n /** Seed a model's draft when it is first expanded. */\n const ensureDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setDrafts(current => {\n if (current[key] !== undefined) return current\n const next = { ...current }\n const table = effortsOf(entry.model)\n if (typeof table === 'object' && table !== null) {\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\n level,\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\n ]))\n } else {\n next[key] = { off: '', high: 'high' }\n }\n return next\n })\n }\n\n /** Apply a one-click preset to every thinking model. */\n const applyPreset = (levels: Record<string, unknown>): void => {\n commitProviders((current) => {\n for (const entry of entriesOf(current)) {\n const profile = current[entry.providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) continue\n const model = profile.models[entry.index]\n if (typeof model !== 'object' || model === null) continue\n const row = model as Record<string, unknown>\n if (effortsOf(row) === undefined) continue // only thinking models\n // Replace the table but never touch supportsReasoningEffort: a\n // toggle-only model (Qwen3.6) must stay Off/On (enable_thinking), so\n // the request guard keeps clamping any injected level to its default\n // strength instead of sending a reasoning_effort the gateway rejects.\n row['reasoningEfforts'] = levels\n }\n return current\n })\n }\n\n /** Seed a model's context-window input when it is first expanded. */\n const seedContext = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setContextRaw(current => {\n if (current[key] !== undefined) return current\n const value = entry.model['contextWindow']\n return {\n ...current,\n [key]: typeof value === 'number' && Number.isFinite(value) ? String(value) : '',\n }\n })\n }\n\n /** Write (or delete) a model's `contextWindow` in the llm-pi-ai entry. */\n const commitContextWindow = (entry: CapabilityEntry, value: number | undefined): void => {\n const key = entryKey(entry)\n patchModel(entry.providerId, entry.index, (row) => {\n if (value === undefined) delete row['contextWindow']\n else row['contextWindow'] = value\n })\n setContextError(current => {\n const next = { ...current }\n delete next[key]\n return next\n })\n }\n\n /** Apply one preset immediately. */\n const applyContextPreset = (entry: CapabilityEntry, value: number): void => {\n const key = entryKey(entry)\n setContextRaw(current => ({ ...current, [key]: String(value) }))\n commitContextWindow(entry, value)\n }\n\n /** Validate and commit the custom input (blur / Enter); empty clears it. */\n const applyContextInput = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n const raw = (contextRaw[key] ?? '').trim()\n if (raw === '') {\n commitContextWindow(entry, undefined)\n return\n }\n const validation = validateContextWindow(raw)\n if (!validation.ok) {\n setContextError(current => ({\n ...current,\n [key]: t(validation.reason === 'integer'\n ? 'card.capabilities.contextInteger'\n : 'card.capabilities.contextRange'),\n }))\n return\n }\n commitContextWindow(entry, validation.value)\n }\n\n /** Clear the model's context-window declaration (delete the field). */\n const clearContext = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setContextRaw(current => ({ ...current, [key]: '' }))\n commitContextWindow(entry, undefined)\n }\n\n if (unavailable) {\n return (\n <div style={sectionStyle}>\n <p style={hintStyle}>{t('card.capabilities.unavailable')}</p>\n </div>\n )\n }\n if (allEntries.length === 0) {\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\n <p style={hintStyle}>{t('card.capabilities.empty')}</p>\n </div>\n )\n }\n\n const needle = query.trim().toLowerCase()\n const visible = needle === ''\n ? allEntries\n : allEntries.filter(entry =>\n entry.modelId.toLowerCase().includes(needle)\n || entry.providerId.toLowerCase().includes(needle))\n const providerIds = [...new Set(visible.map(entry => entry.providerId))]\n // Issue #7 audit: rows an older version force-wrote the openai-completions\n // compat fields onto. They block the NEXT write on that route wholesale, so\n // the count is surfaced at card level with a route-wide sweep.\n const staleEntries = allEntries.filter(entry => staleThinkingCompatFields(entry).length > 0)\n\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\n <p style={hintStyle}>{t('card.capabilities.hint')}</p>\n {writeError !== null && (\n <p style={{ margin: '0 0 4px', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }} role=\"status\">⚠ {writeError}</p>\n )}\n {staleEntries.length > 0 && (\n <div style={{ margin: '4px 0 6px' }}>\n <p style={{ ...hintStyle, color: 'var(--dsw-alias-warning, #b7791f)' }}>\n {t('card.capabilities.staleCompat')}: {staleEntries.length} / {allEntries.length}\n </p>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={stripAllStaleCompat}\n style={{ ...controlStyle, cursor: readonly || busy ? 'default' : 'pointer' }}\n >\n {t('card.capabilities.stripStaleCompat')}\n </button>\n </div>\n )}\n\n {/* Search + one-click presets */}\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '8px 0 2px' }}>\n <input\n type=\"text\"\n value={query}\n placeholder={t('card.capabilities.search')}\n disabled={readonly || busy}\n style={{ ...controlStyle, flex: '1 1 160px', minWidth: '140px' }}\n onChange={(event) => setQuery(event.currentTarget.value)}\n />\n {PRESETS.map(preset => (\n <button\n key={preset.key}\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyPreset(preset.levels)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t(`card.capabilities.preset${preset.key === 'official' ? 'Official' : 'Generic'}`)}\n </button>\n ))}\n </div>\n\n {visible.length === 0\n ? <p style={hintStyle}>{t('card.capabilities.noMatches')}</p>\n : providerIds.map(providerId => {\n const providerEntries = visible.filter(entry => entry.providerId === providerId)\n const providerOpen = expandedProviders[providerId] === true || needle !== ''\n return (\n <div key={providerId} style={providerStyle}>\n <div style={providerHeadStyle}>\n <button\n type=\"button\"\n aria-expanded={providerOpen}\n disabled={readonly || busy}\n onClick={() => setExpandedProviders(current => ({\n ...current,\n [providerId]: current[providerId] !== true,\n }))}\n style={{\n ...iconButtonStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n }}\n title={providerOpen ? t('card.capabilities.collapseProvider') : t('card.capabilities.expandProvider')}\n >\n <ChevronIcon open={providerOpen} />\n </button>\n <p style={providerNameStyle}>{providerId}</p>\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '11px', whiteSpace: 'nowrap', color: 'var(--dsw-alias-label-secondary)' }}\n title={t('card.capabilities.developerRoleHint')}\n >\n <input\n type=\"checkbox\"\n checked={developerRoleDisabledOf(providers[providerId])}\n disabled={readonly || busy}\n onChange={(event) => toggleDeveloperRole(providerId, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.developerRole')}</span>\n </label>\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '11px', whiteSpace: 'nowrap', color: ocWritable ? 'var(--dsw-alias-label-secondary)' : 'var(--dsw-alias-label-disabled, var(--dsw-alias-label-caption))' }}\n title={ocScope === undefined ? t('card.capabilities.takeoverHintAbsent') : t('card.capabilities.takeoverHint')}\n >\n <input\n type=\"checkbox\"\n checked={takeoverActiveOf(viewOc, providerId)}\n disabled={readonly || busy || !ocWritable}\n onChange={(event) => toggleTakeover(providerId, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.takeover')}</span>\n </label>\n <p style={providerBadgeStyle}>{providerEntries.length}</p>\n </div>\n {providerOpen\n ? providerEntries.map(entry => {\n const key = entryKey(entry)\n const modelOpen = expandedModels[key] === true\n const efforts = effortsOf(entry.model)\n const thinking = typeof efforts === 'object'\n // Display falls back to the provider-level `compat` so a\n // route-declared thinking/effort posture shows on every model.\n const compat = compatOf(entry)\n const supportsEffort = compat['supportsReasoningEffort'] === true\n // Issue #2/#6/#7: a non-completions protocol refuses the\n // openai-completions compat FIELDS at the write site. Issue #7\n // moves them OUT of that surface entirely (they are not\n // rendered at all) instead of rendering them disabled: the\n // fields are only reachable once the model is DECLARED a\n // thinking model AND the route speaks completions. The\n // Thinking switch stays live on every protocol — it writes\n // protocol-neutral `reasoningEfforts`, the prerequisite.\n const compatGated = !completionsCompatConfigurable(entry)\n const compatOffered = thinking && !compatGated\n // What an older version force-wrote onto this row (or a\n // hand-edited cordis.yml left behind): a hard write blocker\n // for the whole route, so it is surfaced with one-click cleanup.\n const stale = staleThinkingCompatFields(entry)\n const meta = summaryOf(entry)\n const format = typeof compat['thinkingFormat'] === 'string'\n ? compat['thinkingFormat']\n : undefined\n return (\n <div key={key}>\n <div style={modelRowStyle}>\n <button\n type=\"button\"\n aria-expanded={modelOpen}\n disabled={readonly || busy}\n onClick={() => {\n const next = expandedModels[key] !== true\n setExpandedModels(current => ({ ...current, [key]: next }))\n if (next) { ensureDraft(entry); seedContext(entry) }\n }}\n style={{\n ...iconButtonStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n }}\n title={modelOpen ? t('card.capabilities.closeModelSettings') : t('card.capabilities.openModelSettings')}\n >\n <ChevronIcon open={modelOpen} />\n </button>\n <p style={modelIdStyle}>{entry.modelId}</p>\n <span style={badgeStyle} title=\"text\">{meta.text ? 'T' : '–'}</span>\n <span style={badgeStyle} title=\"image\">{meta.image ? 'IMG' : '–'}</span>\n {modelExtrasOf(entry.providerId, entry.modelId).includes('video') && <span style={badgeStyle} title=\"video (extraInputs)\">VID</span>}\n {modelExtrasOf(entry.providerId, entry.modelId).includes('audio') && <span style={badgeStyle} title=\"audio (extraInputs)\">AUD</span>}\n {modelExtrasOf(entry.providerId, entry.modelId).includes('pdf') && <span style={badgeStyle} title=\"pdf (extraInputs)\">PDF</span>}\n {meta.context !== null && <span style={badgeStyle}>{meta.context}</span>}\n {thinking && !supportsEffort && <span style={badgeStyle}>On/Off</span>}\n </div>\n {modelOpen\n ? (\n <div style={{ padding: '4px 10px 10px', borderTop: '1px solid var(--dsw-alias-border-l2)' }}>\n {compatGated && <p style={hintStyle}>{t('card.capabilities.apiUnsupported')}</p>}\n {stale.length > 0 && (\n <div style={{ margin: '0 0 8px' }}>\n <p style={{ ...hintStyle, color: 'var(--dsw-alias-warning, #b7791f)' }}>\n {t('card.capabilities.staleCompat')}: {stale.join(', ')}\n </p>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => stripStaleCompat(entry)}\n style={{ ...controlStyle, cursor: readonly || busy ? 'default' : 'pointer' }}\n >\n {t('card.capabilities.stripStaleCompat')}\n </button>\n </div>\n )}\n {/* Layer 1 — base capabilities: is it a thinking model? A vision model? */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', margin: '2px 0 8px' }}>\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}\n title={compatGated ? t('card.capabilities.thinkingNative') : undefined}\n >\n <input\n type=\"checkbox\"\n checked={thinking}\n disabled={readonly || busy}\n onChange={(event) => toggleThinking(entry, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.thinking')}</span>\n </label>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={meta.image}\n disabled={readonly || busy}\n onChange={(event) => {\n patchModel(entry.providerId, entry.index, (row) => {\n // Image input implies text input; the pair is written together.\n row['input'] = event.currentTarget.checked ? ['text', 'image'] : ['text']\n })\n }}\n />\n <span>{t('card.capabilities.vision')}</span>\n </label>\n {/* Video/audio/pdf declarations live on the taken-over transport\n (extraInputs): the host model-row input enum caps at text|image.\n `pdf` is accepted by the transport schema (audio|video|pdf) and\n renders uploaded PDFs as native OpenAI `file` parts. */}\n {(['video', 'audio', 'pdf'] as const).map(modality => (\n <label\n key={modality}\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px', color: takeoverActiveOf(viewOc, entry.providerId) ? undefined : 'var(--dsw-alias-label-disabled, var(--dsw-alias-label-caption))' }}\n title={t('card.capabilities.mediaHint')}\n >\n <input\n type=\"checkbox\"\n checked={modelExtrasOf(entry.providerId, entry.modelId).includes(modality)}\n disabled={readonly || busy || !ocWritable || !takeoverActiveOf(viewOc, entry.providerId)}\n onChange={(event) => toggleModelModality(entry.providerId, entry.modelId, modality, event.currentTarget.checked)}\n />\n <span>{t(`card.capabilities.${modality}`)}</span>\n </label>\n ))}\n </div>\n {/* Layer 2 — openai-completions-only compat switch, and\n only once the model is DECLARED a thinking model:\n a non-thinking model has no effort wire to declare,\n and a non-completions route refuses the field. */}\n {compatOffered\n ? (\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px', margin: '0 0 8px' }}\n >\n <input\n type=\"checkbox\"\n checked={supportsEffort}\n disabled={readonly || busy}\n onChange={(event) => toggleEffortCapable(entry, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.supportsEffort')}</span>\n </label>\n )\n : null}\n {/* Layer 3 — the per-level wire map (`reasoningEfforts`).\n PROTOCOL-NEUTRAL (issue #8): the host turns this table\n into pi-ai's `thinkingLevelMap`, which every protocol\n reads — Anthropic for its thinking budget, Responses\n for its reasoning effort, completions for the\n reasoning_effort string. So the editor must open on a\n non-completions route too; only the COMPLETIONS\n toggle-style guard (needs `supportsReasoningEffort`\n before offering reasoning_effort levels) applies. */}\n {thinking && (!compatOffered || supportsEffort)\n ? (\n <>\n {/* Per-level wire editor — the reasoningEfforts map */}\n <p style={fieldLabelStyle}>{t('card.capabilities.efforts')}</p>\n <div style={{ margin: '4px 0 6px' }}>\n {CAPABILITY_LEVELS.map(level => {\n const wire = drafts[key]?.[level]\n const on = wire !== undefined && wire !== null\n return (\n <div key={level} style={levelRowStyle}>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={on}\n disabled={readonly || busy}\n onChange={(event) => {\n const checked = event.currentTarget.checked\n setDrafts(current => {\n const draft = { ...(current[key] ?? {}) }\n draft[level] = checked\n ? (level === 'off' ? '' : level)\n : null\n return { ...current, [key]: draft }\n })\n }}\n />\n <span>{level}</span>\n </label>\n <span style={levelNameStyle}>{level === 'off' ? t('card.capabilities.offPlaceholder') : '→'}</span>\n <input\n type=\"text\"\n value={wire ?? ''}\n disabled={readonly || busy || !on}\n placeholder={t('card.capabilities.wirePlaceholder')}\n style={wireInputStyle}\n onChange={(event) => {\n setDrafts(current => {\n const draft = { ...(current[key] ?? {}) }\n draft[level] = event.currentTarget.value\n return { ...current, [key]: draft }\n })\n }}\n />\n </div>\n )\n })}\n </div>\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyDraft(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.applyLevel')}\n </button>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => resetDraft(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.restoreDefault')}\n </button>\n </div>\n </>\n )\n : null}\n {/* Layer 4 — thinking format (wire serialization). Same\n two conditions as Layer 2: it is a completions-only\n compat field describing how a THINKING model's\n levels serialize, so it is absent everywhere else. */}\n {compatOffered && (\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\n <label style={fieldStyle}>\n <span style={fieldLabelStyle}>{t('card.capabilities.thinkingFormat')}</span>\n <select\n style={controlStyle}\n value={format ?? 'inherit'}\n disabled={readonly || busy}\n onChange={(event) => {\n const next = event.currentTarget.value\n patchModel(entry.providerId, entry.index, (row) => {\n patchCompat(row, (compat) => {\n if (next === 'inherit') delete compat['thinkingFormat']\n else compat['thinkingFormat'] = next\n })\n })\n }}\n >\n <option value=\"inherit\">{t('card.capabilities.thinkingFormat.inherit')}</option>\n {THINKING_FORMATS.map(formatOption => (\n <option key={formatOption} value={formatOption}>{formatOption}</option>\n ))}\n </select>\n </label>\n </div>\n )}\n {/* Context-window limit: presets + custom integer (written to llm-pi-ai, live on next request) */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\n <label style={fieldStyle}>\n <span style={fieldLabelStyle}>{t('card.capabilities.contextWindow')}</span>\n <div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap', alignItems: 'center' }}>\n {CONTEXT_WINDOW_PRESETS.map(preset => (\n <button\n key={preset.value}\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyContextPreset(entry, preset.value)}\n style={{\n ...controlStyle,\n padding: '2px 8px',\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {preset.label}\n </button>\n ))}\n <input\n type=\"text\"\n value={contextRaw[key] ?? ''}\n disabled={readonly || busy}\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\n style={{ ...controlStyle, width: '120px' }}\n onChange={(event) => {\n const next = event.currentTarget.value\n setContextRaw(current => ({ ...current, [key]: next }))\n }}\n onBlur={() => applyContextInput(entry)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') event.currentTarget.blur()\n }}\n />\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => clearContext(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.contextClear')}\n </button>\n </div>\n {contextError[key] !== undefined\n ? (\n <span style={{ margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }}>\n {contextError[key]}\n </span>\n )\n : null}\n </label>\n </div>\n </div>\n )\n : null}\n </div>\n )\n })\n : null}\n </div>\n )\n })}\n {readonly ? <p style={hintStyle}>{t('card.readonly')}</p> : null}\n </div>\n )\n}\n\n/**\n * The absent-llm-deepseek snapshot: module-level CONSTANT (the stable-snapshot\n * rule that killed the first-ever panel mount, #185).\n */\nconst DS_ABSENT_SNAPSHOT = Object.freeze({\n status: 'unavailable' as const,\n value: undefined,\n revision: undefined,\n writable: false,\n base: undefined,\n user: undefined,\n mode: 'memory' as const,\n})\n\n/**\n * Official DeepSeek model context-window editor (4.4.0): the per-line editor\n * lived only in the ModelPanel; with the seat takeover off by default the\n * card owns it. Writes mirror the panel's DEEPSEEK branch exactly: the model\n * entry's `contextWindow` when listed, the route `defaultContextWindow`\n * otherwise (clear = back to the native 1M).\n * @param props - the llm-deepseek scope (absent = section hidden), copy, fence.\n * @returns the editor block, or null when the namespace/scope is unavailable.\n */\nfunction DeepSeekContextSection(props: {\n scope: SettingsScope<unknown> | undefined\n t: (key: string) => string\n readonly: boolean\n}): JSX.Element | null {\n const { scope, t, readonly } = props\n const subscribe = useCallback(\n (listener: () => void) => (scope !== undefined ? scope.subscribe(listener) : () => {}),\n [scope],\n )\n const getSnapshot = useCallback(\n () => (scope === undefined ? DS_ABSENT_SNAPSHOT : scope.getSnapshot()),\n [scope],\n )\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\n const [raw, setRaw] = useState<Record<string, string>>({})\n const [errors, setErrors] = useState<Record<string, string>>({})\n const [busy, setBusy] = useState(false)\n if (snapshot.status !== 'ready') return null\n const section = deepseekSectionOf(snapshot)\n const models = section.models ?? []\n if (models.length === 0 && section.defaultContextWindow === undefined) return null\n const writable = snapshot.writable && !readonly && !busy\n\n /** Commit one row's window (index -1 = the route default layer). */\n const commit = (index: number, value: number | undefined): void => {\n if (scope === undefined || !writable) return\n setBusy(true)\n const rows = (deepseekSectionOf(scope.getSnapshot()).models ?? []).map(entry => ({ ...entry }))\n const write = index >= 0\n ? scope.set('models', rows.map((entry, at) => {\n if (at !== index) return entry\n if (value === undefined) {\n const rest = { ...entry }\n delete rest['contextWindow']\n return rest\n }\n return { ...entry, contextWindow: value }\n }))\n : scope.set('defaultContextWindow', value ?? DEEPSEEK_DEFAULT_WINDOW)\n void write.then(\n () => {\n setBusy(false)\n setErrors(cur => {\n const next = { ...cur }\n delete next[String(index)]\n return next\n })\n },\n () => {\n setBusy(false)\n setErrors(cur => ({ ...cur, [String(index)]: t('card.capabilities.failed') }))\n },\n )\n }\n\n /** Validate and commit the custom input; empty clears. */\n const applyCustom = (index: number): void => {\n const key = String(index)\n const trimmed = (raw[key] ?? '').trim()\n if (trimmed === '') {\n commit(index, undefined)\n return\n }\n const validation = validateContextWindow(trimmed)\n if (!validation.ok) {\n setErrors(cur => ({\n ...cur,\n [key]: t(validation.reason === 'integer' ? 'input.context.integer' : 'input.context.range'),\n }))\n return\n }\n commit(index, validation.value)\n }\n\n const rows: { label: string; index: number; value: number | undefined }[] = [\n ...models.map((entry, index) => ({\n label: String(entry['name'] ?? entry['id'] ?? index),\n index,\n value: contextWindowOf(entry),\n })),\n { label: t('model.panel.window'), index: -1, value: section.defaultContextWindow },\n ]\n\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.dsContextTitle')}</p>\n {rows.map(row => {\n const key = String(row.index)\n return (\n <div key={key} style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '6px 0' }}>\n <span style={{ ...fieldLabelStyle, margin: 0 }}>{row.label}</span>\n <span style={badgeStyle}>{row.value === undefined ? t('input.context.unset') : formatContextWindow(row.value)}</span>\n {CONTEXT_WINDOW_PRESETS.map(preset => (\n <button\n key={preset.value}\n type=\"button\"\n disabled={!writable}\n onClick={() => commit(row.index, preset.value)}\n style={{\n ...controlStyle,\n padding: '2px 8px',\n cursor: writable ? 'pointer' : 'default',\n opacity: writable ? 1 : 0.5,\n }}\n >\n {preset.label}\n </button>\n ))}\n <input\n type=\"text\"\n inputMode=\"numeric\"\n value={raw[key] ?? ''}\n disabled={!writable}\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\n style={{ ...controlStyle, width: '120px' }}\n onChange={event => setRaw(cur => ({ ...cur, [key]: event.currentTarget.value }))}\n onKeyDown={event => { if (event.key === 'Enter') applyCustom(row.index) }}\n />\n <button\n type=\"button\"\n disabled={!writable || row.value === undefined}\n onClick={() => commit(row.index, undefined)}\n style={{ ...controlStyle, padding: '2px 8px' }}\n >\n {t('input.context.clear')}\n </button>\n {errors[key] !== undefined && (\n <span style={{ fontSize: '12px', color: 'var(--dsw-alias-danger, #e5484d)' }}>{errors[key]}</span>\n )}\n </div>\n )\n })}\n </div>\n )\n}\n\n/**\n * The card body, wrapped in a disclosure shell like every peer settings card:\n * a header (name + description + chevron) that toggles the body, expanded by\n * default so the family section reads as an open page of drawers.\n * @param props - locale copy and the injected scopes.\n */\nexport function ThinkingLevelsCard({ t, scope, piAiScope, ocScope, deepseekScope }: ThinkingLevelsCardProps): JSX.Element {\n const [open, setOpen] = useState(true)\n // Stable subscription identities (see ModelCapabilities): the host controller\n // folds a fresh snapshot on every subscribe, so per-render inline lambdas\n // would resubscribe→fold→re-render forever.\n const subscribe = useCallback((listener: () => void) => scope.subscribe(listener), [scope])\n const getSnapshot = useCallback(() => scope.getSnapshot(), [scope])\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\n const unavailable = snapshot.status === 'unavailable'\n const readonly = unavailable || !snapshot.writable\n // configForms serves the STORED doc: volatile fields arrive as plain values\n // (simplify() unwraps the live refs before persistence), so the card sees a\n // plain config shape even though the host-side type carries Volatile unions.\n const value = (snapshot.value ?? {}) as unknown as Partial<{\n enabled: boolean\n level: EffortId\n allowDowngrade: boolean\n allowUpgrade: boolean\n takeover: boolean\n takeoverUi: boolean\n defaultPricing: PricingPolicy\n simpleTools: string[]\n }>\n // Optimistic overlay for this card's own writes (plan §E): same contract as\n // the capability card's overlay — clear on resolve(true), roll back + banner\n // on resolve(false).\n const [pendingTl, setPendingTl] = useState<Partial<{ enabled: boolean; level: EffortId; allowDowngrade: boolean; allowUpgrade: boolean; takeover: boolean; takeoverUi: boolean; defaultPricing: PricingPolicy; simpleTools: string[] }>>({})\n const [writeErrorTl, setWriteErrorTl] = useState<string | null>(null)\n // The simple-tool allowlist is edited as free text (comma/space separated) and\n // written back as a deduped string[]; the local text is the source of truth for\n // the input so typing a trailing comma does not fight the persisted array.\n const [simpleToolsText, setSimpleToolsText] = useState<string>((value.simpleTools ?? []).join(', '))\n const viewValue = { ...value, ...pendingTl }\n // 首次使用引导:本地标记持久化;卡底「重新查看引导」清标记就地重开。\n const [guideOpen, setGuideOpen] = useState(() => !isGuideSkipped('thinking-levels'))\n const level = EFFORT_OPTIONS.includes(viewValue.level as EffortId) ? viewValue.level as EffortId : 'auto'\n const defaultPricing = PRICING_OPTIONS.includes(viewValue.defaultPricing as PricingPolicy) ? viewValue.defaultPricing as PricingPolicy : 'estimate'\n const writeTl = (field: 'enabled' | 'level' | 'allowDowngrade' | 'allowUpgrade' | 'simpleTools' | 'takeover' | 'takeoverUi' | 'defaultPricing', v: unknown): void => {\n setPendingTl((cur) => ({ ...cur, [field]: v as never }))\n void setWithRetry(scope, field, v).then(({ ok }) => {\n setPendingTl((cur) => {\n const rest = { ...cur }\n delete rest[field]\n return rest\n })\n if (!ok) setWriteErrorTl(t('card.writeError'))\n })\n // The takeover master carries OC.enabled with it in-session (same value):\n // the host mirror reconciles at boot, but an in-session flip must take\n // effect immediately — writing the same value the mirror would write can\n // never fight it.\n if (field === 'takeover' && typeof v === 'boolean' && ocScope !== undefined) {\n void setWithRetry(ocScope, 'enabled', v).then(({ ok }) => {\n if (!ok) setWriteErrorTl(t('card.writeError'))\n })\n }\n }\n\n return (\n <div style={{\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\n borderRadius: '12px',\n transition: 'border-color 0.16s, background 0.16s',\n }}>\n <button\n type=\"button\"\n aria-expanded={open}\n style={{\n appearance: 'none',\n width: '100%',\n font: 'inherit',\n color: 'inherit',\n textAlign: 'left',\n cursor: 'pointer',\n background: 'none',\n border: 0,\n borderRadius: '12px',\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n padding: '14px 16px',\n }}\n onClick={() => { setOpen(current => !current) }}\n >\n <span style={{ flex: '1 1 0%', minWidth: 0 }}>\n <div style={{ fontSize: '14px', fontWeight: 600, color: 'var(--dsw-alias-label-primary)' }}>{t('card.title')}</div>\n <div style={{ color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))', fontSize: '13px', lineHeight: 1.5 }}>{t('card.description')}</div>\n </span>\n <svg\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden\n style={{\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))',\n flex: '0 0 auto',\n transition: 'transform 0.16s',\n transform: open ? 'rotate(180deg)' : 'none',\n }}\n >\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n {open\n ? (\n <div style={{ padding: '12px 16px' }}>\n {/* 引导重启入口放在设置面上方:贴士也渲染在同一位置,跳过之后一眼就能重开。 */}\n <p style={{ margin: '0 0 10px' }}>\n <GuideRestartButton ns=\"thinking-levels\" onOpen={() => { setGuideOpen(true) }} />\n </p>\n {guideOpen\n ? (\n <GuidePanel\n ns=\"thinking-levels\"\n steps={guideSteps(THINKING_GUIDE_STEPS)}\n onClose={() => { setGuideOpen(false) }}\n />\n )\n : null}\n {unavailable\n ? (\n <div style={{ fontSize: '13px', color: 'var(--dsw-alias-label-tertiary)' }}>\n {t('card.unavailable')}\n </div>\n )\n : (\n <>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-level\" style={labelStyle}>{t('card.level')}</label>\n <select\n id=\"plugin-config-thinking-levels-level\"\n value={level}\n disabled={readonly}\n style={controlStyle}\n onChange={(event) => { writeTl('level', event.currentTarget.value as EffortId) }}\n >\n {EFFORT_OPTIONS.map((option) => (\n <option key={option} value={option}>{t(`card.level.${option}`)}</option>\n ))}\n </select>\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-enabled\" style={labelStyle}>{t('card.enabled')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-enabled\"\n checked={viewValue.enabled ?? true}\n disabled={readonly}\n onChange={(next) => { writeTl('enabled', next) }}\n />\n </div>\n <div style={rowStyle}>\n <label\n htmlFor=\"plugin-config-thinking-levels-takeover\"\n style={labelStyle}\n title={t('card.masterTakeoverHint')}\n >{t('card.masterTakeover')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-takeover\"\n checked={viewValue.takeover ?? false}\n disabled={readonly}\n title={t('card.masterTakeoverHint')}\n onChange={(next) => { writeTl('takeover', next) }}\n />\n </div>\n <div style={rowStyle}>\n <label\n htmlFor=\"plugin-config-thinking-levels-takeover-ui\"\n style={labelStyle}\n title={t('card.takeoverUiHint')}\n >{t('card.takeoverUi')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-takeover-ui\"\n checked={viewValue.takeoverUi ?? false}\n disabled={readonly}\n title={t('card.takeoverUiHint')}\n onChange={(next) => { writeTl('takeoverUi', next) }}\n />\n </div>\n {/* Visible explainer (user feedback: what enabling actually\n buys must be readable without hunting for a tooltip). */}\n <p style={{ ...hintStyle, margin: '2px 0 10px' }}>{t('card.takeoverUiHint')}</p>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-downgrade\" style={labelStyle}>{t('card.allowDowngrade')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-downgrade\"\n checked={viewValue.allowDowngrade ?? true}\n disabled={readonly || viewValue.level !== 'auto'}\n onChange={(next) => { writeTl('allowDowngrade', next) }}\n />\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-upgrade\" style={labelStyle}>{t('card.allowUpgrade')}</label>\n <PillToggle\n id=\"plugin-config-thinking-levels-upgrade\"\n checked={viewValue.allowUpgrade ?? false}\n disabled={readonly || viewValue.level !== 'auto'}\n onChange={(next) => { writeTl('allowUpgrade', next) }}\n />\n </div>\n <div style={rowStyle}>\n <label\n htmlFor=\"plugin-config-thinking-levels-default-pricing\"\n style={labelStyle}\n title={t('card.defaultPricingHint')}\n >{t('card.defaultPricing')}</label>\n <select\n id=\"plugin-config-thinking-levels-default-pricing\"\n value={defaultPricing}\n disabled={readonly}\n style={controlStyle}\n onChange={(event) => { writeTl('defaultPricing', event.currentTarget.value) }}\n >\n {PRICING_OPTIONS.map((option) => (\n <option key={option} value={option}>{t(`card.defaultPricing.${option}`)}</option>\n ))}\n </select>\n </div>\n <div style={fieldStyle}>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-simple-tools\" style={labelStyle}>{t('card.simpleTools')}</label>\n <input\n id=\"plugin-config-thinking-levels-simple-tools\"\n type=\"text\"\n style={controlStyle}\n disabled={readonly}\n value={simpleToolsText}\n placeholder=\"shell, pwsh, web_fetch\"\n onChange={(event) => {\n const raw = event.currentTarget.value\n setSimpleToolsText(raw)\n const parsed = Array.from(new Set(raw.split(/[,\\s]+/).map(token => token.trim()).filter(token => token !== '')))\n writeTl('simpleTools', parsed)\n }}\n />\n </div>\n <p style={{ ...hintStyle, margin: '2px 0 10px' }}>{t('card.simpleToolsHint')}</p>\n </div>\n {writeErrorTl !== null && (\n <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-danger, #e5484d)' }} role=\"status\">⚠ {writeErrorTl}</p>\n )}\n {!snapshot.writable\n && <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-label-tertiary)' }}>{t('card.readonly')}</p>}\n <ModelCapabilities scope={piAiScope} ocScope={ocScope} tlScope={scope} t={t} readonly={readonly} />\n <DeepSeekContextSection scope={deepseekScope} t={t} readonly={readonly} />\n </>\n )}\n </div>\n )\n : null}\n </div>\n )\n}\n","/**\r\n * FamilySettingsSection — the top-level 「起子插件设置」 settings section.\r\n *\r\n * One `settings.section` nav entry (registered by this plugin) whose entry\r\n * declares the `dsh-family.tab` child slot; sibling plugins (session-guard\r\n * first) contribute their cards there via `ctx.slots.inject('dsh-family.tab',\r\n * …)`. The section renders the family's own thinking-levels card as the first\r\n * tab and every contributor as a following tab — the same tabs-around-pages\r\n * pattern the built-in Plugins section uses (ui-settings-plugins): the tab\r\n * ledger is a HostObservable projected from the child-slot registry, and the\r\n * active tab mounts through `renderSlot(key, {}, { only: id })`. Each card is\r\n * a disclosure drawer expanded by default, so an opened tab shows its full\r\n * panel right away.\r\n *\r\n * When this section is absent the whole family surface is absent; a\r\n * contributor's inject simply idles (an undischarged wait never blocks the\r\n * client half), so plugins stay fully functional without their card.\r\n */\r\nimport { useEffect, useState } from 'react'\r\nimport type { JSX, ReactNode } from 'react'\r\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\r\nimport { ThinkingLevelsCard, type ThinkingLevelsCardInjected } from './card.tsx'\r\n\r\n/**\r\n * Structural mirrors of the ui-slots faces this section consumes (the same\r\n * pattern as scope-face.ts: the package's `export *` type graph resolves\r\n * unreliably outside the harness workspace, so the handful of shapes are\r\n * declared locally instead).\r\n */\r\ntype HostObservable<T> = {\r\n getSnapshot(): T\r\n subscribe(listener: () => void): () => void\r\n}\r\n\r\n/** One contributor tab projected from the `dsh-family.tab` ledger. */\r\nexport interface FamilyTabEntry {\r\n id: string\r\n order: number\r\n label: string\r\n}\r\n\r\n/** Registration-side business face for the section. */\r\nexport interface FamilySectionInjected extends ThinkingLevelsCardInjected {\r\n hooks: {\r\n /** Ordered projection of the contributor ledger (locale-aware). */\r\n tabs: HostObservable<readonly FamilyTabEntry[]>\r\n }\r\n /** Apply-time EAGER locale binder — the ≤0.1.6 stand-in for the host's\r\n * PropsLocale delivery (0.1.7+ shells pass `t` and this is ignored). */\r\n tFallback?: (key: string) => string\r\n /** Direct-mount face for contributor tabs where the shell delivers no\r\n * renderSlot (≤0.1.6): mounts the active ledger entry's own component from\r\n * the raw `ctx.slots.entries` records. Null on any failure. */\r\n renderContributor?: (id: string) => ReactNode\r\n}\r\n\r\n/**\r\n * The framework-delivered child-slot dispatcher, narrowed to our one child key.\r\n * Optional: the Plugins-page `plugins.bundle.config` card renders this same\r\n * component WITHOUT a children declaration (the `dsh-family.tab` child slot is\r\n * claimed by the settings.section entry alone), so the machinery delivers no\r\n * renderSlot seat on that surface — contributor tabs degrade to empty panels\r\n * there instead of crashing on an absent dispatcher.\r\n */\r\ninterface FamilyRenderSlots {\r\n renderSlot?(key: 'dsh-family.tab', owner?: object, opts?: { only?: string; fallback?: React.ReactNode }): React.ReactNode\r\n}\r\n\r\n/** Full props: locale + contributor dispatcher + the resolved inject face. */\r\nexport type FamilySettingsSectionProps =\r\n PropsLocale<'thinking-levels'>\r\n & FamilyRenderSlots\r\n & FamilySectionInjected\r\n\r\n/** This plugin's own tab, always first: the thinking-levels card itself. */\r\nconst OWN_TAB_ID = 'thinking-levels'\r\n\r\nconst NO_TABS: readonly FamilyTabEntry[] = []\r\n\r\n/** The hooks-compartment selector hook face (bound `use<Name>` hook) —\r\n * delivered by 0.1.7+ shells only; optional for the ≤0.1.6 degraded read. */\r\ninterface FamilyHooksFace {\r\n useTabs?: <S>(selector: (value: readonly FamilyTabEntry[]) => S) => S\r\n}\r\n\r\n/**\r\n * Contributor ledger reader across shell generations. 0.1.7+ shells deliver\r\n * the hooks compartment (`useTabs`); ≤0.1.6 shells deliver none, so the same\r\n * projected observable (`hooks.tabs`, injected by the section factory) is read\r\n * through React's own subscription instead. The face choice is fixed per host\r\n * (a shell never grows hooks mid-session), so the hook order stays stable per\r\n * component instance even though the two paths differ.\r\n */\r\nfunction useContributorTabs(\r\n hooksFace: FamilyHooksFace,\r\n hooksTabs?: HostObservable<readonly FamilyTabEntry[]>,\r\n): readonly FamilyTabEntry[] {\r\n const [polled, setPolled] = useState<readonly FamilyTabEntry[]>(\r\n () => hooksTabs?.getSnapshot() ?? NO_TABS,\r\n )\r\n useEffect(() => {\r\n if (hooksFace.useTabs !== undefined || hooksTabs === undefined) return\r\n return hooksTabs.subscribe(() => setPolled(hooksTabs.getSnapshot()))\r\n }, [hooksFace, hooksTabs])\r\n if (hooksFace.useTabs !== undefined) return hooksFace.useTabs(value => value)\r\n return polled\r\n}\r\n\r\nexport function FamilySettingsSection(props: FamilySettingsSectionProps): JSX.Element {\r\n const { t: tHost, renderSlot, scope, piAiScope, ocScope, deepseekScope } = props\r\n // Locale: the host's PropsLocale delivery when present (0.1.7+), the injected\r\n // EAGER binder when not (≤0.1.6), identity as the last resort — a thrown\r\n // translate kills the whole section render.\r\n const t = tHost ?? props.tFallback ?? ((key: string) => key)\r\n const contributors = useContributorTabs(props as unknown as FamilyHooksFace, props.hooks?.tabs)\r\n const [activeId, setActiveId] = useState<string>(OWN_TAB_ID)\r\n const rows = [\r\n { id: OWN_TAB_ID, order: Number.NEGATIVE_INFINITY, label: t('card.title') },\r\n ...contributors,\r\n ]\r\n const active = rows.some(row => row.id === activeId) ? activeId : OWN_TAB_ID\r\n\r\n return (\r\n <div style={{ display: 'grid', gap: '12px' }}>\r\n <div role=\"tablist\" aria-label={t('family.title')} style={{ display: 'flex', flexWrap: 'wrap', gap: '4px' }}>\r\n {rows.map(row => (\r\n <button\r\n key={row.id}\r\n type=\"button\"\r\n role=\"tab\"\r\n aria-selected={row.id === active}\r\n onClick={() => { setActiveId(row.id) }}\r\n style={{\r\n appearance: 'none',\r\n font: 'inherit',\r\n cursor: 'pointer',\r\n whiteSpace: 'nowrap',\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\r\n background: row.id === active ? 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.08))' : 'none',\r\n color: 'var(--dsw-alias-label-primary, inherit)',\r\n borderRadius: '8px',\r\n padding: '5px 12px',\r\n fontSize: '13px',\r\n }}\r\n >\r\n {row.label}\r\n </button>\r\n ))}\r\n </div>\r\n <div role=\"tabpanel\">\r\n {active === OWN_TAB_ID\r\n ? <ThinkingLevelsCard t={t} scope={scope} piAiScope={piAiScope} ocScope={ocScope} deepseekScope={deepseekScope} />\r\n : renderSlot\r\n ? renderSlot('dsh-family.tab', {}, { only: active, fallback: null })\r\n : props.renderContributor?.(active) ?? null}\r\n </div>\r\n </div>\r\n )\r\n}\r\n","/**\r\n * dsh-thinking-levels — browser half.\r\n *\r\n * Registers the `thinking-levels` dictionaries and one composer model-seat\r\n * panel (`conversation.input.model`) carrying the per-line context-window\r\n * editor.\r\n *\r\n * The plugin's own settings (default level, enable toggle, scheduler bounds)\r\n * have NO standalone settings card since the DSH 0.1.7 line: the host renders\r\n * the Plugins settings form declaratively from the `.volatile()` fields of the\r\n * schema in src/index.ts, and the runtime values flow through the\r\n * `configForms` service keyed by the composition entry id. The former\r\n * per-plugin settings card was dropped with that migration (its seat no\r\n * longer exists in 0.1.7), including its llm-pi-ai model-capability editor.\r\n * DSH 0.2.0 restores a client face for them: the family settings section\r\n * below and the Plugins-page `plugins.bundle.config` card (same component,\r\n * same inject factory).\r\n *\r\n * All @deepseek-ai/* imports are type-only: collaboration happens through\r\n * cordis services (`configForms`) and slot registration only (client bundle\r\n * purity).\r\n */\r\nimport { createElement } from 'react'\r\nimport type { ComponentType, ReactNode } from 'react'\r\nimport type { Context as ClientContext } from '@deepseek-ai/cordis'\r\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\r\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\r\n// DSH 0.1.5 moved the `ctx.slots` Context augmentation here (it used to live in\r\n// the retired `dsh-client-runtime` package): importing the client types restores\r\n// the typed `ctx.slots` member on the cordis Context surface.\r\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\r\nimport { NS, de, en, es, fr, it, ja, ko, pt, ru, zh } from './locales.ts'\r\nimport { ModelPanel, type ModelPanelInjected } from './model-panel.tsx'\r\nimport { EffortTrace } from './effort-trace.tsx'\r\nimport { projectionValueOf } from './projection-value.ts'\r\nimport { ProjectionDataHook } from './context-ring.tsx'\r\nimport { FamilySettingsSection, type FamilySectionInjected, type FamilyTabEntry } from './family-tab.tsx'\r\n// Type-only: pulls the settings shell's SlotMap merges ('settings.section').\r\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\r\n\r\n/**\r\n * The plugin-family shared settings surface: ONE top-level `settings.section`\r\n * nav entry (「起子插件设置」) whose entry declares the `dsh-family.tab` child\r\n * slot; sibling plugins contribute their cards there (session-guard first) and\r\n * the section renders them as tabs — the built-in Plugins section's\r\n * tabs-around-pages pattern; every card drawer is expanded by default. Declaring is claiming (ui-slots): the child slot\r\n * exists exactly while this section entry does, and a contributor's\r\n * `ctx.slots.inject('dsh-family.tab', …)` idles harmlessly if this plugin is\r\n * absent (an undischarged inject never blocks the client half).\r\n */\r\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\r\n interface SlotMap {\r\n 'dsh-family.tab': { kind: 'list'; scope: 'root' }\r\n /**\r\n * Plugins-page configuration card (official ui-plugin-manager contract):\r\n * keyed by the bundle's package name, rendered on the bundle's detail page\r\n * with `{ view: 'page' }` owner props. Declared here because community\r\n * plugins don't import the official package's client types — the same\r\n * merge pattern as dsh-tidy-display's settings-slots.ts.\r\n */\r\n 'plugins.bundle.config': { kind: 'keyed'; scope: 'root'; owner: Record<string, unknown> }\r\n }\r\n}\r\n\r\n/** Services required by the browser half (the common floor across all host\r\n * generations). Generation-specific services resolve through separate deferred\r\n * injects below: a cordis inject naming an absent service would pend forever,\r\n * so `configForms` (0.1.7+), `settingsScope` (≤0.1.6) and `modelDirectories`\r\n * each get their own inject that simply never fires where the service is\r\n * missing — shape-detected availability, never version-guessed.\r\n */\r\nexport const inject = ['slots', 'locale']\r\n\r\n/**\r\n * The openai-completions transport's settings namespace, resolved per render:\r\n * its composition entry id changed shape across packaging history\r\n * (`dsh-llm-openai-completions` in the 0.4.0 fragment; earlier manual installs\r\n * used the short form), so both candidates are probed and the one the host's\r\n * describe document actually carries wins. A handle for an absent namespace\r\n * reports `unavailable` forever, which the capability card treats as \"transport\r\n * absent\" — that degradation is only honest when BOTH candidates are absent.\r\n */\r\nconst OC_NAMESPACE_PREFERRED = 'dsh-llm-openai-completions'\r\nconst OC_NAMESPACE_LEGACY = 'llm-openai-completions'\r\n\r\ninterface ScopeStatusFace {\r\n getSnapshot?: () => { status?: 'loading' | 'ready' | 'unavailable' }\r\n}\r\n\r\nfunction ocTransportScopeOf(scopeOf: (ns: string) => unknown): unknown {\r\n const preferredScope = scopeOf(OC_NAMESPACE_PREFERRED) as ScopeStatusFace | undefined\r\n const status = typeof preferredScope?.getSnapshot === 'function'\r\n ? preferredScope.getSnapshot().status\r\n : undefined\r\n // `loading` means the mirror is still folding — the preferred face may still\r\n // turn ready, so keep it rather than degrading to the legacy name.\r\n if (status === 'unavailable') return scopeOf(OC_NAMESPACE_LEGACY)\r\n return preferredScope\r\n}\r\n\r\nconst TL_NAMESPACE_MODERN = 'dsh-thinking-levels'\r\nconst TL_NAMESPACE_LEGACY = 'thinking-levels'\r\n\r\n/**\r\n * The plugin's own settings scope, generation-probed like the transport above:\r\n * 0.1.7+ keys configForms by the composition entry id (`dsh-thinking-levels`),\r\n * while ≤0.1.6 hosts register the settings section under `thinking-levels` —\r\n * the same namespace the legacy card reads. A handle for an absent namespace\r\n * reports `unavailable` forever, which is the probe signal.\r\n */\r\nfunction tlSettingsScopeOf(scopeOf: (ns: string) => unknown): unknown {\r\n const modern = scopeOf(TL_NAMESPACE_MODERN) as ScopeStatusFace | undefined\r\n const status = typeof modern?.getSnapshot === 'function'\r\n ? modern.getSnapshot().status\r\n : undefined\r\n if (status === 'unavailable') {\r\n logOwnScopeOnce(false, status)\r\n return scopeOf(TL_NAMESPACE_LEGACY)\r\n }\r\n logOwnScopeOnce(true, status)\r\n return modern\r\n}\r\n\r\n/** One-shot generation probe line (client mirror of the server's\r\n * installSection-style log): which own-settings namespace the family section\r\n * settled on, and why. Never repeats — render-time callers hit this often. */\r\nlet ownScopeLogged = false\r\nfunction logOwnScopeOnce(modern: boolean, status: unknown): void {\r\n if (ownScopeLogged) return\r\n ownScopeLogged = true\r\n console.info(`[dsh-thinking-levels] own-scope ns = ${modern ? TL_NAMESPACE_MODERN : TL_NAMESPACE_LEGACY} (modern status=${String(status)})`)\r\n}\r\n\r\n/**\r\n * Raw ledger record: ui-slots keeps `component` and the per-entry `inject` on\r\n * the entry objects of `ctx.slots.entries(key)` on every host line (the\r\n * public SlotMap typing narrows to options only, so the direct-mount face\r\n * widens the shape locally).\r\n */\r\ninterface FamilyLedgerEntry {\r\n options: { id?: string; locale?: string }\r\n component?: ComponentType<Record<string, unknown>>\r\n inject?: () => unknown\r\n}\r\n\r\n/**\r\n * Client plugin body: dictionaries plus the composer quick-control slot.\r\n * @param ctx - client root context.\r\n */\r\nexport function apply(ctx: ClientContext): void {\r\n // `locale.bind` is a 0.1.7+ face; the only apply-scope use is the family\r\n // section's nav label (registered in the configForms path below), so the\r\n // fallback never renders anywhere.\r\n const locale = ctx.locale as { bind?: (ns: string) => (key: string) => string }\r\n const t = typeof locale.bind === 'function' ? locale.bind(NS) : (key: string) => key\r\n // The one scope factory, set by whichever generation's settings channel the\r\n // host provides (see the waist injects at the end of apply).\r\n let scopeOf: ((ns: string) => unknown) | undefined\r\n /** One-shot guard for `registerModernSurface` — see its declaration for why a\r\n * second call is not merely redundant but destructive (double seating). */\r\n let modernSurfaceClaimed = false\r\n const scopeInject = (ctx as unknown as {\r\n inject: (deps: string[], cb: (scope: Record<string, unknown>) => void) => void\r\n }).inject\r\n\r\n // `register(ns, dicts)` is typed to the built-in locale ids (`zh` / `en`\r\n // only); the shipped `ja` / `ko` / `fr` / `de` / `it` / `ru` / `es` / `pt`\r\n // dictionaries go through the single-locale overload, so they are installed\r\n // and ready once DSH publishes those ids.\r\n ctx.effect(() => {\r\n const disposers = [\r\n ctx.locale.register(NS, { zh, en }),\r\n ctx.locale.register(NS, 'ja', ja),\r\n ctx.locale.register(NS, 'ko', ko),\r\n ctx.locale.register(NS, 'fr', fr),\r\n ctx.locale.register(NS, 'de', de),\r\n ctx.locale.register(NS, 'it', it),\r\n ctx.locale.register(NS, 'ru', ru),\r\n ctx.locale.register(NS, 'es', es),\r\n ctx.locale.register(NS, 'pt', pt),\r\n ]\r\n return () => { for (const dispose of disposers) dispose() }\r\n }, 'dsh-thinking-levels: dictionaries')\r\n\r\n // Composer model seat: one registered entry named after the seat with\r\n // `priority: -1` replaces the shipped `ModelSelect` trigger and popup\r\n // outright (the official popup renders no slots, so occupying the seat is\r\n // the only way to contribute inside it — the dsh-reasoning-effort pattern).\r\n // The panel renders its own picker over the harness's shared\r\n // `modelDirectories` service (model switching keeps working) and puts a\r\n // context-window editor on every model line: custom gateways write the\r\n // `llm-pi-ai` entry config, official DeepSeek models write the\r\n // `llm-deepseek` entry (its `models[].contextWindow`, else the provider\r\n // default).\r\n // Resolve `modelDirectories` through a cordis inject, NOT a synchronous\r\n // property read: at apply time the ui-model-selection module's service may\r\n // not be started yet, and the property read returned undefined on 0.1.7\r\n // hosts — the whole panel was silently skipped and the shipped selector\r\n // stayed. The deferred inject waits for the service to start; on harness\r\n // lines without the module the callback never fires or sees undefined,\r\n // leaving the shipped selector untouched.\r\n //\r\n // The inject must ALSO declare the resolver's own dependency set\r\n // (`sessions`, `remote`, `remote.session` — ui-model-selection's\r\n // `ModelDirectoryResolver.static inject`): a cordis Service resolves\r\n // `this.ctx` through the ACCESSING context (the traceable proxy rebinds\r\n // `ctx` to the reader), and `directoryFor()` reads `this.ctx.sessions` —\r\n // with only `modelDirectories` declared that read came back undefined and\r\n // every `directoryFor` call threw, so the seat entry crashed on first\r\n // render and the slot boundary abdicated it back to the shipped selector.\r\n /**\r\n * takeoverUi seat watchdog (4.4.1, desktop field report): the one-shot\r\n * mirror read at inject time was not enough — on the real host the seat\r\n * callback fires when `modelDirectories` starts, which can precede BOTH the\r\n * settings waist binding (`scopeOf` still undefined) and the mirror fold\r\n * (status `loading`). A static decision then never seats even with the\r\n * switch on, and no reload changes it (the service order is the same every\r\n * boot). Seating becomes an evaluation driven by every input that can move\r\n * it: the declaration, the waist binding, and each settings change — flip\r\n * the switch and the panel seats (or abdicates) immediately, no reload.\r\n */\r\n let seatDirectories: ModelDirectoriesFace | undefined\r\n /** The `sessions` face, kept for the chip's projection read (issue #11). */\r\n let sessionsRef: SessionsFace | undefined\r\n let seatDeclared = false\r\n let seatWatched = false\r\n let seatClaimed: (() => void) | undefined\r\n let seatWatchOff: (() => void) | undefined\r\n let seatHandleMemo: {\r\n getSnapshot?: () => { status?: string; value?: unknown }\r\n subscribe?: (listener: () => void) => () => void\r\n } | undefined\r\n const seatHandle = (): typeof seatHandleMemo => {\r\n if (seatHandleMemo === undefined && scopeOf !== undefined) {\r\n seatHandleMemo = tlSettingsScopeOf(scopeOf) as NonNullable<typeof seatHandleMemo>\r\n }\r\n return seatHandleMemo\r\n }\r\n /**\r\n * The level the session's last committed request actually carried, read from\r\n * this plugin's own `tlAutoSchedule` projection (issue #11).\r\n *\r\n * Why not the directory's `current.reasoningEffort`: the host derives it from\r\n * `modelSelection.next` — the selection the NEXT step uses, i.e. the user's\r\n * intent (`dsh-client-ui-model-selection/src/client/directory.ts:178`). With\r\n * `auto` picked, `next.reasoningEffort` stays `'auto'` for the whole session,\r\n * so the chip had no way to show what was really sent. The projection folds\r\n * the committed `request/header`, which carries the resolved level.\r\n *\r\n * Returns `undefined` — never throws — when the projection channel or the\r\n * projection itself is absent (older hosts, cold sessions). The chip then\r\n * degrades to the plain intent label.\r\n * @param sessions - the sessions face captured from the scope inject.\r\n * @param sessionId - the owning session.\r\n * @returns the last effective effort id, or undefined.\r\n */\r\n const lastEffectiveOf = (sessions: SessionsFace | undefined, sessionId: string): string | undefined => {\r\n try {\r\n const face = sessions?.binding(sessionId)?.session?.projections?.faceOf?.('tlAutoSchedule')\r\n const snapshot = typeof face?.getSnapshot === 'function' ? face.getSnapshot() : undefined\r\n // The projection face returns the state BARE; the `{ value }` wrapper is\r\n // the settings-handle shape and read as undefined here (issue #11's\r\n // symptom back on 4.6.0). See projection-value.ts.\r\n const raw = projectionValueOf(snapshot)?.['lastEffective']\r\n return typeof raw === 'string' && raw.length > 0 ? raw : undefined\r\n } catch {\r\n // A thrown inject abdicates the seat entry and the shipped selector comes\r\n // back — never let a cosmetic read do that.\r\n return undefined\r\n }\r\n }\r\n const takeoverUiOn = (): boolean => {\r\n const snap = typeof seatHandle()?.getSnapshot === 'function' ? seatHandle()!.getSnapshot!() : undefined\r\n return snap?.status === 'ready'\r\n && (snap.value as { takeoverUi?: unknown } | undefined)?.takeoverUi === true\r\n }\r\n const seatOptions = (directories: ModelDirectoriesFace): Record<string, unknown> => ({\r\n name: 'conversation.input.model',\r\n id: 'context-window-model-panel',\r\n priority: -1,\r\n locale: NS,\r\n inject: (sessionId: string): ModelPanelInjected => {\r\n // Entry ids of the target plugins: each dsh llm plugin's composition\r\n // entry id matches its settings namespace (`llm-pi-ai` / `llm-deepseek`).\r\n // A `directoryFor` failure (odd session shape) must not throw out of\r\n // the render: a thrown inject abdicates the seat entry — the whole\r\n // takeover — so degrade to the unavailable face instead.\r\n let directory: ModelDirectoryFace | undefined\r\n try {\r\n directory = directories.directoryFor(sessionId)\r\n } catch {\r\n directory = undefined\r\n }\r\n return {\r\n directory,\r\n // Resolved through the generation waist; by the time a session\r\n // renders, both deferred injects have long settled.\r\n piAiScope: scopeOf?.('llm-pi-ai') as never,\r\n deepseekScope: scopeOf?.('llm-deepseek') as never,\r\n // The plugin's own settings face: the chip reads the configured\r\n // level as the user-intent source (issue #5).\r\n tlScope: scopeOf === undefined ? undefined : tlSettingsScopeOf(scopeOf) as never,\r\n // Issue #11: the level the last request ACTUALLY carried. The host's\r\n // `modelSelection.next` (what the directory exposes as `current`) is the\r\n // user's intent — with `auto` selected it stays `'auto'` forever, so the\r\n // chip could never show what was really sent. Read our own projection\r\n // instead; `undefined` on any host without it, and the chip degrades to\r\n // the plain intent label.\r\n lastEffectiveEffort: lastEffectiveOf(sessionsRef, sessionId),\r\n }\r\n },\r\n })\r\n /** Apply the current intent: seat while on, release the seat while off. */\r\n const evaluateSeat = (): void => {\r\n if (!seatDeclared || seatDirectories === undefined || scopeOf === undefined) return\r\n const on = takeoverUiOn()\r\n if (on && seatClaimed === undefined) {\r\n try {\r\n seatClaimed = ctx.slots.register(seatOptions(seatDirectories) as never, ModelPanel) as unknown as (() => void)\r\n } catch {\r\n // A host that refuses the late register leaves the shipped selector —\r\n // the honest degradation is \"no takeover\", never a broken composer.\r\n seatClaimed = undefined\r\n }\r\n } else if (!on && seatClaimed !== undefined) {\r\n const claim = seatClaimed\r\n seatClaimed = undefined\r\n claim()\r\n }\r\n }\r\n const startSeatWatch = (): void => {\r\n if (seatWatched) return\r\n if (scopeOf === undefined || !seatDeclared || seatDirectories === undefined) return\r\n seatWatched = true\r\n const handle = seatHandle()\r\n if (typeof handle?.subscribe === 'function') seatWatchOff = handle.subscribe(() => { evaluateSeat() })\r\n evaluateSeat()\r\n }\r\n ;(ctx as unknown as {\r\n inject: (\r\n deps: string[],\r\n cb: (scope: {\r\n modelDirectories: ModelDirectoriesFace | undefined\r\n sessions: SessionsFace | undefined\r\n }) => void,\r\n ) => void\r\n }).inject(['modelDirectories', 'sessions', 'remote', 'remote.session'], (scope) => {\r\n const directories = scope.modelDirectories\r\n if (directories === undefined) return\r\n seatDirectories = directories\r\n sessionsRef = scope.sessions\r\n ctx.slots.inject('conversation.input.model', function* () {\r\n // Reaching the generator proves the seat is declared — late\r\n // ctx.slots.register from the watch is then legitimate. The yielded\r\n // function is the fiber's teardown: stop watching, give the shipped\r\n // ModelSelect back.\r\n seatDeclared = true\r\n startSeatWatch()\r\n yield () => {\r\n seatWatchOff?.()\r\n seatWatchOff = undefined\r\n seatWatched = false\r\n if (seatClaimed !== undefined) {\r\n const claim = seatClaimed\r\n seatClaimed = undefined\r\n claim()\r\n }\r\n }\r\n })\r\n })\r\n\r\n // Effort-trace tab (conversation.view — the dsh-perm-gate history pattern):\r\n // a run-length timeline of the levels this session's requests actually went\r\n // out with, folded by the `tlAutoSchedule` projection (stateVersion 3) from\r\n // the same committed headers the chip's `lastEffective` reads. Its own\r\n // `sessions` inject on purpose: the tab must not ride the modelDirectories\r\n // one above (an absent directories service must not cost the tab). On a\r\n // host that never declared the slot the generator inject simply never\r\n // fires — the honest degradation is \"no tab\", like the undischarged\r\n // dsh-family.tab inject.\r\n ;(ctx as unknown as {\r\n inject: (\r\n deps: string[],\r\n cb: (scope: { sessions?: SessionsFace | undefined }) => void,\r\n ) => void\r\n }).inject(['sessions'], (scope) => {\r\n const sessions = scope.sessions\r\n ctx.slots.inject('conversation.view', function* () {\r\n yield ctx.slots.register({\r\n name: 'conversation.view',\r\n id: 'dsh-thinking-levels.effort-trace',\r\n order: 25,\r\n label: () => t('trace.label'),\r\n locale: NS,\r\n inject: (sessionId: string | undefined) => ({ sessionId, sessions, tFallback: t }),\r\n }, EffortTrace)\r\n }) as unknown\r\n })\r\n\r\n // Family settings section (see the SlotMap note above): the contributor\r\n // ledger is projected exactly like the built-in Plugins section projects its\r\n // tab ledger (cache until ledger/locale revision bumps, so useSyncExternalStore\r\n // sees a stable snapshot).\r\n/** Registrant labels arrive as a string or a locale thunk; unwrap either.\r\n * A throwing thunk (e.g. a contributor whose label touches a service its own\r\n * inject never declared) must not kill the whole tab-ledger projection — fall\r\n * back to the entry id. */\r\nconst resolveLabel = (label: unknown, fallback = ''): string => {\r\n try {\r\n if (typeof label === 'function') return (label as () => string)() || fallback\r\n if (typeof label === 'string') return label\r\n } catch { /* bad contributor label — degrade to the fallback */ }\r\n return fallback\r\n}\r\n\r\n let tabsVersion = -1\r\n let tabsRevision = -1\r\n let tabs: readonly FamilyTabEntry[] = []\r\n\r\n // Direct-mount face for contributor tabs on hosts whose settings shell does\r\n // not deliver renderSlot (≤0.1.6): the raw ledger records carry the\r\n // contributor's component and inject face on every line, so the section can\r\n // mount the active tab itself. Every failure mode (entry gone mid-render, a\r\n // throwing inject, a host without the raw view) degrades to an empty panel —\r\n // never a thrown render.\r\n const renderContributor = (id: string): ReactNode => {\r\n try {\r\n const entry = (ctx.slots.entries('dsh-family.tab') as readonly FamilyLedgerEntry[])\r\n .find(candidate => candidate.options.id === id)\r\n if (entry === undefined || entry.component === undefined) return null\r\n const injected = typeof entry.inject === 'function'\r\n ? entry.inject() as Record<string, unknown> | undefined\r\n : undefined\r\n return createElement(entry.component, (injected ?? {}) as Record<string, unknown>)\r\n } catch {\r\n return null\r\n }\r\n }\r\n\r\n const sectionInjected = (): FamilySectionInjected => ({\r\n // The settings namespace IS the composition entry id — the include row id\r\n // the shipped cordis.patch.yml inserts (`dsh-thinking-levels`), NOT this\r\n // plugin's locale NS. The host keys configForms by that id; a handle for\r\n // any other string reports `unavailable` forever. Generation-probed: ≤0.1.6\r\n // hosts register the section as `thinking-levels` (see tlSettingsScopeOf).\r\n scope: tlSettingsScopeOf(scopeOf!) as never,\r\n piAiScope: scopeOf!('llm-pi-ai') as never,\r\n // The official DeepSeek section: the card's context editor when the seat\r\n // takeover is off (4.4.0).\r\n deepseekScope: scopeOf!('llm-deepseek') as never,\r\n // The transport's entry id changed shape across its packaging history\r\n // (`dsh-llm-openai-completions` in the 0.4.0 fragment; earlier manual\r\n // installs used the short form): settle on whichever namespace the host's\r\n // describe document actually carries.\r\n ocScope: ocTransportScopeOf(scopeOf!) as never,\r\n // ≤0.1.6 stand-ins for owner props the settings shell there doesn't\r\n // deliver (see family-tab.tsx): the apply-time EAGER binder stands in for\r\n // the host's PropsLocale `t`, and the direct-mount face stands in for\r\n // renderSlot. Both are ignored on shells that provide the real props.\r\n tFallback: t,\r\n renderContributor,\r\n hooks: {\r\n tabs: {\r\n getSnapshot: () => {\r\n const version = ctx.slots.getVersion('dsh-family.tab')\r\n const revision = ctx.locale.getSnapshot().revision\r\n if (version !== tabsVersion || revision !== tabsRevision) {\r\n tabsVersion = version\r\n tabsRevision = revision\r\n tabs = ctx.slots.entries('dsh-family.tab')\r\n .map(entry => ({\r\n id: entry.options.id ?? '',\r\n order: entry.options.order ?? 0,\r\n label: resolveLabel(entry.options.label, entry.options.id ?? ''),\r\n }))\r\n .sort((a, b) => a.order - b.order)\r\n }\r\n return tabs\r\n },\r\n subscribe: (listener) => {\r\n const offLedger = ctx.slots.subscribe('dsh-family.tab', listener)\r\n const offLocale = ctx.locale.subscribe(listener)\r\n return () => {\r\n offLedger()\r\n offLocale()\r\n }\r\n },\r\n },\r\n },\r\n })\r\n\r\n/** ≤0.1.6 legacy card seat (settings.plugin.item) RETIRED (2026-10-08 family\r\n * insection round 2): the 思考档位 card duplicated the family-tab card on the\r\n * ≤0.1.5 plugins page — all plugin settings now live only in the 起子插件设置\r\n * family tab. The legacy scope namespace (`thinking-levels`) remains what the\r\n * family-tab card reads via `scopeOf` below. */\r\n\r\n /** 0.1.7+/0.2.0 surfaces: family section, plugins-page card, context ring.\r\n * Generation-neutral in practice (route A, 2026-10): the `settings.section`\r\n * entry and its children declaration exist on every host line (the perm-gate\r\n * placeholder render proved the 0.1.5 shell consumes client-contributed\r\n * section bodies), so the settingsScope waist below calls this too — its\r\n * `plugins.bundle.config` inject idles harmlessly where the slot is never\r\n * declared (0.1.7 and older).\r\n *\r\n * Election note (2026-10-08 T20-a revision): the old \"priority-0 head +\r\n * priority-10 shadow\" assumption is dead — ≤0.1.7 shells list EVERY same-id\r\n * entry as its own nav row, so TL + guard double registration showed TWO\r\n * 起子插件设置 rows on all five farm cells. Guard now defers FAMILY_YIELD_MS\r\n * after the declaration and stands down when this entry is already seated;\r\n * symmetric guard here: if a dsh-family entry is somehow already in the\r\n * ledger when our factory fires (host-native surface, future rival), we\r\n * stand down too — exactly one owner, whichever path seated first.\r\n *\r\n * Declare-or-withdraw (2026-10-14): seating this entry WITHOUT the children\r\n * table used to be the fallback, and it was the worst possible outcome — a\r\n * childless container still claims the nav row (so every later claimant sees\r\n * \"dsh-family already seated\" and stands down) while `dsh-family.tab` stays\r\n * undeclared, so every member card silently disappears and only our own tab\r\n * renders. One crippled seat therefore poisons the whole family for the rest\r\n * of the boot. Losing the declaration now means losing the section: we yield\r\n * instead of seating a body that cannot host anyone's tabs.\r\n *\r\n * Rank: this plugin heads the ladder at rank 0 — and it defers like every other\r\n * claimant instead of seating synchronously. Putting the head on the same derived\r\n * formula (200 + 0 * 900 = 200ms) keeps it strictly ahead of guard (1100ms),\r\n * steward (3800ms) and mcp-registry (4700ms) while leaving no special case that\r\n * only this repo obeys, and no rank constant that exists purely to satisfy\r\n * `--check`. The single source of truth for those numbers is\r\n * `mine-dsh-plugins/_tools/family-rank.mjs` (offline, GitHub stars + npm\r\n * downloads) — never re-derive them by feel in a comment. */\r\n /**\r\n * 家族接管分级:本插件 rank 0,但与其他候选**走同一派生式**(不例外地同步坐位),\r\n * 尝试延迟 = BASE + RANK * STEP = 200ms,仍严格早于 guard(1100)/steward(3800)/mcp(4700)。\r\n * 唯一真源是 `mine-dsh-plugins/_tools/family-rank.mjs`,不得在注释/代码里另行推数。 */\r\n const FAMILY_CLAIM_RANK = 0\r\n const FAMILY_CLAIM_BASE_MS = 200\r\n const FAMILY_CLAIM_STEP_MS = 900\r\n const FAMILY_CLAIM_DELAY_MS = FAMILY_CLAIM_BASE_MS + FAMILY_CLAIM_RANK * FAMILY_CLAIM_STEP_MS\r\n\r\n function registerModernSurface(): void {\r\n if (scopeOf === undefined) return\r\n // Idempotence latch: both the configForms and the settingsScope waist call\r\n // this, and a second call would double-inject `settings.section` (same id,\r\n // same priority → the host throws) and double-register the bundle card and\r\n // the input ring. One seating per client load, whichever service dispatches first.\r\n if (modernSurfaceClaimed) return\r\n modernSurfaceClaimed = true\r\n ctx.slots.inject('settings.section', function* () {\r\n console.log('[dsh-thinking-levels] settings.section factory fired (declared)')\r\n // 分级时刻再查账本(与 guard/steward/mcp 同一机制):声明事件内同步抢位在\r\n // 本家能赢,只是因为它 rank 0——把「谁先」交给派生式而不是交给运气。\r\n let claimed: (() => void) | undefined\r\n const timer = setTimeout(() => {\r\n if (ctx.slots.entries('settings.section').some(e => e.options.id === 'dsh-family')) {\r\n console.log('[dsh-thinking-levels] settings.section: dsh-family already seated — stand down')\r\n return\r\n }\r\n const base = {\r\n name: 'settings.section',\r\n id: 'dsh-family',\r\n order: 40,\r\n label: () => t('family.title'),\r\n locale: NS,\r\n inject: sectionInjected,\r\n }\r\n try {\r\n claimed = ctx.slots.register({\r\n ...base,\r\n children: { 'dsh-family.tab': { kind: 'list', scope: 'root' } },\r\n }, FamilySettingsSection) as unknown as (() => void) | undefined\r\n console.log('[dsh-thinking-levels] settings.section: family takeover registered (children declared)')\r\n } catch (error) {\r\n // Declare-or-withdraw: the children table is held by someone else, so a\r\n // section seated here could not render a single member tab. Withdraw\r\n // (no registration) and let the holder serve the family.\r\n console.log('[dsh-thinking-levels] settings.section: children claim lost — withdrawing ('\r\n + (error instanceof Error ? error.message : String(error)) + ')')\r\n }\r\n }, FAMILY_CLAIM_DELAY_MS)\r\n yield () => {\r\n clearTimeout(timer)\r\n if (typeof claimed === 'function') claimed()\r\n }\r\n })\r\n\r\n // Plugins-page configuration card (DSH 0.2.0): same component and same\r\n // inject factory as the family section above, so both surfaces stay one\r\n // source of truth. On 0.1.7 hosts the slot is never declared and this\r\n // inject idles harmlessly.\r\n ctx.slots.inject('plugins.bundle.config', () => ctx.slots.register({\r\n name: 'plugins.bundle.config',\r\n key: 'dsh-thinking-levels',\r\n locale: NS,\r\n inject: sectionInjected,\r\n }, FamilySettingsSection))\r\n\r\n // Context-capacity check ring (conversation.input.right): restores the\r\n // CHECK the model-seat takeover removed. The projection seat arrives via\r\n // the slot's injected props; hosts without it render nothing (the ring is\r\n // a 0.2.0 feature — on the ≤0.1.6 lines the seat props lack the hook).\r\n }\r\n\r\n // Projection data hook (conversation.input.right): this seat's entries DO\r\n // receive the session projection hook (better-er/dsh-cache-billing proved\r\n // the injection there); the model seat does not. The zero-size hook mirrors\r\n // every push into the module store the ring reads.\r\n ctx.slots.inject('conversation.input.right', () => ctx.slots.register({\r\n name: 'conversation.input.right',\r\n id: 'projection-data-hook',\r\n order: 9,\r\n }, ProjectionDataHook))\r\n\r\n // Generation waist (registered last — the callbacks reach the definitions\r\n // above): whichever settings channel the host provides becomes the one scope\r\n // factory. Faces are structurally identical (getSnapshot / subscribe / set /\r\n // unset) — 0.1.7's ConfigForm handle mirrors the ≤0.1.6 settingsScope\r\n // field-for-field. A host missing a generation's service never fires that\r\n // callback, so exactly one path registers its surface.\r\n scopeInject.call(ctx, ['configForms'], (scope) => {\r\n const forms = scope.configForms as { get: <T>(entryId: string) => T } | undefined\r\n if (forms === undefined) return\r\n scopeOf = (<T,>(ns: string) => forms.get<T>(ns)) as typeof scopeOf\r\n registerModernSurface()\r\n // The waist may bind AFTER the seat declaration (the desktop boot order\r\n // that made the static gate fail) — the watch starts here too.\r\n startSeatWatch()\r\n })\r\n scopeInject.call(ctx, ['settingsScope'], (scope) => {\r\n const settingsScope = scope.settingsScope as\r\n | { bind: <T>(spec: { namespace: string }) => T }\r\n | undefined\r\n if (settingsScope === undefined) return\r\n scopeOf = (<T,>(ns: string) => settingsScope.bind<T>({ namespace: ns })) as typeof scopeOf\r\n // Route A (family-tab ledger, 2026-10): the family section body used to be\r\n // configForms-only, leaving ≤0.1.6 hosts with session-guard's nav-level\r\n // takeover and an EMPTY section body. The section entry itself is\r\n // generation-neutral — the component self-degrades where the shell omits\r\n // the owner props (tFallback / hooks-compartment polling / direct-mount\r\n // contributor render).\r\n registerModernSurface()\r\n startSeatWatch()\r\n })\r\n}\r\n"],"mappings":";;;;;;;;;;;EAGA,MAAa,KAAK;;EAGlB,MAAa,KAAK;GAChB,cAAc;GACd,gBAAgB;GAChB,oBAAoB;GACpB,cAAc;GACd,kBAAkB;GAClB,iBAAiB;GACjB,sBAAsB;GACtB,kBAAkB;GAClB,qBAAqB;GACrB,mBAAmB;GACnB,o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