dsh-thinking-levels 4.4.1 → 4.4.2
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/CHANGELOG.ja.md +5 -0
- package/CHANGELOG.ko.md +5 -0
- package/CHANGELOG.md +5 -0
- package/dsh.plugin.json +1 -1
- package/lib/client.js +19 -16
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["triggerStyle","popStyle","rowStyle","useSyncExternalStore","useState","useRef","labelStyle","useState","useRef","providerNameStyle","modelRowStyle","labelStyle","providersOf","useSyncExternalStore","useRef","useState","useCallback","useMemo","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/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). */\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.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.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 协议:思考兼容字段由宿主 pi-ai 原生处理,此处不可配置。',\r\n 'card.dsContextTitle': '官方 DeepSeek 模型上下文上限',\r\n 'input.effort.default': '提供方默认',\r\n 'input.effort.reset': '恢复提供方默认',\r\n 'card.capabilities.failed': '保存失败:配置被拒绝或冲突,请检查值。',\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.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.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: the thinking-compat fields are handled natively by pi-ai and are not configurable here.',\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}\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.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.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 以外のプロトコルを使用しています:思考互換フィールドは pi-ai がネイティブに処理するため、ここで設定できません。',\r\n 'card.dsContextTitle': '公式 DeepSeek モデルのコンテキスト上限',\r\n 'input.effort.default': 'プロバイダーの既定',\r\n 'input.effort.reset': 'プロバイダーの既定に戻す',\r\n 'card.capabilities.failed': '保存に失敗しました:値が拒否されたか競合しています。確認してください。',\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.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.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 이외 프로토콜을 사용합니다: 사고 호환 필드는 pi-ai가 네이티브로 처리하므로 여기서 설정할 수 없습니다.',\r\n 'card.dsContextTitle': '공식 DeepSeek 모델 컨텍스트 상한',\r\n 'input.effort.default': '공급자 기본값',\r\n 'input.effort.reset': '공급자 기본값으로 복원',\r\n 'card.capabilities.failed': '저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요.',\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.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.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 : les champs de compat de réflexion sont gérés nativement par pi-ai et ne sont pas configurables ici.\",\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}\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.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.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: die Thinking-Kompatibilitätsfelder werden von pi-ai nativ behandelt und sind hier nicht konfigurierbar.',\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}\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.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.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: i campi di compatibilità thinking sono gestiti nativamente da pi-ai e non sono configurabili qui.',\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}\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.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.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: поля совместимости thinking обрабатываются pi-ai нативно и здесь не настраиваются.',\r\n 'card.dsContextTitle': 'Лимиты контекста официальных моделей DeepSeek',\r\n 'input.effort.default': 'Значение провайдера по умолчанию',\r\n 'input.effort.reset': 'Вернуть значение провайдера по умолчанию',\r\n 'card.capabilities.failed': 'Ошибка сохранения: значение отклонено или конфликтует. Проверьте его.',\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.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.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: los campos de compatibilidad de thinking los gestiona pi-ai de forma nativa y no son configurables aquí.',\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}\r\n\r\n/** Combined dictionary map — all 9 languages, single-call registration. */\r\nexport const dictionaries: Record<string, Record<string, string>> = { zh, en, ja, ko, fr, de, it, ru, es }\r\n","/**\r\n * Context-capacity check ring for the composer tool row\r\n * (`conversation.input.right`, the seat just left of the send button —\r\n * the same seat the retired context-window pill used, and the same side of\r\n * the composer where the shipped ContextMeter lived).\r\n *\r\n * Why this exists: the model-seat panel replaced the shipped `ModelSelect`\r\n * trigger and popup, and with them went the shipped context meter — the\r\n * \"how full is this window\" read. The editor part moved into the model\r\n * panel's per-model lines; the CHECK part (used vs. window, pressure, a\r\n * breakdown, a warning before you run out) is what this ring restores.\r\n * Layout language follows better-er/dsh-cache-billing (rows with a color\r\n * swatch, token counts right-aligned, a muted footer note), which itself\r\n * pins into the shipped meter's popup.\r\n *\r\n * Data: the session projection seats. `useProjection('contextPressure')`\r\n * is the same feed the shipped meter consumes (`{ usedTokens, contextWindow,\r\n * percent }`), `useProjection('contextBreakdown')` the three-way split\r\n * (`{ systemTokens, toolsTokens, messageTokens }`). Both are optional on the\r\n * props and defensively read: a harness without the projection seat, or a\r\n * session before its first request, renders nothing here instead of a dead\r\n * control (the retired pill's discipline). Values refresh live while the\r\n * projection pushes — no polling.\r\n *\r\n * Zero host coupling beyond react + the injected seats: plain SVG + HTML\r\n * with token-based inline styling; copy is inline zh/en by document language\r\n * (the plugin's locale dictionaries stay untouched).\r\n */\r\nimport { useEffect, useRef, useState, useSyncExternalStore } from 'react'\r\nimport type { CSSProperties, JSX } from 'react'\r\n\r\n/** The pressure projection slice — the token-meter wire view's own fields. */\r\nexport interface ContextPressureLike {\r\n /** Post-usage pressure: the last usage sample's prompt-side token count. */\r\n pressureTokens?: number\r\n /** The request-projected estimate (pressure + uncommitted surface). */\r\n projectedTokens?: number\r\n contextWindow?: number\r\n}\r\n\r\n/** The breakdown projection slice (shipped meter's three-way split). */\r\nexport interface ContextBreakdownLike {\r\n systemTokens?: number\r\n toolsTokens?: number\r\n messageTokens?: number\r\n}\r\n\r\n/**\r\n * One session projection seat: a selector hook over the host's projection\r\n * store. Absent on harnesses without the projection module — the component\r\n * then renders nothing.\r\n */\r\nexport type ProjectionHook = <T>(key: string) => T | undefined\r\n\r\n/** The tlCacheBilling projection wire view (full field set). */\r\nexport interface CacheBillingLike {\r\n available?: boolean\r\n cost?: number\r\n missCost?: number\r\n outputCost?: number\r\n currency?: string\r\n cacheReadTokens?: number\r\n totalInputTokens?: number\r\n outputTokens?: number\r\n hitRate?: number | null\r\n model?: string | null\r\n provider?: string | null\r\n matchedModel?: string | null\r\n modelMatched?: boolean\r\n tier?: 'peak' | 'offPeak' | 'flat' | null\r\n unitPricePerM?: number | null\r\n /** 目录化新增字段(全部 optional:旧 view 落新客户端时保守回退)。 */\r\n priced?: boolean\r\n pricingSource?: 'estimate' | 'cn' | 'global' | 'custom' | 'off' | 'catalog-miss' | null\r\n /** 金额为兜底典型价估算(未校准,仅供参考)。 */\r\n estimated?: boolean\r\n catalogKey?: string | null\r\n catalogLabel?: string | null\r\n priceRow?: { inputMiss: number; inputCacheHit: number; output: number } | null\r\n sessionByCurrency?: Array<{ currency: string; hitCost: number; missCost: number; outputCost: number }>\r\n mixedCurrency?: boolean\r\n turn?: number | null\r\n step?: number | null\r\n turnCost?: number\r\n turnHitCost?: number\r\n turnMissCost?: number\r\n turnOutputCost?: number\r\n turnTokens?: number\r\n turnCacheReadTokens?: number\r\n turnInputTokens?: number\r\n turnOutputTokens?: number\r\n sessionCacheHitCost?: number\r\n sessionMissCost?: number\r\n sessionOutputCost?: number\r\n sessionInputTokens?: number\r\n sessionCacheReadTokens?: number\r\n sessionOutputTokens?: number\r\n sessionRounds?: number\r\n sessionMissSteps?: number\r\n sessionWriteTokens?: number\r\n sessionFullMissSteps?: number\r\n}\r\n\r\n/** Full props of the ring entry (all optional — data comes from the store). */\r\nexport interface ContextRingProps {\r\n /** The session id of the slot's owning conversation (standard seat). */\r\n sessionId?: string\r\n /**\r\n * Capacity fallback from the model catalog: when the contextPressure\r\n * projection carries no contextWindow (some sessions never see the\r\n * request/context event), the declared window of the ACTIVE model fills in.\r\n */\r\n contextWindowFallback?: number\r\n}\r\n\r\n/* ── inline copy: zh default, en elsewhere ──────────────────────────────── */\r\n\r\ninterface CopyShape {\r\n title: string\r\n used: string\r\n remaining: string\r\n window: string\r\n percent: string\r\n system: string\r\n tools: string\r\n messages: string\r\n warning: string\r\n aria: (percent: string) => string\r\n unset: string\r\n billing: string\r\n billStep: string\r\n billTurn: string\r\n billSession: string\r\n billCacheRead: string\r\n billCacheMiss: string\r\n billOutput: string\r\n billFullMiss: string\r\n billRoundsWord: string\r\n billPeak: string\r\n billOffPeak: string\r\n billFlat: string\r\n billUnpriced: string\r\n billCustom: string\r\n billPricedAs: (label: string) => string\r\n billPriced: string\r\n billEstimate: string\r\n /** 兜底典型价估算的诚实标注(未校准仅供参考)。 */\r\n billUncalibratedHint: string\r\n}\r\n\r\nconst COPY: Record<'zh' | 'en', CopyShape> = {\r\n zh: {\r\n title: '上下文检查',\r\n used: '已用',\r\n remaining: '剩余',\r\n window: '窗口容量',\r\n percent: '占用',\r\n system: '系统提示词',\r\n tools: '工具定义',\r\n messages: '对话消息',\r\n warning: '上下文即将用尽——建议压缩上下文或开启新会话。',\r\n aria: (percent: string) => `上下文已用 ${percent}`,\r\n unset: '本轮尚未产生用量',\r\n billing: '缓存账单',\r\n billStep: '当前步',\r\n billTurn: '当前轮',\r\n billSession: '会话累计',\r\n billCacheRead: '缓存命中',\r\n billCacheMiss: '缓存未命中',\r\n billOutput: '输出',\r\n billFullMiss: '完全失效',\r\n billRoundsWord: '步',\r\n billPeak: '峰价',\r\n billOffPeak: '谷价',\r\n billFlat: '平价',\r\n billUnpriced: '未计价',\r\n billCustom: '自填价计价',\r\n billPricedAs: (label: string) => `按 ${label} 计价`,\r\n billPriced: '按目录价计价',\r\n billEstimate: '目录外估算价',\r\n billUncalibratedHint: '未校准·仅供参考',\r\n },\r\n en: {\r\n title: 'Context check',\r\n used: 'Used',\r\n remaining: 'Remaining',\r\n window: 'Context window',\r\n percent: 'Pressure',\r\n system: 'System prompt',\r\n tools: 'Tool definitions',\r\n messages: 'Messages',\r\n warning: 'Context is nearly full — compact the context or start a new session.',\r\n aria: (percent: string) => `${percent} of context used`,\r\n unset: 'No usage yet in this turn',\r\n billing: 'Cache billing',\r\n billStep: 'This step',\r\n billTurn: 'This turn',\r\n billSession: 'Session total',\r\n billCacheRead: 'Cache read',\r\n billCacheMiss: 'Cache miss',\r\n billOutput: 'Output',\r\n billFullMiss: 'Full misses',\r\n billRoundsWord: 'steps',\r\n billPeak: 'Peak rates',\r\n billOffPeak: 'Off-peak rates',\r\n billFlat: 'Flat rate',\r\n billUnpriced: 'Not billed',\r\n billCustom: 'priced at custom rates',\r\n billPricedAs: (label: string) => `priced as ${label}`,\r\n billPriced: 'priced at catalog rates',\r\n billEstimate: 'estimated off-catalog',\r\n billUncalibratedHint: 'uncalibrated — reference only',\r\n },\r\n} as const\r\n\r\nconst copy = (): CopyShape =>\r\n typeof document !== 'undefined' && document.documentElement.lang?.toLowerCase().startsWith('zh')\r\n ? COPY.zh\r\n : COPY.en\r\n\r\n/* ── inline styling (no CSS modules in the client bundle) ──────────────── */\r\n\r\nconst RING_SIZE = 18\r\nconst RING_STROKE = 2.5\r\n\r\nconst triggerStyle: CSSProperties = {\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n gap: '5px',\r\n height: '24px',\r\n padding: '0 6px',\r\n background: 'transparent',\r\n border: 'none',\r\n borderRadius: '6px',\r\n cursor: 'pointer',\r\n color: 'var(--dsw-alias-label-secondary, inherit)',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n whiteSpace: 'nowrap',\r\n}\r\n\r\nconst popStyle: CSSProperties = {\r\n position: 'absolute',\r\n bottom: 'calc(100% + 8px)',\r\n right: 0,\r\n zIndex: 1200,\r\n minWidth: '264px',\r\n padding: '10px 12px',\r\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\r\n color: 'var(--dsw-alias-label-primary, inherit)',\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.25))',\r\n borderRadius: '10px',\r\n boxShadow: '0 8px 24px rgba(0,0,0,0.14)',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n}\r\n\r\nconst headStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'baseline',\r\n gap: '8px',\r\n fontWeight: 600,\r\n marginBottom: '4px',\r\n}\r\n\r\nconst figureStyle: CSSProperties = {\r\n fontVariantNumeric: 'tabular-nums',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n}\r\n\r\nconst rowStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '12px',\r\n padding: '2px 0',\r\n}\r\n\r\nconst rowLabelStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n color: 'var(--dsw-alias-label-secondary, inherit)',\r\n}\r\n\r\nconst rowValueStyle: CSSProperties = {\r\n marginLeft: 'auto',\r\n fontVariantNumeric: 'tabular-nums',\r\n fontWeight: 500,\r\n textAlign: 'right' as const,\r\n}\r\n\r\nconst swatchStyle = (color: string): CSSProperties => ({\r\n display: 'inline-block',\r\n width: '8px',\r\n height: '8px',\r\n borderRadius: '2px',\r\n marginRight: '6px',\r\n flex: 'none',\r\n background: color,\r\n})\r\n\r\nconst warnStyle: CSSProperties = {\r\n marginTop: '6px',\r\n color: '#f43f5e',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n}\r\n\r\nconst footStyle: CSSProperties = {\r\n marginTop: '6px',\r\n color: 'var(--dsw-alias-label-caption, inherit)',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n}\r\n\r\nconst BREAKDOWN_COLORS = { system: '#8b5cf6', tools: '#0ea5e9', messages: '#10b981' } as const\r\n\r\n/** Pressure color: calm → amber → red (cache-billing's foot/warn palette). */\r\nexport function pressureColor(percent: number): string {\r\n if (percent >= 85) return '#f43f5e'\r\n if (percent >= 70) return '#f59e0b'\r\n return 'var(--dsw-alias-label-secondary, currentColor)'\r\n}\r\n\r\n/** Format a token count compactly (12.3k / 1.24M). */\r\nexport function formatTokens(n: number): string {\r\n if (n >= 1_000_000) return `${Math.round((n / 1_000_000) * 100) / 100}M`\r\n if (n >= 1000) return `${Math.round((n / 1000) * 10) / 10}k`\r\n return String(Math.round(n))\r\n}\r\n\r\nconst BILL_COLORS = { hit: '#10b981', miss: '#f59e0b', output: '#3b82f6' } as const\r\n\r\n/** One nested billing sub-row (cache-billing's indented swatch row). */\r\nfunction BillSubRow({ label, tokens, amount, color }: { label: string; tokens: number; amount: string; color: string }): JSX.Element {\r\n return (\r\n <div style={{ ...rowStyle, paddingLeft: '16px' }}>\r\n <dt style={rowLabelStyle}><span style={swatchStyle(color)} />{label}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>\r\n <span style={{ color: 'var(--dsw-alias-label-caption, inherit)', fontWeight: 400, marginRight: '6px' }}>{formatTokens(tokens)} tok</span>\r\n {amount}\r\n </dd>\r\n </div>\r\n )\r\n}\r\n\r\n/** 币种符号:目录原样不折算;未知币种回退 ISO 码。 */\r\nfunction currencySymbol(currency: string | undefined): string {\r\n if (currency === 'USD') return '$'\r\n if (currency !== undefined && currency !== 'CNY') return `${currency} `\r\n return '¥'\r\n}\r\n\r\n/** Format an amount: four decimals for a step, fewer for the totals. */\r\nfunction formatMoney(amount: number, digits: number, currency?: string): string {\r\n return `${currencySymbol(currency)}${amount.toFixed(digits)}`\r\n}\r\n\r\n/**\r\n * The module-level projection store. The ring renders inside the model seat,\r\n * whose entry props do NOT carry the projection hook — the hook lives on a\r\n * zero-size data hook mounted at `conversation.input.right` (the seat where\r\n * better-er/dsh-cache-billing proved the hook injection), which mirrors every\r\n * push into this store. The ring subscribes like any external store.\r\n */\r\ninterface ProjectionSnapshot {\r\n /** Set once the data hook mounts anywhere — the 0.2.0+ seat marker. */\r\n seatMounted?: boolean\r\n pressure?: ContextPressureLike\r\n breakdown?: ContextBreakdownLike\r\n billing?: CacheBillingLike\r\n}\r\n\r\nlet store: ProjectionSnapshot = {}\r\nconst listeners = new Set<() => void>()\r\n\r\n/** Immutable replacement — useSyncExternalStore compares snapshots by\r\n * reference, so in-place mutation would never re-render subscribers. */\r\nfunction publish(patch: Partial<ProjectionSnapshot>): void {\r\n store = { ...store, ...patch }\r\n for (const listener of listeners) listener()\r\n}\r\n\r\nfunction subscribeStore(listener: () => void): () => void {\r\n listeners.add(listener)\r\n return () => { listeners.delete(listener) }\r\n}\r\n\r\nfunction getStore(): ProjectionSnapshot {\r\n return store\r\n}\r\n\r\n/**\r\n * The zero-size data hook: props delivered by the slot renderer carry the\r\n * session projection hook; every push lands in the module store.\r\n */\r\nexport function ProjectionDataHook(props: { useProjection?: ProjectionHook }): JSX.Element {\r\n const pressure = props.useProjection?.('contextPressure') as ContextPressureLike | undefined\r\n const breakdown = props.useProjection?.('contextBreakdown') as ContextBreakdownLike | undefined\r\n const billing = props.useProjection?.('tlCacheBilling') as CacheBillingLike | undefined\r\n useEffect(() => {\r\n // The seat marker rides the first publish: the ring re-renders on every\r\n // publish, so a marker arriving after the ring's first render still\r\n // flips it from hidden to visible.\r\n publish({ seatMounted: true, pressure, breakdown, billing })\r\n })\r\n return <span data-dsh-thinking-levels=\"projection-hook\" style={{ display: 'none' }} />\r\n}\r\n\r\n/** The SVG ring: one background track + one pressure arc. */\r\nfunction Ring({ percent, color }: { percent: number; color: string }): JSX.Element {\r\n const r = (RING_SIZE - RING_STROKE) / 2\r\n const c = 2 * Math.PI * r\r\n const clamped = Math.max(0, Math.min(100, percent))\r\n return (\r\n <svg width={RING_SIZE} height={RING_SIZE} viewBox={`0 0 ${RING_SIZE} ${RING_SIZE}`} aria-hidden=\"true\">\r\n <circle cx={RING_SIZE / 2} cy={RING_SIZE / 2} r={r} fill=\"none\"\r\n stroke=\"var(--dsw-alias-border-l2, rgba(127,127,127,0.3))\" strokeWidth={RING_STROKE} />\r\n <circle cx={RING_SIZE / 2} cy={RING_SIZE / 2} r={r} fill=\"none\"\r\n stroke={color} strokeWidth={RING_STROKE} strokeLinecap=\"round\"\r\n strokeDasharray={`${(c * clamped) / 100} ${c}`}\r\n transform={`rotate(-90 ${RING_SIZE / 2} ${RING_SIZE / 2})`} />\r\n </svg>\r\n )\r\n}\r\n\r\n/** One breakdown row (cache-billing's swatch-row layout). */\r\nfunction BreakdownRow({ label, value, color }: { label: string; value: number; color: string }): JSX.Element {\r\n return (\r\n <div style={rowStyle}>\r\n <dt style={rowLabelStyle}><span style={swatchStyle(color)} />{label}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>{formatTokens(value)}</dd>\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * The cache-billing block (catalog era). 未计价(priced===false)时保留 token\r\n * 读数、金额位换「未计价」文案;旧 view 缺 priced 字段 → 按历史行为计价。\r\n * 混币种会话不给跨币种合计,改按币种分行。\r\n */\r\nfunction BillingBlock({ billing }: { billing: CacheBillingLike }): JSX.Element {\r\n const c = copy()\r\n const cur = billing.currency\r\n const priced = billing.priced !== false\r\n const money = (amount: number | undefined, digits: number): JSX.Element | string =>\r\n priced\r\n ? formatMoney(amount ?? 0, digits, cur)\r\n : <span style={{ color: 'var(--dsw-alias-label-caption, inherit)' }}>{c.billUnpriced}</span>\r\n const dash = priced ? undefined : '—'\r\n const buckets = Array.isArray(billing.sessionByCurrency) ? billing.sessionByCurrency : []\r\n const sessionTotal: JSX.Element | string = !priced\r\n ? <span style={{ color: 'var(--dsw-alias-label-caption, inherit)' }}>{c.billUnpriced}</span>\r\n : billing.mixedCurrency === true && buckets.length > 1\r\n // 跨币种不相加:逐桶展示(主币种取 session* 字段,其余补列)\r\n ? buckets.map((b) => `${currencySymbol(b.currency)}${(b.hitCost + b.missCost + b.outputCost).toFixed(2)}`).join(' + ')\r\n : formatMoney((billing.sessionCacheHitCost ?? 0) + (billing.sessionMissCost ?? 0) + (billing.sessionOutputCost ?? 0), 2, cur)\r\n return (\r\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))' }}>\r\n <div style={rowStyle}>\r\n <dt style={{ ...rowLabelStyle, color: '#a78bfa' }}>{c.billStep}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>\r\n {formatTokens((billing.totalInputTokens ?? 0) + (billing.outputTokens ?? 0))} tok {money(billing.cost, 4)}\r\n </dd>\r\n </div>\r\n <BillSubRow label={c.billCacheRead} tokens={billing.cacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.cost ?? 0, 4, cur)} color={BILL_COLORS.hit} />\r\n <BillSubRow label={c.billCacheMiss} tokens={(billing.totalInputTokens ?? 0) - (billing.cacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.missCost ?? 0, 4, cur)} color={BILL_COLORS.miss} />\r\n <BillSubRow label={c.billOutput} tokens={billing.outputTokens ?? 0} amount={dash ?? formatMoney(billing.outputCost ?? 0, 4, cur)} color={BILL_COLORS.output} />\r\n <div style={rowStyle}>\r\n <dt style={{ ...rowLabelStyle, color: '#22d3ee' }}>{c.billTurn}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>\r\n {formatTokens(billing.turnTokens ?? 0)} tok {money(billing.turnCost, 3)}\r\n </dd>\r\n </div>\r\n <BillSubRow label={c.billCacheRead} tokens={billing.turnCacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.turnHitCost ?? 0, 3, cur)} color={BILL_COLORS.hit} />\r\n <BillSubRow label={c.billCacheMiss} tokens={(billing.turnInputTokens ?? 0) - (billing.turnCacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.turnMissCost ?? 0, 3, cur)} color={BILL_COLORS.miss} />\r\n <BillSubRow label={c.billOutput} tokens={billing.turnOutputTokens ?? 0} amount={dash ?? formatMoney(billing.turnOutputCost ?? 0, 3, cur)} color={BILL_COLORS.output} />\r\n <div style={rowStyle}>\r\n <dt style={{ ...rowLabelStyle, color: '#f472b6' }}>\r\n {c.billSession}{billing.sessionRounds ? ` · ${billing.sessionRounds} ${c.billRoundsWord}` : ''}\r\n </dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>\r\n {formatTokens((billing.sessionInputTokens ?? 0) + (billing.sessionOutputTokens ?? 0))} tok {sessionTotal}\r\n </dd>\r\n </div>\r\n <BillSubRow label={c.billCacheRead} tokens={billing.sessionCacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.sessionCacheHitCost ?? 0, 2, cur)} color={BILL_COLORS.hit} />\r\n <BillSubRow label={c.billCacheMiss} tokens={(billing.sessionInputTokens ?? 0) - (billing.sessionCacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.sessionMissCost ?? 0, 2, cur)} color={BILL_COLORS.miss} />\r\n <BillSubRow label={c.billOutput} tokens={billing.sessionOutputTokens ?? 0} amount={dash ?? formatMoney(billing.sessionOutputCost ?? 0, 2, cur)} color={BILL_COLORS.output} />\r\n {(billing.sessionFullMissSteps ?? 0) > 0 && (\r\n <div style={rowStyle}>\r\n <dt style={{ ...rowLabelStyle, color: '#f43f5e' }}>{c.billFullMiss}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>{billing.sessionFullMissSteps}</dd>\r\n </div>\r\n )}\r\n </dl>\r\n )\r\n}\r\n\r\n/**\r\n * The ring entry: pressure arc trigger + the check popover. Renders nothing\r\n * without a projection seat or before the session has any reading.\r\n */\r\nexport function ContextRing(props: ContextRingProps): JSX.Element | null {\r\n // Two distinct invisible cases, handled differently: a host WITHOUT the\r\n // projection hook seat (≤0.1.6 lines — the data hook never mounts) hides the\r\n // ring, the retired pill's discipline — a permanently dead control helps\r\n // nobody there. A host WITH the hook but no reading yet (fresh session)\r\n // renders the dimmed unset state — fail-visible, because a hidden control is\r\n // indistinguishable from a dead registration, which cost a debug round-trip\r\n // once already.\r\n const live = useSyncExternalStore(subscribeStore, getStore)\r\n const hasSeat = live.seatMounted === true\r\n const [open, setOpen] = useState(false)\r\n const rootRef = useRef<HTMLDivElement | null>(null)\r\n const pressure = live.pressure\r\n const breakdown = live.breakdown\r\n const billing = live.billing\r\n // The official meter's own occupancy mapping (contextOccupancy): the\r\n // projected estimate wins, the raw pressure sample is the floor.\r\n const used = typeof pressure?.projectedTokens === 'number'\r\n ? pressure.projectedTokens\r\n : typeof pressure?.pressureTokens === 'number' ? pressure.pressureTokens : undefined\r\n const window_ = typeof pressure?.contextWindow === 'number' && pressure.contextWindow > 0\r\n ? pressure.contextWindow\r\n : typeof props.contextWindowFallback === 'number' && props.contextWindowFallback > 0\r\n ? props.contextWindowFallback\r\n : undefined\r\n const hasReading = used !== undefined && window_ !== undefined && window_ > 0\r\n\r\n const c = copy()\r\n const percent = hasReading\r\n ? Math.min(100, Math.round(((used as number) / (window_ as number)) * 100))\r\n : 0\r\n const color = pressureColor(percent)\r\n const remaining = hasReading ? Math.max(0, (window_ as number) - (used as number)) : 0\r\n const rows: Array<{ label: string; value: number | undefined; color: string }> = !hasReading || breakdown === undefined\r\n ? []\r\n : [\r\n { label: c.system, value: breakdown.systemTokens, color: BREAKDOWN_COLORS.system },\r\n { label: c.tools, value: breakdown.toolsTokens, color: BREAKDOWN_COLORS.tools },\r\n { label: c.messages, value: breakdown.messageTokens, color: BREAKDOWN_COLORS.messages },\r\n ]\r\n\r\n // Hosts without the projection hook seat (≤0.1.6) can never produce a\r\n // reading — hide the control entirely rather than show a permanently dead\r\n // dial (the discipline in the comment at hasSeat). A host with the seat\r\n // flips `seatMounted` during the hook's own mount, so the gap is one store\r\n // tick before the first real re-render.\r\n if (!hasSeat) return null\r\n\r\n return (\r\n <div ref={rootRef} style={{ position: 'relative', display: 'inline-flex' }}>\r\n <button\r\n type=\"button\"\r\n style={hasReading ? triggerStyle : { ...triggerStyle, opacity: 0.55 }}\r\n aria-label={hasReading ? c.aria(`${percent}%`) : c.unset}\r\n aria-haspopup={hasReading ? 'dialog' : undefined}\r\n aria-expanded={open}\r\n onClick={() => { if (hasReading) setOpen(state => !state) }}\r\n >\r\n <Ring percent={percent} color={color} />\r\n <span style={{ ...figureStyle, color: hasReading ? color : 'var(--dsw-alias-label-caption, inherit)' }}>\r\n {hasReading ? `${percent}%` : '–'}\r\n </span>\r\n </button>\r\n {open && hasReading && (\r\n <div style={popStyle} role=\"dialog\" aria-label={c.title}>\r\n <div style={headStyle}>\r\n {c.title}\r\n <span style={{ ...rowValueStyle, ...figureStyle }}>~{formatTokens(used)} / {formatTokens(window_)}</span>\r\n </div>\r\n <div style={rowStyle}>\r\n <dt style={rowLabelStyle}>{c.percent}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0, color }}>{percent}%</dd>\r\n </div>\r\n <div style={rowStyle}>\r\n <dt style={rowLabelStyle}>{c.remaining}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>{formatTokens(remaining)}</dd>\r\n </div>\r\n {rows.every(row => typeof row.value === 'number') && rows.length > 0 && (\r\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))' }}>\r\n {rows.map(row => <BreakdownRow key={row.label} label={row.label} value={row.value as number} color={row.color} />)}\r\n </dl>\r\n )}\r\n {billing?.available === true && <BillingBlock billing={billing} />}\r\n {percent >= 85 && <div style={warnStyle}>{c.warning}</div>}\r\n <div style={footStyle}>\r\n {c.window}: {hasReading ? (window_ as number).toLocaleString() : c.unset}\r\n {billing?.available === true\r\n ? ` · ${billing.tier === 'peak' ? c.billPeak : billing.tier === 'offPeak' ? c.billOffPeak : billing.tier === 'flat' ? c.billFlat : c.billUnpriced} · ${\r\n billing.priced === false\r\n ? c.billUnpriced\r\n : billing.estimated === true\r\n ? c.billUncalibratedHint\r\n : typeof billing.catalogLabel === 'string'\r\n ? c.billPricedAs(billing.catalogLabel)\r\n : billing.pricingSource === 'custom'\r\n ? c.billCustom\r\n : billing.modelMatched === false\r\n ? c.billEstimate\r\n : c.billPriced\r\n }`\r\n : ''}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\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\r\n/** Deterministic tool names that are cheap to reason about (word-boundary anchored). */\r\nconst SIMPLE_TOOL_RE = /^(?:fs|bash|terminal|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/** Hefty payloads signal non-trivial work no matter the tool name. */\r\nconst HEAVY_ARGS = 800\r\n\r\n/** Count how many of the recent calls look cheap-and-deterministic. */\r\nfunction simpleRatio(calls: readonly ToolCallSample[]): number {\r\n if (calls.length === 0) return 1\r\n const simple = calls.filter(call =>\r\n SIMPLE_TOOL_RE.test(call.name) && 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 (fresh prompt, pure chat) -> `low` (simple chat tasks).\r\n * - All/mostly simple tools -> `low` (when downgrades are allowed).\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 * 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`.\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): AutoEffort {\r\n if (calls.length === 0) return allowDowngrade ? 'low' : 'high'\r\n\r\n const ratio = simpleRatio(calls)\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 } = input\r\n if (selected !== 'auto') return selected\r\n return scheduleEffort(recentCalls, allowDowngrade, allowUpgrade)\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 /** The `reasoningEffort` already present on the request seed, if any. */\r\n seedEffort: unknown\r\n /** Plugin-configured default level when the seed carries none. */\r\n selected: EffortId\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 /** 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 passes through unchanged when the model advertises\r\n * it; an unsupported manual pick is stripped rather than clamped (the user\r\n * 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` (or no selection) resolves through the scheduler; the result is\r\n * clamped to the model's advertised levels, so a scheduled `low` on a model\r\n * that only takes off/high (Qwen3.6) becomes `high` instead of an error.\r\n *\r\n * @param input - model capability plus the seed's current 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, seedEffort, selected, 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 seed → inject `high` (the advertised toggle level): the\r\n // short-circuit adapter serializes a non-off effort as enable_thinking\r\n // true — an explicit \"thinking on\" signal the wire needs. (A request\r\n // with NO effort at all is the ambiguous case: leaving it absent relies\r\n // on the provider default, which some gateways treat as off.)\r\n return { inject: true, level: seedEffort === 'off' ? 'off' : 'high' }\r\n }\r\n if (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 (isEffortId(seedEffort) && seedEffort !== '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(seedEffort)\r\n ? { inject: true, level: seedEffort }\r\n : { inject: false }\r\n }\r\n const level = decideEffort({\r\n recentCalls: input.recentCalls,\r\n selected: seedEffort === 'auto' ? 'auto' : selected,\r\n allowDowngrade: input.allowDowngrade,\r\n allowUpgrade: input.allowUpgrade,\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+EltJRWHBFSmZVWGhTV2hlZWsxO4VtZ1Pa5fM7WaQbJmVDPFFUVFphbqwVFzg4O041OE4AAP9pZmzNwrwFAgVoV1ZERld4dW1mZmo5Z6paW2ZYU1ppaGpmZ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XC3lXy7nVm1rOXOg0CzC7r89cdYyTMxmIicOzk9w3Pkho52bv+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\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, 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 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 && resolvedEffort !== undefined\r\n && resolvedEffort !== 'auto'\r\n ? `→ ${effortName(resolvedEffort)}`\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} />\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","/**\r\n * Thinking-levels settings card — the family settings tab face of the\r\n * dsh-thinking-levels plugin.\r\n *\r\n * The card binds this plugin's entry config through the `configForms` cordis\r\n * service and renders its fields: the level picker\r\n * (off / on / minimal / low / medium / high / xhigh / max / auto) plus the\r\n * scheduler toggles. Every change commits immediately through the scope (no\r\n * staged form): the decision is read per model request, so a committed change\r\n * applies to the next request without a restart.\r\n *\r\n * Below the scheduler rows, a \"model capabilities\" block edits the\r\n * `llm-pi-ai` namespace directly (read + write through the same settings\r\n * transport), borrowing dsh-thinking-effort's presentation: providers group\r\n * their models, each model row shows capability badges and expands into a\r\n * per-level editor where a level is ticked and its gateway wire value entered\r\n * (e.g. `high` → `ultra`); `off` left empty means \"do not send\". A search box\r\n * filters models and one-click presets apply official/generic level sets to\r\n * every thinking model.\r\n *\r\n * Kept dependency-free beyond react: the scopes are subscribed with\r\n * `useSyncExternalStore`, and the controls are plain HTML so the client bundle\r\n * needs no CSS modules and no primitives value import.\r\n */\r\nimport { useCallback, useState, useSyncExternalStore } from 'react'\r\nimport type { CSSProperties, JSX } from 'react'\r\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\r\nimport type { SettingsScope } from './scope-face.ts'\r\nimport type { EffortId } from '../thinking-level.ts'\r\nimport type { PricingPolicy } from '../price-catalog.ts'\r\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\r\nimport { contextWindowOf, deepseekSectionOf, DEEPSEEK_DEFAULT_WINDOW } from './model-panel.tsx'\r\nimport type { ThinkingLevelsConfig } from '../index.ts'\r\n\r\n/** One injected face: the plugin's own scope plus the llm-pi-ai namespace scope. */\r\nexport interface ThinkingLevelsCardInjected {\r\n scope: SettingsScope<ThinkingLevelsConfig>\r\n /** The `llm-pi-ai` settings namespace, read and written for model capabilities. */\r\n piAiScope: SettingsScope<unknown>\r\n /**\r\n * The openai-completions transport's section (`llm-openai-completions`):\r\n * read for the per-route takeover state, written by the route-head takeover\r\n * checkbox (`enabled` + the manual `providers` list). Absent face = the\r\n * transport is not composed; the checkbox then renders disabled.\r\n */\r\n ocScope?: SettingsScope<unknown>\r\n /**\r\n * The `llm-deepseek` section: with the seat takeover off (4.4.0 default)\r\n * the official-model context editor lives on this card instead of the\r\n * ModelPanel lines. Absent on hosts without the namespace.\r\n */\r\n deepseekScope?: SettingsScope<unknown>\r\n}\r\n\r\n/** Full props: locale seat + the injected scopes. */\r\nexport type ThinkingLevelsCardProps = PropsLocale<'thinking-levels'> & ThinkingLevelsCardInjected\r\n\r\n/** The user-facing levels, in picker order: eight standard levels plus the auto scheduler sentinel. */\r\nconst EFFORT_OPTIONS: readonly EffortId[] = [\r\n 'off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'auto',\r\n]\r\n\r\n/** 计价兜底档,in picker order:缺省 estimate(典型价估算,未校准仅供参考)。 */\r\nconst PRICING_OPTIONS: readonly PricingPolicy[] = [\r\n 'estimate', 'cn', 'global', 'custom', 'off',\r\n]\r\n\r\n/**\r\n * The levels the capability editor offers. This is the llm-pi-ai\r\n * `reasoningEfforts` table-key space — pi-ai's fixed seven levels (schema\r\n * rejects any other key). `on` (the enable-thinking toggle) is a selector /\r\n * injection-level concept, expressed here by the `off` + `high` pair\r\n * (enable_thinking false/true), so it has no table key of its own.\r\n */\r\nconst CAPABILITY_LEVELS: readonly EffortId[] = [\r\n 'off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',\r\n] as const\r\n\r\n/** One-click presets, mirroring dsh-thinking-effort: official DeepSeek style and a generic set. */\r\nconst PRESETS: readonly { key: 'official' | 'generic'; levels: Record<string, unknown> }[] = [\r\n { key: 'official', levels: { off: null, high: 'high', max: 'max' } },\r\n { key: 'generic', levels: { off: null, low: 'low', medium: 'medium', high: 'high' } },\r\n]\r\n\r\n/** The wire thinking formats offered (llm-pi-ai's nameable set, incl. qwen-chat-template). */\r\nconst THINKING_FORMATS = [\r\n 'openai', 'deepseek', 'openrouter', 'together', 'zai', 'qwen',\r\n 'qwen-chat-template', 'string-thinking', 'ant-ling',\r\n] as const\r\n\r\n/* ── shared row styling (inline; keeps the client bundle CSS-free) ──────── */\r\n\r\nconst rowStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n gap: '12px',\r\n padding: '6px 0',\r\n fontSize: '13px',\r\n lineHeight: '20px',\r\n}\r\n\r\nconst labelStyle: CSSProperties = { margin: 0, color: 'var(--dsw-alias-label-primary)' }\r\n\r\n/** Native form controls (the select's dropdown popup) follow `color-scheme`,\r\n * which the ≤0.1.6 shells never set — derive it from the body luminance once\r\n * at bundle eval so dark-theme hosts get dark popups without a media query\r\n * (the app theme isn't the OS theme, so prefers-color-scheme would lie). */\r\nconst controlColorScheme: 'dark' | 'light' = (() => {\r\n try {\r\n const rgb = getComputedStyle(document.body).backgroundColor.match(/\\d+/g) ?? ['255', '255', '255']\r\n const [r, g, b] = rgb.map(Number)\r\n return (r * 299 + g * 587 + b * 114) / 1000 < 128 ? 'dark' : 'light'\r\n } catch { return 'light' }\r\n})()\r\n\r\nconst controlStyle: CSSProperties = {\r\n // Translucent fallback: the alias tokens don't exist on the ≤0.1.6 shells,\r\n // and the old `#fff` fallback painted white controls onto dark dialogs.\r\n background: 'var(--dsw-alias-bg-surface, rgba(127,127,127,0.12))',\r\n color: 'var(--dsw-alias-label-primary, inherit)',\r\n colorScheme: controlColorScheme,\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '4px',\r\n padding: '3px 8px',\r\n fontSize: '13px',\r\n}\r\n\r\nconst sectionStyle: CSSProperties = {\r\n marginTop: '14px',\r\n paddingTop: '12px',\r\n borderTop: '1px solid var(--dsw-alias-border-l2)',\r\n}\r\n\r\nconst fieldStyle: CSSProperties = { display: 'flex', flexDirection: 'column', gap: '4px' }\r\n\r\nconst fieldLabelStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\r\n\r\nconst hintStyle: CSSProperties = { margin: '6px 0 0', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\r\n\r\n/** Provider group shell: an outlined row grouping its models. */\r\nconst providerStyle: CSSProperties = {\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '8px',\r\n margin: '8px 0 0',\r\n overflow: 'hidden',\r\n}\r\n\r\nconst providerHeadStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '8px',\r\n padding: '7px 10px',\r\n background: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\r\n}\r\n\r\nconst providerNameStyle: CSSProperties = {\r\n margin: 0,\r\n flex: '1 1 auto',\r\n minWidth: 0,\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n fontWeight: 600,\r\n color: 'var(--dsw-alias-label-primary)',\r\n overflowWrap: 'anywhere',\r\n}\r\n\r\nconst providerBadgeStyle: CSSProperties = {\r\n margin: 0,\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '4px',\r\n padding: '0 5px',\r\n whiteSpace: 'nowrap',\r\n}\r\n\r\nconst iconButtonStyle: CSSProperties = {\r\n background: 'none',\r\n border: 'none',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n cursor: 'pointer',\r\n padding: '2px 4px',\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n}\r\n\r\n/** One model row inside a provider group. */\r\nconst modelRowStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '8px',\r\n padding: '7px 10px',\r\n borderTop: '1px solid var(--dsw-alias-border-l2)',\r\n}\r\n\r\nconst modelIdStyle: CSSProperties = {\r\n margin: 0,\r\n flex: '1 1 auto',\r\n minWidth: 0,\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n overflowWrap: 'anywhere',\r\n}\r\n\r\n/** Capability badge chips (text / image / context). */\r\nconst badgeStyle: CSSProperties = {\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '4px',\r\n padding: '0 5px',\r\n whiteSpace: 'nowrap',\r\n}\r\n\r\n/** The per-level editor grid: one row per level with a toggle, a label and a wire input. */\r\nconst levelRowStyle: CSSProperties = {\r\n display: 'grid',\r\n gridTemplateColumns: 'auto 92px minmax(0, 1fr)',\r\n alignItems: 'center',\r\n gap: '8px',\r\n padding: '4px 0',\r\n fontSize: '13px',\r\n}\r\n\r\nconst levelNameStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-secondary)' }\r\n\r\nconst wireInputStyle: CSSProperties = {\r\n background: 'var(--dsw-alias-bg-surface, #fff)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '4px',\r\n padding: '3px 8px',\r\n fontSize: '12px',\r\n width: '100%',\r\n boxSizing: 'border-box',\r\n}\r\n\r\n/* ── helpers over the llm-pi-ai user layer ─────────────────────────────── */\r\n\r\n/** A row's `reasoningEfforts` as stored in the user layer. */\r\nfunction effortsOf(model: Record<string, unknown>): false | Record<string, unknown> | undefined {\r\n const value = model['reasoningEfforts']\r\n if (value === false) return false\r\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\r\n return value as Record<string, unknown>\r\n }\r\n return undefined\r\n}\r\n\r\n/**\r\n * Build a `reasoningEfforts` table from a level→wire draft. `off` maps to\r\n * `null` (omit the reasoning option → enable_thinking false) unless the user\r\n * typed a wire value; every other ticked level keeps its typed wire value.\r\n * pi-ai rejects a table offering nothing beyond `off`, so a selection of only\r\n * `off` falls back to the default `high` level.\r\n */\r\nfunction effortTableOf(draft: Record<string, string | null>): Record<string, unknown> {\r\n const table: Record<string, unknown> = {}\r\n for (const level of CAPABILITY_LEVELS) {\r\n const wire = draft[level]\r\n if (wire === undefined || wire === null) continue\r\n const trimmed = typeof wire === 'string' ? wire.trim() : ''\r\n if (level === 'off') table[level] = trimmed === '' ? null : trimmed\r\n else if (trimmed !== '') table[level] = trimmed\r\n }\r\n if (Object.keys(table).length === 0 || Object.keys(table).every(level => table[level] === null)) {\r\n return { ...table, high: 'high' }\r\n }\r\n return table\r\n}\r\n\r\n/** Whether a row declares `compat.supportsReasoningEffort` (the wire sends reasoning_effort). */\r\nfunction supportsEffortOf(model: Record<string, unknown>): boolean {\r\n const compat = model['compat']\r\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\r\n return (compat as Record<string, unknown>)['supportsReasoningEffort'] === true\r\n}\r\n\r\n/** Patch one row's `compat` object, merging rather than replacing sibling fields. */\r\nfunction patchCompat(\r\n row: Record<string, unknown>,\r\n patch: (compat: Record<string, unknown>) => void,\r\n): void {\r\n const compat = typeof row['compat'] === 'object' && row['compat'] !== null && !Array.isArray(row['compat'])\r\n ? { ...(row['compat'] as Record<string, unknown>) }\r\n : {}\r\n patch(compat)\r\n if (Object.keys(compat).length === 0) delete row['compat']\r\n else row['compat'] = compat\r\n}\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/** Whether a route-level profile declares `compat.supportsDeveloperRole: false`. */\r\nfunction developerRoleDisabledOf(profile: unknown): boolean {\r\n if (typeof profile !== 'object' || profile === null) return false\r\n const compat = (profile as Record<string, unknown>)['compat']\r\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\r\n return (compat as Record<string, unknown>)['supportsDeveloperRole'] === false\r\n}\r\n\r\n/**\r\n * Whether the transport currently takes this route over: its master switch on\r\n * AND the route in its manual providers list. Pure membership — the checkbox\r\n * is the single per-route truth, so dispatch uses the same set.\r\n */\r\nfunction takeoverActiveOf(section: { enabled?: unknown; providers?: unknown }, providerId: string): boolean {\r\n if (section.enabled !== true) return false\r\n return Array.isArray(section.providers) && (section.providers as unknown[]).includes(providerId)\r\n}\r\n\r\n/**\r\n * The transport's `extraInputs` dict ('provider/model' → modality list), from\r\n * its own section. The host llm-pi-ai schema caps a model row's `input` enum\r\n * at text|image, so video/audio declarations for omni models live here —\r\n * the taken-over transport unions them into the model's effective input.\r\n */\r\nfunction extraInputsOf(section: { extraInputs?: unknown }): Record<string, string[]> {\r\n if (typeof section.extraInputs !== 'object' || section.extraInputs === null || Array.isArray(section.extraInputs)) return {}\r\n const out: Record<string, string[]> = {}\r\n for (const [key, value] of Object.entries(section.extraInputs as Record<string, unknown>)) {\r\n if (Array.isArray(value)) out[key] = value.filter((m): m is string => typeof m === 'string')\r\n }\r\n return out\r\n}\r\n\r\n/**\r\n * One settings write with a single self-heal retry. A false return means the\r\n * host refused the optimistic lock — and the client has ALREADY completed its\r\n * recover() (a fresh describe folded into the mirror) by the time resolve\r\n * lands, so an immediate second attempt carries a fresh revision: the machine\r\n * equivalent of the user's proven \"click it twice\" workaround.\r\n */\r\nasync function setWithRetry(scope: SettingsScope<unknown>, field: string, value: unknown): Promise<{ ok: boolean; retried: boolean }> {\r\n const ok1 = await scope.set(field, value).catch(() => false)\r\n if (ok1) return { ok: true, retried: false }\r\n await new Promise((resolve) => setTimeout(resolve, 350))\r\n const ok2 = await scope.set(field, value).catch(() => false)\r\n return { ok: ok2, retried: true }\r\n}\r\n\r\n/** One flattened capability entry: a provider's model at an array index. */\r\ninterface CapabilityEntry {\r\n providerId: string\r\n index: number\r\n model: Record<string, unknown>\r\n modelId: string\r\n /** The provider-level `compat`, applied to models that declare none (display parity). */\r\n providerCompat?: unknown\r\n /** The provider-level `defaultInput`, applied to models that declare none (display parity). */\r\n providerInput?: unknown[]\r\n /** The provider-level `api` (wire protocol): the host's compat gates differ per protocol. */\r\n providerApi?: unknown\r\n}\r\n\r\n/** The effective `compat` of an entry: its own `compat` merged over the provider-level `compat`. */\r\nfunction compatOf(entry: CapabilityEntry): Record<string, unknown> {\r\n const base = typeof entry.providerCompat === 'object' && entry.providerCompat !== null\r\n ? entry.providerCompat as Record<string, unknown>\r\n : {}\r\n const own = entry.model['compat']\r\n return typeof own === 'object' && own !== null && !Array.isArray(own)\r\n ? { ...base, ...(own as Record<string, unknown>) }\r\n : base\r\n}\r\n\r\n/**\r\n * Whether the model-level thinking-compat fields (`compat.thinkingFormat`,\r\n * `compat.supportsReasoningEffort`) may be written for this entry's provider\r\n * (issue #2): the host llm-pi-ai gate offers them ONLY on the\r\n * openai-completions protocol — a Responses route carrying them fails the\r\n * WHOLE providers write (`not configurable here`). An absent `api` keeps\r\n * pi-ai's openai-completions default, so the row stays editable.\r\n * (exported for the gate's unit regression, issue #2)\r\n */\r\nexport function effortCompatConfigurable(entry: CapabilityEntry): boolean {\r\n return typeof entry.providerApi !== 'string' || entry.providerApi === 'openai-completions'\r\n}\r\n\r\n/** Flatten the user-layer providers into capability entries (models arrays only). */\r\nfunction entriesOf(providers: Record<string, unknown>): CapabilityEntry[] {\r\n return Object.entries(providers).flatMap(([providerId, profile]) => {\r\n const raw = profile as Record<string, unknown>\r\n const models = raw['models']\r\n if (!Array.isArray(models)) return []\r\n const providerCompat = raw['compat']\r\n const providerInput = Array.isArray(raw['defaultInput']) ? raw['defaultInput'] as unknown[] : undefined\r\n return models.map((model, index) => ({\r\n providerId,\r\n index,\r\n model: (typeof model === 'object' && model !== null && !Array.isArray(model)\r\n ? model as Record<string, unknown>\r\n : {}),\r\n modelId: typeof model === 'object' && model !== null && typeof (model as Record<string, unknown>)['id'] === 'string'\r\n ? (model as Record<string, unknown>)['id'] as string\r\n : `#${index + 1}`,\r\n providerCompat,\r\n providerInput,\r\n providerApi: raw['api'],\r\n }))\r\n })\r\n}\r\n\r\n/** Human-readable capability summary of one entry (input modalities + declared context window). */\r\nfunction summaryOf(entry: CapabilityEntry): { text: boolean; image: boolean; context: string | null } {\r\n // Modalities fall back to the provider-level `defaultInput` so a vision\r\n // gateway declared once on the route shows every model as vision, matching\r\n // llm-pi-ai's resolution and the adapter's runtime gate.\r\n const input = Array.isArray(entry.model['input'])\r\n ? entry.model['input'] as unknown[]\r\n : entry.providerInput\r\n const text = !Array.isArray(input) || input.length === 0 || input.includes('text')\r\n const image = Array.isArray(input) && input.includes('image')\r\n const contextWindow = entry.model['contextWindow']\r\n const context = typeof contextWindow === 'number' && Number.isFinite(contextWindow) && contextWindow > 0\r\n ? formatContextWindow(contextWindow)\r\n : null\r\n return { text, image, context }\r\n}\r\n\r\n/** A tiny inline chevron icon (no CSS modules). */\r\nfunction ChevronIcon({ open }: { open: boolean }): JSX.Element {\r\n return (\r\n <svg\r\n width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" aria-hidden\r\n style={{ transform: open ? 'rotate(180deg)' : 'none', transition: 'transform 0.16s' }}\r\n >\r\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\r\n </svg>\r\n )\r\n}\r\n\r\n/**\r\n * Horizontal pill toggle: the real checkbox stays the a11y control (sr-only),\r\n * the drawn track/knob reflects `checked` — which the card feeds from its\r\n * optimistic overlay, so the pill flips the instant the user clicks and rolls\r\n * back on a refused write (same pendingTl contract as every other field).\r\n */\r\nfunction PillToggle(props: {\r\n id: string\r\n checked: boolean\r\n disabled: boolean\r\n title?: string\r\n onChange: (next: boolean) => void\r\n}): JSX.Element {\r\n const { id, checked, disabled, title, onChange } = props\r\n return (\r\n <label\r\n htmlFor={id}\r\n title={title}\r\n style={{ display: 'inline-flex', alignItems: 'center', cursor: disabled ? 'default' : 'pointer' }}\r\n >\r\n <input\r\n id={id}\r\n type=\"checkbox\"\r\n checked={checked}\r\n disabled={disabled}\r\n onChange={(event) => onChange(event.currentTarget.checked)}\r\n style={{ position: 'absolute', width: 1, height: 1, margin: 0, opacity: 0, pointerEvents: 'none' }}\r\n />\r\n <span\r\n aria-hidden\r\n style={{\r\n display: 'inline-block',\r\n width: '36px',\r\n height: '20px',\r\n borderRadius: '999px',\r\n flex: '0 0 auto',\r\n position: 'relative',\r\n background: checked\r\n ? 'var(--dsw-alias-bg-control-primary, #4d6bfe)'\r\n : 'var(--dsw-alias-fill-input-primary, rgba(127,127,127,0.25))',\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\r\n transition: 'background 0.16s',\r\n }}\r\n >\r\n <span\r\n style={{\r\n position: 'absolute',\r\n top: '1px',\r\n left: checked ? '17px' : '1px',\r\n width: '16px',\r\n height: '16px',\r\n borderRadius: '50%',\r\n background: '#fff',\r\n boxShadow: '0 1px 2px rgba(0,0,0,0.25)',\r\n transition: 'left 0.16s',\r\n }}\r\n />\r\n </span>\r\n </label>\r\n )\r\n}\r\n\r\n/**\r\n * The llm-pi-ai model-capability editor block (dsh-thinking-effort style:\r\n * provider groups, model rows with badges, per-level wire editors, search and\r\n * one-click presets).\r\n * @param scope - the `llm-pi-ai` namespace scope.\r\n * @param t - copy lookup.\r\n * @param readonly - whether writes are forbidden.\r\n * @returns the capabilities block, or a placeholder when nothing is configured.\r\n */\r\n/**\r\n * The absent-transport snapshot: a module-level CONSTANT. `useSyncExternalStore`\r\n * requires getSnapshot to return a STABLE value — an inline fallback literal is\r\n * a new object on every call, and React spins an infinite update loop (#185)\r\n * the moment this block renders with no transport handle (the ready branch's\r\n * first-ever mount crash).\r\n */\r\nconst OC_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\nfunction ModelCapabilities(props: {\r\n scope: SettingsScope<unknown>\r\n ocScope?: SettingsScope<unknown>\r\n /** The plugin's OWN settings scope (TL namespace): hosts the takeover master switch write. */\r\n tlScope?: SettingsScope<unknown>\r\n t: (key: string) => string\r\n readonly: boolean\r\n}): JSX.Element {\r\n const { scope, ocScope, tlScope, t, readonly } = props\r\n // Stable subscription identities: inline lambdas make React resubscribe on\r\n // every render, and the host controller folds a fresh decoded snapshot into\r\n // its store on every subscribe — each resubscription would then look like a\r\n // store change and re-render forever.\r\n const subscribe = useCallback((listener: () => void) => scope.subscribe(listener), [scope])\r\n const getSnapshot = useCallback(() => scope.getSnapshot(), [scope])\r\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\r\n // The transport's live section: drives the per-route takeover checkbox.\r\n const ocSubscribe = useCallback(\r\n (listener: () => void) => ocScope?.subscribe(listener) ?? (() => {}),\r\n [ocScope],\r\n )\r\n const ocGetSnapshot = useCallback(\r\n () => (ocScope !== undefined ? ocScope.getSnapshot() : OC_ABSENT_SNAPSHOT),\r\n [ocScope],\r\n )\r\n const ocSnapshot = useSyncExternalStore(ocSubscribe, ocGetSnapshot)\r\n const ocSection = (ocSnapshot.status === 'ready' && typeof ocSnapshot.value === 'object' && ocSnapshot.value !== null\r\n ? ocSnapshot.value\r\n : {}) as { enabled?: unknown; providers?: unknown; extraInputs?: unknown }\r\n const ocWritable = ocSnapshot.status === 'ready' && ocSnapshot.writable && !readonly\r\n // Optimistic overlay (plan tl-write-immediacy §B): pending values shadow the\r\n // snapshots until their write settles. resolve(true) implies the client has\r\n // already accepted the new mirror view, so clearing the pending entry then\r\n // is gap-free; resolve(false) rolls the overlay back AND surfaces the error\r\n // banner. Optimistic writes deliberately do NOT touch `busy` — a 350ms\r\n // grey-out would defeat the instant-flip this overlay exists for.\r\n const [pendingOc, setPendingOc] = useState<Partial<{ enabled: boolean; providers: string[]; extraInputs: Record<string, string[]> }>>({})\r\n const [pendingPi, setPendingPi] = useState<Record<string, unknown> | undefined>(undefined)\r\n const [writeError, setWriteError] = useState<string | null>(null)\r\n const viewOc = { ...ocSection, ...pendingOc } as { enabled?: unknown; providers?: unknown; extraInputs?: unknown }\r\n const unavailable = snapshot.status === 'unavailable'\r\n const providers = snapshot.status === 'ready' ? providersOf(snapshot) : {}\r\n // H1: the overlay must sit at the SOURCE of the model-row derivation chain —\r\n // thinking / vision / effort / context all flow from entriesOf(...).\r\n const viewProviders = { ...providers, ...pendingPi }\r\n // Every llm-pi-ai provider is listed with its models — no list gating: the\r\n // official compat surface (dsh ≥ rc.8) means pi-ai serves every route\r\n // natively, so each model is editable right here.\r\n const allEntries = entriesOf(viewProviders)\r\n\r\n // UI-only state: provider/model expansion, the wire drafts, and the query.\r\n const [query, setQuery] = useState('')\r\n const [expandedProviders, setExpandedProviders] = useState<Record<string, boolean>>({})\r\n const [expandedModels, setExpandedModels] = useState<Record<string, boolean>>({})\r\n const [drafts, setDrafts] = useState<Record<string, Record<string, string | null>>>({})\r\n // `busy` has no writer by design (see the optimistic-write note above) —\r\n // every write path is optimistic with its own inline rollback, so the\r\n // disabled states below are currently pure `readonly` mirrors.\r\n const [busy] = useState(false)\r\n const [contextRaw, setContextRaw] = useState<Record<string, string>>({})\r\n const [contextError, setContextError] = useState<Record<string, string>>({})\r\n\r\n const entryKey = (entry: CapabilityEntry): string => `${entry.providerId}\\u0000${entry.index}`\r\n\r\n /** Commit one patch over the user-layer providers (optimistic + self-heal retry). */\r\n const commitProviders = (mutate: (current: Record<string, unknown>) => Record<string, unknown>): void => {\r\n if (snapshot.status !== 'ready' || readonly) return\r\n const next = mutate(structuredClone(viewProviders))\r\n setPendingPi(next)\r\n void setWithRetry(scope, 'providers', next).then(({ ok }) => {\r\n setPendingPi(undefined)\r\n if (!ok) setWriteError(t('card.writeError'))\r\n })\r\n }\r\n\r\n /** Toggle the route-level official compat flag: unchecked = inherit (unset). */\r\n const toggleDeveloperRole = (providerId: string, next: boolean): void => {\r\n commitProviders((current) => {\r\n const profile = current[providerId] as Record<string, unknown> | undefined\r\n if (profile === undefined) return current\r\n const compat = typeof profile['compat'] === 'object' && profile['compat'] !== null && !Array.isArray(profile['compat'])\r\n ? { ...(profile['compat'] as Record<string, unknown>) }\r\n : {}\r\n if (next) compat['supportsDeveloperRole'] = false\r\n else delete compat['supportsDeveloperRole']\r\n if (Object.keys(compat).length === 0) delete profile['compat']\r\n else profile['compat'] = compat\r\n return current\r\n })\r\n }\r\n\r\n /**\r\n * Toggle the per-route third-party takeover. Ownership split (plan §D): this\r\n * checkbox writes MEMBERSHIP only — `OC.enabled`'s sole writer is the host\r\n * mirror of TL's `takeover` master. Checking a route while the master is off\r\n * lights the master through ONE TL-namespace write instead of the old direct\r\n * OC.enabled write that used to fight the mirror and bounce the checkbox.\r\n */\r\n const toggleTakeover = (providerId: string, next: boolean): void => {\r\n if (ocScope === undefined || !ocWritable) return\r\n const currentProviders = Array.isArray(viewOc.providers)\r\n ? (viewOc.providers as unknown[]).filter((id): id is string => typeof id === 'string')\r\n : []\r\n const providers = next\r\n ? [...new Set([...currentProviders, providerId])]\r\n : currentProviders.filter((id) => id !== providerId)\r\n setPendingOc((cur) => ({ ...cur, providers }))\r\n // Master-off detection reads TL's OWN snapshot, never viewOc.enabled: the\r\n // enabled field folds lazily (host mirror timing) and reads stale-true\r\n // right after a master-off click, which would skip the auto-light. The\r\n // TL snapshot folds on the master write itself, so it is always fresh.\r\n const tlTakeoverNow = (tlScope?.getSnapshot().value as { takeover?: unknown } | undefined)?.takeover === true\r\n if (next && !tlTakeoverNow && tlScope !== undefined) {\r\n // Light the master AND carry OC.enabled with it in-session: the host\r\n // mirror only reconciles at boot reliably, so the card writes both sides\r\n // of the lighting (same value — no fight with the mirror is possible).\r\n void setWithRetry(tlScope, 'takeover', true).then(({ ok }) => {\r\n if (!ok) setWriteError(t('card.writeError'))\r\n })\r\n void setWithRetry(ocScope, 'enabled', true).then(({ ok }) => {\r\n if (!ok) setWriteError(t('card.writeError'))\r\n })\r\n }\r\n void setWithRetry(ocScope, 'providers', providers).then(({ ok }) => {\r\n setPendingOc((cur) => {\r\n const rest = { ...cur }\r\n delete rest['providers']\r\n return rest\r\n })\r\n if (!ok) {\r\n setPendingOc((cur) => ({ ...cur, providers: currentProviders }))\r\n setWriteError(t('card.writeError'))\r\n }\r\n })\r\n }\r\n\r\n /** The model's extra input modalities declared on the transport ('provider/model' key). */\r\n const modelExtrasOf = (providerId: string, modelId: string): string[] =>\r\n extraInputsOf(viewOc)[`${providerId}/${modelId}`] ?? []\r\n\r\n /** Toggle one model's video/audio declaration on the transport's extraInputs.\r\n * The host pi-ai schema caps model-row `input` at text|image, so omni\r\n * modalities live here — effective only while the route is taken over. */\r\n const toggleModelModality = (providerId: string, modelId: string, modality: 'video' | 'audio', next: boolean): void => {\r\n if (ocScope === undefined || !ocWritable) return\r\n const current = extraInputsOf(viewOc)\r\n const modelKey = `${providerId}/${modelId}`\r\n const entry = Array.isArray(current[modelKey]) ? [...current[modelKey]] : []\r\n const nextEntry = next ? [...new Set([...entry, modality])] : entry.filter((m) => m !== modality)\r\n const nextDict: Record<string, string[]> = { ...current }\r\n if (nextEntry.length > 0) nextDict[modelKey] = nextEntry\r\n else delete nextDict[modelKey]\r\n setPendingOc((cur) => ({ ...cur, extraInputs: nextDict }))\r\n void setWithRetry(ocScope, 'extraInputs', nextDict).then(({ ok }) => {\r\n setPendingOc((cur) => {\r\n const rest = { ...cur }\r\n delete rest['extraInputs']\r\n return rest\r\n })\r\n if (!ok) {\r\n setPendingOc((cur) => ({ ...cur, extraInputs: current }))\r\n setWriteError(t('card.writeError'))\r\n }\r\n })\r\n }\r\n\r\n /** Patch one model row of one provider. */\r\n const patchModel = (\r\n providerId: string,\r\n index: number,\r\n patch: (model: Record<string, unknown>) => void,\r\n ): void => {\r\n commitProviders((current) => {\r\n const profile = current[providerId] as { models?: unknown[] } | undefined\r\n if (profile === undefined || !Array.isArray(profile.models)) return current\r\n const model = profile.models[index]\r\n if (typeof model !== 'object' || model === null) return current\r\n patch(model as Record<string, unknown>)\r\n return current\r\n })\r\n }\r\n\r\n /** Toggle whether a model is a thinking model (reasoningEfforts table vs false). */\r\n const toggleThinking = (entry: CapabilityEntry, next: boolean): void => {\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n if (next) {\r\n // Thinking on: a table must exist so the wire drives enable_thinking /\r\n // reasoning_effort. Start from the persisted table or the default high\r\n // set; a toggle model (no effort) keeps supportsReasoningEffort false.\r\n const effortCapable = supportsEffortOf(row)\r\n row['reasoningEfforts'] = effortCapable\r\n ? effortTableOf({ high: 'high' })\r\n : { off: null, high: 'high' }\r\n // Toggle-style thinking models need the official qwen format so pi-ai\r\n // sends enable_thinking (early vLLM thinking models return no thinking\r\n // content without that flag, and reject reasoning_effort). Only fills\r\n // an absent format — an explicit choice is never clobbered.\r\n if (!effortCapable) {\r\n patchCompat(row, (compat) => {\r\n if (compat['thinkingFormat'] === undefined) compat['thinkingFormat'] = 'qwen-chat-template'\r\n })\r\n }\r\n } else {\r\n // Thinking off: a non-reasoning model never takes an effort.\r\n row['reasoningEfforts'] = false\r\n }\r\n })\r\n }\r\n\r\n /** Toggle whether a model accepts reasoning_effort levels. */\r\n const toggleEffortCapable = (entry: CapabilityEntry, next: boolean): void => {\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n patchCompat(row, (compat) => {\r\n compat['supportsReasoningEffort'] = next\r\n // Counterpart of the auto-fill in toggleThinking: effort-capable rows\r\n // need reasoning_effort on the wire, so drop the toggle-style qwen\r\n // format when effort turns on (it would drive enable_thinking instead).\r\n if (next && compat['thinkingFormat'] === 'qwen-chat-template') delete compat['thinkingFormat']\r\n })\r\n })\r\n }\r\n\r\n /** Apply one model's wire draft as its `reasoningEfforts` table. */\r\n const applyDraft = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n const draft = drafts[key]\r\n if (draft === undefined) return\r\n const table = effortTableOf(draft)\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n row['reasoningEfforts'] = table\r\n // Mark effort support only when the model already had it or the user\r\n // ticked a reasoning_effort-only level (minimal/low/medium/xhigh/max).\r\n // A toggle-only model (Qwen3.6: off/high = enable_thinking) must keep\r\n // supportsReasoningEffort false — flipping it would make the adapter\r\n // send a reasoning_effort the gateway rejects (400).\r\n const extended = Object.keys(table).some(level => level !== 'off' && level !== 'on' && level !== 'high')\r\n if (supportsEffortOf(row) || extended) {\r\n patchCompat(row, (compat) => {\r\n compat['supportsReasoningEffort'] = true\r\n })\r\n }\r\n })\r\n }\r\n\r\n /** Reset a model's draft to its persisted table (or the default high set). */\r\n const resetDraft = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n setDrafts(current => {\r\n const next = { ...current }\r\n const table = effortsOf(entry.model)\r\n if (typeof table === 'object' && table !== null) {\r\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\r\n level,\r\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\r\n ]))\r\n } else {\r\n next[key] = { off: '', high: 'high' }\r\n }\r\n return next\r\n })\r\n }\r\n\r\n /** Seed a model's draft when it is first expanded. */\r\n const ensureDraft = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n setDrafts(current => {\r\n if (current[key] !== undefined) return current\r\n const next = { ...current }\r\n const table = effortsOf(entry.model)\r\n if (typeof table === 'object' && table !== null) {\r\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\r\n level,\r\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\r\n ]))\r\n } else {\r\n next[key] = { off: '', high: 'high' }\r\n }\r\n return next\r\n })\r\n }\r\n\r\n /** Apply a one-click preset to every thinking model. */\r\n const applyPreset = (levels: Record<string, unknown>): void => {\r\n commitProviders((current) => {\r\n for (const entry of entriesOf(current)) {\r\n const profile = current[entry.providerId] as { models?: unknown[] } | undefined\r\n if (profile === undefined || !Array.isArray(profile.models)) continue\r\n const model = profile.models[entry.index]\r\n if (typeof model !== 'object' || model === null) continue\r\n const row = model as Record<string, unknown>\r\n if (effortsOf(row) === undefined) continue // only thinking models\r\n // Replace the table but never touch supportsReasoningEffort: a\r\n // toggle-only model (Qwen3.6) must stay Off/On (enable_thinking), so\r\n // the request guard keeps clamping any injected level to its default\r\n // strength instead of sending a reasoning_effort the gateway rejects.\r\n row['reasoningEfforts'] = levels\r\n }\r\n return current\r\n })\r\n }\r\n\r\n /** Seed a model's context-window input when it is first expanded. */\r\n const seedContext = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n setContextRaw(current => {\r\n if (current[key] !== undefined) return current\r\n const value = entry.model['contextWindow']\r\n return {\r\n ...current,\r\n [key]: typeof value === 'number' && Number.isFinite(value) ? String(value) : '',\r\n }\r\n })\r\n }\r\n\r\n /** Write (or delete) a model's `contextWindow` in the llm-pi-ai entry. */\r\n const commitContextWindow = (entry: CapabilityEntry, value: number | undefined): void => {\r\n const key = entryKey(entry)\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n if (value === undefined) delete row['contextWindow']\r\n else row['contextWindow'] = value\r\n })\r\n setContextError(current => {\r\n const next = { ...current }\r\n delete next[key]\r\n return next\r\n })\r\n }\r\n\r\n /** Apply one preset immediately. */\r\n const applyContextPreset = (entry: CapabilityEntry, value: number): void => {\r\n const key = entryKey(entry)\r\n setContextRaw(current => ({ ...current, [key]: String(value) }))\r\n commitContextWindow(entry, value)\r\n }\r\n\r\n /** Validate and commit the custom input (blur / Enter); empty clears it. */\r\n const applyContextInput = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n const raw = (contextRaw[key] ?? '').trim()\r\n if (raw === '') {\r\n commitContextWindow(entry, undefined)\r\n return\r\n }\r\n const validation = validateContextWindow(raw)\r\n if (!validation.ok) {\r\n setContextError(current => ({\r\n ...current,\r\n [key]: t(validation.reason === 'integer'\r\n ? 'card.capabilities.contextInteger'\r\n : 'card.capabilities.contextRange'),\r\n }))\r\n return\r\n }\r\n commitContextWindow(entry, validation.value)\r\n }\r\n\r\n /** Clear the model's context-window declaration (delete the field). */\r\n const clearContext = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n setContextRaw(current => ({ ...current, [key]: '' }))\r\n commitContextWindow(entry, undefined)\r\n }\r\n\r\n if (unavailable) {\r\n return (\r\n <div style={sectionStyle}>\r\n <p style={hintStyle}>{t('card.capabilities.unavailable')}</p>\r\n </div>\r\n )\r\n }\r\n if (allEntries.length === 0) {\r\n return (\r\n <div style={sectionStyle}>\r\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\r\n <p style={hintStyle}>{t('card.capabilities.empty')}</p>\r\n </div>\r\n )\r\n }\r\n\r\n const needle = query.trim().toLowerCase()\r\n const visible = needle === ''\r\n ? allEntries\r\n : allEntries.filter(entry =>\r\n entry.modelId.toLowerCase().includes(needle)\r\n || entry.providerId.toLowerCase().includes(needle))\r\n const providerIds = [...new Set(visible.map(entry => entry.providerId))]\r\n\r\n return (\r\n <div style={sectionStyle}>\r\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\r\n <p style={hintStyle}>{t('card.capabilities.hint')}</p>\r\n {writeError !== null && (\r\n <p style={{ margin: '0 0 4px', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }} role=\"status\">⚠ {writeError}</p>\r\n )}\r\n\r\n {/* Search + one-click presets */}\r\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '8px 0 2px' }}>\r\n <input\r\n type=\"text\"\r\n value={query}\r\n placeholder={t('card.capabilities.search')}\r\n disabled={readonly || busy}\r\n style={{ ...controlStyle, flex: '1 1 160px', minWidth: '140px' }}\r\n onChange={(event) => setQuery(event.currentTarget.value)}\r\n />\r\n {PRESETS.map(preset => (\r\n <button\r\n key={preset.key}\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => applyPreset(preset.levels)}\r\n style={{\r\n ...controlStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {t(`card.capabilities.preset${preset.key === 'official' ? 'Official' : 'Generic'}`)}\r\n </button>\r\n ))}\r\n </div>\r\n\r\n {visible.length === 0\r\n ? <p style={hintStyle}>{t('card.capabilities.noMatches')}</p>\r\n : providerIds.map(providerId => {\r\n const providerEntries = visible.filter(entry => entry.providerId === providerId)\r\n const providerOpen = expandedProviders[providerId] === true || needle !== ''\r\n return (\r\n <div key={providerId} style={providerStyle}>\r\n <div style={providerHeadStyle}>\r\n <button\r\n type=\"button\"\r\n aria-expanded={providerOpen}\r\n disabled={readonly || busy}\r\n onClick={() => setExpandedProviders(current => ({\r\n ...current,\r\n [providerId]: current[providerId] !== true,\r\n }))}\r\n style={{\r\n ...iconButtonStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n }}\r\n title={providerOpen ? t('card.capabilities.collapseProvider') : t('card.capabilities.expandProvider')}\r\n >\r\n <ChevronIcon open={providerOpen} />\r\n </button>\r\n <p style={providerNameStyle}>{providerId}</p>\r\n <label\r\n style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '11px', whiteSpace: 'nowrap', color: 'var(--dsw-alias-label-secondary)' }}\r\n title={t('card.capabilities.developerRoleHint')}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={developerRoleDisabledOf(providers[providerId])}\r\n disabled={readonly || busy}\r\n onChange={(event) => toggleDeveloperRole(providerId, event.currentTarget.checked)}\r\n />\r\n <span>{t('card.capabilities.developerRole')}</span>\r\n </label>\r\n <label\r\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))' }}\r\n title={ocScope === undefined ? t('card.capabilities.takeoverHintAbsent') : t('card.capabilities.takeoverHint')}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={takeoverActiveOf(viewOc, providerId)}\r\n disabled={readonly || busy || !ocWritable}\r\n onChange={(event) => toggleTakeover(providerId, event.currentTarget.checked)}\r\n />\r\n <span>{t('card.capabilities.takeover')}</span>\r\n </label>\r\n <p style={providerBadgeStyle}>{providerEntries.length}</p>\r\n </div>\r\n {providerOpen\r\n ? providerEntries.map(entry => {\r\n const key = entryKey(entry)\r\n const modelOpen = expandedModels[key] === true\r\n const efforts = effortsOf(entry.model)\r\n const thinking = typeof efforts === 'object'\r\n // Display falls back to the provider-level `compat` so a\r\n // route-declared thinking/effort posture shows on every model.\r\n const compat = compatOf(entry)\r\n const supportsEffort = compat['supportsReasoningEffort'] === true\r\n // Issue #2: a non-completions protocol refuses the thinking-compat\r\n // fields at the write site — grey the three controls out before\r\n // the attempt instead of failing the whole providers payload.\r\n const apiGated = !effortCompatConfigurable(entry)\r\n const meta = summaryOf(entry)\r\n const format = typeof compat['thinkingFormat'] === 'string'\r\n ? compat['thinkingFormat']\r\n : undefined\r\n return (\r\n <div key={key}>\r\n <div style={modelRowStyle}>\r\n <button\r\n type=\"button\"\r\n aria-expanded={modelOpen}\r\n disabled={readonly || busy}\r\n onClick={() => {\r\n const next = expandedModels[key] !== true\r\n setExpandedModels(current => ({ ...current, [key]: next }))\r\n if (next) { ensureDraft(entry); seedContext(entry) }\r\n }}\r\n style={{\r\n ...iconButtonStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n }}\r\n title={modelOpen ? t('card.capabilities.closeModelSettings') : t('card.capabilities.openModelSettings')}\r\n >\r\n <ChevronIcon open={modelOpen} />\r\n </button>\r\n <p style={modelIdStyle}>{entry.modelId}</p>\r\n <span style={badgeStyle} title=\"text\">{meta.text ? 'T' : '–'}</span>\r\n <span style={badgeStyle} title=\"image\">{meta.image ? 'IMG' : '–'}</span>\r\n {modelExtrasOf(entry.providerId, entry.modelId).includes('video') && <span style={badgeStyle} title=\"video (extraInputs)\">VID</span>}\r\n {modelExtrasOf(entry.providerId, entry.modelId).includes('audio') && <span style={badgeStyle} title=\"audio (extraInputs)\">AUD</span>}\r\n {meta.context !== null && <span style={badgeStyle}>{meta.context}</span>}\r\n {thinking && !supportsEffort && <span style={badgeStyle}>On/Off</span>}\r\n </div>\r\n {modelOpen\r\n ? (\r\n <div style={{ padding: '4px 10px 10px', borderTop: '1px solid var(--dsw-alias-border-l2)' }}>\r\n {apiGated && <p style={hintStyle}>{t('card.capabilities.apiUnsupported')}</p>}\r\n {/* Layer 1 — base capabilities: is it a thinking model? A vision model? */}\r\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', margin: '2px 0 8px' }}>\r\n <label\r\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}\r\n title={apiGated ? t('card.capabilities.apiUnsupported') : undefined}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={thinking}\r\n disabled={readonly || busy || apiGated}\r\n onChange={(event) => toggleThinking(entry, event.currentTarget.checked)}\r\n />\r\n <span>{t('card.capabilities.thinking')}</span>\r\n </label>\r\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\r\n <input\r\n type=\"checkbox\"\r\n checked={meta.image}\r\n disabled={readonly || busy}\r\n onChange={(event) => {\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n // Image input implies text input; the pair is written together.\r\n row['input'] = event.currentTarget.checked ? ['text', 'image'] : ['text']\r\n })\r\n }}\r\n />\r\n <span>{t('card.capabilities.vision')}</span>\r\n </label>\r\n {/* Video/audio declarations live on the taken-over transport\r\n (extraInputs): the host model-row input enum caps at text|image. */}\r\n {(['video', 'audio'] as const).map(modality => (\r\n <label\r\n key={modality}\r\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))' }}\r\n title={t('card.capabilities.mediaHint')}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={modelExtrasOf(entry.providerId, entry.modelId).includes(modality)}\r\n disabled={readonly || busy || !ocWritable || !takeoverActiveOf(viewOc, entry.providerId)}\r\n onChange={(event) => toggleModelModality(entry.providerId, entry.modelId, modality, event.currentTarget.checked)}\r\n />\r\n <span>{t(`card.capabilities.${modality}`)}</span>\r\n </label>\r\n ))}\r\n </div>\r\n {/* Layer 2 — only for thinking models: does it take reasoning_effort levels? */}\r\n {thinking\r\n ? (\r\n <label\r\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px', margin: '0 0 8px' }}\r\n title={apiGated ? t('card.capabilities.apiUnsupported') : undefined}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={supportsEffort}\r\n disabled={readonly || busy || apiGated}\r\n onChange={(event) => toggleEffortCapable(entry, event.currentTarget.checked)}\r\n />\r\n <span>{t('card.capabilities.supportsEffort')}</span>\r\n </label>\r\n )\r\n : null}\r\n {thinking && supportsEffort\r\n ? (\r\n <>\r\n {/* Per-level wire editor — only for effort-capable thinking models */}\r\n <p style={fieldLabelStyle}>{t('card.capabilities.efforts')}</p>\r\n <div style={{ margin: '4px 0 6px' }}>\r\n {CAPABILITY_LEVELS.map(level => {\r\n const wire = drafts[key]?.[level]\r\n const on = wire !== undefined && wire !== null\r\n return (\r\n <div key={level} style={levelRowStyle}>\r\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\r\n <input\r\n type=\"checkbox\"\r\n checked={on}\r\n disabled={readonly || busy}\r\n onChange={(event) => {\r\n const checked = event.currentTarget.checked\r\n setDrafts(current => {\r\n const draft = { ...(current[key] ?? {}) }\r\n draft[level] = checked\r\n ? (level === 'off' ? '' : level)\r\n : null\r\n return { ...current, [key]: draft }\r\n })\r\n }}\r\n />\r\n <span>{level}</span>\r\n </label>\r\n <span style={levelNameStyle}>{level === 'off' ? t('card.capabilities.offPlaceholder') : '→'}</span>\r\n <input\r\n type=\"text\"\r\n value={wire ?? ''}\r\n disabled={readonly || busy || !on}\r\n placeholder={t('card.capabilities.wirePlaceholder')}\r\n style={wireInputStyle}\r\n onChange={(event) => {\r\n setDrafts(current => {\r\n const draft = { ...(current[key] ?? {}) }\r\n draft[level] = event.currentTarget.value\r\n return { ...current, [key]: draft }\r\n })\r\n }}\r\n />\r\n </div>\r\n )\r\n })}\r\n </div>\r\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>\r\n <button\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => applyDraft(entry)}\r\n style={{\r\n ...controlStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {t('card.capabilities.applyLevel')}\r\n </button>\r\n <button\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => resetDraft(entry)}\r\n style={{\r\n ...controlStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {t('card.capabilities.restoreDefault')}\r\n </button>\r\n </div>\r\n </>\r\n )\r\n : null}\r\n {/* Layer 4 — thinking format (wire serialization) */}\r\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\r\n <label style={fieldStyle}>\r\n <span style={fieldLabelStyle}>{t('card.capabilities.thinkingFormat')}</span>\r\n <select\r\n style={controlStyle}\r\n value={format ?? 'inherit'}\r\n disabled={readonly || busy || apiGated}\r\n title={apiGated ? t('card.capabilities.apiUnsupported') : undefined}\r\n onChange={(event) => {\r\n const next = event.currentTarget.value\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n patchCompat(row, (compat) => {\r\n if (next === 'inherit') delete compat['thinkingFormat']\r\n else compat['thinkingFormat'] = next\r\n })\r\n })\r\n }}\r\n >\r\n <option value=\"inherit\">{t('card.capabilities.thinkingFormat.inherit')}</option>\r\n {THINKING_FORMATS.map(formatOption => (\r\n <option key={formatOption} value={formatOption}>{formatOption}</option>\r\n ))}\r\n </select>\r\n </label>\r\n </div>\r\n {/* Context-window limit: presets + custom integer (written to llm-pi-ai, live on next request) */}\r\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\r\n <label style={fieldStyle}>\r\n <span style={fieldLabelStyle}>{t('card.capabilities.contextWindow')}</span>\r\n <div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap', alignItems: 'center' }}>\r\n {CONTEXT_WINDOW_PRESETS.map(preset => (\r\n <button\r\n key={preset.value}\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => applyContextPreset(entry, preset.value)}\r\n style={{\r\n ...controlStyle,\r\n padding: '2px 8px',\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {preset.label}\r\n </button>\r\n ))}\r\n <input\r\n type=\"text\"\r\n value={contextRaw[key] ?? ''}\r\n disabled={readonly || busy}\r\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\r\n style={{ ...controlStyle, width: '120px' }}\r\n onChange={(event) => {\r\n const next = event.currentTarget.value\r\n setContextRaw(current => ({ ...current, [key]: next }))\r\n }}\r\n onBlur={() => applyContextInput(entry)}\r\n onKeyDown={(event) => {\r\n if (event.key === 'Enter') event.currentTarget.blur()\r\n }}\r\n />\r\n <button\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => clearContext(entry)}\r\n style={{\r\n ...controlStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {t('card.capabilities.contextClear')}\r\n </button>\r\n </div>\r\n {contextError[key] !== undefined\r\n ? (\r\n <span style={{ margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }}>\r\n {contextError[key]}\r\n </span>\r\n )\r\n : null}\r\n </label>\r\n </div>\r\n </div>\r\n )\r\n : null}\r\n </div>\r\n )\r\n })\r\n : null}\r\n </div>\r\n )\r\n })}\r\n {readonly ? <p style={hintStyle}>{t('card.readonly')}</p> : null}\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * The absent-llm-deepseek snapshot: module-level CONSTANT (the stable-snapshot\r\n * rule that killed the first-ever panel mount, #185).\r\n */\r\nconst DS_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/**\r\n * Official DeepSeek model context-window editor (4.4.0): the per-line editor\r\n * lived only in the ModelPanel; with the seat takeover off by default the\r\n * card owns it. Writes mirror the panel's DEEPSEEK branch exactly: the model\r\n * entry's `contextWindow` when listed, the route `defaultContextWindow`\r\n * otherwise (clear = back to the native 1M).\r\n * @param props - the llm-deepseek scope (absent = section hidden), copy, fence.\r\n * @returns the editor block, or null when the namespace/scope is unavailable.\r\n */\r\nfunction DeepSeekContextSection(props: {\r\n scope: SettingsScope<unknown> | undefined\r\n t: (key: string) => string\r\n readonly: boolean\r\n}): JSX.Element | null {\r\n const { scope, t, readonly } = props\r\n const subscribe = useCallback(\r\n (listener: () => void) => (scope !== undefined ? scope.subscribe(listener) : () => {}),\r\n [scope],\r\n )\r\n const getSnapshot = useCallback(\r\n () => (scope === undefined ? DS_ABSENT_SNAPSHOT : scope.getSnapshot()),\r\n [scope],\r\n )\r\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\r\n const [raw, setRaw] = useState<Record<string, string>>({})\r\n const [errors, setErrors] = useState<Record<string, string>>({})\r\n const [busy, setBusy] = useState(false)\r\n if (snapshot.status !== 'ready') return null\r\n const section = deepseekSectionOf(snapshot)\r\n const models = section.models ?? []\r\n if (models.length === 0 && section.defaultContextWindow === undefined) return null\r\n const writable = snapshot.writable && !readonly && !busy\r\n\r\n /** Commit one row's window (index -1 = the route default layer). */\r\n const commit = (index: number, value: number | undefined): void => {\r\n if (scope === undefined || !writable) return\r\n setBusy(true)\r\n const rows = (deepseekSectionOf(scope.getSnapshot()).models ?? []).map(entry => ({ ...entry }))\r\n const write = index >= 0\r\n ? scope.set('models', rows.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 : scope.set('defaultContextWindow', value ?? DEEPSEEK_DEFAULT_WINDOW)\r\n void write.then(\r\n () => {\r\n setBusy(false)\r\n setErrors(cur => {\r\n const next = { ...cur }\r\n delete next[String(index)]\r\n return next\r\n })\r\n },\r\n () => {\r\n setBusy(false)\r\n setErrors(cur => ({ ...cur, [String(index)]: t('card.capabilities.failed') }))\r\n },\r\n )\r\n }\r\n\r\n /** Validate and commit the custom input; empty clears. */\r\n const applyCustom = (index: number): void => {\r\n const key = String(index)\r\n const trimmed = (raw[key] ?? '').trim()\r\n if (trimmed === '') {\r\n commit(index, undefined)\r\n return\r\n }\r\n const validation = validateContextWindow(trimmed)\r\n if (!validation.ok) {\r\n setErrors(cur => ({\r\n ...cur,\r\n [key]: t(validation.reason === 'integer' ? 'input.context.integer' : 'input.context.range'),\r\n }))\r\n return\r\n }\r\n commit(index, validation.value)\r\n }\r\n\r\n const rows: { label: string; index: number; value: number | undefined }[] = [\r\n ...models.map((entry, index) => ({\r\n label: String(entry['name'] ?? entry['id'] ?? index),\r\n index,\r\n value: contextWindowOf(entry),\r\n })),\r\n { label: t('model.panel.window'), index: -1, value: section.defaultContextWindow },\r\n ]\r\n\r\n return (\r\n <div style={sectionStyle}>\r\n <p style={fieldLabelStyle}>{t('card.dsContextTitle')}</p>\r\n {rows.map(row => {\r\n const key = String(row.index)\r\n return (\r\n <div key={key} style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '6px 0' }}>\r\n <span style={{ ...fieldLabelStyle, margin: 0 }}>{row.label}</span>\r\n <span style={badgeStyle}>{row.value === undefined ? t('input.context.unset') : formatContextWindow(row.value)}</span>\r\n {CONTEXT_WINDOW_PRESETS.map(preset => (\r\n <button\r\n key={preset.value}\r\n type=\"button\"\r\n disabled={!writable}\r\n onClick={() => commit(row.index, preset.value)}\r\n style={{\r\n ...controlStyle,\r\n padding: '2px 8px',\r\n cursor: writable ? 'pointer' : 'default',\r\n opacity: writable ? 1 : 0.5,\r\n }}\r\n >\r\n {preset.label}\r\n </button>\r\n ))}\r\n <input\r\n type=\"text\"\r\n inputMode=\"numeric\"\r\n value={raw[key] ?? ''}\r\n disabled={!writable}\r\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\r\n style={{ ...controlStyle, width: '120px' }}\r\n onChange={event => setRaw(cur => ({ ...cur, [key]: event.currentTarget.value }))}\r\n onKeyDown={event => { if (event.key === 'Enter') applyCustom(row.index) }}\r\n />\r\n <button\r\n type=\"button\"\r\n disabled={!writable || row.value === undefined}\r\n onClick={() => commit(row.index, undefined)}\r\n style={{ ...controlStyle, padding: '2px 8px' }}\r\n >\r\n {t('input.context.clear')}\r\n </button>\r\n {errors[key] !== undefined && (\r\n <span style={{ fontSize: '12px', color: 'var(--dsw-alias-danger, #e5484d)' }}>{errors[key]}</span>\r\n )}\r\n </div>\r\n )\r\n })}\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * The card body, wrapped in a disclosure shell like every peer settings card:\r\n * a header (name + description + chevron) that toggles the body, expanded by\r\n * default so the family section reads as an open page of drawers.\r\n * @param props - locale copy and the injected scopes.\r\n */\r\nexport function ThinkingLevelsCard({ t, scope, piAiScope, ocScope, deepseekScope }: ThinkingLevelsCardProps): JSX.Element {\r\n const [open, setOpen] = useState(true)\r\n // Stable subscription identities (see ModelCapabilities): the host controller\r\n // folds a fresh snapshot on every subscribe, so per-render inline lambdas\r\n // would resubscribe→fold→re-render forever.\r\n const subscribe = useCallback((listener: () => void) => scope.subscribe(listener), [scope])\r\n const getSnapshot = useCallback(() => scope.getSnapshot(), [scope])\r\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\r\n const unavailable = snapshot.status === 'unavailable'\r\n const readonly = unavailable || !snapshot.writable\r\n // configForms serves the STORED doc: volatile fields arrive as plain values\r\n // (simplify() unwraps the live refs before persistence), so the card sees a\r\n // plain config shape even though the host-side type carries Volatile unions.\r\n const value = (snapshot.value ?? {}) as unknown as Partial<{\r\n enabled: boolean\r\n level: EffortId\r\n allowDowngrade: boolean\r\n allowUpgrade: boolean\r\n takeover: boolean\r\n takeoverUi: boolean\r\n defaultPricing: PricingPolicy\r\n }>\r\n // Optimistic overlay for this card's own writes (plan §E): same contract as\r\n // the capability card's overlay — clear on resolve(true), roll back + banner\r\n // on resolve(false).\r\n const [pendingTl, setPendingTl] = useState<Partial<{ enabled: boolean; level: EffortId; allowDowngrade: boolean; allowUpgrade: boolean; takeover: boolean; takeoverUi: boolean; defaultPricing: PricingPolicy }>>({})\r\n const [writeErrorTl, setWriteErrorTl] = useState<string | null>(null)\r\n const viewValue = { ...value, ...pendingTl }\r\n const level = EFFORT_OPTIONS.includes(viewValue.level as EffortId) ? viewValue.level as EffortId : 'auto'\r\n const defaultPricing = PRICING_OPTIONS.includes(viewValue.defaultPricing as PricingPolicy) ? viewValue.defaultPricing as PricingPolicy : 'estimate'\r\n const writeTl = (field: 'enabled' | 'level' | 'allowDowngrade' | 'allowUpgrade' | 'takeover' | 'takeoverUi' | 'defaultPricing', v: unknown): void => {\r\n setPendingTl((cur) => ({ ...cur, [field]: v as never }))\r\n void setWithRetry(scope, field, v).then(({ ok }) => {\r\n setPendingTl((cur) => {\r\n const rest = { ...cur }\r\n delete rest[field]\r\n return rest\r\n })\r\n if (!ok) setWriteErrorTl(t('card.writeError'))\r\n })\r\n // The takeover master carries OC.enabled with it in-session (same value):\r\n // the host mirror reconciles at boot, but an in-session flip must take\r\n // effect immediately — writing the same value the mirror would write can\r\n // never fight it.\r\n if (field === 'takeover' && typeof v === 'boolean' && ocScope !== undefined) {\r\n void setWithRetry(ocScope, 'enabled', v).then(({ ok }) => {\r\n if (!ok) setWriteErrorTl(t('card.writeError'))\r\n })\r\n }\r\n }\r\n\r\n return (\r\n <div style={{\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\r\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\r\n borderRadius: '12px',\r\n transition: 'border-color 0.16s, background 0.16s',\r\n }}>\r\n <button\r\n type=\"button\"\r\n aria-expanded={open}\r\n style={{\r\n appearance: 'none',\r\n width: '100%',\r\n font: 'inherit',\r\n color: 'inherit',\r\n textAlign: 'left',\r\n cursor: 'pointer',\r\n background: 'none',\r\n border: 0,\r\n borderRadius: '12px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '12px',\r\n padding: '14px 16px',\r\n }}\r\n onClick={() => { setOpen(current => !current) }}\r\n >\r\n <span style={{ flex: '1 1 0%', minWidth: 0 }}>\r\n <div style={{ fontSize: '14px', fontWeight: 600, color: 'var(--dsw-alias-label-primary)' }}>{t('card.title')}</div>\r\n <div style={{ color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))', fontSize: '13px', lineHeight: 1.5 }}>{t('card.description')}</div>\r\n </span>\r\n <svg\r\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden\r\n style={{\r\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))',\r\n flex: '0 0 auto',\r\n transition: 'transform 0.16s',\r\n transform: open ? 'rotate(180deg)' : 'none',\r\n }}\r\n >\r\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\r\n </svg>\r\n </button>\r\n {open\r\n ? (\r\n <div style={{ padding: '12px 16px' }}>\r\n {unavailable\r\n ? (\r\n <div style={{ fontSize: '13px', color: 'var(--dsw-alias-label-tertiary)' }}>\r\n {t('card.unavailable')}\r\n </div>\r\n )\r\n : (\r\n <>\r\n <div style={rowStyle}>\r\n <label htmlFor=\"plugin-config-thinking-levels-level\" style={labelStyle}>{t('card.level')}</label>\r\n <select\r\n id=\"plugin-config-thinking-levels-level\"\r\n value={level}\r\n disabled={readonly}\r\n style={controlStyle}\r\n onChange={(event) => { writeTl('level', event.currentTarget.value as EffortId) }}\r\n >\r\n {EFFORT_OPTIONS.map((option) => (\r\n <option key={option} value={option}>{t(`card.level.${option}`)}</option>\r\n ))}\r\n </select>\r\n </div>\r\n <div style={rowStyle}>\r\n <label htmlFor=\"plugin-config-thinking-levels-enabled\" style={labelStyle}>{t('card.enabled')}</label>\r\n <input\r\n id=\"plugin-config-thinking-levels-enabled\"\r\n type=\"checkbox\"\r\n checked={viewValue.enabled ?? true}\r\n disabled={readonly}\r\n onChange={(event) => { writeTl('enabled', event.currentTarget.checked) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label\r\n htmlFor=\"plugin-config-thinking-levels-takeover\"\r\n style={labelStyle}\r\n title={t('card.masterTakeoverHint')}\r\n >{t('card.masterTakeover')}</label>\r\n <input\r\n id=\"plugin-config-thinking-levels-takeover\"\r\n type=\"checkbox\"\r\n checked={viewValue.takeover ?? false}\r\n disabled={readonly}\r\n title={t('card.masterTakeoverHint')}\r\n onChange={(event) => { writeTl('takeover', event.currentTarget.checked) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label\r\n htmlFor=\"plugin-config-thinking-levels-takeover-ui\"\r\n style={labelStyle}\r\n title={t('card.takeoverUiHint')}\r\n >{t('card.takeoverUi')}</label>\r\n <PillToggle\r\n id=\"plugin-config-thinking-levels-takeover-ui\"\r\n checked={viewValue.takeoverUi ?? false}\r\n disabled={readonly}\r\n title={t('card.takeoverUiHint')}\r\n onChange={(next) => { writeTl('takeoverUi', next) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label htmlFor=\"plugin-config-thinking-levels-downgrade\" style={labelStyle}>{t('card.allowDowngrade')}</label>\r\n <input\r\n id=\"plugin-config-thinking-levels-downgrade\"\r\n type=\"checkbox\"\r\n checked={viewValue.allowDowngrade ?? true}\r\n disabled={readonly || viewValue.level !== 'auto'}\r\n onChange={(event) => { writeTl('allowDowngrade', event.currentTarget.checked) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label htmlFor=\"plugin-config-thinking-levels-upgrade\" style={labelStyle}>{t('card.allowUpgrade')}</label>\r\n <input\r\n id=\"plugin-config-thinking-levels-upgrade\"\r\n type=\"checkbox\"\r\n checked={viewValue.allowUpgrade ?? false}\r\n disabled={readonly || viewValue.level !== 'auto'}\r\n onChange={(event) => { writeTl('allowUpgrade', event.currentTarget.checked) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label\r\n htmlFor=\"plugin-config-thinking-levels-default-pricing\"\r\n style={labelStyle}\r\n title={t('card.defaultPricingHint')}\r\n >{t('card.defaultPricing')}</label>\r\n <select\r\n id=\"plugin-config-thinking-levels-default-pricing\"\r\n value={defaultPricing}\r\n disabled={readonly}\r\n style={controlStyle}\r\n onChange={(event) => { writeTl('defaultPricing', event.currentTarget.value) }}\r\n >\r\n {PRICING_OPTIONS.map((option) => (\r\n <option key={option} value={option}>{t(`card.defaultPricing.${option}`)}</option>\r\n ))}\r\n </select>\r\n </div>\r\n {writeErrorTl !== null && (\r\n <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-danger, #e5484d)' }} role=\"status\">⚠ {writeErrorTl}</p>\r\n )}\r\n {!snapshot.writable\r\n && <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-label-tertiary)' }}>{t('card.readonly')}</p>}\r\n <ModelCapabilities scope={piAiScope} ocScope={ocScope} tlScope={scope} t={t} readonly={readonly} />\r\n <DeepSeekContextSection scope={deepseekScope} t={t} readonly={readonly} />\r\n </>\r\n )}\r\n </div>\r\n )\r\n : null}\r\n </div>\r\n )\r\n}\r\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, ru, zh } from './locales.ts'\r\nimport { ModelPanel, type ModelPanelInjected } from './model-panel.tsx'\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`\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 ]\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 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 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 }\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 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 // 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,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,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e;GACjB,CAAC;EACH"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["triggerStyle","popStyle","rowStyle","useSyncExternalStore","useState","useRef","labelStyle","useState","useRef","providerNameStyle","modelRowStyle","labelStyle","providersOf","useSyncExternalStore","useRef","useState","useCallback","useMemo","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/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). */\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.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.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 协议:思考兼容字段由宿主 pi-ai 原生处理,此处不可配置。',\r\n 'card.dsContextTitle': '官方 DeepSeek 模型上下文上限',\r\n 'input.effort.default': '提供方默认',\r\n 'input.effort.reset': '恢复提供方默认',\r\n 'card.capabilities.failed': '保存失败:配置被拒绝或冲突,请检查值。',\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.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.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: the thinking-compat fields are handled natively by pi-ai and are not configurable here.',\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}\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.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.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 以外のプロトコルを使用しています:思考互換フィールドは pi-ai がネイティブに処理するため、ここで設定できません。',\r\n 'card.dsContextTitle': '公式 DeepSeek モデルのコンテキスト上限',\r\n 'input.effort.default': 'プロバイダーの既定',\r\n 'input.effort.reset': 'プロバイダーの既定に戻す',\r\n 'card.capabilities.failed': '保存に失敗しました:値が拒否されたか競合しています。確認してください。',\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.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.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 이외 프로토콜을 사용합니다: 사고 호환 필드는 pi-ai가 네이티브로 처리하므로 여기서 설정할 수 없습니다.',\r\n 'card.dsContextTitle': '공식 DeepSeek 모델 컨텍스트 상한',\r\n 'input.effort.default': '공급자 기본값',\r\n 'input.effort.reset': '공급자 기본값으로 복원',\r\n 'card.capabilities.failed': '저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요.',\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.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.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 : les champs de compat de réflexion sont gérés nativement par pi-ai et ne sont pas configurables ici.\",\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}\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.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.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: die Thinking-Kompatibilitätsfelder werden von pi-ai nativ behandelt und sind hier nicht konfigurierbar.',\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}\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.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.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: i campi di compatibilità thinking sono gestiti nativamente da pi-ai e non sono configurabili qui.',\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}\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.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.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: поля совместимости thinking обрабатываются pi-ai нативно и здесь не настраиваются.',\r\n 'card.dsContextTitle': 'Лимиты контекста официальных моделей DeepSeek',\r\n 'input.effort.default': 'Значение провайдера по умолчанию',\r\n 'input.effort.reset': 'Вернуть значение провайдера по умолчанию',\r\n 'card.capabilities.failed': 'Ошибка сохранения: значение отклонено или конфликтует. Проверьте его.',\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.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.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: los campos de compatibilidad de thinking los gestiona pi-ai de forma nativa y no son configurables aquí.',\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}\r\n\r\n/** Combined dictionary map — all 9 languages, single-call registration. */\r\nexport const dictionaries: Record<string, Record<string, string>> = { zh, en, ja, ko, fr, de, it, ru, es }\r\n","/**\r\n * Context-capacity check ring for the composer tool row\r\n * (`conversation.input.right`, the seat just left of the send button —\r\n * the same seat the retired context-window pill used, and the same side of\r\n * the composer where the shipped ContextMeter lived).\r\n *\r\n * Why this exists: the model-seat panel replaced the shipped `ModelSelect`\r\n * trigger and popup, and with them went the shipped context meter — the\r\n * \"how full is this window\" read. The editor part moved into the model\r\n * panel's per-model lines; the CHECK part (used vs. window, pressure, a\r\n * breakdown, a warning before you run out) is what this ring restores.\r\n * Layout language follows better-er/dsh-cache-billing (rows with a color\r\n * swatch, token counts right-aligned, a muted footer note), which itself\r\n * pins into the shipped meter's popup.\r\n *\r\n * Data: the session projection seats. `useProjection('contextPressure')`\r\n * is the same feed the shipped meter consumes (`{ usedTokens, contextWindow,\r\n * percent }`), `useProjection('contextBreakdown')` the three-way split\r\n * (`{ systemTokens, toolsTokens, messageTokens }`). Both are optional on the\r\n * props and defensively read: a harness without the projection seat, or a\r\n * session before its first request, renders nothing here instead of a dead\r\n * control (the retired pill's discipline). Values refresh live while the\r\n * projection pushes — no polling.\r\n *\r\n * Zero host coupling beyond react + the injected seats: plain SVG + HTML\r\n * with token-based inline styling; copy is inline zh/en by document language\r\n * (the plugin's locale dictionaries stay untouched).\r\n */\r\nimport { useEffect, useRef, useState, useSyncExternalStore } from 'react'\r\nimport type { CSSProperties, JSX } from 'react'\r\n\r\n/** The pressure projection slice — the token-meter wire view's own fields. */\r\nexport interface ContextPressureLike {\r\n /** Post-usage pressure: the last usage sample's prompt-side token count. */\r\n pressureTokens?: number\r\n /** The request-projected estimate (pressure + uncommitted surface). */\r\n projectedTokens?: number\r\n contextWindow?: number\r\n}\r\n\r\n/** The breakdown projection slice (shipped meter's three-way split). */\r\nexport interface ContextBreakdownLike {\r\n systemTokens?: number\r\n toolsTokens?: number\r\n messageTokens?: number\r\n}\r\n\r\n/**\r\n * One session projection seat: a selector hook over the host's projection\r\n * store. Absent on harnesses without the projection module — the component\r\n * then renders nothing.\r\n */\r\nexport type ProjectionHook = <T>(key: string) => T | undefined\r\n\r\n/** The tlCacheBilling projection wire view (full field set). */\r\nexport interface CacheBillingLike {\r\n available?: boolean\r\n cost?: number\r\n missCost?: number\r\n outputCost?: number\r\n currency?: string\r\n cacheReadTokens?: number\r\n totalInputTokens?: number\r\n outputTokens?: number\r\n hitRate?: number | null\r\n model?: string | null\r\n provider?: string | null\r\n matchedModel?: string | null\r\n modelMatched?: boolean\r\n tier?: 'peak' | 'offPeak' | 'flat' | null\r\n unitPricePerM?: number | null\r\n /** 目录化新增字段(全部 optional:旧 view 落新客户端时保守回退)。 */\r\n priced?: boolean\r\n pricingSource?: 'estimate' | 'cn' | 'global' | 'custom' | 'off' | 'catalog-miss' | null\r\n /** 金额为兜底典型价估算(未校准,仅供参考)。 */\r\n estimated?: boolean\r\n catalogKey?: string | null\r\n catalogLabel?: string | null\r\n priceRow?: { inputMiss: number; inputCacheHit: number; output: number } | null\r\n sessionByCurrency?: Array<{ currency: string; hitCost: number; missCost: number; outputCost: number }>\r\n mixedCurrency?: boolean\r\n turn?: number | null\r\n step?: number | null\r\n turnCost?: number\r\n turnHitCost?: number\r\n turnMissCost?: number\r\n turnOutputCost?: number\r\n turnTokens?: number\r\n turnCacheReadTokens?: number\r\n turnInputTokens?: number\r\n turnOutputTokens?: number\r\n sessionCacheHitCost?: number\r\n sessionMissCost?: number\r\n sessionOutputCost?: number\r\n sessionInputTokens?: number\r\n sessionCacheReadTokens?: number\r\n sessionOutputTokens?: number\r\n sessionRounds?: number\r\n sessionMissSteps?: number\r\n sessionWriteTokens?: number\r\n sessionFullMissSteps?: number\r\n}\r\n\r\n/** Full props of the ring entry (all optional — data comes from the store). */\r\nexport interface ContextRingProps {\r\n /** The session id of the slot's owning conversation (standard seat). */\r\n sessionId?: string\r\n /**\r\n * Capacity fallback from the model catalog: when the contextPressure\r\n * projection carries no contextWindow (some sessions never see the\r\n * request/context event), the declared window of the ACTIVE model fills in.\r\n */\r\n contextWindowFallback?: number\r\n}\r\n\r\n/* ── inline copy: zh default, en elsewhere ──────────────────────────────── */\r\n\r\ninterface CopyShape {\r\n title: string\r\n used: string\r\n remaining: string\r\n window: string\r\n percent: string\r\n system: string\r\n tools: string\r\n messages: string\r\n warning: string\r\n aria: (percent: string) => string\r\n unset: string\r\n billing: string\r\n billStep: string\r\n billTurn: string\r\n billSession: string\r\n billCacheRead: string\r\n billCacheMiss: string\r\n billOutput: string\r\n billFullMiss: string\r\n billRoundsWord: string\r\n billPeak: string\r\n billOffPeak: string\r\n billFlat: string\r\n billUnpriced: string\r\n billCustom: string\r\n billPricedAs: (label: string) => string\r\n billPriced: string\r\n billEstimate: string\r\n /** 兜底典型价估算的诚实标注(未校准仅供参考)。 */\r\n billUncalibratedHint: string\r\n}\r\n\r\nconst COPY: Record<'zh' | 'en', CopyShape> = {\r\n zh: {\r\n title: '上下文检查',\r\n used: '已用',\r\n remaining: '剩余',\r\n window: '窗口容量',\r\n percent: '占用',\r\n system: '系统提示词',\r\n tools: '工具定义',\r\n messages: '对话消息',\r\n warning: '上下文即将用尽——建议压缩上下文或开启新会话。',\r\n aria: (percent: string) => `上下文已用 ${percent}`,\r\n unset: '本轮尚未产生用量',\r\n billing: '缓存账单',\r\n billStep: '当前步',\r\n billTurn: '当前轮',\r\n billSession: '会话累计',\r\n billCacheRead: '缓存命中',\r\n billCacheMiss: '缓存未命中',\r\n billOutput: '输出',\r\n billFullMiss: '完全失效',\r\n billRoundsWord: '步',\r\n billPeak: '峰价',\r\n billOffPeak: '谷价',\r\n billFlat: '平价',\r\n billUnpriced: '未计价',\r\n billCustom: '自填价计价',\r\n billPricedAs: (label: string) => `按 ${label} 计价`,\r\n billPriced: '按目录价计价',\r\n billEstimate: '目录外估算价',\r\n billUncalibratedHint: '未校准·仅供参考',\r\n },\r\n en: {\r\n title: 'Context check',\r\n used: 'Used',\r\n remaining: 'Remaining',\r\n window: 'Context window',\r\n percent: 'Pressure',\r\n system: 'System prompt',\r\n tools: 'Tool definitions',\r\n messages: 'Messages',\r\n warning: 'Context is nearly full — compact the context or start a new session.',\r\n aria: (percent: string) => `${percent} of context used`,\r\n unset: 'No usage yet in this turn',\r\n billing: 'Cache billing',\r\n billStep: 'This step',\r\n billTurn: 'This turn',\r\n billSession: 'Session total',\r\n billCacheRead: 'Cache read',\r\n billCacheMiss: 'Cache miss',\r\n billOutput: 'Output',\r\n billFullMiss: 'Full misses',\r\n billRoundsWord: 'steps',\r\n billPeak: 'Peak rates',\r\n billOffPeak: 'Off-peak rates',\r\n billFlat: 'Flat rate',\r\n billUnpriced: 'Not billed',\r\n billCustom: 'priced at custom rates',\r\n billPricedAs: (label: string) => `priced as ${label}`,\r\n billPriced: 'priced at catalog rates',\r\n billEstimate: 'estimated off-catalog',\r\n billUncalibratedHint: 'uncalibrated — reference only',\r\n },\r\n} as const\r\n\r\nconst copy = (): CopyShape =>\r\n typeof document !== 'undefined' && document.documentElement.lang?.toLowerCase().startsWith('zh')\r\n ? COPY.zh\r\n : COPY.en\r\n\r\n/* ── inline styling (no CSS modules in the client bundle) ──────────────── */\r\n\r\nconst RING_SIZE = 18\r\nconst RING_STROKE = 2.5\r\n\r\nconst triggerStyle: CSSProperties = {\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n gap: '5px',\r\n height: '24px',\r\n padding: '0 6px',\r\n background: 'transparent',\r\n border: 'none',\r\n borderRadius: '6px',\r\n cursor: 'pointer',\r\n color: 'var(--dsw-alias-label-secondary, inherit)',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n whiteSpace: 'nowrap',\r\n}\r\n\r\nconst popStyle: CSSProperties = {\r\n position: 'absolute',\r\n bottom: 'calc(100% + 8px)',\r\n right: 0,\r\n zIndex: 1200,\r\n minWidth: '264px',\r\n padding: '10px 12px',\r\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\r\n color: 'var(--dsw-alias-label-primary, inherit)',\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.25))',\r\n borderRadius: '10px',\r\n boxShadow: '0 8px 24px rgba(0,0,0,0.14)',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n}\r\n\r\nconst headStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'baseline',\r\n gap: '8px',\r\n fontWeight: 600,\r\n marginBottom: '4px',\r\n}\r\n\r\nconst figureStyle: CSSProperties = {\r\n fontVariantNumeric: 'tabular-nums',\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n}\r\n\r\nconst rowStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '12px',\r\n padding: '2px 0',\r\n}\r\n\r\nconst rowLabelStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n color: 'var(--dsw-alias-label-secondary, inherit)',\r\n}\r\n\r\nconst rowValueStyle: CSSProperties = {\r\n marginLeft: 'auto',\r\n fontVariantNumeric: 'tabular-nums',\r\n fontWeight: 500,\r\n textAlign: 'right' as const,\r\n}\r\n\r\nconst swatchStyle = (color: string): CSSProperties => ({\r\n display: 'inline-block',\r\n width: '8px',\r\n height: '8px',\r\n borderRadius: '2px',\r\n marginRight: '6px',\r\n flex: 'none',\r\n background: color,\r\n})\r\n\r\nconst warnStyle: CSSProperties = {\r\n marginTop: '6px',\r\n color: '#f43f5e',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n}\r\n\r\nconst footStyle: CSSProperties = {\r\n marginTop: '6px',\r\n color: 'var(--dsw-alias-label-caption, inherit)',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n}\r\n\r\nconst BREAKDOWN_COLORS = { system: '#8b5cf6', tools: '#0ea5e9', messages: '#10b981' } as const\r\n\r\n/** Pressure color: calm → amber → red (cache-billing's foot/warn palette). */\r\nexport function pressureColor(percent: number): string {\r\n if (percent >= 85) return '#f43f5e'\r\n if (percent >= 70) return '#f59e0b'\r\n return 'var(--dsw-alias-label-secondary, currentColor)'\r\n}\r\n\r\n/** Format a token count compactly (12.3k / 1.24M). */\r\nexport function formatTokens(n: number): string {\r\n if (n >= 1_000_000) return `${Math.round((n / 1_000_000) * 100) / 100}M`\r\n if (n >= 1000) return `${Math.round((n / 1000) * 10) / 10}k`\r\n return String(Math.round(n))\r\n}\r\n\r\nconst BILL_COLORS = { hit: '#10b981', miss: '#f59e0b', output: '#3b82f6' } as const\r\n\r\n/** One nested billing sub-row (cache-billing's indented swatch row). */\r\nfunction BillSubRow({ label, tokens, amount, color }: { label: string; tokens: number; amount: string; color: string }): JSX.Element {\r\n return (\r\n <div style={{ ...rowStyle, paddingLeft: '16px' }}>\r\n <dt style={rowLabelStyle}><span style={swatchStyle(color)} />{label}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>\r\n <span style={{ color: 'var(--dsw-alias-label-caption, inherit)', fontWeight: 400, marginRight: '6px' }}>{formatTokens(tokens)} tok</span>\r\n {amount}\r\n </dd>\r\n </div>\r\n )\r\n}\r\n\r\n/** 币种符号:目录原样不折算;未知币种回退 ISO 码。 */\r\nfunction currencySymbol(currency: string | undefined): string {\r\n if (currency === 'USD') return '$'\r\n if (currency !== undefined && currency !== 'CNY') return `${currency} `\r\n return '¥'\r\n}\r\n\r\n/** Format an amount: four decimals for a step, fewer for the totals. */\r\nfunction formatMoney(amount: number, digits: number, currency?: string): string {\r\n return `${currencySymbol(currency)}${amount.toFixed(digits)}`\r\n}\r\n\r\n/**\r\n * The module-level projection store. The ring renders inside the model seat,\r\n * whose entry props do NOT carry the projection hook — the hook lives on a\r\n * zero-size data hook mounted at `conversation.input.right` (the seat where\r\n * better-er/dsh-cache-billing proved the hook injection), which mirrors every\r\n * push into this store. The ring subscribes like any external store.\r\n */\r\ninterface ProjectionSnapshot {\r\n /** Set once the data hook mounts anywhere — the 0.2.0+ seat marker. */\r\n seatMounted?: boolean\r\n pressure?: ContextPressureLike\r\n breakdown?: ContextBreakdownLike\r\n billing?: CacheBillingLike\r\n}\r\n\r\nlet store: ProjectionSnapshot = {}\r\nconst listeners = new Set<() => void>()\r\n\r\n/** Immutable replacement — useSyncExternalStore compares snapshots by\r\n * reference, so in-place mutation would never re-render subscribers. */\r\nfunction publish(patch: Partial<ProjectionSnapshot>): void {\r\n store = { ...store, ...patch }\r\n for (const listener of listeners) listener()\r\n}\r\n\r\nfunction subscribeStore(listener: () => void): () => void {\r\n listeners.add(listener)\r\n return () => { listeners.delete(listener) }\r\n}\r\n\r\nfunction getStore(): ProjectionSnapshot {\r\n return store\r\n}\r\n\r\n/**\r\n * The zero-size data hook: props delivered by the slot renderer carry the\r\n * session projection hook; every push lands in the module store.\r\n */\r\nexport function ProjectionDataHook(props: { useProjection?: ProjectionHook }): JSX.Element {\r\n const pressure = props.useProjection?.('contextPressure') as ContextPressureLike | undefined\r\n const breakdown = props.useProjection?.('contextBreakdown') as ContextBreakdownLike | undefined\r\n const billing = props.useProjection?.('tlCacheBilling') as CacheBillingLike | undefined\r\n useEffect(() => {\r\n // The seat marker rides the first publish: the ring re-renders on every\r\n // publish, so a marker arriving after the ring's first render still\r\n // flips it from hidden to visible.\r\n publish({ seatMounted: true, pressure, breakdown, billing })\r\n })\r\n return <span data-dsh-thinking-levels=\"projection-hook\" style={{ display: 'none' }} />\r\n}\r\n\r\n/** The SVG ring: one background track + one pressure arc. */\r\nfunction Ring({ percent, color }: { percent: number; color: string }): JSX.Element {\r\n const r = (RING_SIZE - RING_STROKE) / 2\r\n const c = 2 * Math.PI * r\r\n const clamped = Math.max(0, Math.min(100, percent))\r\n return (\r\n <svg width={RING_SIZE} height={RING_SIZE} viewBox={`0 0 ${RING_SIZE} ${RING_SIZE}`} aria-hidden=\"true\">\r\n <circle cx={RING_SIZE / 2} cy={RING_SIZE / 2} r={r} fill=\"none\"\r\n stroke=\"var(--dsw-alias-border-l2, rgba(127,127,127,0.3))\" strokeWidth={RING_STROKE} />\r\n <circle cx={RING_SIZE / 2} cy={RING_SIZE / 2} r={r} fill=\"none\"\r\n stroke={color} strokeWidth={RING_STROKE} strokeLinecap=\"round\"\r\n strokeDasharray={`${(c * clamped) / 100} ${c}`}\r\n transform={`rotate(-90 ${RING_SIZE / 2} ${RING_SIZE / 2})`} />\r\n </svg>\r\n )\r\n}\r\n\r\n/** One breakdown row (cache-billing's swatch-row layout). */\r\nfunction BreakdownRow({ label, value, color }: { label: string; value: number; color: string }): JSX.Element {\r\n return (\r\n <div style={rowStyle}>\r\n <dt style={rowLabelStyle}><span style={swatchStyle(color)} />{label}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>{formatTokens(value)}</dd>\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * The cache-billing block (catalog era). 未计价(priced===false)时保留 token\r\n * 读数、金额位换「未计价」文案;旧 view 缺 priced 字段 → 按历史行为计价。\r\n * 混币种会话不给跨币种合计,改按币种分行。\r\n */\r\nfunction BillingBlock({ billing }: { billing: CacheBillingLike }): JSX.Element {\r\n const c = copy()\r\n const cur = billing.currency\r\n const priced = billing.priced !== false\r\n const money = (amount: number | undefined, digits: number): JSX.Element | string =>\r\n priced\r\n ? formatMoney(amount ?? 0, digits, cur)\r\n : <span style={{ color: 'var(--dsw-alias-label-caption, inherit)' }}>{c.billUnpriced}</span>\r\n const dash = priced ? undefined : '—'\r\n const buckets = Array.isArray(billing.sessionByCurrency) ? billing.sessionByCurrency : []\r\n const sessionTotal: JSX.Element | string = !priced\r\n ? <span style={{ color: 'var(--dsw-alias-label-caption, inherit)' }}>{c.billUnpriced}</span>\r\n : billing.mixedCurrency === true && buckets.length > 1\r\n // 跨币种不相加:逐桶展示(主币种取 session* 字段,其余补列)\r\n ? buckets.map((b) => `${currencySymbol(b.currency)}${(b.hitCost + b.missCost + b.outputCost).toFixed(2)}`).join(' + ')\r\n : formatMoney((billing.sessionCacheHitCost ?? 0) + (billing.sessionMissCost ?? 0) + (billing.sessionOutputCost ?? 0), 2, cur)\r\n return (\r\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))' }}>\r\n <div style={rowStyle}>\r\n <dt style={{ ...rowLabelStyle, color: '#a78bfa' }}>{c.billStep}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>\r\n {formatTokens((billing.totalInputTokens ?? 0) + (billing.outputTokens ?? 0))} tok {money(billing.cost, 4)}\r\n </dd>\r\n </div>\r\n <BillSubRow label={c.billCacheRead} tokens={billing.cacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.cost ?? 0, 4, cur)} color={BILL_COLORS.hit} />\r\n <BillSubRow label={c.billCacheMiss} tokens={(billing.totalInputTokens ?? 0) - (billing.cacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.missCost ?? 0, 4, cur)} color={BILL_COLORS.miss} />\r\n <BillSubRow label={c.billOutput} tokens={billing.outputTokens ?? 0} amount={dash ?? formatMoney(billing.outputCost ?? 0, 4, cur)} color={BILL_COLORS.output} />\r\n <div style={rowStyle}>\r\n <dt style={{ ...rowLabelStyle, color: '#22d3ee' }}>{c.billTurn}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>\r\n {formatTokens(billing.turnTokens ?? 0)} tok {money(billing.turnCost, 3)}\r\n </dd>\r\n </div>\r\n <BillSubRow label={c.billCacheRead} tokens={billing.turnCacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.turnHitCost ?? 0, 3, cur)} color={BILL_COLORS.hit} />\r\n <BillSubRow label={c.billCacheMiss} tokens={(billing.turnInputTokens ?? 0) - (billing.turnCacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.turnMissCost ?? 0, 3, cur)} color={BILL_COLORS.miss} />\r\n <BillSubRow label={c.billOutput} tokens={billing.turnOutputTokens ?? 0} amount={dash ?? formatMoney(billing.turnOutputCost ?? 0, 3, cur)} color={BILL_COLORS.output} />\r\n <div style={rowStyle}>\r\n <dt style={{ ...rowLabelStyle, color: '#f472b6' }}>\r\n {c.billSession}{billing.sessionRounds ? ` · ${billing.sessionRounds} ${c.billRoundsWord}` : ''}\r\n </dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>\r\n {formatTokens((billing.sessionInputTokens ?? 0) + (billing.sessionOutputTokens ?? 0))} tok {sessionTotal}\r\n </dd>\r\n </div>\r\n <BillSubRow label={c.billCacheRead} tokens={billing.sessionCacheReadTokens ?? 0} amount={dash ?? formatMoney(billing.sessionCacheHitCost ?? 0, 2, cur)} color={BILL_COLORS.hit} />\r\n <BillSubRow label={c.billCacheMiss} tokens={(billing.sessionInputTokens ?? 0) - (billing.sessionCacheReadTokens ?? 0)} amount={dash ?? formatMoney(billing.sessionMissCost ?? 0, 2, cur)} color={BILL_COLORS.miss} />\r\n <BillSubRow label={c.billOutput} tokens={billing.sessionOutputTokens ?? 0} amount={dash ?? formatMoney(billing.sessionOutputCost ?? 0, 2, cur)} color={BILL_COLORS.output} />\r\n {(billing.sessionFullMissSteps ?? 0) > 0 && (\r\n <div style={rowStyle}>\r\n <dt style={{ ...rowLabelStyle, color: '#f43f5e' }}>{c.billFullMiss}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>{billing.sessionFullMissSteps}</dd>\r\n </div>\r\n )}\r\n </dl>\r\n )\r\n}\r\n\r\n/**\r\n * The ring entry: pressure arc trigger + the check popover. Renders nothing\r\n * without a projection seat or before the session has any reading.\r\n */\r\nexport function ContextRing(props: ContextRingProps): JSX.Element | null {\r\n // Two distinct invisible cases, handled differently: a host WITHOUT the\r\n // projection hook seat (≤0.1.6 lines — the data hook never mounts) hides the\r\n // ring, the retired pill's discipline — a permanently dead control helps\r\n // nobody there. A host WITH the hook but no reading yet (fresh session)\r\n // renders the dimmed unset state — fail-visible, because a hidden control is\r\n // indistinguishable from a dead registration, which cost a debug round-trip\r\n // once already.\r\n const live = useSyncExternalStore(subscribeStore, getStore)\r\n const hasSeat = live.seatMounted === true\r\n const [open, setOpen] = useState(false)\r\n const rootRef = useRef<HTMLDivElement | null>(null)\r\n const pressure = live.pressure\r\n const breakdown = live.breakdown\r\n const billing = live.billing\r\n // The official meter's own occupancy mapping (contextOccupancy): the\r\n // projected estimate wins, the raw pressure sample is the floor.\r\n const used = typeof pressure?.projectedTokens === 'number'\r\n ? pressure.projectedTokens\r\n : typeof pressure?.pressureTokens === 'number' ? pressure.pressureTokens : undefined\r\n const window_ = typeof pressure?.contextWindow === 'number' && pressure.contextWindow > 0\r\n ? pressure.contextWindow\r\n : typeof props.contextWindowFallback === 'number' && props.contextWindowFallback > 0\r\n ? props.contextWindowFallback\r\n : undefined\r\n const hasReading = used !== undefined && window_ !== undefined && window_ > 0\r\n\r\n const c = copy()\r\n const percent = hasReading\r\n ? Math.min(100, Math.round(((used as number) / (window_ as number)) * 100))\r\n : 0\r\n const color = pressureColor(percent)\r\n const remaining = hasReading ? Math.max(0, (window_ as number) - (used as number)) : 0\r\n const rows: Array<{ label: string; value: number | undefined; color: string }> = !hasReading || breakdown === undefined\r\n ? []\r\n : [\r\n { label: c.system, value: breakdown.systemTokens, color: BREAKDOWN_COLORS.system },\r\n { label: c.tools, value: breakdown.toolsTokens, color: BREAKDOWN_COLORS.tools },\r\n { label: c.messages, value: breakdown.messageTokens, color: BREAKDOWN_COLORS.messages },\r\n ]\r\n\r\n // Hosts without the projection hook seat (≤0.1.6) can never produce a\r\n // reading — hide the control entirely rather than show a permanently dead\r\n // dial (the discipline in the comment at hasSeat). A host with the seat\r\n // flips `seatMounted` during the hook's own mount, so the gap is one store\r\n // tick before the first real re-render.\r\n if (!hasSeat) return null\r\n\r\n return (\r\n <div ref={rootRef} style={{ position: 'relative', display: 'inline-flex' }}>\r\n <button\r\n type=\"button\"\r\n style={hasReading ? triggerStyle : { ...triggerStyle, opacity: 0.55 }}\r\n aria-label={hasReading ? c.aria(`${percent}%`) : c.unset}\r\n aria-haspopup={hasReading ? 'dialog' : undefined}\r\n aria-expanded={open}\r\n onClick={() => { if (hasReading) setOpen(state => !state) }}\r\n >\r\n <Ring percent={percent} color={color} />\r\n <span style={{ ...figureStyle, color: hasReading ? color : 'var(--dsw-alias-label-caption, inherit)' }}>\r\n {hasReading ? `${percent}%` : '–'}\r\n </span>\r\n </button>\r\n {open && hasReading && (\r\n <div style={popStyle} role=\"dialog\" aria-label={c.title}>\r\n <div style={headStyle}>\r\n {c.title}\r\n <span style={{ ...rowValueStyle, ...figureStyle }}>~{formatTokens(used)} / {formatTokens(window_)}</span>\r\n </div>\r\n <div style={rowStyle}>\r\n <dt style={rowLabelStyle}>{c.percent}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0, color }}>{percent}%</dd>\r\n </div>\r\n <div style={rowStyle}>\r\n <dt style={rowLabelStyle}>{c.remaining}</dt>\r\n <dd style={{ ...rowValueStyle, margin: 0 }}>{formatTokens(remaining)}</dd>\r\n </div>\r\n {rows.every(row => typeof row.value === 'number') && rows.length > 0 && (\r\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))' }}>\r\n {rows.map(row => <BreakdownRow key={row.label} label={row.label} value={row.value as number} color={row.color} />)}\r\n </dl>\r\n )}\r\n {billing?.available === true && <BillingBlock billing={billing} />}\r\n {percent >= 85 && <div style={warnStyle}>{c.warning}</div>}\r\n <div style={footStyle}>\r\n {c.window}: {hasReading ? (window_ as number).toLocaleString() : c.unset}\r\n {billing?.available === true\r\n ? ` · ${billing.tier === 'peak' ? c.billPeak : billing.tier === 'offPeak' ? c.billOffPeak : billing.tier === 'flat' ? c.billFlat : c.billUnpriced} · ${\r\n billing.priced === false\r\n ? c.billUnpriced\r\n : billing.estimated === true\r\n ? c.billUncalibratedHint\r\n : typeof billing.catalogLabel === 'string'\r\n ? c.billPricedAs(billing.catalogLabel)\r\n : billing.pricingSource === 'custom'\r\n ? c.billCustom\r\n : billing.modelMatched === false\r\n ? c.billEstimate\r\n : c.billPriced\r\n }`\r\n : ''}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\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\r\n/** Deterministic tool names that are cheap to reason about (word-boundary anchored). */\r\nconst SIMPLE_TOOL_RE = /^(?:fs|bash|terminal|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/** Hefty payloads signal non-trivial work no matter the tool name. */\r\nconst HEAVY_ARGS = 800\r\n\r\n/** Count how many of the recent calls look cheap-and-deterministic. */\r\nfunction simpleRatio(calls: readonly ToolCallSample[]): number {\r\n if (calls.length === 0) return 1\r\n const simple = calls.filter(call =>\r\n SIMPLE_TOOL_RE.test(call.name) && 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 (fresh prompt, pure chat) -> `low` (simple chat tasks).\r\n * - All/mostly simple tools -> `low` (when downgrades are allowed).\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 * 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`.\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): AutoEffort {\r\n if (calls.length === 0) return allowDowngrade ? 'low' : 'high'\r\n\r\n const ratio = simpleRatio(calls)\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 } = input\r\n if (selected !== 'auto') return selected\r\n return scheduleEffort(recentCalls, allowDowngrade, allowUpgrade)\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 /** The `reasoningEffort` already present on the request seed, if any. */\r\n seedEffort: unknown\r\n /** Plugin-configured default level when the seed carries none. */\r\n selected: EffortId\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 /** 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 passes through unchanged when the model advertises\r\n * it; an unsupported manual pick is stripped rather than clamped (the user\r\n * 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` (or no selection) resolves through the scheduler; the result is\r\n * clamped to the model's advertised levels, so a scheduled `low` on a model\r\n * that only takes off/high (Qwen3.6) becomes `high` instead of an error.\r\n *\r\n * @param input - model capability plus the seed's current 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, seedEffort, selected, 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 seed → inject `high` (the advertised toggle level): the\r\n // short-circuit adapter serializes a non-off effort as enable_thinking\r\n // true — an explicit \"thinking on\" signal the wire needs. (A request\r\n // with NO effort at all is the ambiguous case: leaving it absent relies\r\n // on the provider default, which some gateways treat as off.)\r\n return { inject: true, level: seedEffort === 'off' ? 'off' : 'high' }\r\n }\r\n if (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 (isEffortId(seedEffort) && seedEffort !== '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(seedEffort)\r\n ? { inject: true, level: seedEffort }\r\n : { inject: false }\r\n }\r\n const level = decideEffort({\r\n recentCalls: input.recentCalls,\r\n selected: seedEffort === 'auto' ? 'auto' : selected,\r\n allowDowngrade: input.allowDowngrade,\r\n allowUpgrade: input.allowUpgrade,\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+EltJRWHBFSmZVWGhTV2hlZWsxO4VtZ1Pa5fM7WaQbJmVDPFFUVFphbqwVFzg4O041OE4AAP9pZmzNwrwFAgVoV1ZERld4dW1mZmo5Z6paW2ZYU1ppaGpmZ28rJzc4Okn9/a8AADlVltKNi6ZmZ2moiYs5Y5RXWWWEpOVWVVN0meKqqat1dHjxysRVVFqBjcxaYXxmW0n//wBGSmVKSVB9gpWQiHNup+STptQAVVXsubRoZFlWdJhts+p3dXHNqaeEa3EGCTC4wtY8QVpQhrUoJy87dLI8QVdJTWX8/s95c1hzdHdWU1liXFWHe2Y2ODs2NTY3OkYpKVNVVapaWWyolm6JiYs4OUTvwrwzMzQ5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ecSYqsQiUeyRpXxLwtgO32fz8sUwBpGKPZXfO53XPgPtEG6yTlgOan6ITNP4bbJXF+QTMODgzvXD4/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\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, 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 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 && resolvedEffort !== undefined\r\n && resolvedEffort !== 'auto'\r\n ? `→ ${effortName(resolvedEffort)}`\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} />\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","/**\r\n * Thinking-levels settings card — the family settings tab face of the\r\n * dsh-thinking-levels plugin.\r\n *\r\n * The card binds this plugin's entry config through the `configForms` cordis\r\n * service and renders its fields: the level picker\r\n * (off / on / minimal / low / medium / high / xhigh / max / auto) plus the\r\n * scheduler toggles. Every change commits immediately through the scope (no\r\n * staged form): the decision is read per model request, so a committed change\r\n * applies to the next request without a restart.\r\n *\r\n * Below the scheduler rows, a \"model capabilities\" block edits the\r\n * `llm-pi-ai` namespace directly (read + write through the same settings\r\n * transport), borrowing dsh-thinking-effort's presentation: providers group\r\n * their models, each model row shows capability badges and expands into a\r\n * per-level editor where a level is ticked and its gateway wire value entered\r\n * (e.g. `high` → `ultra`); `off` left empty means \"do not send\". A search box\r\n * filters models and one-click presets apply official/generic level sets to\r\n * every thinking model.\r\n *\r\n * Kept dependency-free beyond react: the scopes are subscribed with\r\n * `useSyncExternalStore`, and the controls are plain HTML so the client bundle\r\n * needs no CSS modules and no primitives value import.\r\n */\r\nimport { useCallback, useState, useSyncExternalStore } from 'react'\r\nimport type { CSSProperties, JSX } from 'react'\r\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\r\nimport type { SettingsScope } from './scope-face.ts'\r\nimport type { EffortId } from '../thinking-level.ts'\r\nimport type { PricingPolicy } from '../price-catalog.ts'\r\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\r\nimport { contextWindowOf, deepseekSectionOf, DEEPSEEK_DEFAULT_WINDOW } from './model-panel.tsx'\r\nimport type { ThinkingLevelsConfig } from '../index.ts'\r\n\r\n/** One injected face: the plugin's own scope plus the llm-pi-ai namespace scope. */\r\nexport interface ThinkingLevelsCardInjected {\r\n scope: SettingsScope<ThinkingLevelsConfig>\r\n /** The `llm-pi-ai` settings namespace, read and written for model capabilities. */\r\n piAiScope: SettingsScope<unknown>\r\n /**\r\n * The openai-completions transport's section (`llm-openai-completions`):\r\n * read for the per-route takeover state, written by the route-head takeover\r\n * checkbox (`enabled` + the manual `providers` list). Absent face = the\r\n * transport is not composed; the checkbox then renders disabled.\r\n */\r\n ocScope?: SettingsScope<unknown>\r\n /**\r\n * The `llm-deepseek` section: with the seat takeover off (4.4.0 default)\r\n * the official-model context editor lives on this card instead of the\r\n * ModelPanel lines. Absent on hosts without the namespace.\r\n */\r\n deepseekScope?: SettingsScope<unknown>\r\n}\r\n\r\n/** Full props: locale seat + the injected scopes. */\r\nexport type ThinkingLevelsCardProps = PropsLocale<'thinking-levels'> & ThinkingLevelsCardInjected\r\n\r\n/** The user-facing levels, in picker order: eight standard levels plus the auto scheduler sentinel. */\r\nconst EFFORT_OPTIONS: readonly EffortId[] = [\r\n 'off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'auto',\r\n]\r\n\r\n/** 计价兜底档,in picker order:缺省 estimate(典型价估算,未校准仅供参考)。 */\r\nconst PRICING_OPTIONS: readonly PricingPolicy[] = [\r\n 'estimate', 'cn', 'global', 'custom', 'off',\r\n]\r\n\r\n/**\r\n * The levels the capability editor offers. This is the llm-pi-ai\r\n * `reasoningEfforts` table-key space — pi-ai's fixed seven levels (schema\r\n * rejects any other key). `on` (the enable-thinking toggle) is a selector /\r\n * injection-level concept, expressed here by the `off` + `high` pair\r\n * (enable_thinking false/true), so it has no table key of its own.\r\n */\r\nconst CAPABILITY_LEVELS: readonly EffortId[] = [\r\n 'off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',\r\n] as const\r\n\r\n/** One-click presets, mirroring dsh-thinking-effort: official DeepSeek style and a generic set. */\r\nconst PRESETS: readonly { key: 'official' | 'generic'; levels: Record<string, unknown> }[] = [\r\n { key: 'official', levels: { off: null, high: 'high', max: 'max' } },\r\n { key: 'generic', levels: { off: null, low: 'low', medium: 'medium', high: 'high' } },\r\n]\r\n\r\n/** The wire thinking formats offered (llm-pi-ai's nameable set, incl. qwen-chat-template). */\r\nconst THINKING_FORMATS = [\r\n 'openai', 'deepseek', 'openrouter', 'together', 'zai', 'qwen',\r\n 'qwen-chat-template', 'string-thinking', 'ant-ling',\r\n] as const\r\n\r\n/* ── shared row styling (inline; keeps the client bundle CSS-free) ──────── */\r\n\r\nconst rowStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n gap: '12px',\r\n padding: '6px 0',\r\n fontSize: '13px',\r\n lineHeight: '20px',\r\n}\r\n\r\nconst labelStyle: CSSProperties = { margin: 0, color: 'var(--dsw-alias-label-primary)' }\r\n\r\n/** Native form controls (the select's dropdown popup) follow `color-scheme`,\r\n * which the ≤0.1.6 shells never set — derive it from the body luminance once\r\n * at bundle eval so dark-theme hosts get dark popups without a media query\r\n * (the app theme isn't the OS theme, so prefers-color-scheme would lie). */\r\nconst controlColorScheme: 'dark' | 'light' = (() => {\r\n try {\r\n const rgb = getComputedStyle(document.body).backgroundColor.match(/\\d+/g) ?? ['255', '255', '255']\r\n const [r, g, b] = rgb.map(Number)\r\n return (r * 299 + g * 587 + b * 114) / 1000 < 128 ? 'dark' : 'light'\r\n } catch { return 'light' }\r\n})()\r\n\r\nconst controlStyle: CSSProperties = {\r\n // Translucent fallback: the alias tokens don't exist on the ≤0.1.6 shells,\r\n // and the old `#fff` fallback painted white controls onto dark dialogs.\r\n background: 'var(--dsw-alias-bg-surface, rgba(127,127,127,0.12))',\r\n color: 'var(--dsw-alias-label-primary, inherit)',\r\n colorScheme: controlColorScheme,\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '4px',\r\n padding: '3px 8px',\r\n fontSize: '13px',\r\n}\r\n\r\nconst sectionStyle: CSSProperties = {\r\n marginTop: '14px',\r\n paddingTop: '12px',\r\n borderTop: '1px solid var(--dsw-alias-border-l2)',\r\n}\r\n\r\nconst fieldStyle: CSSProperties = { display: 'flex', flexDirection: 'column', gap: '4px' }\r\n\r\nconst fieldLabelStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\r\n\r\nconst hintStyle: CSSProperties = { margin: '6px 0 0', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\r\n\r\n/** Provider group shell: an outlined row grouping its models. */\r\nconst providerStyle: CSSProperties = {\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '8px',\r\n margin: '8px 0 0',\r\n overflow: 'hidden',\r\n}\r\n\r\nconst providerHeadStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '8px',\r\n padding: '7px 10px',\r\n background: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\r\n}\r\n\r\nconst providerNameStyle: CSSProperties = {\r\n margin: 0,\r\n flex: '1 1 auto',\r\n minWidth: 0,\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n fontWeight: 600,\r\n color: 'var(--dsw-alias-label-primary)',\r\n overflowWrap: 'anywhere',\r\n}\r\n\r\nconst providerBadgeStyle: CSSProperties = {\r\n margin: 0,\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '4px',\r\n padding: '0 5px',\r\n whiteSpace: 'nowrap',\r\n}\r\n\r\nconst iconButtonStyle: CSSProperties = {\r\n background: 'none',\r\n border: 'none',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n cursor: 'pointer',\r\n padding: '2px 4px',\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n}\r\n\r\n/** One model row inside a provider group. */\r\nconst modelRowStyle: CSSProperties = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '8px',\r\n padding: '7px 10px',\r\n borderTop: '1px solid var(--dsw-alias-border-l2)',\r\n}\r\n\r\nconst modelIdStyle: CSSProperties = {\r\n margin: 0,\r\n flex: '1 1 auto',\r\n minWidth: 0,\r\n fontFamily: 'var(--ds-font-family-code, monospace)',\r\n fontSize: '12px',\r\n lineHeight: '18px',\r\n color: 'var(--dsw-alias-label-secondary)',\r\n overflowWrap: 'anywhere',\r\n}\r\n\r\n/** Capability badge chips (text / image / context). */\r\nconst badgeStyle: CSSProperties = {\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n color: 'var(--dsw-alias-label-tertiary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '4px',\r\n padding: '0 5px',\r\n whiteSpace: 'nowrap',\r\n}\r\n\r\n/** The per-level editor grid: one row per level with a toggle, a label and a wire input. */\r\nconst levelRowStyle: CSSProperties = {\r\n display: 'grid',\r\n gridTemplateColumns: 'auto 92px minmax(0, 1fr)',\r\n alignItems: 'center',\r\n gap: '8px',\r\n padding: '4px 0',\r\n fontSize: '13px',\r\n}\r\n\r\nconst levelNameStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-secondary)' }\r\n\r\nconst wireInputStyle: CSSProperties = {\r\n background: 'var(--dsw-alias-bg-surface, #fff)',\r\n color: 'var(--dsw-alias-label-primary)',\r\n border: '1px solid var(--dsw-alias-border-l2)',\r\n borderRadius: '4px',\r\n padding: '3px 8px',\r\n fontSize: '12px',\r\n width: '100%',\r\n boxSizing: 'border-box',\r\n}\r\n\r\n/* ── helpers over the llm-pi-ai user layer ─────────────────────────────── */\r\n\r\n/** A row's `reasoningEfforts` as stored in the user layer. */\r\nfunction effortsOf(model: Record<string, unknown>): false | Record<string, unknown> | undefined {\r\n const value = model['reasoningEfforts']\r\n if (value === false) return false\r\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\r\n return value as Record<string, unknown>\r\n }\r\n return undefined\r\n}\r\n\r\n/**\r\n * Build a `reasoningEfforts` table from a level→wire draft. `off` maps to\r\n * `null` (omit the reasoning option → enable_thinking false) unless the user\r\n * typed a wire value; every other ticked level keeps its typed wire value.\r\n * pi-ai rejects a table offering nothing beyond `off`, so a selection of only\r\n * `off` falls back to the default `high` level.\r\n */\r\nfunction effortTableOf(draft: Record<string, string | null>): Record<string, unknown> {\r\n const table: Record<string, unknown> = {}\r\n for (const level of CAPABILITY_LEVELS) {\r\n const wire = draft[level]\r\n if (wire === undefined || wire === null) continue\r\n const trimmed = typeof wire === 'string' ? wire.trim() : ''\r\n if (level === 'off') table[level] = trimmed === '' ? null : trimmed\r\n else if (trimmed !== '') table[level] = trimmed\r\n }\r\n if (Object.keys(table).length === 0 || Object.keys(table).every(level => table[level] === null)) {\r\n return { ...table, high: 'high' }\r\n }\r\n return table\r\n}\r\n\r\n/** Whether a row declares `compat.supportsReasoningEffort` (the wire sends reasoning_effort). */\r\nfunction supportsEffortOf(model: Record<string, unknown>): boolean {\r\n const compat = model['compat']\r\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\r\n return (compat as Record<string, unknown>)['supportsReasoningEffort'] === true\r\n}\r\n\r\n/** Patch one row's `compat` object, merging rather than replacing sibling fields. */\r\nfunction patchCompat(\r\n row: Record<string, unknown>,\r\n patch: (compat: Record<string, unknown>) => void,\r\n): void {\r\n const compat = typeof row['compat'] === 'object' && row['compat'] !== null && !Array.isArray(row['compat'])\r\n ? { ...(row['compat'] as Record<string, unknown>) }\r\n : {}\r\n patch(compat)\r\n if (Object.keys(compat).length === 0) delete row['compat']\r\n else row['compat'] = compat\r\n}\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/** Whether a route-level profile declares `compat.supportsDeveloperRole: false`. */\r\nfunction developerRoleDisabledOf(profile: unknown): boolean {\r\n if (typeof profile !== 'object' || profile === null) return false\r\n const compat = (profile as Record<string, unknown>)['compat']\r\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\r\n return (compat as Record<string, unknown>)['supportsDeveloperRole'] === false\r\n}\r\n\r\n/**\r\n * Whether the transport currently takes this route over: its master switch on\r\n * AND the route in its manual providers list. Pure membership — the checkbox\r\n * is the single per-route truth, so dispatch uses the same set.\r\n */\r\nfunction takeoverActiveOf(section: { enabled?: unknown; providers?: unknown }, providerId: string): boolean {\r\n if (section.enabled !== true) return false\r\n return Array.isArray(section.providers) && (section.providers as unknown[]).includes(providerId)\r\n}\r\n\r\n/**\r\n * The transport's `extraInputs` dict ('provider/model' → modality list), from\r\n * its own section. The host llm-pi-ai schema caps a model row's `input` enum\r\n * at text|image, so video/audio declarations for omni models live here —\r\n * the taken-over transport unions them into the model's effective input.\r\n */\r\nfunction extraInputsOf(section: { extraInputs?: unknown }): Record<string, string[]> {\r\n if (typeof section.extraInputs !== 'object' || section.extraInputs === null || Array.isArray(section.extraInputs)) return {}\r\n const out: Record<string, string[]> = {}\r\n for (const [key, value] of Object.entries(section.extraInputs as Record<string, unknown>)) {\r\n if (Array.isArray(value)) out[key] = value.filter((m): m is string => typeof m === 'string')\r\n }\r\n return out\r\n}\r\n\r\n/**\r\n * One settings write with a single self-heal retry. A false return means the\r\n * host refused the optimistic lock — and the client has ALREADY completed its\r\n * recover() (a fresh describe folded into the mirror) by the time resolve\r\n * lands, so an immediate second attempt carries a fresh revision: the machine\r\n * equivalent of the user's proven \"click it twice\" workaround.\r\n */\r\nasync function setWithRetry(scope: SettingsScope<unknown>, field: string, value: unknown): Promise<{ ok: boolean; retried: boolean }> {\r\n const ok1 = await scope.set(field, value).catch(() => false)\r\n if (ok1) return { ok: true, retried: false }\r\n await new Promise((resolve) => setTimeout(resolve, 350))\r\n const ok2 = await scope.set(field, value).catch(() => false)\r\n return { ok: ok2, retried: true }\r\n}\r\n\r\n/** One flattened capability entry: a provider's model at an array index. */\r\ninterface CapabilityEntry {\r\n providerId: string\r\n index: number\r\n model: Record<string, unknown>\r\n modelId: string\r\n /** The provider-level `compat`, applied to models that declare none (display parity). */\r\n providerCompat?: unknown\r\n /** The provider-level `defaultInput`, applied to models that declare none (display parity). */\r\n providerInput?: unknown[]\r\n /** The provider-level `api` (wire protocol): the host's compat gates differ per protocol. */\r\n providerApi?: unknown\r\n}\r\n\r\n/** The effective `compat` of an entry: its own `compat` merged over the provider-level `compat`. */\r\nfunction compatOf(entry: CapabilityEntry): Record<string, unknown> {\r\n const base = typeof entry.providerCompat === 'object' && entry.providerCompat !== null\r\n ? entry.providerCompat as Record<string, unknown>\r\n : {}\r\n const own = entry.model['compat']\r\n return typeof own === 'object' && own !== null && !Array.isArray(own)\r\n ? { ...base, ...(own as Record<string, unknown>) }\r\n : base\r\n}\r\n\r\n/**\r\n * Whether the model-level thinking-compat fields (`compat.thinkingFormat`,\r\n * `compat.supportsReasoningEffort`) may be written for this entry's provider\r\n * (issue #2): the host llm-pi-ai gate offers them ONLY on the\r\n * openai-completions protocol — a Responses route carrying them fails the\r\n * WHOLE providers write (`not configurable here`). An absent `api` keeps\r\n * pi-ai's openai-completions default, so the row stays editable.\r\n * (exported for the gate's unit regression, issue #2)\r\n */\r\nexport function effortCompatConfigurable(entry: CapabilityEntry): boolean {\r\n return typeof entry.providerApi !== 'string' || entry.providerApi === 'openai-completions'\r\n}\r\n\r\n/** Flatten the user-layer providers into capability entries (models arrays only). */\r\nfunction entriesOf(providers: Record<string, unknown>): CapabilityEntry[] {\r\n return Object.entries(providers).flatMap(([providerId, profile]) => {\r\n const raw = profile as Record<string, unknown>\r\n const models = raw['models']\r\n if (!Array.isArray(models)) return []\r\n const providerCompat = raw['compat']\r\n const providerInput = Array.isArray(raw['defaultInput']) ? raw['defaultInput'] as unknown[] : undefined\r\n return models.map((model, index) => ({\r\n providerId,\r\n index,\r\n model: (typeof model === 'object' && model !== null && !Array.isArray(model)\r\n ? model as Record<string, unknown>\r\n : {}),\r\n modelId: typeof model === 'object' && model !== null && typeof (model as Record<string, unknown>)['id'] === 'string'\r\n ? (model as Record<string, unknown>)['id'] as string\r\n : `#${index + 1}`,\r\n providerCompat,\r\n providerInput,\r\n providerApi: raw['api'],\r\n }))\r\n })\r\n}\r\n\r\n/** Human-readable capability summary of one entry (input modalities + declared context window). */\r\nfunction summaryOf(entry: CapabilityEntry): { text: boolean; image: boolean; context: string | null } {\r\n // Modalities fall back to the provider-level `defaultInput` so a vision\r\n // gateway declared once on the route shows every model as vision, matching\r\n // llm-pi-ai's resolution and the adapter's runtime gate.\r\n const input = Array.isArray(entry.model['input'])\r\n ? entry.model['input'] as unknown[]\r\n : entry.providerInput\r\n const text = !Array.isArray(input) || input.length === 0 || input.includes('text')\r\n const image = Array.isArray(input) && input.includes('image')\r\n const contextWindow = entry.model['contextWindow']\r\n const context = typeof contextWindow === 'number' && Number.isFinite(contextWindow) && contextWindow > 0\r\n ? formatContextWindow(contextWindow)\r\n : null\r\n return { text, image, context }\r\n}\r\n\r\n/** A tiny inline chevron icon (no CSS modules). */\r\nfunction ChevronIcon({ open }: { open: boolean }): JSX.Element {\r\n return (\r\n <svg\r\n width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" aria-hidden\r\n style={{ transform: open ? 'rotate(180deg)' : 'none', transition: 'transform 0.16s' }}\r\n >\r\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\r\n </svg>\r\n )\r\n}\r\n\r\n/**\r\n * Horizontal pill toggle: the real checkbox stays the a11y control (sr-only),\r\n * the drawn track/knob reflects `checked` — which the card feeds from its\r\n * optimistic overlay, so the pill flips the instant the user clicks and rolls\r\n * back on a refused write (same pendingTl contract as every other field).\r\n */\r\nfunction PillToggle(props: {\r\n id: string\r\n checked: boolean\r\n disabled: boolean\r\n title?: string\r\n onChange: (next: boolean) => void\r\n}): JSX.Element {\r\n const { id, checked, disabled, title, onChange } = props\r\n return (\r\n <label\r\n htmlFor={id}\r\n title={title}\r\n style={{ display: 'inline-flex', alignItems: 'center', cursor: disabled ? 'default' : 'pointer' }}\r\n >\r\n <input\r\n id={id}\r\n type=\"checkbox\"\r\n checked={checked}\r\n disabled={disabled}\r\n onChange={(event) => onChange(event.currentTarget.checked)}\r\n style={{ position: 'absolute', width: 1, height: 1, margin: 0, opacity: 0, pointerEvents: 'none' }}\r\n />\r\n <span\r\n aria-hidden\r\n style={{\r\n display: 'inline-block',\r\n width: '36px',\r\n height: '20px',\r\n borderRadius: '999px',\r\n flex: '0 0 auto',\r\n position: 'relative',\r\n background: checked\r\n ? 'var(--dsw-alias-bg-control-primary, #4d6bfe)'\r\n : 'var(--dsw-alias-fill-input-primary, rgba(127,127,127,0.25))',\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\r\n transition: 'background 0.16s',\r\n }}\r\n >\r\n <span\r\n style={{\r\n position: 'absolute',\r\n top: '1px',\r\n left: checked ? '17px' : '1px',\r\n width: '16px',\r\n height: '16px',\r\n borderRadius: '50%',\r\n background: '#fff',\r\n boxShadow: '0 1px 2px rgba(0,0,0,0.25)',\r\n transition: 'left 0.16s',\r\n }}\r\n />\r\n </span>\r\n </label>\r\n )\r\n}\r\n\r\n/**\r\n * The llm-pi-ai model-capability editor block (dsh-thinking-effort style:\r\n * provider groups, model rows with badges, per-level wire editors, search and\r\n * one-click presets).\r\n * @param scope - the `llm-pi-ai` namespace scope.\r\n * @param t - copy lookup.\r\n * @param readonly - whether writes are forbidden.\r\n * @returns the capabilities block, or a placeholder when nothing is configured.\r\n */\r\n/**\r\n * The absent-transport snapshot: a module-level CONSTANT. `useSyncExternalStore`\r\n * requires getSnapshot to return a STABLE value — an inline fallback literal is\r\n * a new object on every call, and React spins an infinite update loop (#185)\r\n * the moment this block renders with no transport handle (the ready branch's\r\n * first-ever mount crash).\r\n */\r\nconst OC_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\nfunction ModelCapabilities(props: {\r\n scope: SettingsScope<unknown>\r\n ocScope?: SettingsScope<unknown>\r\n /** The plugin's OWN settings scope (TL namespace): hosts the takeover master switch write. */\r\n tlScope?: SettingsScope<unknown>\r\n t: (key: string) => string\r\n readonly: boolean\r\n}): JSX.Element {\r\n const { scope, ocScope, tlScope, t, readonly } = props\r\n // Stable subscription identities: inline lambdas make React resubscribe on\r\n // every render, and the host controller folds a fresh decoded snapshot into\r\n // its store on every subscribe — each resubscription would then look like a\r\n // store change and re-render forever.\r\n const subscribe = useCallback((listener: () => void) => scope.subscribe(listener), [scope])\r\n const getSnapshot = useCallback(() => scope.getSnapshot(), [scope])\r\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\r\n // The transport's live section: drives the per-route takeover checkbox.\r\n const ocSubscribe = useCallback(\r\n (listener: () => void) => ocScope?.subscribe(listener) ?? (() => {}),\r\n [ocScope],\r\n )\r\n const ocGetSnapshot = useCallback(\r\n () => (ocScope !== undefined ? ocScope.getSnapshot() : OC_ABSENT_SNAPSHOT),\r\n [ocScope],\r\n )\r\n const ocSnapshot = useSyncExternalStore(ocSubscribe, ocGetSnapshot)\r\n const ocSection = (ocSnapshot.status === 'ready' && typeof ocSnapshot.value === 'object' && ocSnapshot.value !== null\r\n ? ocSnapshot.value\r\n : {}) as { enabled?: unknown; providers?: unknown; extraInputs?: unknown }\r\n const ocWritable = ocSnapshot.status === 'ready' && ocSnapshot.writable && !readonly\r\n // Optimistic overlay (plan tl-write-immediacy §B): pending values shadow the\r\n // snapshots until their write settles. resolve(true) implies the client has\r\n // already accepted the new mirror view, so clearing the pending entry then\r\n // is gap-free; resolve(false) rolls the overlay back AND surfaces the error\r\n // banner. Optimistic writes deliberately do NOT touch `busy` — a 350ms\r\n // grey-out would defeat the instant-flip this overlay exists for.\r\n const [pendingOc, setPendingOc] = useState<Partial<{ enabled: boolean; providers: string[]; extraInputs: Record<string, string[]> }>>({})\r\n const [pendingPi, setPendingPi] = useState<Record<string, unknown> | undefined>(undefined)\r\n const [writeError, setWriteError] = useState<string | null>(null)\r\n const viewOc = { ...ocSection, ...pendingOc } as { enabled?: unknown; providers?: unknown; extraInputs?: unknown }\r\n const unavailable = snapshot.status === 'unavailable'\r\n const providers = snapshot.status === 'ready' ? providersOf(snapshot) : {}\r\n // H1: the overlay must sit at the SOURCE of the model-row derivation chain —\r\n // thinking / vision / effort / context all flow from entriesOf(...).\r\n const viewProviders = { ...providers, ...pendingPi }\r\n // Every llm-pi-ai provider is listed with its models — no list gating: the\r\n // official compat surface (dsh ≥ rc.8) means pi-ai serves every route\r\n // natively, so each model is editable right here.\r\n const allEntries = entriesOf(viewProviders)\r\n\r\n // UI-only state: provider/model expansion, the wire drafts, and the query.\r\n const [query, setQuery] = useState('')\r\n const [expandedProviders, setExpandedProviders] = useState<Record<string, boolean>>({})\r\n const [expandedModels, setExpandedModels] = useState<Record<string, boolean>>({})\r\n const [drafts, setDrafts] = useState<Record<string, Record<string, string | null>>>({})\r\n // `busy` has no writer by design (see the optimistic-write note above) —\r\n // every write path is optimistic with its own inline rollback, so the\r\n // disabled states below are currently pure `readonly` mirrors.\r\n const [busy] = useState(false)\r\n const [contextRaw, setContextRaw] = useState<Record<string, string>>({})\r\n const [contextError, setContextError] = useState<Record<string, string>>({})\r\n\r\n const entryKey = (entry: CapabilityEntry): string => `${entry.providerId}\\u0000${entry.index}`\r\n\r\n /** Commit one patch over the user-layer providers (optimistic + self-heal retry). */\r\n const commitProviders = (mutate: (current: Record<string, unknown>) => Record<string, unknown>): void => {\r\n if (snapshot.status !== 'ready' || readonly) return\r\n const next = mutate(structuredClone(viewProviders))\r\n setPendingPi(next)\r\n void setWithRetry(scope, 'providers', next).then(({ ok }) => {\r\n setPendingPi(undefined)\r\n if (!ok) setWriteError(t('card.writeError'))\r\n })\r\n }\r\n\r\n /** Toggle the route-level official compat flag: unchecked = inherit (unset). */\r\n const toggleDeveloperRole = (providerId: string, next: boolean): void => {\r\n commitProviders((current) => {\r\n const profile = current[providerId] as Record<string, unknown> | undefined\r\n if (profile === undefined) return current\r\n const compat = typeof profile['compat'] === 'object' && profile['compat'] !== null && !Array.isArray(profile['compat'])\r\n ? { ...(profile['compat'] as Record<string, unknown>) }\r\n : {}\r\n if (next) compat['supportsDeveloperRole'] = false\r\n else delete compat['supportsDeveloperRole']\r\n if (Object.keys(compat).length === 0) delete profile['compat']\r\n else profile['compat'] = compat\r\n return current\r\n })\r\n }\r\n\r\n /**\r\n * Toggle the per-route third-party takeover. Ownership split (plan §D): this\r\n * checkbox writes MEMBERSHIP only — `OC.enabled`'s sole writer is the host\r\n * mirror of TL's `takeover` master. Checking a route while the master is off\r\n * lights the master through ONE TL-namespace write instead of the old direct\r\n * OC.enabled write that used to fight the mirror and bounce the checkbox.\r\n */\r\n const toggleTakeover = (providerId: string, next: boolean): void => {\r\n if (ocScope === undefined || !ocWritable) return\r\n const currentProviders = Array.isArray(viewOc.providers)\r\n ? (viewOc.providers as unknown[]).filter((id): id is string => typeof id === 'string')\r\n : []\r\n const providers = next\r\n ? [...new Set([...currentProviders, providerId])]\r\n : currentProviders.filter((id) => id !== providerId)\r\n setPendingOc((cur) => ({ ...cur, providers }))\r\n // Master-off detection reads TL's OWN snapshot, never viewOc.enabled: the\r\n // enabled field folds lazily (host mirror timing) and reads stale-true\r\n // right after a master-off click, which would skip the auto-light. The\r\n // TL snapshot folds on the master write itself, so it is always fresh.\r\n const tlTakeoverNow = (tlScope?.getSnapshot().value as { takeover?: unknown } | undefined)?.takeover === true\r\n if (next && !tlTakeoverNow && tlScope !== undefined) {\r\n // Light the master AND carry OC.enabled with it in-session: the host\r\n // mirror only reconciles at boot reliably, so the card writes both sides\r\n // of the lighting (same value — no fight with the mirror is possible).\r\n void setWithRetry(tlScope, 'takeover', true).then(({ ok }) => {\r\n if (!ok) setWriteError(t('card.writeError'))\r\n })\r\n void setWithRetry(ocScope, 'enabled', true).then(({ ok }) => {\r\n if (!ok) setWriteError(t('card.writeError'))\r\n })\r\n }\r\n void setWithRetry(ocScope, 'providers', providers).then(({ ok }) => {\r\n setPendingOc((cur) => {\r\n const rest = { ...cur }\r\n delete rest['providers']\r\n return rest\r\n })\r\n if (!ok) {\r\n setPendingOc((cur) => ({ ...cur, providers: currentProviders }))\r\n setWriteError(t('card.writeError'))\r\n }\r\n })\r\n }\r\n\r\n /** The model's extra input modalities declared on the transport ('provider/model' key). */\r\n const modelExtrasOf = (providerId: string, modelId: string): string[] =>\r\n extraInputsOf(viewOc)[`${providerId}/${modelId}`] ?? []\r\n\r\n /** Toggle one model's video/audio declaration on the transport's extraInputs.\r\n * The host pi-ai schema caps model-row `input` at text|image, so omni\r\n * modalities live here — effective only while the route is taken over. */\r\n const toggleModelModality = (providerId: string, modelId: string, modality: 'video' | 'audio', next: boolean): void => {\r\n if (ocScope === undefined || !ocWritable) return\r\n const current = extraInputsOf(viewOc)\r\n const modelKey = `${providerId}/${modelId}`\r\n const entry = Array.isArray(current[modelKey]) ? [...current[modelKey]] : []\r\n const nextEntry = next ? [...new Set([...entry, modality])] : entry.filter((m) => m !== modality)\r\n const nextDict: Record<string, string[]> = { ...current }\r\n if (nextEntry.length > 0) nextDict[modelKey] = nextEntry\r\n else delete nextDict[modelKey]\r\n setPendingOc((cur) => ({ ...cur, extraInputs: nextDict }))\r\n void setWithRetry(ocScope, 'extraInputs', nextDict).then(({ ok }) => {\r\n setPendingOc((cur) => {\r\n const rest = { ...cur }\r\n delete rest['extraInputs']\r\n return rest\r\n })\r\n if (!ok) {\r\n setPendingOc((cur) => ({ ...cur, extraInputs: current }))\r\n setWriteError(t('card.writeError'))\r\n }\r\n })\r\n }\r\n\r\n /** Patch one model row of one provider. */\r\n const patchModel = (\r\n providerId: string,\r\n index: number,\r\n patch: (model: Record<string, unknown>) => void,\r\n ): void => {\r\n commitProviders((current) => {\r\n const profile = current[providerId] as { models?: unknown[] } | undefined\r\n if (profile === undefined || !Array.isArray(profile.models)) return current\r\n const model = profile.models[index]\r\n if (typeof model !== 'object' || model === null) return current\r\n patch(model as Record<string, unknown>)\r\n return current\r\n })\r\n }\r\n\r\n /** Toggle whether a model is a thinking model (reasoningEfforts table vs false). */\r\n const toggleThinking = (entry: CapabilityEntry, next: boolean): void => {\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n if (next) {\r\n // Thinking on: a table must exist so the wire drives enable_thinking /\r\n // reasoning_effort. Start from the persisted table or the default high\r\n // set; a toggle model (no effort) keeps supportsReasoningEffort false.\r\n const effortCapable = supportsEffortOf(row)\r\n row['reasoningEfforts'] = effortCapable\r\n ? effortTableOf({ high: 'high' })\r\n : { off: null, high: 'high' }\r\n // Toggle-style thinking models need the official qwen format so pi-ai\r\n // sends enable_thinking (early vLLM thinking models return no thinking\r\n // content without that flag, and reject reasoning_effort). Only fills\r\n // an absent format — an explicit choice is never clobbered.\r\n if (!effortCapable) {\r\n patchCompat(row, (compat) => {\r\n if (compat['thinkingFormat'] === undefined) compat['thinkingFormat'] = 'qwen-chat-template'\r\n })\r\n }\r\n } else {\r\n // Thinking off: a non-reasoning model never takes an effort.\r\n row['reasoningEfforts'] = false\r\n }\r\n })\r\n }\r\n\r\n /** Toggle whether a model accepts reasoning_effort levels. */\r\n const toggleEffortCapable = (entry: CapabilityEntry, next: boolean): void => {\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n patchCompat(row, (compat) => {\r\n compat['supportsReasoningEffort'] = next\r\n // Counterpart of the auto-fill in toggleThinking: effort-capable rows\r\n // need reasoning_effort on the wire, so drop the toggle-style qwen\r\n // format when effort turns on (it would drive enable_thinking instead).\r\n if (next && compat['thinkingFormat'] === 'qwen-chat-template') delete compat['thinkingFormat']\r\n })\r\n })\r\n }\r\n\r\n /** Apply one model's wire draft as its `reasoningEfforts` table. */\r\n const applyDraft = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n const draft = drafts[key]\r\n if (draft === undefined) return\r\n const table = effortTableOf(draft)\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n row['reasoningEfforts'] = table\r\n // Mark effort support only when the model already had it or the user\r\n // ticked a reasoning_effort-only level (minimal/low/medium/xhigh/max).\r\n // A toggle-only model (Qwen3.6: off/high = enable_thinking) must keep\r\n // supportsReasoningEffort false — flipping it would make the adapter\r\n // send a reasoning_effort the gateway rejects (400).\r\n const extended = Object.keys(table).some(level => level !== 'off' && level !== 'on' && level !== 'high')\r\n if (supportsEffortOf(row) || extended) {\r\n patchCompat(row, (compat) => {\r\n compat['supportsReasoningEffort'] = true\r\n })\r\n }\r\n })\r\n }\r\n\r\n /** Reset a model's draft to its persisted table (or the default high set). */\r\n const resetDraft = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n setDrafts(current => {\r\n const next = { ...current }\r\n const table = effortsOf(entry.model)\r\n if (typeof table === 'object' && table !== null) {\r\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\r\n level,\r\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\r\n ]))\r\n } else {\r\n next[key] = { off: '', high: 'high' }\r\n }\r\n return next\r\n })\r\n }\r\n\r\n /** Seed a model's draft when it is first expanded. */\r\n const ensureDraft = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n setDrafts(current => {\r\n if (current[key] !== undefined) return current\r\n const next = { ...current }\r\n const table = effortsOf(entry.model)\r\n if (typeof table === 'object' && table !== null) {\r\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\r\n level,\r\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\r\n ]))\r\n } else {\r\n next[key] = { off: '', high: 'high' }\r\n }\r\n return next\r\n })\r\n }\r\n\r\n /** Apply a one-click preset to every thinking model. */\r\n const applyPreset = (levels: Record<string, unknown>): void => {\r\n commitProviders((current) => {\r\n for (const entry of entriesOf(current)) {\r\n const profile = current[entry.providerId] as { models?: unknown[] } | undefined\r\n if (profile === undefined || !Array.isArray(profile.models)) continue\r\n const model = profile.models[entry.index]\r\n if (typeof model !== 'object' || model === null) continue\r\n const row = model as Record<string, unknown>\r\n if (effortsOf(row) === undefined) continue // only thinking models\r\n // Replace the table but never touch supportsReasoningEffort: a\r\n // toggle-only model (Qwen3.6) must stay Off/On (enable_thinking), so\r\n // the request guard keeps clamping any injected level to its default\r\n // strength instead of sending a reasoning_effort the gateway rejects.\r\n row['reasoningEfforts'] = levels\r\n }\r\n return current\r\n })\r\n }\r\n\r\n /** Seed a model's context-window input when it is first expanded. */\r\n const seedContext = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n setContextRaw(current => {\r\n if (current[key] !== undefined) return current\r\n const value = entry.model['contextWindow']\r\n return {\r\n ...current,\r\n [key]: typeof value === 'number' && Number.isFinite(value) ? String(value) : '',\r\n }\r\n })\r\n }\r\n\r\n /** Write (or delete) a model's `contextWindow` in the llm-pi-ai entry. */\r\n const commitContextWindow = (entry: CapabilityEntry, value: number | undefined): void => {\r\n const key = entryKey(entry)\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n if (value === undefined) delete row['contextWindow']\r\n else row['contextWindow'] = value\r\n })\r\n setContextError(current => {\r\n const next = { ...current }\r\n delete next[key]\r\n return next\r\n })\r\n }\r\n\r\n /** Apply one preset immediately. */\r\n const applyContextPreset = (entry: CapabilityEntry, value: number): void => {\r\n const key = entryKey(entry)\r\n setContextRaw(current => ({ ...current, [key]: String(value) }))\r\n commitContextWindow(entry, value)\r\n }\r\n\r\n /** Validate and commit the custom input (blur / Enter); empty clears it. */\r\n const applyContextInput = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n const raw = (contextRaw[key] ?? '').trim()\r\n if (raw === '') {\r\n commitContextWindow(entry, undefined)\r\n return\r\n }\r\n const validation = validateContextWindow(raw)\r\n if (!validation.ok) {\r\n setContextError(current => ({\r\n ...current,\r\n [key]: t(validation.reason === 'integer'\r\n ? 'card.capabilities.contextInteger'\r\n : 'card.capabilities.contextRange'),\r\n }))\r\n return\r\n }\r\n commitContextWindow(entry, validation.value)\r\n }\r\n\r\n /** Clear the model's context-window declaration (delete the field). */\r\n const clearContext = (entry: CapabilityEntry): void => {\r\n const key = entryKey(entry)\r\n setContextRaw(current => ({ ...current, [key]: '' }))\r\n commitContextWindow(entry, undefined)\r\n }\r\n\r\n if (unavailable) {\r\n return (\r\n <div style={sectionStyle}>\r\n <p style={hintStyle}>{t('card.capabilities.unavailable')}</p>\r\n </div>\r\n )\r\n }\r\n if (allEntries.length === 0) {\r\n return (\r\n <div style={sectionStyle}>\r\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\r\n <p style={hintStyle}>{t('card.capabilities.empty')}</p>\r\n </div>\r\n )\r\n }\r\n\r\n const needle = query.trim().toLowerCase()\r\n const visible = needle === ''\r\n ? allEntries\r\n : allEntries.filter(entry =>\r\n entry.modelId.toLowerCase().includes(needle)\r\n || entry.providerId.toLowerCase().includes(needle))\r\n const providerIds = [...new Set(visible.map(entry => entry.providerId))]\r\n\r\n return (\r\n <div style={sectionStyle}>\r\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\r\n <p style={hintStyle}>{t('card.capabilities.hint')}</p>\r\n {writeError !== null && (\r\n <p style={{ margin: '0 0 4px', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }} role=\"status\">⚠ {writeError}</p>\r\n )}\r\n\r\n {/* Search + one-click presets */}\r\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '8px 0 2px' }}>\r\n <input\r\n type=\"text\"\r\n value={query}\r\n placeholder={t('card.capabilities.search')}\r\n disabled={readonly || busy}\r\n style={{ ...controlStyle, flex: '1 1 160px', minWidth: '140px' }}\r\n onChange={(event) => setQuery(event.currentTarget.value)}\r\n />\r\n {PRESETS.map(preset => (\r\n <button\r\n key={preset.key}\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => applyPreset(preset.levels)}\r\n style={{\r\n ...controlStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {t(`card.capabilities.preset${preset.key === 'official' ? 'Official' : 'Generic'}`)}\r\n </button>\r\n ))}\r\n </div>\r\n\r\n {visible.length === 0\r\n ? <p style={hintStyle}>{t('card.capabilities.noMatches')}</p>\r\n : providerIds.map(providerId => {\r\n const providerEntries = visible.filter(entry => entry.providerId === providerId)\r\n const providerOpen = expandedProviders[providerId] === true || needle !== ''\r\n return (\r\n <div key={providerId} style={providerStyle}>\r\n <div style={providerHeadStyle}>\r\n <button\r\n type=\"button\"\r\n aria-expanded={providerOpen}\r\n disabled={readonly || busy}\r\n onClick={() => setExpandedProviders(current => ({\r\n ...current,\r\n [providerId]: current[providerId] !== true,\r\n }))}\r\n style={{\r\n ...iconButtonStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n }}\r\n title={providerOpen ? t('card.capabilities.collapseProvider') : t('card.capabilities.expandProvider')}\r\n >\r\n <ChevronIcon open={providerOpen} />\r\n </button>\r\n <p style={providerNameStyle}>{providerId}</p>\r\n <label\r\n style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '11px', whiteSpace: 'nowrap', color: 'var(--dsw-alias-label-secondary)' }}\r\n title={t('card.capabilities.developerRoleHint')}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={developerRoleDisabledOf(providers[providerId])}\r\n disabled={readonly || busy}\r\n onChange={(event) => toggleDeveloperRole(providerId, event.currentTarget.checked)}\r\n />\r\n <span>{t('card.capabilities.developerRole')}</span>\r\n </label>\r\n <label\r\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))' }}\r\n title={ocScope === undefined ? t('card.capabilities.takeoverHintAbsent') : t('card.capabilities.takeoverHint')}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={takeoverActiveOf(viewOc, providerId)}\r\n disabled={readonly || busy || !ocWritable}\r\n onChange={(event) => toggleTakeover(providerId, event.currentTarget.checked)}\r\n />\r\n <span>{t('card.capabilities.takeover')}</span>\r\n </label>\r\n <p style={providerBadgeStyle}>{providerEntries.length}</p>\r\n </div>\r\n {providerOpen\r\n ? providerEntries.map(entry => {\r\n const key = entryKey(entry)\r\n const modelOpen = expandedModels[key] === true\r\n const efforts = effortsOf(entry.model)\r\n const thinking = typeof efforts === 'object'\r\n // Display falls back to the provider-level `compat` so a\r\n // route-declared thinking/effort posture shows on every model.\r\n const compat = compatOf(entry)\r\n const supportsEffort = compat['supportsReasoningEffort'] === true\r\n // Issue #2: a non-completions protocol refuses the thinking-compat\r\n // fields at the write site — grey the three controls out before\r\n // the attempt instead of failing the whole providers payload.\r\n const apiGated = !effortCompatConfigurable(entry)\r\n const meta = summaryOf(entry)\r\n const format = typeof compat['thinkingFormat'] === 'string'\r\n ? compat['thinkingFormat']\r\n : undefined\r\n return (\r\n <div key={key}>\r\n <div style={modelRowStyle}>\r\n <button\r\n type=\"button\"\r\n aria-expanded={modelOpen}\r\n disabled={readonly || busy}\r\n onClick={() => {\r\n const next = expandedModels[key] !== true\r\n setExpandedModels(current => ({ ...current, [key]: next }))\r\n if (next) { ensureDraft(entry); seedContext(entry) }\r\n }}\r\n style={{\r\n ...iconButtonStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n }}\r\n title={modelOpen ? t('card.capabilities.closeModelSettings') : t('card.capabilities.openModelSettings')}\r\n >\r\n <ChevronIcon open={modelOpen} />\r\n </button>\r\n <p style={modelIdStyle}>{entry.modelId}</p>\r\n <span style={badgeStyle} title=\"text\">{meta.text ? 'T' : '–'}</span>\r\n <span style={badgeStyle} title=\"image\">{meta.image ? 'IMG' : '–'}</span>\r\n {modelExtrasOf(entry.providerId, entry.modelId).includes('video') && <span style={badgeStyle} title=\"video (extraInputs)\">VID</span>}\r\n {modelExtrasOf(entry.providerId, entry.modelId).includes('audio') && <span style={badgeStyle} title=\"audio (extraInputs)\">AUD</span>}\r\n {meta.context !== null && <span style={badgeStyle}>{meta.context}</span>}\r\n {thinking && !supportsEffort && <span style={badgeStyle}>On/Off</span>}\r\n </div>\r\n {modelOpen\r\n ? (\r\n <div style={{ padding: '4px 10px 10px', borderTop: '1px solid var(--dsw-alias-border-l2)' }}>\r\n {apiGated && <p style={hintStyle}>{t('card.capabilities.apiUnsupported')}</p>}\r\n {/* Layer 1 — base capabilities: is it a thinking model? A vision model? */}\r\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', margin: '2px 0 8px' }}>\r\n <label\r\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}\r\n title={apiGated ? t('card.capabilities.apiUnsupported') : undefined}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={thinking}\r\n disabled={readonly || busy || apiGated}\r\n onChange={(event) => toggleThinking(entry, event.currentTarget.checked)}\r\n />\r\n <span>{t('card.capabilities.thinking')}</span>\r\n </label>\r\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\r\n <input\r\n type=\"checkbox\"\r\n checked={meta.image}\r\n disabled={readonly || busy}\r\n onChange={(event) => {\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n // Image input implies text input; the pair is written together.\r\n row['input'] = event.currentTarget.checked ? ['text', 'image'] : ['text']\r\n })\r\n }}\r\n />\r\n <span>{t('card.capabilities.vision')}</span>\r\n </label>\r\n {/* Video/audio declarations live on the taken-over transport\r\n (extraInputs): the host model-row input enum caps at text|image. */}\r\n {(['video', 'audio'] as const).map(modality => (\r\n <label\r\n key={modality}\r\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))' }}\r\n title={t('card.capabilities.mediaHint')}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={modelExtrasOf(entry.providerId, entry.modelId).includes(modality)}\r\n disabled={readonly || busy || !ocWritable || !takeoverActiveOf(viewOc, entry.providerId)}\r\n onChange={(event) => toggleModelModality(entry.providerId, entry.modelId, modality, event.currentTarget.checked)}\r\n />\r\n <span>{t(`card.capabilities.${modality}`)}</span>\r\n </label>\r\n ))}\r\n </div>\r\n {/* Layer 2 — only for thinking models: does it take reasoning_effort levels? */}\r\n {thinking\r\n ? (\r\n <label\r\n style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px', margin: '0 0 8px' }}\r\n title={apiGated ? t('card.capabilities.apiUnsupported') : undefined}\r\n >\r\n <input\r\n type=\"checkbox\"\r\n checked={supportsEffort}\r\n disabled={readonly || busy || apiGated}\r\n onChange={(event) => toggleEffortCapable(entry, event.currentTarget.checked)}\r\n />\r\n <span>{t('card.capabilities.supportsEffort')}</span>\r\n </label>\r\n )\r\n : null}\r\n {thinking && supportsEffort\r\n ? (\r\n <>\r\n {/* Per-level wire editor — only for effort-capable thinking models */}\r\n <p style={fieldLabelStyle}>{t('card.capabilities.efforts')}</p>\r\n <div style={{ margin: '4px 0 6px' }}>\r\n {CAPABILITY_LEVELS.map(level => {\r\n const wire = drafts[key]?.[level]\r\n const on = wire !== undefined && wire !== null\r\n return (\r\n <div key={level} style={levelRowStyle}>\r\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\r\n <input\r\n type=\"checkbox\"\r\n checked={on}\r\n disabled={readonly || busy}\r\n onChange={(event) => {\r\n const checked = event.currentTarget.checked\r\n setDrafts(current => {\r\n const draft = { ...(current[key] ?? {}) }\r\n draft[level] = checked\r\n ? (level === 'off' ? '' : level)\r\n : null\r\n return { ...current, [key]: draft }\r\n })\r\n }}\r\n />\r\n <span>{level}</span>\r\n </label>\r\n <span style={levelNameStyle}>{level === 'off' ? t('card.capabilities.offPlaceholder') : '→'}</span>\r\n <input\r\n type=\"text\"\r\n value={wire ?? ''}\r\n disabled={readonly || busy || !on}\r\n placeholder={t('card.capabilities.wirePlaceholder')}\r\n style={wireInputStyle}\r\n onChange={(event) => {\r\n setDrafts(current => {\r\n const draft = { ...(current[key] ?? {}) }\r\n draft[level] = event.currentTarget.value\r\n return { ...current, [key]: draft }\r\n })\r\n }}\r\n />\r\n </div>\r\n )\r\n })}\r\n </div>\r\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>\r\n <button\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => applyDraft(entry)}\r\n style={{\r\n ...controlStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {t('card.capabilities.applyLevel')}\r\n </button>\r\n <button\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => resetDraft(entry)}\r\n style={{\r\n ...controlStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {t('card.capabilities.restoreDefault')}\r\n </button>\r\n </div>\r\n </>\r\n )\r\n : null}\r\n {/* Layer 4 — thinking format (wire serialization) */}\r\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\r\n <label style={fieldStyle}>\r\n <span style={fieldLabelStyle}>{t('card.capabilities.thinkingFormat')}</span>\r\n <select\r\n style={controlStyle}\r\n value={format ?? 'inherit'}\r\n disabled={readonly || busy || apiGated}\r\n title={apiGated ? t('card.capabilities.apiUnsupported') : undefined}\r\n onChange={(event) => {\r\n const next = event.currentTarget.value\r\n patchModel(entry.providerId, entry.index, (row) => {\r\n patchCompat(row, (compat) => {\r\n if (next === 'inherit') delete compat['thinkingFormat']\r\n else compat['thinkingFormat'] = next\r\n })\r\n })\r\n }}\r\n >\r\n <option value=\"inherit\">{t('card.capabilities.thinkingFormat.inherit')}</option>\r\n {THINKING_FORMATS.map(formatOption => (\r\n <option key={formatOption} value={formatOption}>{formatOption}</option>\r\n ))}\r\n </select>\r\n </label>\r\n </div>\r\n {/* Context-window limit: presets + custom integer (written to llm-pi-ai, live on next request) */}\r\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\r\n <label style={fieldStyle}>\r\n <span style={fieldLabelStyle}>{t('card.capabilities.contextWindow')}</span>\r\n <div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap', alignItems: 'center' }}>\r\n {CONTEXT_WINDOW_PRESETS.map(preset => (\r\n <button\r\n key={preset.value}\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => applyContextPreset(entry, preset.value)}\r\n style={{\r\n ...controlStyle,\r\n padding: '2px 8px',\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {preset.label}\r\n </button>\r\n ))}\r\n <input\r\n type=\"text\"\r\n value={contextRaw[key] ?? ''}\r\n disabled={readonly || busy}\r\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\r\n style={{ ...controlStyle, width: '120px' }}\r\n onChange={(event) => {\r\n const next = event.currentTarget.value\r\n setContextRaw(current => ({ ...current, [key]: next }))\r\n }}\r\n onBlur={() => applyContextInput(entry)}\r\n onKeyDown={(event) => {\r\n if (event.key === 'Enter') event.currentTarget.blur()\r\n }}\r\n />\r\n <button\r\n type=\"button\"\r\n disabled={readonly || busy}\r\n onClick={() => clearContext(entry)}\r\n style={{\r\n ...controlStyle,\r\n cursor: readonly || busy ? 'default' : 'pointer',\r\n opacity: readonly || busy ? 0.5 : 1,\r\n }}\r\n >\r\n {t('card.capabilities.contextClear')}\r\n </button>\r\n </div>\r\n {contextError[key] !== undefined\r\n ? (\r\n <span style={{ margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }}>\r\n {contextError[key]}\r\n </span>\r\n )\r\n : null}\r\n </label>\r\n </div>\r\n </div>\r\n )\r\n : null}\r\n </div>\r\n )\r\n })\r\n : null}\r\n </div>\r\n )\r\n })}\r\n {readonly ? <p style={hintStyle}>{t('card.readonly')}</p> : null}\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * The absent-llm-deepseek snapshot: module-level CONSTANT (the stable-snapshot\r\n * rule that killed the first-ever panel mount, #185).\r\n */\r\nconst DS_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/**\r\n * Official DeepSeek model context-window editor (4.4.0): the per-line editor\r\n * lived only in the ModelPanel; with the seat takeover off by default the\r\n * card owns it. Writes mirror the panel's DEEPSEEK branch exactly: the model\r\n * entry's `contextWindow` when listed, the route `defaultContextWindow`\r\n * otherwise (clear = back to the native 1M).\r\n * @param props - the llm-deepseek scope (absent = section hidden), copy, fence.\r\n * @returns the editor block, or null when the namespace/scope is unavailable.\r\n */\r\nfunction DeepSeekContextSection(props: {\r\n scope: SettingsScope<unknown> | undefined\r\n t: (key: string) => string\r\n readonly: boolean\r\n}): JSX.Element | null {\r\n const { scope, t, readonly } = props\r\n const subscribe = useCallback(\r\n (listener: () => void) => (scope !== undefined ? scope.subscribe(listener) : () => {}),\r\n [scope],\r\n )\r\n const getSnapshot = useCallback(\r\n () => (scope === undefined ? DS_ABSENT_SNAPSHOT : scope.getSnapshot()),\r\n [scope],\r\n )\r\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\r\n const [raw, setRaw] = useState<Record<string, string>>({})\r\n const [errors, setErrors] = useState<Record<string, string>>({})\r\n const [busy, setBusy] = useState(false)\r\n if (snapshot.status !== 'ready') return null\r\n const section = deepseekSectionOf(snapshot)\r\n const models = section.models ?? []\r\n if (models.length === 0 && section.defaultContextWindow === undefined) return null\r\n const writable = snapshot.writable && !readonly && !busy\r\n\r\n /** Commit one row's window (index -1 = the route default layer). */\r\n const commit = (index: number, value: number | undefined): void => {\r\n if (scope === undefined || !writable) return\r\n setBusy(true)\r\n const rows = (deepseekSectionOf(scope.getSnapshot()).models ?? []).map(entry => ({ ...entry }))\r\n const write = index >= 0\r\n ? scope.set('models', rows.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 : scope.set('defaultContextWindow', value ?? DEEPSEEK_DEFAULT_WINDOW)\r\n void write.then(\r\n () => {\r\n setBusy(false)\r\n setErrors(cur => {\r\n const next = { ...cur }\r\n delete next[String(index)]\r\n return next\r\n })\r\n },\r\n () => {\r\n setBusy(false)\r\n setErrors(cur => ({ ...cur, [String(index)]: t('card.capabilities.failed') }))\r\n },\r\n )\r\n }\r\n\r\n /** Validate and commit the custom input; empty clears. */\r\n const applyCustom = (index: number): void => {\r\n const key = String(index)\r\n const trimmed = (raw[key] ?? '').trim()\r\n if (trimmed === '') {\r\n commit(index, undefined)\r\n return\r\n }\r\n const validation = validateContextWindow(trimmed)\r\n if (!validation.ok) {\r\n setErrors(cur => ({\r\n ...cur,\r\n [key]: t(validation.reason === 'integer' ? 'input.context.integer' : 'input.context.range'),\r\n }))\r\n return\r\n }\r\n commit(index, validation.value)\r\n }\r\n\r\n const rows: { label: string; index: number; value: number | undefined }[] = [\r\n ...models.map((entry, index) => ({\r\n label: String(entry['name'] ?? entry['id'] ?? index),\r\n index,\r\n value: contextWindowOf(entry),\r\n })),\r\n { label: t('model.panel.window'), index: -1, value: section.defaultContextWindow },\r\n ]\r\n\r\n return (\r\n <div style={sectionStyle}>\r\n <p style={fieldLabelStyle}>{t('card.dsContextTitle')}</p>\r\n {rows.map(row => {\r\n const key = String(row.index)\r\n return (\r\n <div key={key} style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '6px 0' }}>\r\n <span style={{ ...fieldLabelStyle, margin: 0 }}>{row.label}</span>\r\n <span style={badgeStyle}>{row.value === undefined ? t('input.context.unset') : formatContextWindow(row.value)}</span>\r\n {CONTEXT_WINDOW_PRESETS.map(preset => (\r\n <button\r\n key={preset.value}\r\n type=\"button\"\r\n disabled={!writable}\r\n onClick={() => commit(row.index, preset.value)}\r\n style={{\r\n ...controlStyle,\r\n padding: '2px 8px',\r\n cursor: writable ? 'pointer' : 'default',\r\n opacity: writable ? 1 : 0.5,\r\n }}\r\n >\r\n {preset.label}\r\n </button>\r\n ))}\r\n <input\r\n type=\"text\"\r\n inputMode=\"numeric\"\r\n value={raw[key] ?? ''}\r\n disabled={!writable}\r\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\r\n style={{ ...controlStyle, width: '120px' }}\r\n onChange={event => setRaw(cur => ({ ...cur, [key]: event.currentTarget.value }))}\r\n onKeyDown={event => { if (event.key === 'Enter') applyCustom(row.index) }}\r\n />\r\n <button\r\n type=\"button\"\r\n disabled={!writable || row.value === undefined}\r\n onClick={() => commit(row.index, undefined)}\r\n style={{ ...controlStyle, padding: '2px 8px' }}\r\n >\r\n {t('input.context.clear')}\r\n </button>\r\n {errors[key] !== undefined && (\r\n <span style={{ fontSize: '12px', color: 'var(--dsw-alias-danger, #e5484d)' }}>{errors[key]}</span>\r\n )}\r\n </div>\r\n )\r\n })}\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * The card body, wrapped in a disclosure shell like every peer settings card:\r\n * a header (name + description + chevron) that toggles the body, expanded by\r\n * default so the family section reads as an open page of drawers.\r\n * @param props - locale copy and the injected scopes.\r\n */\r\nexport function ThinkingLevelsCard({ t, scope, piAiScope, ocScope, deepseekScope }: ThinkingLevelsCardProps): JSX.Element {\r\n const [open, setOpen] = useState(true)\r\n // Stable subscription identities (see ModelCapabilities): the host controller\r\n // folds a fresh snapshot on every subscribe, so per-render inline lambdas\r\n // would resubscribe→fold→re-render forever.\r\n const subscribe = useCallback((listener: () => void) => scope.subscribe(listener), [scope])\r\n const getSnapshot = useCallback(() => scope.getSnapshot(), [scope])\r\n const snapshot = useSyncExternalStore(subscribe, getSnapshot)\r\n const unavailable = snapshot.status === 'unavailable'\r\n const readonly = unavailable || !snapshot.writable\r\n // configForms serves the STORED doc: volatile fields arrive as plain values\r\n // (simplify() unwraps the live refs before persistence), so the card sees a\r\n // plain config shape even though the host-side type carries Volatile unions.\r\n const value = (snapshot.value ?? {}) as unknown as Partial<{\r\n enabled: boolean\r\n level: EffortId\r\n allowDowngrade: boolean\r\n allowUpgrade: boolean\r\n takeover: boolean\r\n takeoverUi: boolean\r\n defaultPricing: PricingPolicy\r\n }>\r\n // Optimistic overlay for this card's own writes (plan §E): same contract as\r\n // the capability card's overlay — clear on resolve(true), roll back + banner\r\n // on resolve(false).\r\n const [pendingTl, setPendingTl] = useState<Partial<{ enabled: boolean; level: EffortId; allowDowngrade: boolean; allowUpgrade: boolean; takeover: boolean; takeoverUi: boolean; defaultPricing: PricingPolicy }>>({})\r\n const [writeErrorTl, setWriteErrorTl] = useState<string | null>(null)\r\n const viewValue = { ...value, ...pendingTl }\r\n const level = EFFORT_OPTIONS.includes(viewValue.level as EffortId) ? viewValue.level as EffortId : 'auto'\r\n const defaultPricing = PRICING_OPTIONS.includes(viewValue.defaultPricing as PricingPolicy) ? viewValue.defaultPricing as PricingPolicy : 'estimate'\r\n const writeTl = (field: 'enabled' | 'level' | 'allowDowngrade' | 'allowUpgrade' | 'takeover' | 'takeoverUi' | 'defaultPricing', v: unknown): void => {\r\n setPendingTl((cur) => ({ ...cur, [field]: v as never }))\r\n void setWithRetry(scope, field, v).then(({ ok }) => {\r\n setPendingTl((cur) => {\r\n const rest = { ...cur }\r\n delete rest[field]\r\n return rest\r\n })\r\n if (!ok) setWriteErrorTl(t('card.writeError'))\r\n })\r\n // The takeover master carries OC.enabled with it in-session (same value):\r\n // the host mirror reconciles at boot, but an in-session flip must take\r\n // effect immediately — writing the same value the mirror would write can\r\n // never fight it.\r\n if (field === 'takeover' && typeof v === 'boolean' && ocScope !== undefined) {\r\n void setWithRetry(ocScope, 'enabled', v).then(({ ok }) => {\r\n if (!ok) setWriteErrorTl(t('card.writeError'))\r\n })\r\n }\r\n }\r\n\r\n return (\r\n <div style={{\r\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\r\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\r\n borderRadius: '12px',\r\n transition: 'border-color 0.16s, background 0.16s',\r\n }}>\r\n <button\r\n type=\"button\"\r\n aria-expanded={open}\r\n style={{\r\n appearance: 'none',\r\n width: '100%',\r\n font: 'inherit',\r\n color: 'inherit',\r\n textAlign: 'left',\r\n cursor: 'pointer',\r\n background: 'none',\r\n border: 0,\r\n borderRadius: '12px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: '12px',\r\n padding: '14px 16px',\r\n }}\r\n onClick={() => { setOpen(current => !current) }}\r\n >\r\n <span style={{ flex: '1 1 0%', minWidth: 0 }}>\r\n <div style={{ fontSize: '14px', fontWeight: 600, color: 'var(--dsw-alias-label-primary)' }}>{t('card.title')}</div>\r\n <div style={{ color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))', fontSize: '13px', lineHeight: 1.5 }}>{t('card.description')}</div>\r\n </span>\r\n <svg\r\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden\r\n style={{\r\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))',\r\n flex: '0 0 auto',\r\n transition: 'transform 0.16s',\r\n transform: open ? 'rotate(180deg)' : 'none',\r\n }}\r\n >\r\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\r\n </svg>\r\n </button>\r\n {open\r\n ? (\r\n <div style={{ padding: '12px 16px' }}>\r\n {unavailable\r\n ? (\r\n <div style={{ fontSize: '13px', color: 'var(--dsw-alias-label-tertiary)' }}>\r\n {t('card.unavailable')}\r\n </div>\r\n )\r\n : (\r\n <>\r\n <div style={rowStyle}>\r\n <label htmlFor=\"plugin-config-thinking-levels-level\" style={labelStyle}>{t('card.level')}</label>\r\n <select\r\n id=\"plugin-config-thinking-levels-level\"\r\n value={level}\r\n disabled={readonly}\r\n style={controlStyle}\r\n onChange={(event) => { writeTl('level', event.currentTarget.value as EffortId) }}\r\n >\r\n {EFFORT_OPTIONS.map((option) => (\r\n <option key={option} value={option}>{t(`card.level.${option}`)}</option>\r\n ))}\r\n </select>\r\n </div>\r\n <div style={rowStyle}>\r\n <label htmlFor=\"plugin-config-thinking-levels-enabled\" style={labelStyle}>{t('card.enabled')}</label>\r\n <PillToggle\r\n id=\"plugin-config-thinking-levels-enabled\"\r\n checked={viewValue.enabled ?? true}\r\n disabled={readonly}\r\n onChange={(next) => { writeTl('enabled', next) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label\r\n htmlFor=\"plugin-config-thinking-levels-takeover\"\r\n style={labelStyle}\r\n title={t('card.masterTakeoverHint')}\r\n >{t('card.masterTakeover')}</label>\r\n <PillToggle\r\n id=\"plugin-config-thinking-levels-takeover\"\r\n checked={viewValue.takeover ?? false}\r\n disabled={readonly}\r\n title={t('card.masterTakeoverHint')}\r\n onChange={(next) => { writeTl('takeover', next) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label\r\n htmlFor=\"plugin-config-thinking-levels-takeover-ui\"\r\n style={labelStyle}\r\n title={t('card.takeoverUiHint')}\r\n >{t('card.takeoverUi')}</label>\r\n <PillToggle\r\n id=\"plugin-config-thinking-levels-takeover-ui\"\r\n checked={viewValue.takeoverUi ?? false}\r\n disabled={readonly}\r\n title={t('card.takeoverUiHint')}\r\n onChange={(next) => { writeTl('takeoverUi', next) }}\r\n />\r\n </div>\r\n {/* Visible explainer (user feedback: what enabling actually\r\n buys must be readable without hunting for a tooltip). */}\r\n <p style={{ ...hintStyle, margin: '2px 0 10px' }}>{t('card.takeoverUiHint')}</p>\r\n <div style={rowStyle}>\r\n <label htmlFor=\"plugin-config-thinking-levels-downgrade\" style={labelStyle}>{t('card.allowDowngrade')}</label>\r\n <PillToggle\r\n id=\"plugin-config-thinking-levels-downgrade\"\r\n checked={viewValue.allowDowngrade ?? true}\r\n disabled={readonly || viewValue.level !== 'auto'}\r\n onChange={(next) => { writeTl('allowDowngrade', next) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label htmlFor=\"plugin-config-thinking-levels-upgrade\" style={labelStyle}>{t('card.allowUpgrade')}</label>\r\n <PillToggle\r\n id=\"plugin-config-thinking-levels-upgrade\"\r\n checked={viewValue.allowUpgrade ?? false}\r\n disabled={readonly || viewValue.level !== 'auto'}\r\n onChange={(next) => { writeTl('allowUpgrade', next) }}\r\n />\r\n </div>\r\n <div style={rowStyle}>\r\n <label\r\n htmlFor=\"plugin-config-thinking-levels-default-pricing\"\r\n style={labelStyle}\r\n title={t('card.defaultPricingHint')}\r\n >{t('card.defaultPricing')}</label>\r\n <select\r\n id=\"plugin-config-thinking-levels-default-pricing\"\r\n value={defaultPricing}\r\n disabled={readonly}\r\n style={controlStyle}\r\n onChange={(event) => { writeTl('defaultPricing', event.currentTarget.value) }}\r\n >\r\n {PRICING_OPTIONS.map((option) => (\r\n <option key={option} value={option}>{t(`card.defaultPricing.${option}`)}</option>\r\n ))}\r\n </select>\r\n </div>\r\n {writeErrorTl !== null && (\r\n <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-danger, #e5484d)' }} role=\"status\">⚠ {writeErrorTl}</p>\r\n )}\r\n {!snapshot.writable\r\n && <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-label-tertiary)' }}>{t('card.readonly')}</p>}\r\n <ModelCapabilities scope={piAiScope} ocScope={ocScope} tlScope={scope} t={t} readonly={readonly} />\r\n <DeepSeekContextSection scope={deepseekScope} t={t} readonly={readonly} />\r\n </>\r\n )}\r\n </div>\r\n )\r\n : null}\r\n </div>\r\n )\r\n}\r\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, ru, zh } from './locales.ts'\r\nimport { ModelPanel, type ModelPanelInjected } from './model-panel.tsx'\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`\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 ]\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 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 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 }\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 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 // 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,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,4BAA4B;GAC5B,mCAAmC;GACnC,uCAAuC;GACvC,8BAA8B;GAC9B,kCAAkC;GAClC,wCAAwC;GACxC,oCAAoC;GACpC,sCAAsC;GACtC,uCAAuC;GACvC,wCAAwC;GACxC,4BAA4B;GAC5B,2BAA2B;GAC3B,2BAA2B;GAC3B,+BAA+B;GAC/B,uBAAuB;GACv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