dsh-thinking-levels 3.4.0 → 3.4.3
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/dsh.plugin.json +1 -1
- package/lib/client.js +270 -151
- package/lib/client.js.map +1 -1
- package/package.json +131 -131
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["providerNameStyle","modelRowStyle","labelStyle","providersOf","useSyncExternalStore","useState","useRef","useCallback","useMemo","useSyncExternalStore","useState","useState"],"sources":["../src/client/locales.ts","../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). */\n\n/** Dictionary namespace owned by this plugin. */\nexport const NS = 'thinking-levels'\n\n/** Simplified Chinese dictionary (the key-set source of truth). */\nexport const zh = {\n 'card.title': '思考档位',\n 'family.title': '起子插件设置',\n 'card.description': '在模型选择器中可选 Auto(mask):按工具调用历史自动在 low / high / max 间调度后提交 API。此处配置默认档位、调度边界与模型能力(档位 → 网关线上值映射)。',\n 'card.level': '默认档位',\n 'card.level.off': 'off — 关闭思考(仅手动,永不自动选择)',\n 'card.level.on': 'on — 开启思考(仅 toggle 型模型;只发 enable_thinking,不发 effort)',\n 'card.level.minimal': 'minimal — 最低(极轻任务)',\n 'card.level.low': 'low — 低(简单任务,廉价轮保持廉价)',\n 'card.level.medium': 'medium — 中',\n 'card.level.high': 'high — 高(官方默认)',\n 'card.level.xhigh': 'xhigh — 特高',\n 'card.level.max': 'max — 最大(重任务)',\n 'card.level.auto': 'auto — 按工具历史自动调度(默认)',\n 'card.enabled': '启用',\n 'card.allowDowngrade': '允许降档(auto 可降至 low)',\n 'card.allowUpgrade': '允许升档(auto 可升至 max)',\n 'card.unavailable': '设置命名空间不可用:请确认 dsh-thinking-levels 已装配进 profile。',\n 'card.readonly': '只读',\n 'card.capabilities': '模型能力(llm-pi-ai 自定义提供方)',\n 'card.capabilities.hint': '直接读写 llm-pi-ai 配置:勾选档位并填写发送给网关的线上值(例如 high → ultra);off 留空表示不发送。视觉决定图片输入;思考开关决定 enable_thinking 置位;thinkingFormat 决定 wire 序列化格式。',\n 'card.capabilities.empty': 'llm-pi-ai 中没有已配置模型的自定义提供方。请先在「设置 → 模型」添加提供方与模型。',\n 'card.capabilities.unavailable': 'llm-pi-ai 设置命名空间不可用。',\n 'card.capabilities.none': '(无模型)',\n 'card.capabilities.search': '搜索模型(名称或 ID)…',\n 'card.capabilities.noMatches': '没有匹配的模型',\n 'card.capabilities.quickSettings': '一键设置',\n 'card.capabilities.presetOfficial': '应用到全部:Off / High / Max(官方 DeepSeek 风格)',\n 'card.capabilities.presetGeneric': '应用到全部:Off / Low / Medium / High(通用)',\n 'card.capabilities.vendor': '提供方',\n 'card.capabilities.developerRole': '网关不支持 developer 角色',\n 'card.capabilities.developerRoleHint': '官方兼容开关(dsh ≥ v0.1.0-rc.8):写入路由级 compat.supportsDeveloperRole: false,系统提示词按 system 角色发送,修复 vLLM / SGLang 等网关的 Unexpected message role 400。取消勾选 = 删除该字段、恢复继承。',\n 'card.capabilities.expandProvider': '展开提供方',\n 'card.capabilities.collapseProvider': '收起提供方',\n 'card.capabilities.openModelSettings': '打开模型设置',\n 'card.capabilities.closeModelSettings': '收起模型设置',\n 'card.capabilities.vision': '视觉模型',\n 'card.capabilities.thinking': '思考模型',\n 'card.capabilities.supportsEffort': '支持 think effort',\n 'card.capabilities.efforts': '思考档位(勾选后填写线上值)',\n 'card.capabilities.wirePlaceholder': '线上值,如 ultra',\n 'card.capabilities.offPlaceholder': '留空 = 不发送',\n 'card.capabilities.atLeastThinking': '至少需要一个思考档位(off 除外)',\n 'card.capabilities.applyLevel': '应用此档位',\n 'card.capabilities.restoreDefault': '恢复默认档位',\n 'card.capabilities.unsaved': '未保存',\n 'card.capabilities.saveChanges': '保存更改',\n 'card.capabilities.saved': '已保存',\n 'card.capabilities.thinkingFormat': '思考格式',\n 'card.capabilities.thinkingFormat.inherit': '继承',\n 'card.capabilities.contextWindow': '上下文窗口上限',\n 'card.capabilities.contextCustomPlaceholder': '自定义整数,如 256000',\n 'card.capabilities.contextClear': '清除',\n 'card.capabilities.contextInteger': '上下文长度必须是整数(2000-1000000)',\n 'card.capabilities.contextRange': '上下文长度必须在 2000 到 1000000 之间',\n 'card.capabilities.contextHint': '选择预设或输入整数(2000–1000000),写入 llm-pi-ai 供上下文压力/压缩使用,无需重启即对下一请求生效。',\n 'input.context.title': '上下文窗口',\n 'input.context.globalHint': '全局生效:作用于所有使用该模型的会话(清除可恢复默认)',\n 'input.context.unset': '未设',\n 'input.context.custom': '自定义',\n 'input.context.noModel': '暂无会话模型',\n 'input.context.customPlaceholder': '自定义整数,如 256000',\n 'input.context.apply': '应用',\n 'input.context.clear': '清除',\n 'input.context.integer': '上下文长度必须是整数(2000-1000000)',\n 'input.context.range': '上下文长度必须在 2000 到 1000000 之间',\n 'model.panel.choose': '选择模型',\n 'model.panel.loading': '模型目录加载中…',\n 'model.panel.empty': '没有可用模型',\n 'model.panel.window': '窗口',\n 'model.panel.noTarget': '该模型没有可写的配置项',\n 'card.capabilities.failed': '保存失败:配置被拒绝或冲突,请检查值。',\n} satisfies Record<string, string>\n\n/** English dictionary (keys mirror zh). */\nexport const en: Record<keyof typeof zh, string> = {\n 'card.title': 'Thinking Levels',\n 'family.title': 'Qizi Plugin Settings',\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).',\n 'card.level': 'Default level',\n 'card.level.off': 'off — disable thinking (manual only, never auto-picked)',\n 'card.level.on': 'on — enable thinking (toggle-only models only; sends enable_thinking, never an effort)',\n 'card.level.minimal': 'minimal — least (very light tasks)',\n 'card.level.low': 'low — cheap rounds stay cheap',\n 'card.level.medium': 'medium — medium',\n 'card.level.high': 'high — the official default',\n 'card.level.xhigh': 'xhigh — extra high',\n 'card.level.max': 'max — heavy work',\n 'card.level.auto': 'auto — schedule from tool history (default)',\n 'card.enabled': 'Enabled',\n 'card.allowDowngrade': 'Allow downgrade (auto may drop to low)',\n 'card.allowUpgrade': 'Allow upgrade (auto may lift to max)',\n 'card.unavailable': 'Settings namespace unavailable: make sure dsh-thinking-levels is assembled into this profile.',\n 'card.readonly': 'Read-only',\n 'card.capabilities': 'Model capabilities (llm-pi-ai custom providers)',\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.',\n 'card.capabilities.empty': 'No custom provider has models configured in llm-pi-ai. Add a provider and models under Settings → Models first.',\n 'card.capabilities.unavailable': 'The llm-pi-ai settings namespace is unavailable.',\n 'card.capabilities.none': '(no models)',\n 'card.capabilities.search': 'Search models by name or ID…',\n 'card.capabilities.noMatches': 'No matching models',\n 'card.capabilities.quickSettings': 'Quick settings',\n 'card.capabilities.presetOfficial': 'Apply to all: Off / High / Max (official DeepSeek style)',\n 'card.capabilities.presetGeneric': 'Apply to all: Off / Low / Medium / High (generic)',\n 'card.capabilities.vendor': 'Provider',\n 'card.capabilities.developerRole': 'Gateway rejects the developer role',\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.',\n 'card.capabilities.expandProvider': 'Expand provider',\n 'card.capabilities.collapseProvider': 'Collapse provider',\n 'card.capabilities.openModelSettings': 'Open model settings',\n 'card.capabilities.closeModelSettings': 'Collapse model settings',\n 'card.capabilities.vision': 'Vision model',\n 'card.capabilities.thinking': 'Thinking model',\n 'card.capabilities.supportsEffort': 'Supports think effort',\n 'card.capabilities.efforts': 'Thinking effort levels (tick, then enter the wire value)',\n 'card.capabilities.wirePlaceholder': 'Wire value, e.g. ultra',\n 'card.capabilities.offPlaceholder': 'Empty = do not send',\n 'card.capabilities.atLeastThinking': 'Select at least one thinking level (other than off)',\n 'card.capabilities.applyLevel': 'Apply levels',\n 'card.capabilities.restoreDefault': 'Restore defaults',\n 'card.capabilities.unsaved': 'Unsaved',\n 'card.capabilities.saveChanges': 'Save changes',\n 'card.capabilities.saved': 'Saved',\n 'card.capabilities.thinkingFormat': 'Thinking format',\n 'card.capabilities.thinkingFormat.inherit': 'Inherit',\n 'card.capabilities.contextWindow': 'Context window limit',\n 'card.capabilities.contextCustomPlaceholder': 'Custom integer, e.g. 256000',\n 'card.capabilities.contextClear': 'Clear',\n 'card.capabilities.contextInteger': 'Context length must be an integer (2000-1000000)',\n 'card.capabilities.contextRange': 'Context length must be between 2000 and 1000000',\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.',\n 'input.context.title': 'Context window',\n 'input.context.globalHint': 'Applies globally to every session using this model (Clear restores the default)',\n 'input.context.unset': 'Unset',\n 'input.context.custom': 'Custom',\n 'input.context.noModel': 'No session model yet',\n 'input.context.customPlaceholder': 'Custom integer, e.g. 256000',\n 'input.context.apply': 'Apply',\n 'input.context.clear': 'Clear',\n 'input.context.integer': 'Context length must be an integer (2000-1000000)',\n 'input.context.range': 'Context length must be between 2000 and 1000000',\n 'model.panel.choose': 'Choose model',\n 'model.panel.loading': 'Loading the model directory…',\n 'model.panel.empty': 'No models available',\n 'model.panel.window': 'Window',\n 'model.panel.noTarget': 'No writable config entry for this model',\n 'card.capabilities.failed': 'Save failed: the value was rejected or conflicted. Check it.',\n}\n\n/** Japanese dictionary (keys mirror zh). */\nexport const ja: Record<keyof typeof zh, string> = {\n 'card.title': '思考レベル',\n 'family.title': '起子プラグイン設定',\n 'card.description': 'モデルセレクターで Auto(マスク)を選択すると、ツール呼び出し履歴から low / high / max を自動スケジュールして API に送信します。ここでは既定レベル、スケジューラーの境界、モデル能力(レベル → ゲートウェイ送信値のマッピング)を設定します。',\n 'card.level': '既定レベル',\n 'card.level.off': 'off — 思考を無効化(手動のみ、自動選択はされません)',\n 'card.level.on': 'on — 思考を有効化(トグルのみのモデル向け。enable_thinking のみ送信、effort は送信しません)',\n 'card.level.minimal': 'minimal — 最小(非常に軽いタスク)',\n 'card.level.low': 'low — 低(軽いラウンドは軽いまま)',\n 'card.level.medium': 'medium — 中',\n 'card.level.high': 'high — 高(公式既定値)',\n 'card.level.xhigh': 'xhigh — 特高',\n 'card.level.max': 'max — 最大(重いタスク)',\n 'card.level.auto': 'auto — ツール履歴から自動スケジュール(既定)',\n 'card.enabled': '有効',\n 'card.allowDowngrade': '降格を許可(auto は low まで下げられる)',\n 'card.allowUpgrade': '昇格を許可(auto は max まで上げられる)',\n 'card.unavailable': '設定名前空間が利用できません:dsh-thinking-levels が profile に組み込まれているか確認してください。',\n 'card.readonly': '読み取り専用',\n 'card.capabilities': 'モデル能力(llm-pi-ai カスタムプロバイダー)',\n 'card.capabilities.hint': 'llm-pi-ai 設定を直接読み書きします:レベルにチェックを入れ、ゲートウェイに送信する値を入力(例:high → ultra)。off を空欄にすると送信しません。視覚は画像入力を決定、思考トグルは enable_thinking を制御、thinkingFormat は wire シリアライズ形式を選択します。',\n 'card.capabilities.empty': 'llm-pi-ai にモデルが設定されたカスタムプロバイダーがありません。先に「設定 → モデル」でプロバイダーとモデルを追加してください。',\n 'card.capabilities.unavailable': 'llm-pi-ai の設定名前空間が利用できません。',\n 'card.capabilities.none': '(モデルなし)',\n 'card.capabilities.search': 'モデル名または ID で検索…',\n 'card.capabilities.noMatches': '一致するモデルがありません',\n 'card.capabilities.quickSettings': 'クイック設定',\n 'card.capabilities.presetOfficial': 'すべてに適用:Off / High / Max(公式 DeepSeek 形式)',\n 'card.capabilities.presetGeneric': 'すべてに適用:Off / Low / Medium / High(汎用)',\n 'card.capabilities.vendor': 'プロバイダー',\n 'card.capabilities.developerRole': 'ゲートウェイは developer ロール非対応',\n 'card.capabilities.developerRoleHint': '公式互換スイッチ(dsh ≥ v0.1.0-rc.8):ルートレベルの compat.supportsDeveloperRole: false を書き込み、システムプロンプトを system ロールで送信します。vLLM / SGLang などの Unexpected message role 400 を修正。チェックを外すとフィールドを削除し継承に戻します。',\n 'card.capabilities.expandProvider': 'プロバイダーを展開',\n 'card.capabilities.collapseProvider': 'プロバイダーを折りたたむ',\n 'card.capabilities.openModelSettings': 'モデル設定を開く',\n 'card.capabilities.closeModelSettings': 'モデル設定を折りたたむ',\n 'card.capabilities.vision': '視覚モデル',\n 'card.capabilities.thinking': '思考モデル',\n 'card.capabilities.supportsEffort': 'think effort をサポート',\n 'card.capabilities.efforts': '思考レベル(チェック後、送信値を入力)',\n 'card.capabilities.wirePlaceholder': '送信値(例:ultra)',\n 'card.capabilities.offPlaceholder': '空欄 = 送信しない',\n 'card.capabilities.atLeastThinking': '思考レベルを 1 つ以上選択してください(off 以外)',\n 'card.capabilities.applyLevel': 'レベルを適用',\n 'card.capabilities.restoreDefault': '既定値に戻す',\n 'card.capabilities.unsaved': '未保存',\n 'card.capabilities.saveChanges': '変更を保存',\n 'card.capabilities.saved': '保存済み',\n 'card.capabilities.thinkingFormat': '思考形式',\n 'card.capabilities.thinkingFormat.inherit': '継承',\n 'card.capabilities.contextWindow': 'コンテキストウィンドウ上限',\n 'card.capabilities.contextCustomPlaceholder': 'カスタム整数(例:256000)',\n 'card.capabilities.contextClear': 'クリア',\n 'card.capabilities.contextInteger': 'コンテキスト長は整数で入力してください(2000-1000000)',\n 'card.capabilities.contextRange': 'コンテキスト長は 2000 から 1000000 の範囲で指定してください',\n 'card.capabilities.contextHint': 'プリセットを選ぶか整数を入力(2000–1000000)。llm-pi-ai に書き込まれ、コンテキスト圧力/圧縮に使用され、再起動なしで次のリクエストに反映されます。',\n 'input.context.title': 'コンテキストウィンドウ',\n 'input.context.globalHint': 'グローバルに有効:このモデルを使用するすべてのセッションに適用されます(クリアで既定値に戻ります)',\n 'input.context.unset': '未設定',\n 'input.context.custom': 'カスタム',\n 'input.context.noModel': 'セッションモデルがまだありません',\n 'input.context.customPlaceholder': 'カスタム整数(例:256000)',\n 'input.context.apply': '適用',\n 'input.context.clear': 'クリア',\n 'input.context.integer': 'コンテキスト長は整数で入力してください(2000-1000000)',\n 'input.context.range': 'コンテキスト長は 2000 から 1000000 の範囲で指定してください',\n 'model.panel.choose': 'モデルを選択',\n 'model.panel.loading': 'モデルディレクトリを読み込み中…',\n 'model.panel.empty': '利用可能なモデルがありません',\n 'model.panel.window': 'ウィンドウ',\n 'model.panel.noTarget': 'このモデルには書き込み可能な設定項目がありません',\n 'card.capabilities.failed': '保存に失敗しました:値が拒否されたか競合しています。確認してください。',\n}\n\n/** Korean dictionary (keys mirror zh). */\nexport const ko: Record<keyof typeof zh, string> = {\n 'card.title': '사고 수준',\n 'family.title': '起子 플러그인 설정',\n 'card.description': '모델 선택기에서 Auto(마스크)를 선택하면 도구 호출 기록을 기반으로 low / high / max 를 자동 스케줄링하여 API에 제출합니다. 여기서 기본 수준, 스케줄러 경계, 모델 기능(수준 → 게이트웨이 전송 값 매핑)을 구성합니다.',\n 'card.level': '기본 수준',\n 'card.level.off': 'off — 사고 비활성화(수동 전용, 자동 선택 안 됨)',\n 'card.level.on': 'on — 사고 활성화(토글 전용 모델용. enable_thinking만 전송, effort는 전송하지 않음)',\n 'card.level.minimal': 'minimal — 최소(매우 가벼운 작업)',\n 'card.level.low': 'low — 낮음(가벼운 라운드는 가볍게 유지)',\n 'card.level.medium': 'medium — 중간',\n 'card.level.high': 'high — 높음(공식 기본값)',\n 'card.level.xhigh': 'xhigh — 특별히 높음',\n 'card.level.max': 'max — 최대(무거운 작업)',\n 'card.level.auto': 'auto — 도구 기록에서 자동 스케줄링(기본값)',\n 'card.enabled': '활성화',\n 'card.allowDowngrade': '다운그레이드 허용(auto가 low까지 내릴 수 있음)',\n 'card.allowUpgrade': '업그레이드 허용(auto가 max까지 올릴 수 있음)',\n 'card.unavailable': '설정 네임스페이스를 사용할 수 없습니다: dsh-thinking-levels가 이 profile에 조립되었는지 확인하세요.',\n 'card.readonly': '읽기 전용',\n 'card.capabilities': '모델 기능(llm-pi-ai 사용자 지정 제공자)',\n 'card.capabilities.hint': 'llm-pi-ai 설정을 직접 읽고 씁니다: 수준을 체크하고 게이트웨이에 보낼 값을 입력(예: high → ultra). off를 비워 두면 전송하지 않습니다. 시각은 이미지 입력을 결정하고, 사고 토글은 enable_thinking을 제어하며, thinkingFormat은 wire 직렬화 형식을 선택합니다.',\n 'card.capabilities.empty': 'llm-pi-ai에 모델이 구성된 사용자 지정 제공자가 없습니다. 먼저 「설정 → 모델」에서 제공자와 모델을 추가하세요.',\n 'card.capabilities.unavailable': 'llm-pi-ai 설정 네임스페이스를 사용할 수 없습니다.',\n 'card.capabilities.none': '(모델 없음)',\n 'card.capabilities.search': '모델 이름 또는 ID로 검색…',\n 'card.capabilities.noMatches': '일치하는 모델이 없습니다',\n 'card.capabilities.quickSettings': '빠른 설정',\n 'card.capabilities.presetOfficial': '전체에 적용: Off / High / Max(공식 DeepSeek 방식)',\n 'card.capabilities.presetGeneric': '전체에 적용: Off / Low / Medium / High(일반 방식)',\n 'card.capabilities.vendor': '제공자',\n 'card.capabilities.developerRole': '게이트웨이가 developer 역할 미지원',\n 'card.capabilities.developerRoleHint': '공식 호환 스위치(dsh ≥ v0.1.0-rc.8): 라우트 수준 compat.supportsDeveloperRole: false 를 기록하여 시스템 프롬프트를 system 역할로 전송합니다. vLLM / SGLang 등의 Unexpected message role 400 을 수정. 체크 해제 시 필드를 삭제하고 상속을 복원합니다.',\n 'card.capabilities.expandProvider': '제공자 펼치기',\n 'card.capabilities.collapseProvider': '제공자 접기',\n 'card.capabilities.openModelSettings': '모델 설정 열기',\n 'card.capabilities.closeModelSettings': '모델 설정 접기',\n 'card.capabilities.vision': '시각 모델',\n 'card.capabilities.thinking': '사고 모델',\n 'card.capabilities.supportsEffort': 'think effort 지원',\n 'card.capabilities.efforts': '사고 수준(체크 후 전송 값 입력)',\n 'card.capabilities.wirePlaceholder': '전송 값(예: ultra)',\n 'card.capabilities.offPlaceholder': '비워 둠 = 전송하지 않음',\n 'card.capabilities.atLeastThinking': '사고 수준을 하나 이상 선택하세요(off 제외)',\n 'card.capabilities.applyLevel': '수준 적용',\n 'card.capabilities.restoreDefault': '기본값 복원',\n 'card.capabilities.unsaved': '저장되지 않음',\n 'card.capabilities.saveChanges': '변경 사항 저장',\n 'card.capabilities.saved': '저장됨',\n 'card.capabilities.thinkingFormat': '사고 형식',\n 'card.capabilities.thinkingFormat.inherit': '상속',\n 'card.capabilities.contextWindow': '컨텍스트 창 상한',\n 'card.capabilities.contextCustomPlaceholder': '사용자 지정 정수(예: 256000)',\n 'card.capabilities.contextClear': '지우기',\n 'card.capabilities.contextInteger': '컨텍스트 길이는 정수여야 합니다 (2000-1000000)',\n 'card.capabilities.contextRange': '컨텍스트 길이는 2000에서 1000000 사이여야 합니다',\n 'card.capabilities.contextHint': '프리셋을 선택하거나 정수를 입력하세요(2000–1000000). llm-pi-ai에 기록되어 컨텍스트 압력/압축에 사용되며, 재시작 없이 다음 요청에 반영됩니다.',\n 'input.context.title': '컨텍스트 창',\n 'input.context.globalHint': '전역 적용: 이 모델을 사용하는 모든 세션에 적용됩니다(지우면 기본값 복원)',\n 'input.context.unset': '미설정',\n 'input.context.custom': '사용자 지정',\n 'input.context.noModel': '세션 모델이 아직 없습니다',\n 'input.context.customPlaceholder': '사용자 지정 정수(예: 256000)',\n 'input.context.apply': '적용',\n 'input.context.clear': '지우기',\n 'input.context.integer': '컨텍스트 길이는 정수여야 합니다 (2000-1000000)',\n 'input.context.range': '컨텍스트 길이는 2000에서 1000000 사이여야 합니다',\n 'model.panel.choose': '모델 선택',\n 'model.panel.loading': '모델 디렉터리를 불러오는 중…',\n 'model.panel.empty': '사용 가능한 모델이 없습니다',\n 'model.panel.window': '창',\n 'model.panel.noTarget': '이 모델에는 쓰기 가능한 설정 항목이 없습니다',\n 'card.capabilities.failed': '저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요.',\n}\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","/**\n * Model-seat panel for the composer (`conversation.input.model`).\n *\n * Why this seat: the shipped `ModelSelect` renders no slots inside its popup,\n * so a plugin can never contribute *into* that panel — the working pattern\n * (proven by dsh-reasoning-effort) is to occupy the model seat itself: one\n * registered entry named after the seat with `priority: -1` replaces the\n * shipped trigger and popup outright. This component then renders its own\n * picker over the harness's shared model directory (`modelDirectories`\n * service), so model switching keeps working, and adds what the official\n * popup cannot offer: a context-window editor on every model line.\n *\n * Per-line context window (the \"max context window\" moved into each line):\n * each model row carries a compact chip showing the model's effective\n * `contextWindow`; clicking it opens an inline editor row (preset slider,\n * custom-integer input, Clear). Writes follow the same two-family discipline\n * the retired composer pill used (both consumed live by\n * `resolveModelInfo(...).context.contextWindow`, effective on the next\n * request without a restart):\n * - Custom gateways (`llm-pi-ai` providers): writes the model entry's\n * `contextWindow` under `providers[provider].models[i]`; a gateway model\n * missing from the config has no write target and renders the chip disabled.\n * - Official DeepSeek (`deepseek-official`, the `llm-deepseek` entry): writes\n * the catalog model's `contextWindow` when listed, otherwise caps via\n * `defaultContextWindow`.\n *\n * Graceful degradation: when the harness provides no `modelDirectories`\n * service (older lines) the registration is skipped entirely and the shipped\n * model selector stays untouched.\n */\nimport { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react'\nimport type { CSSProperties, JSX } from 'react'\nimport type { SettingsScope } from './scope-face.ts'\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\n\n/** The official DeepSeek provider route owned by the llm-deepseek adapter. */\nconst DEEPSEEK_PROVIDER = 'deepseek-official'\n/** llm-deepseek's native default context capacity (DEFAULT_CONTEXT_WINDOW). */\nconst DEEPSEEK_DEFAULT_WINDOW = 1_000_000\n/** Slider stop an unset window parks on: the thumb needs a position, the readout stays \"unset\". */\nconst UNSET_STOP_INDEX = CONTEXT_WINDOW_PRESETS.findIndex(preset => preset.value === 256_000)\n\n/** One injected face: the shared model directory plus the two config forms. */\nexport interface ModelPanelInjected {\n /** The session's shared model directory store, loader and selector. */\n directory: ModelDirectoryFace\n /** The `llm-pi-ai` config form (custom gateway models). */\n piAiScope: SettingsScope<unknown>\n /** The `llm-deepseek` config form (official DeepSeek models). */\n deepseekScope: SettingsScope<unknown>\n}\n\n/** Full props: the injected face + the session standard seat + locale copy. */\nexport interface ModelPanelProps extends ModelPanelInjected {\n /** The session id of the slot's owning conversation (standard seat). */\n sessionId: string\n /** Locale copy thunk. */\n t: (key: string) => string\n}\n\n/* ── harness faces (mirrored in src/types/contracts.d.ts) ──────────────── */\n\n/** The narrow model-directory slice this panel reads. */\ninterface DirectoryStateLike {\n status: string\n groups: readonly {\n id: string\n name?: string\n label?: string\n models: readonly { id: string; name: string; description?: string }[]\n }[]\n current: { provider: string; model: string } | null\n error: string | null\n}\n\n/* ── shared inline styling (no CSS modules in the client bundle) ───────── */\n\nconst rootStyle: CSSProperties = { position: 'relative', display: 'inline-flex' }\n\nconst triggerStyle: CSSProperties = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '6px',\n height: '26px',\n padding: '0 10px',\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-primary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '8px',\n fontSize: '12px',\n lineHeight: '18px',\n cursor: 'pointer',\n whiteSpace: 'nowrap',\n maxWidth: '220px',\n}\n\nconst triggerNameStyle: CSSProperties = {\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n}\n\nconst chevronStyle: CSSProperties = {\n flex: '0 0 auto',\n fontSize: '9px',\n color: 'var(--dsw-alias-label-tertiary)',\n}\n\nconst popStyle: CSSProperties = {\n position: 'absolute',\n bottom: 'calc(100% + 8px)',\n left: '0',\n zIndex: 1200,\n width: '320px',\n padding: '8px',\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\n color: 'var(--dsw-alias-label-primary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '10px',\n boxShadow: '0 8px 28px rgba(0,0,0,0.18)',\n display: 'flex',\n flexDirection: 'column',\n gap: '4px',\n}\n\nconst backdropStyle: CSSProperties = { position: 'fixed', inset: 0, zIndex: 1199 }\n\nconst modelsStyle: CSSProperties = { maxHeight: '320px', overflowY: 'auto', display: 'flex', flexDirection: 'column', gap: '2px' }\n\nconst providerToggleStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '6px',\n width: '100%',\n padding: '6px 8px',\n border: 'none',\n borderRadius: '6px',\n background: 'transparent',\n color: 'var(--dsw-alias-label-secondary)',\n font: 'inherit',\n fontSize: '12px',\n cursor: 'pointer',\n textAlign: 'left',\n}\n\nconst providerNameStyle: CSSProperties = { flex: '1 1 auto', fontWeight: 600 }\n\nconst providerMetaStyle: CSSProperties = {\n flex: '0 0 auto',\n color: 'var(--dsw-alias-label-tertiary)',\n fontSize: '11px',\n}\n\nconst modelRowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '6px',\n width: '100%',\n padding: '6px 8px 6px 18px',\n border: 'none',\n borderRadius: '6px',\n background: 'transparent',\n color: 'var(--dsw-alias-label-primary)',\n font: 'inherit',\n fontSize: '12px',\n cursor: 'pointer',\n textAlign: 'left',\n}\n\nconst modelRowActiveStyle: CSSProperties = {\n ...modelRowStyle,\n background: 'var(--dsw-alias-state-business-primary-weak, rgba(77,107,254,0.10))',\n}\n\nconst modelCopyStyle: CSSProperties = {\n flex: '1 1 auto',\n minWidth: 0,\n display: 'flex',\n flexDirection: 'column',\n gap: '1px',\n}\n\nconst modelNameStyle: CSSProperties = { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }\n\nconst modelDescriptionStyle: CSSProperties = {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n fontSize: '11px',\n color: 'var(--dsw-alias-label-tertiary)',\n}\n\nconst checkStyle: CSSProperties = { flex: '0 0 auto', color: 'var(--dsw-alias-state-business-primary)' }\n\nconst chipStyle: CSSProperties = {\n flex: '0 0 auto',\n height: '18px',\n padding: '0 6px',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '5px',\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-secondary)',\n fontSize: '11px',\n lineHeight: '16px',\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontVariantNumeric: 'tabular-nums',\n cursor: 'pointer',\n whiteSpace: 'nowrap',\n}\n\nconst chipDisabledStyle: CSSProperties = { ...chipStyle, cursor: 'default', opacity: 0.55 }\n\nconst editorRowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '6px',\n margin: '2px 8px 6px 18px',\n padding: '6px',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '6px',\n background: 'var(--dsw-alias-bg-surface, #fff)',\n fontSize: '12px',\n}\n\nconst labelStyle: CSSProperties = {\n flex: '0 0 auto',\n color: 'var(--dsw-alias-label-tertiary)',\n whiteSpace: 'nowrap',\n}\n\nconst sliderStyle: CSSProperties = {\n flex: '1 1 auto',\n minWidth: '48px',\n height: '14px',\n margin: '0',\n accentColor: 'var(--dsw-alias-state-business-primary)',\n cursor: 'pointer',\n}\n\nconst valueStyle: CSSProperties = {\n flex: '0 0 auto',\n minWidth: '36px',\n textAlign: 'right',\n color: 'var(--dsw-alias-label-primary)',\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontVariantNumeric: 'tabular-nums',\n}\n\nconst actionButtonStyle: CSSProperties = {\n flex: '0 0 auto',\n height: '18px',\n padding: '0 6px',\n border: '1px solid transparent',\n borderRadius: '4px',\n background: 'transparent',\n color: 'var(--dsw-alias-label-secondary)',\n font: 'inherit',\n cursor: 'pointer',\n}\n\nconst inputStyle: CSSProperties = {\n flex: '1 1 auto',\n minWidth: '0',\n boxSizing: 'border-box',\n padding: '2px 6px',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '5px',\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-primary)',\n font: 'inherit',\n}\n\nconst errorStyle: CSSProperties = {\n flex: '0 0 auto',\n color: 'var(--dsw-alias-danger, #e5484d)',\n fontSize: '11px',\n}\n\nconst statusStyle: CSSProperties = {\n padding: '10px 8px',\n fontSize: '12px',\n color: 'var(--dsw-alias-label-tertiary)',\n}\n\nconst errorBannerStyle: CSSProperties = {\n padding: '6px 8px',\n borderRadius: '6px',\n background: 'var(--dsw-alias-danger-weak, rgba(229,72,77,0.10))',\n color: 'var(--dsw-alias-danger, #e5484d)',\n fontSize: '11px',\n}\n\n/* ── helpers over the settings user layer ──────────────────────────────── */\n\n/** The user-layer `providers` value of the llm-pi-ai namespace, when present. */\nfunction providersOf(snapshot: unknown): Record<string, unknown> {\n if (typeof snapshot !== 'object' || snapshot === null) return {}\n const user = (snapshot as { user?: unknown }).user\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\n const providers = (user as Record<string, unknown>)['providers']\n return typeof providers === 'object' && providers !== null && !Array.isArray(providers)\n ? providers as Record<string, unknown>\n : {}\n}\n\n/** The user-layer `models`/`defaultContextWindow` of the llm-deepseek namespace. */\nfunction deepseekSectionOf(snapshot: unknown): {\n models?: Record<string, unknown>[]\n defaultContextWindow?: number\n} {\n if (typeof snapshot !== 'object' || snapshot === null) return {}\n const user = (snapshot as { user?: unknown }).user\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\n const section = user as { models?: unknown; defaultContextWindow?: unknown }\n const models = Array.isArray(section.models)\n ? section.models.filter((model): model is Record<string, unknown> =>\n typeof model === 'object' && model !== null && !Array.isArray(model))\n : undefined\n const defaultContextWindow = typeof section.defaultContextWindow === 'number'\n ? section.defaultContextWindow\n : undefined\n return {\n ...models === undefined ? {} : { models },\n ...defaultContextWindow === undefined ? {} : { defaultContextWindow },\n }\n}\n\n/** One model entry's declared contextWindow, when present. */\nfunction contextWindowOf(model: Record<string, unknown>): number | undefined {\n const value = model['contextWindow']\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : undefined\n}\n\n/** A provider's model entry in the llm-pi-ai user layer, when present. */\nfunction piModelEntry(\n providers: Record<string, unknown>,\n provider: string,\n model: string,\n): Record<string, unknown> | undefined {\n const profile = providers[provider] as { models?: unknown[] } | undefined\n const entry = profile !== undefined && Array.isArray(profile.models)\n ? profile.models.find((candidate): candidate is Record<string, unknown> =>\n typeof candidate === 'object' && candidate !== null && (candidate as Record<string, unknown>)['id'] === model)\n : undefined\n return entry\n}\n\n/** The slider stop nearest to a committed token count. */\nfunction stopIndexOf(value: number | undefined): number {\n if (value === undefined) return Math.max(0, UNSET_STOP_INDEX)\n let best = 0\n let bestDistance = Number.POSITIVE_INFINITY\n CONTEXT_WINDOW_PRESETS.forEach((preset, index) => {\n const distance = Math.abs(preset.value - value)\n if (distance < bestDistance) {\n bestDistance = distance\n best = index\n }\n })\n return best\n}\n\n/**\n * The model-seat panel: replaces the shipped model selector on this seat and\n * renders one picker whose every model line carries a context-window chip\n * (the \"max context window\" editor moved into each line).\n * @param props - injected directory + config forms, session seat, copy.\n */\nexport function ModelPanel({ directory, piAiScope, deepseekScope, t }: ModelPanelProps): JSX.Element {\n const state = useSyncExternalStore(\n listener => directory.store.subscribe(listener),\n () => directory.store.getSnapshot() as DirectoryStateLike,\n )\n const piSnapshot = useSyncExternalStore(\n listener => piAiScope.subscribe(listener),\n () => piAiScope.getSnapshot(),\n )\n const dsSnapshot = useSyncExternalStore(\n listener => deepseekScope.subscribe(listener),\n () => deepseekScope.getSnapshot(),\n )\n\n const [open, setOpen] = useState(false)\n const [expanded, setExpanded] = useState<ReadonlySet<string>>(() => new Set())\n const [editing, setEditing] = useState<{ provider: string; model: string } | null>(null)\n const [draft, setDraft] = useState<number | null>(null)\n const [custom, setCustom] = useState(false)\n const [raw, setRaw] = useState('')\n const [error, setError] = useState<string | null>(null)\n const [busy, setBusy] = useState(false)\n const rootRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (!open) return\n directory.load().catch(() => { /* surfaced on the shared store */ })\n }, [directory, open])\n\n const close = useCallback((): void => {\n setOpen(false)\n setEditing(null)\n setError(null)\n }, [])\n\n useEffect(() => {\n if (!open) return\n const onOutside = (event: globalThis.MouseEvent): void => {\n const target = event.target\n if (target instanceof Node && rootRef.current?.contains(target)) return\n close()\n }\n document.addEventListener('mousedown', onOutside)\n return () => document.removeEventListener('mousedown', onOutside)\n }, [close, open])\n\n const writable = piSnapshot.status === 'ready' && piSnapshot.writable\n && dsSnapshot.status === 'ready' && dsSnapshot.writable\n\n const current = useMemo(() => {\n if (state.current === null) return undefined\n for (const group of state.groups) {\n if (group.id !== state.current.provider) continue\n const model = group.models.find(candidate => candidate.id === state.current?.model)\n if (model !== undefined) return { model, name: model.name }\n }\n return undefined\n }, [state])\n\n const providers = useMemo(() => providersOf(piSnapshot), [piSnapshot])\n const dsSection = useMemo(() => deepseekSectionOf(dsSnapshot), [dsSnapshot])\n\n /** The effective window of one model line, resolved against its family. */\n const windowOf = (provider: string, model: string): number | undefined => {\n if (provider === DEEPSEEK_PROVIDER) {\n const models = dsSection.models ?? []\n const index = models.findIndex(entry => entry['id'] === model)\n return index >= 0 ? contextWindowOf(models[index]) : dsSection.defaultContextWindow\n }\n const entry = piModelEntry(providers, provider, model)\n return entry === undefined ? undefined : contextWindowOf(entry)\n }\n\n /** Whether one model line has a config write target. */\n const writableLine = (provider: string, model: string): boolean => {\n if (!writable) return false\n if (provider === DEEPSEEK_PROVIDER) return true\n return piModelEntry(providers, provider, model) !== undefined\n }\n\n /** Commit (or delete) one model line's context window. */\n const commitWindow = (provider: string, model: string, value: number | undefined): void => {\n setBusy(true)\n const done = (): void => { setBusy(false); setDraft(null) }\n if (provider === DEEPSEEK_PROVIDER) {\n const models = (deepseekSectionOf(dsSnapshot).models ?? []).map(entry => ({ ...entry }))\n const index = models.findIndex(entry => entry['id'] === model)\n const commit = index >= 0\n ? deepseekScope.set('models', models.map((entry, at) => {\n if (at !== index) return entry\n if (value === undefined) {\n const rest = { ...entry }\n delete rest['contextWindow']\n return rest\n }\n return { ...entry, contextWindow: value }\n }))\n : deepseekScope.set('defaultContextWindow', value === undefined ? DEEPSEEK_DEFAULT_WINDOW : value)\n commit.then(done, done)\n return\n }\n const next = structuredClone(providers)\n const entry = piModelEntry(next, provider, model)\n if (entry === undefined) {\n setBusy(false)\n setDraft(null)\n return\n }\n if (value === undefined) delete entry['contextWindow']\n else entry['contextWindow'] = value\n piAiScope.set('providers', next).then(done, done)\n }\n\n /** Validate and commit the custom input; empty clears. */\n const applyCustom = (): void => {\n if (editing === null) return\n const trimmed = raw.trim()\n if (trimmed === '') {\n setError(null)\n commitWindow(editing.provider, editing.model, undefined)\n return\n }\n const validation = validateContextWindow(trimmed)\n if (!validation.ok) {\n setError(t(validation.reason === 'integer' ? 'input.context.integer' : 'input.context.range'))\n return\n }\n setError(null)\n commitWindow(editing.provider, editing.model, validation.value)\n }\n\n const openEditor = (provider: string, model: string): void => {\n setEditing({ provider, model })\n setDraft(null)\n setCustom(false)\n setRaw('')\n setError(null)\n }\n\n const toggleProvider = (provider: string): void => {\n setExpanded(previous => {\n const next = new Set(previous)\n if (next.has(provider)) next.delete(provider)\n else next.add(provider)\n return next\n })\n }\n\n const chooseModel = (provider: string, model: string): void => {\n if (busy) return\n setBusy(true)\n directory.select({ provider, model })\n .then(() => { setBusy(false); close() })\n .catch(() => { setBusy(false) })\n }\n\n const triggerLabel = current?.name ?? state.current?.model ?? t('model.panel.choose')\n\n return (\n <div ref={rootRef} style={rootStyle}>\n <button\n type=\"button\"\n style={triggerStyle}\n aria-expanded={open}\n aria-haspopup=\"dialog\"\n aria-label={t('model.panel.choose')}\n title={state.current === null ? triggerLabel : `${state.current.provider}/${triggerLabel}`}\n onClick={() => { if (open) close(); else { setOpen(true); setError(null) } }}\n >\n <span style={triggerNameStyle}>{triggerLabel}</span>\n <span style={chevronStyle}>{open ? '▲' : '▼'}</span>\n </button>\n {open\n ? (\n <>\n <div style={backdropStyle} onClick={close} />\n <div style={popStyle} role=\"dialog\" aria-label={t('model.panel.choose')}>\n <div style={modelsStyle}>\n {state.status === 'loading' && state.groups.length === 0 && (\n <div style={statusStyle}>{t('model.panel.loading')}</div>\n )}\n {state.groups.map(group => {\n const isExpanded = expanded.has(group.id)\n const name = group.name ?? group.label ?? group.id\n const activeModel = state.current?.provider === group.id ? state.current.model : undefined\n return (\n <section key={group.id}>\n <button\n type=\"button\"\n style={providerToggleStyle}\n aria-expanded={isExpanded}\n onClick={() => toggleProvider(group.id)}\n >\n <span style={providerNameStyle}>{name}</span>\n <span style={providerMetaStyle}>{group.models.length}</span>\n <span style={chevronStyle}>{isExpanded ? '▼' : '▶'}</span>\n </button>\n {isExpanded && group.models.map(model => {\n const active = activeModel === model.id\n const lineWritable = writableLine(group.id, model.id)\n const lineWindow = windowOf(group.id, model.id)\n const isEditing = editing !== null\n && editing.provider === group.id\n && editing.model === model.id\n return (\n <div key={group.id + ':' + model.id}>\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={active}\n style={active ? modelRowActiveStyle : modelRowStyle}\n disabled={busy}\n onClick={() => chooseModel(group.id, model.id)}\n >\n <span style={modelCopyStyle}>\n <span style={modelNameStyle}>{model.name}</span>\n {model.description !== undefined && (\n <span style={modelDescriptionStyle}>{model.description}</span>\n )}\n </span>\n {active && <span style={checkStyle} aria-hidden=\"true\">✓</span>}\n <span\n role=\"button\"\n tabIndex={0}\n aria-label={t('input.context.title')}\n title={lineWritable\n ? t('input.context.globalHint')\n : t('model.panel.noTarget')}\n style={lineWritable && !busy ? chipStyle : chipDisabledStyle}\n onClick={event => {\n event.stopPropagation()\n if (!lineWritable || busy) return\n if (isEditing) { setEditing(null); return }\n openEditor(group.id, model.id)\n }}\n onKeyDown={event => {\n if (event.key !== 'Enter' && event.key !== ' ') return\n event.preventDefault()\n event.stopPropagation()\n if (!lineWritable || busy) return\n openEditor(group.id, model.id)\n }}\n >\n {lineWindow === undefined\n ? t('input.context.unset')\n : formatContextWindow(lineWindow)}\n </span>\n </button>\n {isEditing && (\n <div style={editorRowStyle}>\n <span style={labelStyle} title={t('input.context.globalHint')}>\n {t('model.panel.window')}\n </span>\n <input\n type=\"range\"\n min={0}\n max={CONTEXT_WINDOW_PRESETS.length - 1}\n step={1}\n value={draft ?? stopIndexOf(lineWindow)}\n disabled={busy}\n aria-label={t('input.context.title')}\n style={sliderStyle}\n onChange={event => { setDraft(Number(event.currentTarget.value)) }}\n onPointerUp={() => {\n if (draft === null) return\n commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value)\n }}\n onKeyUp={() => {\n if (draft === null) return\n commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value)\n }}\n />\n <span style={valueStyle}>\n {draft === null\n ? lineWindow === undefined ? t('input.context.unset') : formatContextWindow(lineWindow)\n : formatContextWindow(CONTEXT_WINDOW_PRESETS[draft]?.value ?? 0)}\n </span>\n {custom\n ? (\n <>\n <input\n type=\"text\"\n inputMode=\"numeric\"\n value={raw}\n disabled={busy}\n placeholder={t('input.context.customPlaceholder')}\n aria-label={t('input.context.customPlaceholder')}\n style={inputStyle}\n onChange={event => { setRaw(event.currentTarget.value) }}\n onKeyDown={event => { if (event.key === 'Enter') applyCustom() }}\n />\n <button\n type=\"button\"\n disabled={busy}\n style={actionButtonStyle}\n onClick={applyCustom}\n >\n {t('input.context.apply')}\n </button>\n </>\n )\n : (\n <>\n <button\n type=\"button\"\n disabled={busy}\n aria-label={t('input.context.custom')}\n title={t('input.context.custom')}\n style={actionButtonStyle}\n onClick={() => { setCustom(true); setError(null) }}\n >\n ⋯\n </button>\n <button\n type=\"button\"\n disabled={busy || lineWindow === undefined}\n style={{\n ...actionButtonStyle,\n opacity: lineWindow === undefined ? 0.55 : 1,\n }}\n onClick={() => {\n setDraft(null)\n setError(null)\n commitWindow(group.id, model.id, undefined)\n }}\n >\n {t('input.context.clear')}\n </button>\n </>\n )}\n {error !== null && <span style={errorStyle}>{error}</span>}\n </div>\n )}\n </div>\n )\n })}\n </section>\n )\n })}\n {state.status !== 'loading' && state.groups.length === 0 && (\n <div style={statusStyle}>{t('model.panel.empty')}</div>\n )}\n </div>\n {state.error !== null && <div style={errorBannerStyle} role=\"status\">{state.error}</div>}\n </div>\n </>\n )\n : null}\n </div>\n )\n}\n\nexport default ModelPanel\n","/**\n * Thinking-levels settings card — the family settings tab face of the\n * dsh-thinking-levels plugin.\n *\n * The card binds this plugin's entry config through the `configForms` cordis\n * service and renders its fields: the level picker\n * (off / on / minimal / low / medium / high / xhigh / max / auto) plus the\n * scheduler toggles. Every change commits immediately through the scope (no\n * staged form): the decision is read per model request, so a committed change\n * applies to the next request without a restart.\n *\n * Below the scheduler rows, a \"model capabilities\" block edits the\n * `llm-pi-ai` namespace directly (read + write through the same settings\n * transport), borrowing dsh-thinking-effort's presentation: providers group\n * their models, each model row shows capability badges and expands into a\n * per-level editor where a level is ticked and its gateway wire value entered\n * (e.g. `high` → `ultra`); `off` left empty means \"do not send\". A search box\n * filters models and one-click presets apply official/generic level sets to\n * every thinking model.\n *\n * Kept dependency-free beyond react: the scopes are subscribed with\n * `useSyncExternalStore`, and the controls are plain HTML so the client bundle\n * needs no CSS modules and no primitives value import.\n */\nimport { useState, useSyncExternalStore } from 'react'\nimport type { CSSProperties, JSX } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { SettingsScope } from './scope-face.ts'\nimport type { EffortId } from '../thinking-level.ts'\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\nimport type { ThinkingLevelsConfig } from '../index.ts'\n\n/** One injected face: the plugin's own scope plus the llm-pi-ai namespace scope. */\nexport interface ThinkingLevelsCardInjected {\n scope: SettingsScope<ThinkingLevelsConfig>\n /** The `llm-pi-ai` settings namespace, read and written for model capabilities. */\n piAiScope: SettingsScope<unknown>\n}\n\n/** Full props: locale seat + the injected scopes. */\nexport type ThinkingLevelsCardProps = PropsLocale<'thinking-levels'> & ThinkingLevelsCardInjected\n\n/** The user-facing levels, in picker order: eight standard levels plus the auto scheduler sentinel. */\nconst EFFORT_OPTIONS: readonly EffortId[] = [\n 'off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'auto',\n]\n\n/**\n * The levels the capability editor offers. This is the llm-pi-ai\n * `reasoningEfforts` table-key space — pi-ai's fixed seven levels (schema\n * rejects any other key). `on` (the enable-thinking toggle) is a selector /\n * injection-level concept, expressed here by the `off` + `high` pair\n * (enable_thinking false/true), so it has no table key of its own.\n */\nconst CAPABILITY_LEVELS: readonly EffortId[] = [\n 'off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',\n] as const\n\n/** One-click presets, mirroring dsh-thinking-effort: official DeepSeek style and a generic set. */\nconst PRESETS: readonly { key: 'official' | 'generic'; levels: Record<string, unknown> }[] = [\n { key: 'official', levels: { off: null, high: 'high', max: 'max' } },\n { key: 'generic', levels: { off: null, low: 'low', medium: 'medium', high: 'high' } },\n]\n\n/** The wire thinking formats offered (llm-pi-ai's nameable set, incl. qwen-chat-template). */\nconst THINKING_FORMATS = [\n 'openai', 'deepseek', 'openrouter', 'together', 'zai', 'qwen',\n 'qwen-chat-template', 'string-thinking', 'ant-ling',\n] as const\n\n/* ── shared row styling (inline; keeps the client bundle CSS-free) ──────── */\n\nconst rowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '12px',\n padding: '6px 0',\n fontSize: '13px',\n lineHeight: '20px',\n}\n\nconst labelStyle: CSSProperties = { margin: 0, color: 'var(--dsw-alias-label-primary)' }\n\nconst controlStyle: CSSProperties = {\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-primary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '3px 8px',\n fontSize: '13px',\n}\n\nconst sectionStyle: CSSProperties = {\n marginTop: '14px',\n paddingTop: '12px',\n borderTop: '1px solid var(--dsw-alias-border-l2)',\n}\n\nconst fieldStyle: CSSProperties = { display: 'flex', flexDirection: 'column', gap: '4px' }\n\nconst fieldLabelStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\n\nconst hintStyle: CSSProperties = { margin: '6px 0 0', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\n\n/** Provider group shell: an outlined row grouping its models. */\nconst providerStyle: CSSProperties = {\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '8px',\n margin: '8px 0 0',\n overflow: 'hidden',\n}\n\nconst providerHeadStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '7px 10px',\n background: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\n}\n\nconst providerNameStyle: CSSProperties = {\n margin: 0,\n flex: '1 1 auto',\n minWidth: 0,\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '12px',\n lineHeight: '18px',\n fontWeight: 600,\n color: 'var(--dsw-alias-label-primary)',\n overflowWrap: 'anywhere',\n}\n\nconst providerBadgeStyle: CSSProperties = {\n margin: 0,\n fontSize: '10px',\n lineHeight: '16px',\n color: 'var(--dsw-alias-label-tertiary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '0 5px',\n whiteSpace: 'nowrap',\n}\n\nconst iconButtonStyle: CSSProperties = {\n background: 'none',\n border: 'none',\n color: 'var(--dsw-alias-label-tertiary)',\n cursor: 'pointer',\n padding: '2px 4px',\n display: 'inline-flex',\n alignItems: 'center',\n}\n\n/** One model row inside a provider group. */\nconst modelRowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '7px 10px',\n borderTop: '1px solid var(--dsw-alias-border-l2)',\n}\n\nconst modelIdStyle: CSSProperties = {\n margin: 0,\n flex: '1 1 auto',\n minWidth: 0,\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '12px',\n lineHeight: '18px',\n color: 'var(--dsw-alias-label-secondary)',\n overflowWrap: 'anywhere',\n}\n\n/** Capability badge chips (text / image / context). */\nconst badgeStyle: CSSProperties = {\n fontSize: '10px',\n lineHeight: '16px',\n color: 'var(--dsw-alias-label-tertiary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '0 5px',\n whiteSpace: 'nowrap',\n}\n\n/** The per-level editor grid: one row per level with a toggle, a label and a wire input. */\nconst levelRowStyle: CSSProperties = {\n display: 'grid',\n gridTemplateColumns: 'auto 92px minmax(0, 1fr)',\n alignItems: 'center',\n gap: '8px',\n padding: '4px 0',\n fontSize: '13px',\n}\n\nconst levelNameStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-secondary)' }\n\nconst wireInputStyle: CSSProperties = {\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-primary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '3px 8px',\n fontSize: '12px',\n width: '100%',\n boxSizing: 'border-box',\n}\n\n/* ── helpers over the llm-pi-ai user layer ─────────────────────────────── */\n\n/** A row's `reasoningEfforts` as stored in the user layer. */\nfunction effortsOf(model: Record<string, unknown>): false | Record<string, unknown> | undefined {\n const value = model['reasoningEfforts']\n if (value === false) return false\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n return value as Record<string, unknown>\n }\n return undefined\n}\n\n/**\n * Build a `reasoningEfforts` table from a level→wire draft. `off` maps to\n * `null` (omit the reasoning option → enable_thinking false) unless the user\n * typed a wire value; every other ticked level keeps its typed wire value.\n * pi-ai rejects a table offering nothing beyond `off`, so a selection of only\n * `off` falls back to the default `high` level.\n */\nfunction effortTableOf(draft: Record<string, string | null>): Record<string, unknown> {\n const table: Record<string, unknown> = {}\n for (const level of CAPABILITY_LEVELS) {\n const wire = draft[level]\n if (wire === undefined || wire === null) continue\n const trimmed = typeof wire === 'string' ? wire.trim() : ''\n if (level === 'off') table[level] = trimmed === '' ? null : trimmed\n else if (trimmed !== '') table[level] = trimmed\n }\n if (Object.keys(table).length === 0 || Object.keys(table).every(level => table[level] === null)) {\n return { ...table, high: 'high' }\n }\n return table\n}\n\n/** Whether a row declares `compat.supportsReasoningEffort` (the wire sends reasoning_effort). */\nfunction supportsEffortOf(model: Record<string, unknown>): boolean {\n const compat = model['compat']\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\n return (compat as Record<string, unknown>)['supportsReasoningEffort'] === true\n}\n\n/** Patch one row's `compat` object, merging rather than replacing sibling fields. */\nfunction patchCompat(\n row: Record<string, unknown>,\n patch: (compat: Record<string, unknown>) => void,\n): void {\n const compat = typeof row['compat'] === 'object' && row['compat'] !== null && !Array.isArray(row['compat'])\n ? { ...(row['compat'] as Record<string, unknown>) }\n : {}\n patch(compat)\n if (Object.keys(compat).length === 0) delete row['compat']\n else row['compat'] = compat\n}\n\n/** The user-layer `providers` value of the llm-pi-ai namespace, when present. */\nfunction providersOf(snapshot: unknown): Record<string, unknown> {\n if (typeof snapshot !== 'object' || snapshot === null) return {}\n const user = (snapshot as { user?: unknown }).user\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\n const providers = (user as Record<string, unknown>)['providers']\n return typeof providers === 'object' && providers !== null && !Array.isArray(providers)\n ? providers as Record<string, unknown>\n : {}\n}\n\n/** Whether a route-level profile declares `compat.supportsDeveloperRole: false`. */\nfunction developerRoleDisabledOf(profile: unknown): boolean {\n if (typeof profile !== 'object' || profile === null) return false\n const compat = (profile as Record<string, unknown>)['compat']\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\n return (compat as Record<string, unknown>)['supportsDeveloperRole'] === false\n}\n\n/** One flattened capability entry: a provider's model at an array index. */\ninterface CapabilityEntry {\n providerId: string\n index: number\n model: Record<string, unknown>\n modelId: string\n /** The provider-level `compat`, applied to models that declare none (display parity). */\n providerCompat?: unknown\n /** The provider-level `defaultInput`, applied to models that declare none (display parity). */\n providerInput?: unknown[]\n}\n\n/** The effective `compat` of an entry: its own `compat` merged over the provider-level `compat`. */\nfunction compatOf(entry: CapabilityEntry): Record<string, unknown> {\n const base = typeof entry.providerCompat === 'object' && entry.providerCompat !== null\n ? entry.providerCompat as Record<string, unknown>\n : {}\n const own = entry.model['compat']\n return typeof own === 'object' && own !== null && !Array.isArray(own)\n ? { ...base, ...(own as Record<string, unknown>) }\n : base\n}\n\n/** Flatten the user-layer providers into capability entries (models arrays only). */\nfunction entriesOf(providers: Record<string, unknown>): CapabilityEntry[] {\n return Object.entries(providers).flatMap(([providerId, profile]) => {\n const raw = profile as Record<string, unknown>\n const models = raw['models']\n if (!Array.isArray(models)) return []\n const providerCompat = raw['compat']\n const providerInput = Array.isArray(raw['defaultInput']) ? raw['defaultInput'] as unknown[] : undefined\n return models.map((model, index) => ({\n providerId,\n index,\n model: (typeof model === 'object' && model !== null && !Array.isArray(model)\n ? model as Record<string, unknown>\n : {}),\n modelId: typeof model === 'object' && model !== null && typeof (model as Record<string, unknown>)['id'] === 'string'\n ? (model as Record<string, unknown>)['id'] as string\n : `#${index + 1}`,\n providerCompat,\n providerInput,\n }))\n })\n}\n\n/** Human-readable capability summary of one entry (input modalities + declared context window). */\nfunction summaryOf(entry: CapabilityEntry): { text: boolean; image: boolean; context: string | null } {\n // Modalities fall back to the provider-level `defaultInput` so a vision\n // gateway declared once on the route shows every model as vision, matching\n // llm-pi-ai's resolution and the adapter's runtime gate.\n const input = Array.isArray(entry.model['input'])\n ? entry.model['input'] as unknown[]\n : entry.providerInput\n const text = !Array.isArray(input) || input.length === 0 || input.includes('text')\n const image = Array.isArray(input) && input.includes('image')\n const contextWindow = entry.model['contextWindow']\n const context = typeof contextWindow === 'number' && Number.isFinite(contextWindow) && contextWindow > 0\n ? formatContextWindow(contextWindow)\n : null\n return { text, image, context }\n}\n\n/** A tiny inline chevron icon (no CSS modules). */\nfunction ChevronIcon({ open }: { open: boolean }): JSX.Element {\n return (\n <svg\n width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" aria-hidden\n style={{ transform: open ? 'rotate(180deg)' : 'none', transition: 'transform 0.16s' }}\n >\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )\n}\n\n/**\n * The llm-pi-ai model-capability editor block (dsh-thinking-effort style:\n * provider groups, model rows with badges, per-level wire editors, search and\n * one-click presets).\n * @param scope - the `llm-pi-ai` namespace scope.\n * @param t - copy lookup.\n * @param readonly - whether writes are forbidden.\n * @returns the capabilities block, or a placeholder when nothing is configured.\n */\nfunction ModelCapabilities(props: {\n scope: SettingsScope<unknown>\n t: (key: string) => string\n readonly: boolean\n}): JSX.Element {\n const { scope, t, readonly } = props\n const snapshot = useSyncExternalStore(\n (listener) => scope.subscribe(listener),\n () => scope.getSnapshot(),\n )\n const unavailable = snapshot.status === 'unavailable'\n const providers = snapshot.status === 'ready' ? providersOf(snapshot) : {}\n // Every llm-pi-ai provider is listed with its models — no list gating: the\n // official compat surface (dsh ≥ rc.8) means pi-ai serves every route\n // natively, so each model is editable right here.\n const allEntries = entriesOf(providers)\n\n // UI-only state: provider/model expansion, the wire drafts, and the query.\n const [query, setQuery] = useState('')\n const [expandedProviders, setExpandedProviders] = useState<Record<string, boolean>>({})\n const [expandedModels, setExpandedModels] = useState<Record<string, boolean>>({})\n const [drafts, setDrafts] = useState<Record<string, Record<string, string | null>>>({})\n const [busy, setBusy] = useState(false)\n const [contextRaw, setContextRaw] = useState<Record<string, string>>({})\n const [contextError, setContextError] = useState<Record<string, string>>({})\n\n const entryKey = (entry: CapabilityEntry): string => `${entry.providerId}\\u0000${entry.index}`\n\n /** Commit one patch over the user-layer providers. */\n const commitProviders = (mutate: (current: Record<string, unknown>) => Record<string, unknown>): void => {\n if (snapshot.status !== 'ready' || readonly) return\n setBusy(true)\n void scope.set('providers', mutate(structuredClone(providers)))\n .then(() => { setBusy(false) })\n .catch(() => { setBusy(false) })\n }\n\n /** Toggle the route-level official compat flag: unchecked = inherit (unset). */\n const toggleDeveloperRole = (providerId: string, next: boolean): void => {\n commitProviders((current) => {\n const profile = current[providerId] as Record<string, unknown> | undefined\n if (profile === undefined) return current\n const compat = typeof profile['compat'] === 'object' && profile['compat'] !== null && !Array.isArray(profile['compat'])\n ? { ...(profile['compat'] as Record<string, unknown>) }\n : {}\n if (next) compat['supportsDeveloperRole'] = false\n else delete compat['supportsDeveloperRole']\n if (Object.keys(compat).length === 0) delete profile['compat']\n else profile['compat'] = compat\n return current\n })\n }\n\n /** Patch one model row of one provider. */\n const patchModel = (\n providerId: string,\n index: number,\n patch: (model: Record<string, unknown>) => void,\n ): void => {\n commitProviders((current) => {\n const profile = current[providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) return current\n const model = profile.models[index]\n if (typeof model !== 'object' || model === null) return current\n patch(model as Record<string, unknown>)\n return current\n })\n }\n\n /** Toggle whether a model is a thinking model (reasoningEfforts table vs false). */\n const toggleThinking = (entry: CapabilityEntry, next: boolean): void => {\n patchModel(entry.providerId, entry.index, (row) => {\n if (next) {\n // Thinking on: a table must exist so the wire drives enable_thinking /\n // reasoning_effort. Start from the persisted table or the default high\n // set; a toggle model (no effort) keeps supportsReasoningEffort false.\n const effortCapable = supportsEffortOf(row)\n row['reasoningEfforts'] = effortCapable\n ? effortTableOf({ high: 'high' })\n : { off: null, high: 'high' }\n // Toggle-style thinking models need the official qwen format so pi-ai\n // sends enable_thinking (early vLLM thinking models return no thinking\n // content without that flag, and reject reasoning_effort). Only fills\n // an absent format — an explicit choice is never clobbered.\n if (!effortCapable) {\n patchCompat(row, (compat) => {\n if (compat['thinkingFormat'] === undefined) compat['thinkingFormat'] = 'qwen-chat-template'\n })\n }\n } else {\n // Thinking off: a non-reasoning model never takes an effort.\n row['reasoningEfforts'] = false\n }\n })\n }\n\n /** Toggle whether a model accepts reasoning_effort levels. */\n const toggleEffortCapable = (entry: CapabilityEntry, next: boolean): void => {\n patchModel(entry.providerId, entry.index, (row) => {\n patchCompat(row, (compat) => {\n compat['supportsReasoningEffort'] = next\n // Counterpart of the auto-fill in toggleThinking: effort-capable rows\n // need reasoning_effort on the wire, so drop the toggle-style qwen\n // format when effort turns on (it would drive enable_thinking instead).\n if (next && compat['thinkingFormat'] === 'qwen-chat-template') delete compat['thinkingFormat']\n })\n })\n }\n\n /** Apply one model's wire draft as its `reasoningEfforts` table. */\n const applyDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n const draft = drafts[key]\n if (draft === undefined) return\n const table = effortTableOf(draft)\n patchModel(entry.providerId, entry.index, (row) => {\n row['reasoningEfforts'] = table\n // Mark effort support only when the model already had it or the user\n // ticked a reasoning_effort-only level (minimal/low/medium/xhigh/max).\n // A toggle-only model (Qwen3.6: off/high = enable_thinking) must keep\n // supportsReasoningEffort false — flipping it would make the adapter\n // send a reasoning_effort the gateway rejects (400).\n const extended = Object.keys(table).some(level => level !== 'off' && level !== 'on' && level !== 'high')\n if (supportsEffortOf(row) || extended) {\n patchCompat(row, (compat) => {\n compat['supportsReasoningEffort'] = true\n })\n }\n })\n }\n\n /** Reset a model's draft to its persisted table (or the default high set). */\n const resetDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setDrafts(current => {\n const next = { ...current }\n const table = effortsOf(entry.model)\n if (typeof table === 'object' && table !== null) {\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\n level,\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\n ]))\n } else {\n next[key] = { off: '', high: 'high' }\n }\n return next\n })\n }\n\n /** Seed a model's draft when it is first expanded. */\n const ensureDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setDrafts(current => {\n if (current[key] !== undefined) return current\n const next = { ...current }\n const table = effortsOf(entry.model)\n if (typeof table === 'object' && table !== null) {\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\n level,\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\n ]))\n } else {\n next[key] = { off: '', high: 'high' }\n }\n return next\n })\n }\n\n /** Apply a one-click preset to every thinking model. */\n const applyPreset = (levels: Record<string, unknown>): void => {\n commitProviders((current) => {\n for (const entry of entriesOf(current)) {\n const profile = current[entry.providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) continue\n const model = profile.models[entry.index]\n if (typeof model !== 'object' || model === null) continue\n const row = model as Record<string, unknown>\n if (effortsOf(row) === undefined) continue // only thinking models\n // Replace the table but never touch supportsReasoningEffort: a\n // toggle-only model (Qwen3.6) must stay Off/On (enable_thinking), so\n // the request guard keeps clamping any injected level to its default\n // strength instead of sending a reasoning_effort the gateway rejects.\n row['reasoningEfforts'] = levels\n }\n return current\n })\n }\n\n /** Seed a model's context-window input when it is first expanded. */\n const seedContext = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setContextRaw(current => {\n if (current[key] !== undefined) return current\n const value = entry.model['contextWindow']\n return {\n ...current,\n [key]: typeof value === 'number' && Number.isFinite(value) ? String(value) : '',\n }\n })\n }\n\n /** Write (or delete) a model's `contextWindow` in the llm-pi-ai entry. */\n const commitContextWindow = (entry: CapabilityEntry, value: number | undefined): void => {\n const key = entryKey(entry)\n patchModel(entry.providerId, entry.index, (row) => {\n if (value === undefined) delete row['contextWindow']\n else row['contextWindow'] = value\n })\n setContextError(current => {\n const next = { ...current }\n delete next[key]\n return next\n })\n }\n\n /** Apply one preset immediately. */\n const applyContextPreset = (entry: CapabilityEntry, value: number): void => {\n const key = entryKey(entry)\n setContextRaw(current => ({ ...current, [key]: String(value) }))\n commitContextWindow(entry, value)\n }\n\n /** Validate and commit the custom input (blur / Enter); empty clears it. */\n const applyContextInput = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n const raw = (contextRaw[key] ?? '').trim()\n if (raw === '') {\n commitContextWindow(entry, undefined)\n return\n }\n const validation = validateContextWindow(raw)\n if (!validation.ok) {\n setContextError(current => ({\n ...current,\n [key]: t(validation.reason === 'integer'\n ? 'card.capabilities.contextInteger'\n : 'card.capabilities.contextRange'),\n }))\n return\n }\n commitContextWindow(entry, validation.value)\n }\n\n /** Clear the model's context-window declaration (delete the field). */\n const clearContext = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setContextRaw(current => ({ ...current, [key]: '' }))\n commitContextWindow(entry, undefined)\n }\n\n if (unavailable) {\n return (\n <div style={sectionStyle}>\n <p style={hintStyle}>{t('card.capabilities.unavailable')}</p>\n </div>\n )\n }\n if (allEntries.length === 0) {\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\n <p style={hintStyle}>{t('card.capabilities.empty')}</p>\n </div>\n )\n }\n\n const needle = query.trim().toLowerCase()\n const visible = needle === ''\n ? allEntries\n : allEntries.filter(entry =>\n entry.modelId.toLowerCase().includes(needle)\n || entry.providerId.toLowerCase().includes(needle))\n const providerIds = [...new Set(visible.map(entry => entry.providerId))]\n\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\n <p style={hintStyle}>{t('card.capabilities.hint')}</p>\n\n {/* Search + one-click presets */}\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '8px 0 2px' }}>\n <input\n type=\"text\"\n value={query}\n placeholder={t('card.capabilities.search')}\n disabled={readonly || busy}\n style={{ ...controlStyle, flex: '1 1 160px', minWidth: '140px' }}\n onChange={(event) => setQuery(event.currentTarget.value)}\n />\n {PRESETS.map(preset => (\n <button\n key={preset.key}\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyPreset(preset.levels)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t(`card.capabilities.preset${preset.key === 'official' ? 'Official' : 'Generic'}`)}\n </button>\n ))}\n </div>\n\n {visible.length === 0\n ? <p style={hintStyle}>{t('card.capabilities.noMatches')}</p>\n : providerIds.map(providerId => {\n const providerEntries = visible.filter(entry => entry.providerId === providerId)\n const providerOpen = expandedProviders[providerId] === true || needle !== ''\n return (\n <div key={providerId} style={providerStyle}>\n <div style={providerHeadStyle}>\n <button\n type=\"button\"\n aria-expanded={providerOpen}\n disabled={readonly || busy}\n onClick={() => setExpandedProviders(current => ({\n ...current,\n [providerId]: current[providerId] !== true,\n }))}\n style={{\n ...iconButtonStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n }}\n title={providerOpen ? t('card.capabilities.collapseProvider') : t('card.capabilities.expandProvider')}\n >\n <ChevronIcon open={providerOpen} />\n </button>\n <p style={providerNameStyle}>{providerId}</p>\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '11px', whiteSpace: 'nowrap', color: 'var(--dsw-alias-label-secondary)' }}\n title={t('card.capabilities.developerRoleHint')}\n >\n <input\n type=\"checkbox\"\n checked={developerRoleDisabledOf(providers[providerId])}\n disabled={readonly || busy}\n onChange={(event) => toggleDeveloperRole(providerId, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.developerRole')}</span>\n </label>\n <p style={providerBadgeStyle}>{providerEntries.length}</p>\n </div>\n {providerOpen\n ? providerEntries.map(entry => {\n const key = entryKey(entry)\n const modelOpen = expandedModels[key] === true\n const efforts = effortsOf(entry.model)\n const thinking = typeof efforts === 'object'\n // Display falls back to the provider-level `compat` so a\n // route-declared thinking/effort posture shows on every model.\n const compat = compatOf(entry)\n const supportsEffort = compat['supportsReasoningEffort'] === true\n const meta = summaryOf(entry)\n const format = typeof compat['thinkingFormat'] === 'string'\n ? compat['thinkingFormat']\n : undefined\n return (\n <div key={key}>\n <div style={modelRowStyle}>\n <button\n type=\"button\"\n aria-expanded={modelOpen}\n disabled={readonly || busy}\n onClick={() => {\n const next = expandedModels[key] !== true\n setExpandedModels(current => ({ ...current, [key]: next }))\n if (next) { ensureDraft(entry); seedContext(entry) }\n }}\n style={{\n ...iconButtonStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n }}\n title={modelOpen ? t('card.capabilities.closeModelSettings') : t('card.capabilities.openModelSettings')}\n >\n <ChevronIcon open={modelOpen} />\n </button>\n <p style={modelIdStyle}>{entry.modelId}</p>\n <span style={badgeStyle} title=\"text\">{meta.text ? 'T' : '–'}</span>\n <span style={badgeStyle} title=\"image\">{meta.image ? 'IMG' : '–'}</span>\n {meta.context !== null && <span style={badgeStyle}>{meta.context}</span>}\n {thinking && !supportsEffort && <span style={badgeStyle}>On/Off</span>}\n </div>\n {modelOpen\n ? (\n <div style={{ padding: '4px 10px 10px', borderTop: '1px solid var(--dsw-alias-border-l2)' }}>\n {/* Layer 1 — base capabilities: is it a thinking model? A vision model? */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', margin: '2px 0 8px' }}>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={thinking}\n disabled={readonly || busy}\n onChange={(event) => toggleThinking(entry, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.thinking')}</span>\n </label>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={meta.image}\n disabled={readonly || busy}\n onChange={(event) => {\n patchModel(entry.providerId, entry.index, (row) => {\n // Image input implies text input; the pair is written together.\n row['input'] = event.currentTarget.checked ? ['text', 'image'] : ['text']\n })\n }}\n />\n <span>{t('card.capabilities.vision')}</span>\n </label>\n </div>\n {/* Layer 2 — only for thinking models: does it take reasoning_effort levels? */}\n {thinking\n ? (\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px', margin: '0 0 8px' }}>\n <input\n type=\"checkbox\"\n checked={supportsEffort}\n disabled={readonly || busy}\n onChange={(event) => toggleEffortCapable(entry, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.supportsEffort')}</span>\n </label>\n )\n : null}\n {thinking && supportsEffort\n ? (\n <>\n {/* Per-level wire editor — only for effort-capable thinking models */}\n <p style={fieldLabelStyle}>{t('card.capabilities.efforts')}</p>\n <div style={{ margin: '4px 0 6px' }}>\n {CAPABILITY_LEVELS.map(level => {\n const wire = drafts[key]?.[level]\n const on = wire !== undefined && wire !== null\n return (\n <div key={level} style={levelRowStyle}>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={on}\n disabled={readonly || busy}\n onChange={(event) => {\n const checked = event.currentTarget.checked\n setDrafts(current => {\n const draft = { ...(current[key] ?? {}) }\n draft[level] = checked\n ? (level === 'off' ? '' : level)\n : null\n return { ...current, [key]: draft }\n })\n }}\n />\n <span>{level}</span>\n </label>\n <span style={levelNameStyle}>{level === 'off' ? t('card.capabilities.offPlaceholder') : '→'}</span>\n <input\n type=\"text\"\n value={wire ?? ''}\n disabled={readonly || busy || !on}\n placeholder={t('card.capabilities.wirePlaceholder')}\n style={wireInputStyle}\n onChange={(event) => {\n setDrafts(current => {\n const draft = { ...(current[key] ?? {}) }\n draft[level] = event.currentTarget.value\n return { ...current, [key]: draft }\n })\n }}\n />\n </div>\n )\n })}\n </div>\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyDraft(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.applyLevel')}\n </button>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => resetDraft(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.restoreDefault')}\n </button>\n </div>\n </>\n )\n : null}\n {/* Layer 4 — thinking format (wire serialization) */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\n <label style={fieldStyle}>\n <span style={fieldLabelStyle}>{t('card.capabilities.thinkingFormat')}</span>\n <select\n style={controlStyle}\n value={format ?? 'inherit'}\n disabled={readonly || busy}\n onChange={(event) => {\n const next = event.currentTarget.value\n patchModel(entry.providerId, entry.index, (row) => {\n patchCompat(row, (compat) => {\n if (next === 'inherit') delete compat['thinkingFormat']\n else compat['thinkingFormat'] = next\n })\n })\n }}\n >\n <option value=\"inherit\">{t('card.capabilities.thinkingFormat.inherit')}</option>\n {THINKING_FORMATS.map(formatOption => (\n <option key={formatOption} value={formatOption}>{formatOption}</option>\n ))}\n </select>\n </label>\n </div>\n {/* Context-window limit: presets + custom integer (written to llm-pi-ai, live on next request) */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\n <label style={fieldStyle}>\n <span style={fieldLabelStyle}>{t('card.capabilities.contextWindow')}</span>\n <div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap', alignItems: 'center' }}>\n {CONTEXT_WINDOW_PRESETS.map(preset => (\n <button\n key={preset.value}\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyContextPreset(entry, preset.value)}\n style={{\n ...controlStyle,\n padding: '2px 8px',\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {preset.label}\n </button>\n ))}\n <input\n type=\"text\"\n value={contextRaw[key] ?? ''}\n disabled={readonly || busy}\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\n style={{ ...controlStyle, width: '120px' }}\n onChange={(event) => {\n const next = event.currentTarget.value\n setContextRaw(current => ({ ...current, [key]: next }))\n }}\n onBlur={() => applyContextInput(entry)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') event.currentTarget.blur()\n }}\n />\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => clearContext(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.contextClear')}\n </button>\n </div>\n {contextError[key] !== undefined\n ? (\n <span style={{ margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }}>\n {contextError[key]}\n </span>\n )\n : null}\n </label>\n </div>\n </div>\n )\n : null}\n </div>\n )\n })\n : null}\n </div>\n )\n })}\n {readonly ? <p style={hintStyle}>{t('card.readonly')}</p> : null}\n </div>\n )\n}\n\n/**\n * The card body, wrapped in a disclosure shell like every peer settings card:\n * a header (name + description + chevron) that toggles the body, expanded by\n * default so the family section reads as an open page of drawers.\n * @param props - locale copy and the injected scopes.\n */\nexport function ThinkingLevelsCard({ t, scope, piAiScope }: ThinkingLevelsCardProps): JSX.Element {\n const [open, setOpen] = useState(true)\n const snapshot = useSyncExternalStore(\n (listener) => scope.subscribe(listener),\n () => scope.getSnapshot(),\n )\n const unavailable = snapshot.status === 'unavailable'\n const readonly = unavailable || !snapshot.writable\n // configForms serves the STORED doc: volatile fields arrive as plain values\n // (simplify() unwraps the live refs before persistence), so the card sees a\n // plain config shape even though the host-side type carries Volatile unions.\n const value = (snapshot.value ?? {}) as unknown as Partial<{\n enabled: boolean\n level: EffortId\n allowDowngrade: boolean\n allowUpgrade: boolean\n }>\n const level = EFFORT_OPTIONS.includes(value.level as EffortId) ? value.level as EffortId : 'auto'\n\n return (\n <div style={{\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\n borderRadius: '12px',\n transition: 'border-color 0.16s, background 0.16s',\n }}>\n <button\n type=\"button\"\n aria-expanded={open}\n style={{\n appearance: 'none',\n width: '100%',\n font: 'inherit',\n color: 'inherit',\n textAlign: 'left',\n cursor: 'pointer',\n background: 'none',\n border: 0,\n borderRadius: '12px',\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n padding: '14px 16px',\n }}\n onClick={() => { setOpen(current => !current) }}\n >\n <span style={{ flex: '1 1 0%', minWidth: 0 }}>\n <div style={{ fontSize: '14px', fontWeight: 600, color: 'var(--dsw-alias-label-primary)' }}>{t('card.title')}</div>\n <div style={{ color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))', fontSize: '13px', lineHeight: 1.5 }}>{t('card.description')}</div>\n </span>\n <svg\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden\n style={{\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))',\n flex: '0 0 auto',\n transition: 'transform 0.16s',\n transform: open ? 'rotate(180deg)' : 'none',\n }}\n >\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n {open\n ? (\n <div style={{ padding: '12px 16px' }}>\n {unavailable\n ? (\n <div style={{ fontSize: '13px', color: 'var(--dsw-alias-label-tertiary)' }}>\n {t('card.unavailable')}\n </div>\n )\n : (\n <>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-level\" style={labelStyle}>{t('card.level')}</label>\n <select\n id=\"plugin-config-thinking-levels-level\"\n value={level}\n disabled={readonly}\n style={controlStyle}\n onChange={(event) => { void scope.set('level', event.currentTarget.value as EffortId) }}\n >\n {EFFORT_OPTIONS.map((option) => (\n <option key={option} value={option}>{t(`card.level.${option}`)}</option>\n ))}\n </select>\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-enabled\" style={labelStyle}>{t('card.enabled')}</label>\n <input\n id=\"plugin-config-thinking-levels-enabled\"\n type=\"checkbox\"\n checked={value.enabled ?? true}\n disabled={readonly}\n onChange={(event) => { void scope.set('enabled', event.currentTarget.checked) }}\n />\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-downgrade\" style={labelStyle}>{t('card.allowDowngrade')}</label>\n <input\n id=\"plugin-config-thinking-levels-downgrade\"\n type=\"checkbox\"\n checked={value.allowDowngrade ?? true}\n disabled={readonly || value.level !== 'auto'}\n onChange={(event) => { void scope.set('allowDowngrade', event.currentTarget.checked) }}\n />\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-upgrade\" style={labelStyle}>{t('card.allowUpgrade')}</label>\n <input\n id=\"plugin-config-thinking-levels-upgrade\"\n type=\"checkbox\"\n checked={value.allowUpgrade ?? false}\n disabled={readonly || value.level !== 'auto'}\n onChange={(event) => { void scope.set('allowUpgrade', event.currentTarget.checked) }}\n />\n </div>\n {!snapshot.writable\n && <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-label-tertiary)' }}>{t('card.readonly')}</p>}\n <ModelCapabilities scope={piAiScope} t={t} readonly={readonly} />\n </>\n )}\n </div>\n )\n : null}\n </div>\n )\n}\n","/**\n * FamilySettingsSection — the top-level 「起子插件设置」 settings section.\n *\n * One `settings.section` nav entry (registered by this plugin) whose entry\n * declares the `dsh-family.tab` child slot; sibling plugins (session-guard\n * first) contribute their cards there via `ctx.slots.inject('dsh-family.tab',\n * …)`. The section renders the family's own thinking-levels card as the first\n * tab and every contributor as a following tab — the same tabs-around-pages\n * pattern the built-in Plugins section uses (ui-settings-plugins): the tab\n * ledger is a HostObservable projected from the child-slot registry, and the\n * active tab mounts through `renderSlot(key, {}, { only: id })`. Each card is\n * a disclosure drawer expanded by default, so an opened tab shows its full\n * panel right away.\n *\n * When this section is absent the whole family surface is absent; a\n * contributor's inject simply idles (an undischarged wait never blocks the\n * client half), so plugins stay fully functional without their card.\n */\nimport { useState } from 'react'\nimport type { JSX } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport { ThinkingLevelsCard, type ThinkingLevelsCardInjected } from './card.tsx'\n\n/**\n * Structural mirrors of the ui-slots faces this section consumes (the same\n * pattern as scope-face.ts: the package's `export *` type graph resolves\n * unreliably outside the harness workspace, so the handful of shapes are\n * declared locally instead).\n */\ntype HostObservable<T> = {\n getSnapshot(): T\n subscribe(listener: () => void): () => void\n}\n\n/** One contributor tab projected from the `dsh-family.tab` ledger. */\nexport interface FamilyTabEntry {\n id: string\n order: number\n label: string\n}\n\n/** Registration-side business face for the section. */\nexport interface FamilySectionInjected extends ThinkingLevelsCardInjected {\n hooks: {\n /** Ordered projection of the contributor ledger (locale-aware). */\n tabs: HostObservable<readonly FamilyTabEntry[]>\n }\n}\n\n/** The framework-delivered child-slot dispatcher, narrowed to our one child key. */\ninterface FamilyRenderSlots {\n renderSlot(key: 'dsh-family.tab', owner?: object, opts?: { only?: string; fallback?: React.ReactNode }): React.ReactNode\n}\n\n/** Full props: locale + contributor dispatcher + the resolved inject face. */\nexport type FamilySettingsSectionProps =\n PropsLocale<'thinking-levels'>\n & FamilyRenderSlots\n & FamilySectionInjected\n\n/** This plugin's own tab, always first: the thinking-levels card itself. */\nconst OWN_TAB_ID = 'thinking-levels'\n\n/** The hooks-compartment selector hook face (bound `use<Name>` hook). */\ninterface FamilyHooksFace {\n useTabs: <S>(selector: (value: readonly FamilyTabEntry[]) => S) => S\n}\n\nexport function FamilySettingsSection(props: FamilySettingsSectionProps): JSX.Element {\n const { t, renderSlot, scope, piAiScope } = props\n const { useTabs } = props as unknown as FamilyHooksFace\n const contributors = useTabs(value => value)\n const [activeId, setActiveId] = useState<string>(OWN_TAB_ID)\n const rows = [\n { id: OWN_TAB_ID, order: Number.NEGATIVE_INFINITY, label: t('card.title') },\n ...contributors,\n ]\n const active = rows.some(row => row.id === activeId) ? activeId : OWN_TAB_ID\n\n return (\n <div style={{ display: 'grid', gap: '12px' }}>\n <div role=\"tablist\" aria-label={t('family.title')} style={{ display: 'flex', flexWrap: 'wrap', gap: '4px' }}>\n {rows.map(row => (\n <button\n key={row.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={row.id === active}\n onClick={() => { setActiveId(row.id) }}\n style={{\n appearance: 'none',\n font: 'inherit',\n cursor: 'pointer',\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\n background: row.id === active ? 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.08))' : 'none',\n color: 'var(--dsw-alias-label-primary, inherit)',\n borderRadius: '8px',\n padding: '5px 12px',\n fontSize: '13px',\n }}\n >\n {row.label}\n </button>\n ))}\n </div>\n <div role=\"tabpanel\">\n {active === OWN_TAB_ID\n ? <ThinkingLevelsCard t={t} scope={scope} piAiScope={piAiScope} />\n : renderSlot('dsh-family.tab', {}, { only: active, fallback: null })}\n </div>\n </div>\n )\n}\n","/**\n * dsh-thinking-levels — browser half.\n *\n * Registers the `thinking-levels` dictionaries and one composer model-seat\n * panel (`conversation.input.model`) carrying the per-line context-window\n * editor.\n *\n * The plugin's own settings (default level, enable toggle, scheduler bounds)\n * have NO client registration since the DSH 0.1.7 line: the host renders the\n * Plugins settings form declaratively from the `.volatile()` fields of the\n * schema in src/index.ts, and the runtime values flow through the\n * `configForms` service keyed by the composition entry id. The former\n * per-plugin settings card was dropped with that migration (its seat no\n * longer exists in 0.1.7), including its llm-pi-ai model-capability editor.\n *\n * All @deepseek-ai/* imports are type-only: collaboration happens through\n * cordis services (`configForms`) and slot registration only (client bundle\n * purity).\n */\nimport type { Context as ClientContext } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\n// DSH 0.1.5 moved the `ctx.slots` Context augmentation here (it used to live in\n// the retired `dsh-client-runtime` package): importing the client types restores\n// the typed `ctx.slots` member on the cordis Context surface.\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport { NS, en, ja, ko, zh } from './locales.ts'\nimport { ModelPanel, type ModelPanelInjected } from './model-panel.tsx'\nimport { FamilySettingsSection, type FamilySectionInjected, type FamilyTabEntry } from './family-tab.tsx'\nimport type { ThinkingLevelsConfig } from '../index.ts'\n// Type-only: pulls the settings shell's SlotMap merges ('settings.section').\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\n\n/**\n * The plugin-family shared settings surface: ONE top-level `settings.section`\n * nav entry (「起子插件设置」) whose entry declares the `dsh-family.tab` child\n * slot; sibling plugins contribute their cards there (session-guard first) and\n * the section renders them as tabs — the built-in Plugins section's\n * tabs-around-pages pattern; every card drawer is expanded by default. Declaring is claiming (ui-slots): the child slot\n * exists exactly while this section entry does, and a contributor's\n * `ctx.slots.inject('dsh-family.tab', …)` idles harmlessly if this plugin is\n * absent (an undischarged inject never blocks the client half).\n */\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface SlotMap {\n 'dsh-family.tab': { kind: 'list'; scope: 'root' }\n }\n}\n\n/** Services required by the browser half. */\nexport const inject = ['slots', 'locale', 'configForms', 'modelDirectories']\n\n/**\n * Client plugin body: dictionaries plus the composer quick-control slot.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n const t = ctx.locale.bind(NS)\n // `register(ns, dicts)` is typed to the built-in locale ids (`zh` / `en`\n // only); the shipped `ja` / `ko` dictionaries go through the single-locale\n // overload, so they are installed and ready once DSH publishes those ids.\n ctx.effect(() => {\n const disposers = [\n ctx.locale.register(NS, { zh, en }),\n ctx.locale.register(NS, 'ja', ja),\n ctx.locale.register(NS, 'ko', ko),\n ]\n return () => { for (const dispose of disposers) dispose() }\n }, 'dsh-thinking-levels: dictionaries')\n\n // Composer model seat: one registered entry named after the seat with\n // `priority: -1` replaces the shipped `ModelSelect` trigger and popup\n // outright (the official popup renders no slots, so occupying the seat is\n // the only way to contribute inside it — the dsh-reasoning-effort pattern).\n // The panel renders its own picker over the harness's shared\n // `modelDirectories` service (model switching keeps working) and puts a\n // context-window editor on every model line: custom gateways write the\n // `llm-pi-ai` entry config, official DeepSeek models write the\n // `llm-deepseek` entry (its `models[].contextWindow`, else the provider\n // default). Skipped entirely on harness lines without the service, leaving\n // the shipped selector untouched.\n const directories = (ctx as unknown as { modelDirectories?: ModelDirectoriesFace }).modelDirectories\n if (directories !== undefined) {\n ctx.slots.inject('conversation.input.model', function* () {\n yield ctx.slots.register({\n name: 'conversation.input.model',\n id: 'context-window-model-panel',\n priority: -1,\n locale: NS,\n inject: (sessionId: string): ModelPanelInjected => {\n // Entry ids of the target plugins: each dsh llm plugin's composition\n // entry id matches its settings namespace (`llm-pi-ai` / `llm-deepseek`).\n return {\n directory: directories.directoryFor(sessionId),\n piAiScope: ctx.configForms.get<unknown>('llm-pi-ai'),\n deepseekScope: ctx.configForms.get<unknown>('llm-deepseek'),\n }\n },\n }, ModelPanel)\n })\n }\n\n // Family settings section (see the SlotMap note above): the contributor\n // ledger is projected exactly like the built-in Plugins section projects its\n // tab ledger (cache until ledger/locale revision bumps, so useSyncExternalStore\n // sees a stable snapshot).\n/** Registrant labels arrive as a string or a locale thunk; unwrap either.\n * A throwing thunk (e.g. a contributor whose label touches a service its own\n * inject never declared) must not kill the whole tab-ledger projection — fall\n * back to the entry id. */\nconst resolveLabel = (label: unknown, fallback = ''): string => {\n try {\n if (typeof label === 'function') return (label as () => string)() || fallback\n if (typeof label === 'string') return label\n } catch { /* bad contributor label — degrade to the fallback */ }\n return fallback\n}\n\n let tabsVersion = -1\n let tabsRevision = -1\n let tabs: readonly FamilyTabEntry[] = []\n const sectionInjected = (): FamilySectionInjected => ({\n scope: ctx.configForms.get<ThinkingLevelsConfig>('dsh-thinking-levels'),\n piAiScope: ctx.configForms.get<unknown>('llm-pi-ai'),\n hooks: {\n tabs: {\n getSnapshot: () => {\n const version = ctx.slots.getVersion('dsh-family.tab')\n const revision = ctx.locale.getSnapshot().revision\n if (version !== tabsVersion || revision !== tabsRevision) {\n tabsVersion = version\n tabsRevision = revision\n tabs = ctx.slots.entries('dsh-family.tab')\n .map(entry => ({\n id: entry.options.id ?? '',\n order: entry.options.order ?? 0,\n label: resolveLabel(entry.options.label, entry.options.id ?? ''),\n }))\n .sort((a, b) => a.order - b.order)\n }\n return tabs\n },\n subscribe: (listener) => {\n const offLedger = ctx.slots.subscribe('dsh-family.tab', listener)\n const offLocale = ctx.locale.subscribe(listener)\n return () => {\n offLedger()\n offLocale()\n }\n },\n },\n },\n })\n\n ctx.slots.inject('settings.section', function* () {\n yield ctx.slots.register({\n name: 'settings.section',\n id: 'dsh-family',\n order: 40,\n label: () => t('family.title'),\n locale: NS,\n inject: sectionInjected,\n children: { 'dsh-family.tab': { kind: 'list', scope: 'root' } },\n }, FamilySettingsSection)\n })\n}\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,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,oCAAoC;GACpC,sCAAsC;GACtC,uCAAuC;GACvC,wCAAwC;GACxC,4BAA4B;GAC5B,8BAA8B;GAC9B,oCAAoC;GACpC,6BAA6B;GAC7B,qCAAqC;GACrC,oCAAoC;GACpC,qCAAqC;GACrC,gCAAgC;GAChC,oCAAoC;GACpC,6BAA6B;GAC7B,iCAAiC;G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B,MAAM,YAAY,IAAI,MAAM,UAAU,kBAAkB,QAAQ;MAChE,MAAM,YAAY,IAAI,OAAO,UAAU,QAAQ;MAC/C,aAAa;OACX,UAAU;OACV,UAAU;MACZ;KACF;IACF,EACF;GACF;GAEA,IAAI,MAAM,OAAO,oBAAoB,aAAa;IAChD,MAAM,IAAI,MAAM,SAAS;KACvB,MAAM;KACN,IAAI;KACJ,OAAO;KACP,aAAa,EAAE,cAAc;KAC7B,QAAQ;KACR,QAAQ;KACR,UAAU,EAAE,kBAAkB;MAAE,MAAM;MAAQ,OAAO;KAAO,EAAE;IAChE,GAAG,qBAAqB;GAC1B,CAAC;EACH"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["providerNameStyle","modelRowStyle","labelStyle","providersOf","useSyncExternalStore","useState","useRef","useCallback","useMemo","useSyncExternalStore","useState","useState"],"sources":["../src/client/locales.ts","../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). */\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.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.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.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 'input.effort.default': '提供方默认',\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.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.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.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 'input.effort.default': '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.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.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.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 'input.effort.default': 'プロバイダーの既定',\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.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.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.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 'input.effort.default': '공급자 기본값',\r\n 'card.capabilities.failed': '저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요.',\r\n}\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 * 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 { 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\nconst 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/** 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/** 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\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 zIndex: 1200,\r\n width: '320px',\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: 1199 }\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\nconst selectStyle: CSSProperties = {\r\n flex: '0 0 auto',\r\n height: '18px',\r\n maxWidth: '96px',\r\n padding: '0 2px',\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 font: 'inherit',\r\n fontSize: '11px',\r\n lineHeight: '16px',\r\n cursor: 'pointer',\r\n colorScheme: 'dark light',\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}\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 height: '14px',\r\n margin: '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: '36px',\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 const user = (snapshot as { user?: unknown }).user\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\nfunction 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\nfunction 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, 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\r\n const [open, setOpen] = useState(false)\r\n const [expanded, setExpanded] = useState<ReadonlySet<string>>(() => new Set())\r\n const [editing, setEditing] = useState<{ provider: string; model: string } | 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 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 const close = useCallback((): void => {\r\n setOpen(false)\r\n setEditing(null)\r\n setError(null)\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 }\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 /** The effective window of one model line, resolved against its family. */\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 /** 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 })\r\n setDraft(null)\r\n setCustom(false)\r\n setRaw('')\r\n setError(null)\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 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 const effectiveEffort = state.current?.reasoningEffort ?? currentReasoning?.defaultEffort\r\n const effortLabel = currentReasoning === undefined\r\n ? undefined\r\n : effectiveEffort === undefined\r\n ? t('input.effort.default')\r\n : currentReasoning.efforts.find(level => level.id === effectiveEffort)?.name ?? effectiveEffort\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 <span style={chevronStyle}>{open ? '▲' : '▼'}</span>\r\n </button>\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 <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 && state.groups.map(group => {\r\n const isExpanded = 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 isEditing = editing !== null\r\n && editing.provider === group.id\r\n && editing.model === model.id\r\n const lineEffort = active\r\n ? state.current?.reasoningEffort ?? model.reasoning?.defaultEffort\r\n : model.reasoning?.defaultEffort\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 !== undefined && (\r\n <select\r\n aria-label={t('input.effort.title')}\r\n title={t('input.effort.title')}\r\n style={selectStyle}\r\n disabled={busy}\r\n value={lineEffort ?? ''}\r\n onClick={event => event.stopPropagation()}\r\n onChange={event => {\r\n event.stopPropagation()\r\n const value = event.currentTarget.value\r\n // '' (provider default) only exists for models declaring a\r\n // defaultEffort: the host keeps the current effort when a\r\n // selection omits reasoningEffort, so reset submits the\r\n // declared default instead.\r\n const target = value === '' ? model.reasoning?.defaultEffort : value\r\n if (target !== undefined) chooseEffort(group.id, model.id, target)\r\n }}\r\n >\r\n {model.reasoning.defaultEffort !== undefined && (\r\n <option value=\"\">{t('input.effort.default')}</option>\r\n )}\r\n {model.reasoning.defaultEffort === undefined && (\r\n <option value=\"\" hidden>{t('input.effort.default')}</option>\r\n )}\r\n {model.reasoning.efforts.map(level => (\r\n <option key={level.id} value={level.id}>{level.name}</option>\r\n ))}\r\n </select>\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 (isEditing) { 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 {isEditing && (\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 </div>\r\n {directory !== undefined && state.error !== null && <div style={errorBannerStyle} role=\"status\">{state.error}</div>}\r\n </div>\r\n </>\r\n )\r\n : null}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ModelPanel\r\n","/**\n * Thinking-levels settings card — the family settings tab face of the\n * dsh-thinking-levels plugin.\n *\n * The card binds this plugin's entry config through the `configForms` cordis\n * service and renders its fields: the level picker\n * (off / on / minimal / low / medium / high / xhigh / max / auto) plus the\n * scheduler toggles. Every change commits immediately through the scope (no\n * staged form): the decision is read per model request, so a committed change\n * applies to the next request without a restart.\n *\n * Below the scheduler rows, a \"model capabilities\" block edits the\n * `llm-pi-ai` namespace directly (read + write through the same settings\n * transport), borrowing dsh-thinking-effort's presentation: providers group\n * their models, each model row shows capability badges and expands into a\n * per-level editor where a level is ticked and its gateway wire value entered\n * (e.g. `high` → `ultra`); `off` left empty means \"do not send\". A search box\n * filters models and one-click presets apply official/generic level sets to\n * every thinking model.\n *\n * Kept dependency-free beyond react: the scopes are subscribed with\n * `useSyncExternalStore`, and the controls are plain HTML so the client bundle\n * needs no CSS modules and no primitives value import.\n */\nimport { useState, useSyncExternalStore } from 'react'\nimport type { CSSProperties, JSX } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { SettingsScope } from './scope-face.ts'\nimport type { EffortId } from '../thinking-level.ts'\nimport { CONTEXT_WINDOW_PRESETS, formatContextWindow, validateContextWindow } from '../context-window.ts'\nimport type { ThinkingLevelsConfig } from '../index.ts'\n\n/** One injected face: the plugin's own scope plus the llm-pi-ai namespace scope. */\nexport interface ThinkingLevelsCardInjected {\n scope: SettingsScope<ThinkingLevelsConfig>\n /** The `llm-pi-ai` settings namespace, read and written for model capabilities. */\n piAiScope: SettingsScope<unknown>\n}\n\n/** Full props: locale seat + the injected scopes. */\nexport type ThinkingLevelsCardProps = PropsLocale<'thinking-levels'> & ThinkingLevelsCardInjected\n\n/** The user-facing levels, in picker order: eight standard levels plus the auto scheduler sentinel. */\nconst EFFORT_OPTIONS: readonly EffortId[] = [\n 'off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'auto',\n]\n\n/**\n * The levels the capability editor offers. This is the llm-pi-ai\n * `reasoningEfforts` table-key space — pi-ai's fixed seven levels (schema\n * rejects any other key). `on` (the enable-thinking toggle) is a selector /\n * injection-level concept, expressed here by the `off` + `high` pair\n * (enable_thinking false/true), so it has no table key of its own.\n */\nconst CAPABILITY_LEVELS: readonly EffortId[] = [\n 'off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',\n] as const\n\n/** One-click presets, mirroring dsh-thinking-effort: official DeepSeek style and a generic set. */\nconst PRESETS: readonly { key: 'official' | 'generic'; levels: Record<string, unknown> }[] = [\n { key: 'official', levels: { off: null, high: 'high', max: 'max' } },\n { key: 'generic', levels: { off: null, low: 'low', medium: 'medium', high: 'high' } },\n]\n\n/** The wire thinking formats offered (llm-pi-ai's nameable set, incl. qwen-chat-template). */\nconst THINKING_FORMATS = [\n 'openai', 'deepseek', 'openrouter', 'together', 'zai', 'qwen',\n 'qwen-chat-template', 'string-thinking', 'ant-ling',\n] as const\n\n/* ── shared row styling (inline; keeps the client bundle CSS-free) ──────── */\n\nconst rowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '12px',\n padding: '6px 0',\n fontSize: '13px',\n lineHeight: '20px',\n}\n\nconst labelStyle: CSSProperties = { margin: 0, color: 'var(--dsw-alias-label-primary)' }\n\nconst controlStyle: CSSProperties = {\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-primary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '3px 8px',\n fontSize: '13px',\n}\n\nconst sectionStyle: CSSProperties = {\n marginTop: '14px',\n paddingTop: '12px',\n borderTop: '1px solid var(--dsw-alias-border-l2)',\n}\n\nconst fieldStyle: CSSProperties = { display: 'flex', flexDirection: 'column', gap: '4px' }\n\nconst fieldLabelStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\n\nconst hintStyle: CSSProperties = { margin: '6px 0 0', fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary)' }\n\n/** Provider group shell: an outlined row grouping its models. */\nconst providerStyle: CSSProperties = {\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '8px',\n margin: '8px 0 0',\n overflow: 'hidden',\n}\n\nconst providerHeadStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '7px 10px',\n background: 'var(--dsw-alias-bg-layer-2, rgba(127,127,127,0.06))',\n}\n\nconst providerNameStyle: CSSProperties = {\n margin: 0,\n flex: '1 1 auto',\n minWidth: 0,\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '12px',\n lineHeight: '18px',\n fontWeight: 600,\n color: 'var(--dsw-alias-label-primary)',\n overflowWrap: 'anywhere',\n}\n\nconst providerBadgeStyle: CSSProperties = {\n margin: 0,\n fontSize: '10px',\n lineHeight: '16px',\n color: 'var(--dsw-alias-label-tertiary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '0 5px',\n whiteSpace: 'nowrap',\n}\n\nconst iconButtonStyle: CSSProperties = {\n background: 'none',\n border: 'none',\n color: 'var(--dsw-alias-label-tertiary)',\n cursor: 'pointer',\n padding: '2px 4px',\n display: 'inline-flex',\n alignItems: 'center',\n}\n\n/** One model row inside a provider group. */\nconst modelRowStyle: CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '7px 10px',\n borderTop: '1px solid var(--dsw-alias-border-l2)',\n}\n\nconst modelIdStyle: CSSProperties = {\n margin: 0,\n flex: '1 1 auto',\n minWidth: 0,\n fontFamily: 'var(--ds-font-family-code, monospace)',\n fontSize: '12px',\n lineHeight: '18px',\n color: 'var(--dsw-alias-label-secondary)',\n overflowWrap: 'anywhere',\n}\n\n/** Capability badge chips (text / image / context). */\nconst badgeStyle: CSSProperties = {\n fontSize: '10px',\n lineHeight: '16px',\n color: 'var(--dsw-alias-label-tertiary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '0 5px',\n whiteSpace: 'nowrap',\n}\n\n/** The per-level editor grid: one row per level with a toggle, a label and a wire input. */\nconst levelRowStyle: CSSProperties = {\n display: 'grid',\n gridTemplateColumns: 'auto 92px minmax(0, 1fr)',\n alignItems: 'center',\n gap: '8px',\n padding: '4px 0',\n fontSize: '13px',\n}\n\nconst levelNameStyle: CSSProperties = { margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-label-secondary)' }\n\nconst wireInputStyle: CSSProperties = {\n background: 'var(--dsw-alias-bg-surface, #fff)',\n color: 'var(--dsw-alias-label-primary)',\n border: '1px solid var(--dsw-alias-border-l2)',\n borderRadius: '4px',\n padding: '3px 8px',\n fontSize: '12px',\n width: '100%',\n boxSizing: 'border-box',\n}\n\n/* ── helpers over the llm-pi-ai user layer ─────────────────────────────── */\n\n/** A row's `reasoningEfforts` as stored in the user layer. */\nfunction effortsOf(model: Record<string, unknown>): false | Record<string, unknown> | undefined {\n const value = model['reasoningEfforts']\n if (value === false) return false\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n return value as Record<string, unknown>\n }\n return undefined\n}\n\n/**\n * Build a `reasoningEfforts` table from a level→wire draft. `off` maps to\n * `null` (omit the reasoning option → enable_thinking false) unless the user\n * typed a wire value; every other ticked level keeps its typed wire value.\n * pi-ai rejects a table offering nothing beyond `off`, so a selection of only\n * `off` falls back to the default `high` level.\n */\nfunction effortTableOf(draft: Record<string, string | null>): Record<string, unknown> {\n const table: Record<string, unknown> = {}\n for (const level of CAPABILITY_LEVELS) {\n const wire = draft[level]\n if (wire === undefined || wire === null) continue\n const trimmed = typeof wire === 'string' ? wire.trim() : ''\n if (level === 'off') table[level] = trimmed === '' ? null : trimmed\n else if (trimmed !== '') table[level] = trimmed\n }\n if (Object.keys(table).length === 0 || Object.keys(table).every(level => table[level] === null)) {\n return { ...table, high: 'high' }\n }\n return table\n}\n\n/** Whether a row declares `compat.supportsReasoningEffort` (the wire sends reasoning_effort). */\nfunction supportsEffortOf(model: Record<string, unknown>): boolean {\n const compat = model['compat']\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\n return (compat as Record<string, unknown>)['supportsReasoningEffort'] === true\n}\n\n/** Patch one row's `compat` object, merging rather than replacing sibling fields. */\nfunction patchCompat(\n row: Record<string, unknown>,\n patch: (compat: Record<string, unknown>) => void,\n): void {\n const compat = typeof row['compat'] === 'object' && row['compat'] !== null && !Array.isArray(row['compat'])\n ? { ...(row['compat'] as Record<string, unknown>) }\n : {}\n patch(compat)\n if (Object.keys(compat).length === 0) delete row['compat']\n else row['compat'] = compat\n}\n\n/** The user-layer `providers` value of the llm-pi-ai namespace, when present. */\nfunction providersOf(snapshot: unknown): Record<string, unknown> {\n if (typeof snapshot !== 'object' || snapshot === null) return {}\n const user = (snapshot as { user?: unknown }).user\n if (typeof user !== 'object' || user === null || Array.isArray(user)) return {}\n const providers = (user as Record<string, unknown>)['providers']\n return typeof providers === 'object' && providers !== null && !Array.isArray(providers)\n ? providers as Record<string, unknown>\n : {}\n}\n\n/** Whether a route-level profile declares `compat.supportsDeveloperRole: false`. */\nfunction developerRoleDisabledOf(profile: unknown): boolean {\n if (typeof profile !== 'object' || profile === null) return false\n const compat = (profile as Record<string, unknown>)['compat']\n if (typeof compat !== 'object' || compat === null || Array.isArray(compat)) return false\n return (compat as Record<string, unknown>)['supportsDeveloperRole'] === false\n}\n\n/** One flattened capability entry: a provider's model at an array index. */\ninterface CapabilityEntry {\n providerId: string\n index: number\n model: Record<string, unknown>\n modelId: string\n /** The provider-level `compat`, applied to models that declare none (display parity). */\n providerCompat?: unknown\n /** The provider-level `defaultInput`, applied to models that declare none (display parity). */\n providerInput?: unknown[]\n}\n\n/** The effective `compat` of an entry: its own `compat` merged over the provider-level `compat`. */\nfunction compatOf(entry: CapabilityEntry): Record<string, unknown> {\n const base = typeof entry.providerCompat === 'object' && entry.providerCompat !== null\n ? entry.providerCompat as Record<string, unknown>\n : {}\n const own = entry.model['compat']\n return typeof own === 'object' && own !== null && !Array.isArray(own)\n ? { ...base, ...(own as Record<string, unknown>) }\n : base\n}\n\n/** Flatten the user-layer providers into capability entries (models arrays only). */\nfunction entriesOf(providers: Record<string, unknown>): CapabilityEntry[] {\n return Object.entries(providers).flatMap(([providerId, profile]) => {\n const raw = profile as Record<string, unknown>\n const models = raw['models']\n if (!Array.isArray(models)) return []\n const providerCompat = raw['compat']\n const providerInput = Array.isArray(raw['defaultInput']) ? raw['defaultInput'] as unknown[] : undefined\n return models.map((model, index) => ({\n providerId,\n index,\n model: (typeof model === 'object' && model !== null && !Array.isArray(model)\n ? model as Record<string, unknown>\n : {}),\n modelId: typeof model === 'object' && model !== null && typeof (model as Record<string, unknown>)['id'] === 'string'\n ? (model as Record<string, unknown>)['id'] as string\n : `#${index + 1}`,\n providerCompat,\n providerInput,\n }))\n })\n}\n\n/** Human-readable capability summary of one entry (input modalities + declared context window). */\nfunction summaryOf(entry: CapabilityEntry): { text: boolean; image: boolean; context: string | null } {\n // Modalities fall back to the provider-level `defaultInput` so a vision\n // gateway declared once on the route shows every model as vision, matching\n // llm-pi-ai's resolution and the adapter's runtime gate.\n const input = Array.isArray(entry.model['input'])\n ? entry.model['input'] as unknown[]\n : entry.providerInput\n const text = !Array.isArray(input) || input.length === 0 || input.includes('text')\n const image = Array.isArray(input) && input.includes('image')\n const contextWindow = entry.model['contextWindow']\n const context = typeof contextWindow === 'number' && Number.isFinite(contextWindow) && contextWindow > 0\n ? formatContextWindow(contextWindow)\n : null\n return { text, image, context }\n}\n\n/** A tiny inline chevron icon (no CSS modules). */\nfunction ChevronIcon({ open }: { open: boolean }): JSX.Element {\n return (\n <svg\n width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" aria-hidden\n style={{ transform: open ? 'rotate(180deg)' : 'none', transition: 'transform 0.16s' }}\n >\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )\n}\n\n/**\n * The llm-pi-ai model-capability editor block (dsh-thinking-effort style:\n * provider groups, model rows with badges, per-level wire editors, search and\n * one-click presets).\n * @param scope - the `llm-pi-ai` namespace scope.\n * @param t - copy lookup.\n * @param readonly - whether writes are forbidden.\n * @returns the capabilities block, or a placeholder when nothing is configured.\n */\nfunction ModelCapabilities(props: {\n scope: SettingsScope<unknown>\n t: (key: string) => string\n readonly: boolean\n}): JSX.Element {\n const { scope, t, readonly } = props\n const snapshot = useSyncExternalStore(\n (listener) => scope.subscribe(listener),\n () => scope.getSnapshot(),\n )\n const unavailable = snapshot.status === 'unavailable'\n const providers = snapshot.status === 'ready' ? providersOf(snapshot) : {}\n // Every llm-pi-ai provider is listed with its models — no list gating: the\n // official compat surface (dsh ≥ rc.8) means pi-ai serves every route\n // natively, so each model is editable right here.\n const allEntries = entriesOf(providers)\n\n // UI-only state: provider/model expansion, the wire drafts, and the query.\n const [query, setQuery] = useState('')\n const [expandedProviders, setExpandedProviders] = useState<Record<string, boolean>>({})\n const [expandedModels, setExpandedModels] = useState<Record<string, boolean>>({})\n const [drafts, setDrafts] = useState<Record<string, Record<string, string | null>>>({})\n const [busy, setBusy] = useState(false)\n const [contextRaw, setContextRaw] = useState<Record<string, string>>({})\n const [contextError, setContextError] = useState<Record<string, string>>({})\n\n const entryKey = (entry: CapabilityEntry): string => `${entry.providerId}\\u0000${entry.index}`\n\n /** Commit one patch over the user-layer providers. */\n const commitProviders = (mutate: (current: Record<string, unknown>) => Record<string, unknown>): void => {\n if (snapshot.status !== 'ready' || readonly) return\n setBusy(true)\n void scope.set('providers', mutate(structuredClone(providers)))\n .then(() => { setBusy(false) })\n .catch(() => { setBusy(false) })\n }\n\n /** Toggle the route-level official compat flag: unchecked = inherit (unset). */\n const toggleDeveloperRole = (providerId: string, next: boolean): void => {\n commitProviders((current) => {\n const profile = current[providerId] as Record<string, unknown> | undefined\n if (profile === undefined) return current\n const compat = typeof profile['compat'] === 'object' && profile['compat'] !== null && !Array.isArray(profile['compat'])\n ? { ...(profile['compat'] as Record<string, unknown>) }\n : {}\n if (next) compat['supportsDeveloperRole'] = false\n else delete compat['supportsDeveloperRole']\n if (Object.keys(compat).length === 0) delete profile['compat']\n else profile['compat'] = compat\n return current\n })\n }\n\n /** Patch one model row of one provider. */\n const patchModel = (\n providerId: string,\n index: number,\n patch: (model: Record<string, unknown>) => void,\n ): void => {\n commitProviders((current) => {\n const profile = current[providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) return current\n const model = profile.models[index]\n if (typeof model !== 'object' || model === null) return current\n patch(model as Record<string, unknown>)\n return current\n })\n }\n\n /** Toggle whether a model is a thinking model (reasoningEfforts table vs false). */\n const toggleThinking = (entry: CapabilityEntry, next: boolean): void => {\n patchModel(entry.providerId, entry.index, (row) => {\n if (next) {\n // Thinking on: a table must exist so the wire drives enable_thinking /\n // reasoning_effort. Start from the persisted table or the default high\n // set; a toggle model (no effort) keeps supportsReasoningEffort false.\n const effortCapable = supportsEffortOf(row)\n row['reasoningEfforts'] = effortCapable\n ? effortTableOf({ high: 'high' })\n : { off: null, high: 'high' }\n // Toggle-style thinking models need the official qwen format so pi-ai\n // sends enable_thinking (early vLLM thinking models return no thinking\n // content without that flag, and reject reasoning_effort). Only fills\n // an absent format — an explicit choice is never clobbered.\n if (!effortCapable) {\n patchCompat(row, (compat) => {\n if (compat['thinkingFormat'] === undefined) compat['thinkingFormat'] = 'qwen-chat-template'\n })\n }\n } else {\n // Thinking off: a non-reasoning model never takes an effort.\n row['reasoningEfforts'] = false\n }\n })\n }\n\n /** Toggle whether a model accepts reasoning_effort levels. */\n const toggleEffortCapable = (entry: CapabilityEntry, next: boolean): void => {\n patchModel(entry.providerId, entry.index, (row) => {\n patchCompat(row, (compat) => {\n compat['supportsReasoningEffort'] = next\n // Counterpart of the auto-fill in toggleThinking: effort-capable rows\n // need reasoning_effort on the wire, so drop the toggle-style qwen\n // format when effort turns on (it would drive enable_thinking instead).\n if (next && compat['thinkingFormat'] === 'qwen-chat-template') delete compat['thinkingFormat']\n })\n })\n }\n\n /** Apply one model's wire draft as its `reasoningEfforts` table. */\n const applyDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n const draft = drafts[key]\n if (draft === undefined) return\n const table = effortTableOf(draft)\n patchModel(entry.providerId, entry.index, (row) => {\n row['reasoningEfforts'] = table\n // Mark effort support only when the model already had it or the user\n // ticked a reasoning_effort-only level (minimal/low/medium/xhigh/max).\n // A toggle-only model (Qwen3.6: off/high = enable_thinking) must keep\n // supportsReasoningEffort false — flipping it would make the adapter\n // send a reasoning_effort the gateway rejects (400).\n const extended = Object.keys(table).some(level => level !== 'off' && level !== 'on' && level !== 'high')\n if (supportsEffortOf(row) || extended) {\n patchCompat(row, (compat) => {\n compat['supportsReasoningEffort'] = true\n })\n }\n })\n }\n\n /** Reset a model's draft to its persisted table (or the default high set). */\n const resetDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setDrafts(current => {\n const next = { ...current }\n const table = effortsOf(entry.model)\n if (typeof table === 'object' && table !== null) {\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\n level,\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\n ]))\n } else {\n next[key] = { off: '', high: 'high' }\n }\n return next\n })\n }\n\n /** Seed a model's draft when it is first expanded. */\n const ensureDraft = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setDrafts(current => {\n if (current[key] !== undefined) return current\n const next = { ...current }\n const table = effortsOf(entry.model)\n if (typeof table === 'object' && table !== null) {\n next[key] = Object.fromEntries(CAPABILITY_LEVELS.map(level => [\n level,\n table[level] === undefined ? null : (table[level] === null ? '' : String(table[level])),\n ]))\n } else {\n next[key] = { off: '', high: 'high' }\n }\n return next\n })\n }\n\n /** Apply a one-click preset to every thinking model. */\n const applyPreset = (levels: Record<string, unknown>): void => {\n commitProviders((current) => {\n for (const entry of entriesOf(current)) {\n const profile = current[entry.providerId] as { models?: unknown[] } | undefined\n if (profile === undefined || !Array.isArray(profile.models)) continue\n const model = profile.models[entry.index]\n if (typeof model !== 'object' || model === null) continue\n const row = model as Record<string, unknown>\n if (effortsOf(row) === undefined) continue // only thinking models\n // Replace the table but never touch supportsReasoningEffort: a\n // toggle-only model (Qwen3.6) must stay Off/On (enable_thinking), so\n // the request guard keeps clamping any injected level to its default\n // strength instead of sending a reasoning_effort the gateway rejects.\n row['reasoningEfforts'] = levels\n }\n return current\n })\n }\n\n /** Seed a model's context-window input when it is first expanded. */\n const seedContext = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setContextRaw(current => {\n if (current[key] !== undefined) return current\n const value = entry.model['contextWindow']\n return {\n ...current,\n [key]: typeof value === 'number' && Number.isFinite(value) ? String(value) : '',\n }\n })\n }\n\n /** Write (or delete) a model's `contextWindow` in the llm-pi-ai entry. */\n const commitContextWindow = (entry: CapabilityEntry, value: number | undefined): void => {\n const key = entryKey(entry)\n patchModel(entry.providerId, entry.index, (row) => {\n if (value === undefined) delete row['contextWindow']\n else row['contextWindow'] = value\n })\n setContextError(current => {\n const next = { ...current }\n delete next[key]\n return next\n })\n }\n\n /** Apply one preset immediately. */\n const applyContextPreset = (entry: CapabilityEntry, value: number): void => {\n const key = entryKey(entry)\n setContextRaw(current => ({ ...current, [key]: String(value) }))\n commitContextWindow(entry, value)\n }\n\n /** Validate and commit the custom input (blur / Enter); empty clears it. */\n const applyContextInput = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n const raw = (contextRaw[key] ?? '').trim()\n if (raw === '') {\n commitContextWindow(entry, undefined)\n return\n }\n const validation = validateContextWindow(raw)\n if (!validation.ok) {\n setContextError(current => ({\n ...current,\n [key]: t(validation.reason === 'integer'\n ? 'card.capabilities.contextInteger'\n : 'card.capabilities.contextRange'),\n }))\n return\n }\n commitContextWindow(entry, validation.value)\n }\n\n /** Clear the model's context-window declaration (delete the field). */\n const clearContext = (entry: CapabilityEntry): void => {\n const key = entryKey(entry)\n setContextRaw(current => ({ ...current, [key]: '' }))\n commitContextWindow(entry, undefined)\n }\n\n if (unavailable) {\n return (\n <div style={sectionStyle}>\n <p style={hintStyle}>{t('card.capabilities.unavailable')}</p>\n </div>\n )\n }\n if (allEntries.length === 0) {\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\n <p style={hintStyle}>{t('card.capabilities.empty')}</p>\n </div>\n )\n }\n\n const needle = query.trim().toLowerCase()\n const visible = needle === ''\n ? allEntries\n : allEntries.filter(entry =>\n entry.modelId.toLowerCase().includes(needle)\n || entry.providerId.toLowerCase().includes(needle))\n const providerIds = [...new Set(visible.map(entry => entry.providerId))]\n\n return (\n <div style={sectionStyle}>\n <p style={fieldLabelStyle}>{t('card.capabilities')}</p>\n <p style={hintStyle}>{t('card.capabilities.hint')}</p>\n\n {/* Search + one-click presets */}\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap', alignItems: 'center', margin: '8px 0 2px' }}>\n <input\n type=\"text\"\n value={query}\n placeholder={t('card.capabilities.search')}\n disabled={readonly || busy}\n style={{ ...controlStyle, flex: '1 1 160px', minWidth: '140px' }}\n onChange={(event) => setQuery(event.currentTarget.value)}\n />\n {PRESETS.map(preset => (\n <button\n key={preset.key}\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyPreset(preset.levels)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t(`card.capabilities.preset${preset.key === 'official' ? 'Official' : 'Generic'}`)}\n </button>\n ))}\n </div>\n\n {visible.length === 0\n ? <p style={hintStyle}>{t('card.capabilities.noMatches')}</p>\n : providerIds.map(providerId => {\n const providerEntries = visible.filter(entry => entry.providerId === providerId)\n const providerOpen = expandedProviders[providerId] === true || needle !== ''\n return (\n <div key={providerId} style={providerStyle}>\n <div style={providerHeadStyle}>\n <button\n type=\"button\"\n aria-expanded={providerOpen}\n disabled={readonly || busy}\n onClick={() => setExpandedProviders(current => ({\n ...current,\n [providerId]: current[providerId] !== true,\n }))}\n style={{\n ...iconButtonStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n }}\n title={providerOpen ? t('card.capabilities.collapseProvider') : t('card.capabilities.expandProvider')}\n >\n <ChevronIcon open={providerOpen} />\n </button>\n <p style={providerNameStyle}>{providerId}</p>\n <label\n style={{ display: 'inline-flex', alignItems: 'center', gap: '5px', fontSize: '11px', whiteSpace: 'nowrap', color: 'var(--dsw-alias-label-secondary)' }}\n title={t('card.capabilities.developerRoleHint')}\n >\n <input\n type=\"checkbox\"\n checked={developerRoleDisabledOf(providers[providerId])}\n disabled={readonly || busy}\n onChange={(event) => toggleDeveloperRole(providerId, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.developerRole')}</span>\n </label>\n <p style={providerBadgeStyle}>{providerEntries.length}</p>\n </div>\n {providerOpen\n ? providerEntries.map(entry => {\n const key = entryKey(entry)\n const modelOpen = expandedModels[key] === true\n const efforts = effortsOf(entry.model)\n const thinking = typeof efforts === 'object'\n // Display falls back to the provider-level `compat` so a\n // route-declared thinking/effort posture shows on every model.\n const compat = compatOf(entry)\n const supportsEffort = compat['supportsReasoningEffort'] === true\n const meta = summaryOf(entry)\n const format = typeof compat['thinkingFormat'] === 'string'\n ? compat['thinkingFormat']\n : undefined\n return (\n <div key={key}>\n <div style={modelRowStyle}>\n <button\n type=\"button\"\n aria-expanded={modelOpen}\n disabled={readonly || busy}\n onClick={() => {\n const next = expandedModels[key] !== true\n setExpandedModels(current => ({ ...current, [key]: next }))\n if (next) { ensureDraft(entry); seedContext(entry) }\n }}\n style={{\n ...iconButtonStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n }}\n title={modelOpen ? t('card.capabilities.closeModelSettings') : t('card.capabilities.openModelSettings')}\n >\n <ChevronIcon open={modelOpen} />\n </button>\n <p style={modelIdStyle}>{entry.modelId}</p>\n <span style={badgeStyle} title=\"text\">{meta.text ? 'T' : '–'}</span>\n <span style={badgeStyle} title=\"image\">{meta.image ? 'IMG' : '–'}</span>\n {meta.context !== null && <span style={badgeStyle}>{meta.context}</span>}\n {thinking && !supportsEffort && <span style={badgeStyle}>On/Off</span>}\n </div>\n {modelOpen\n ? (\n <div style={{ padding: '4px 10px 10px', borderTop: '1px solid var(--dsw-alias-border-l2)' }}>\n {/* Layer 1 — base capabilities: is it a thinking model? A vision model? */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', margin: '2px 0 8px' }}>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={thinking}\n disabled={readonly || busy}\n onChange={(event) => toggleThinking(entry, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.thinking')}</span>\n </label>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={meta.image}\n disabled={readonly || busy}\n onChange={(event) => {\n patchModel(entry.providerId, entry.index, (row) => {\n // Image input implies text input; the pair is written together.\n row['input'] = event.currentTarget.checked ? ['text', 'image'] : ['text']\n })\n }}\n />\n <span>{t('card.capabilities.vision')}</span>\n </label>\n </div>\n {/* Layer 2 — only for thinking models: does it take reasoning_effort levels? */}\n {thinking\n ? (\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px', margin: '0 0 8px' }}>\n <input\n type=\"checkbox\"\n checked={supportsEffort}\n disabled={readonly || busy}\n onChange={(event) => toggleEffortCapable(entry, event.currentTarget.checked)}\n />\n <span>{t('card.capabilities.supportsEffort')}</span>\n </label>\n )\n : null}\n {thinking && supportsEffort\n ? (\n <>\n {/* Per-level wire editor — only for effort-capable thinking models */}\n <p style={fieldLabelStyle}>{t('card.capabilities.efforts')}</p>\n <div style={{ margin: '4px 0 6px' }}>\n {CAPABILITY_LEVELS.map(level => {\n const wire = drafts[key]?.[level]\n const on = wire !== undefined && wire !== null\n return (\n <div key={level} style={levelRowStyle}>\n <label style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', fontSize: '12px' }}>\n <input\n type=\"checkbox\"\n checked={on}\n disabled={readonly || busy}\n onChange={(event) => {\n const checked = event.currentTarget.checked\n setDrafts(current => {\n const draft = { ...(current[key] ?? {}) }\n draft[level] = checked\n ? (level === 'off' ? '' : level)\n : null\n return { ...current, [key]: draft }\n })\n }}\n />\n <span>{level}</span>\n </label>\n <span style={levelNameStyle}>{level === 'off' ? t('card.capabilities.offPlaceholder') : '→'}</span>\n <input\n type=\"text\"\n value={wire ?? ''}\n disabled={readonly || busy || !on}\n placeholder={t('card.capabilities.wirePlaceholder')}\n style={wireInputStyle}\n onChange={(event) => {\n setDrafts(current => {\n const draft = { ...(current[key] ?? {}) }\n draft[level] = event.currentTarget.value\n return { ...current, [key]: draft }\n })\n }}\n />\n </div>\n )\n })}\n </div>\n <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyDraft(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.applyLevel')}\n </button>\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => resetDraft(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.restoreDefault')}\n </button>\n </div>\n </>\n )\n : null}\n {/* Layer 4 — thinking format (wire serialization) */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\n <label style={fieldStyle}>\n <span style={fieldLabelStyle}>{t('card.capabilities.thinkingFormat')}</span>\n <select\n style={controlStyle}\n value={format ?? 'inherit'}\n disabled={readonly || busy}\n onChange={(event) => {\n const next = event.currentTarget.value\n patchModel(entry.providerId, entry.index, (row) => {\n patchCompat(row, (compat) => {\n if (next === 'inherit') delete compat['thinkingFormat']\n else compat['thinkingFormat'] = next\n })\n })\n }}\n >\n <option value=\"inherit\">{t('card.capabilities.thinkingFormat.inherit')}</option>\n {THINKING_FORMATS.map(formatOption => (\n <option key={formatOption} value={formatOption}>{formatOption}</option>\n ))}\n </select>\n </label>\n </div>\n {/* Context-window limit: presets + custom integer (written to llm-pi-ai, live on next request) */}\n <div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', marginTop: '10px' }}>\n <label style={fieldStyle}>\n <span style={fieldLabelStyle}>{t('card.capabilities.contextWindow')}</span>\n <div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap', alignItems: 'center' }}>\n {CONTEXT_WINDOW_PRESETS.map(preset => (\n <button\n key={preset.value}\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => applyContextPreset(entry, preset.value)}\n style={{\n ...controlStyle,\n padding: '2px 8px',\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {preset.label}\n </button>\n ))}\n <input\n type=\"text\"\n value={contextRaw[key] ?? ''}\n disabled={readonly || busy}\n placeholder={t('card.capabilities.contextCustomPlaceholder')}\n style={{ ...controlStyle, width: '120px' }}\n onChange={(event) => {\n const next = event.currentTarget.value\n setContextRaw(current => ({ ...current, [key]: next }))\n }}\n onBlur={() => applyContextInput(entry)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') event.currentTarget.blur()\n }}\n />\n <button\n type=\"button\"\n disabled={readonly || busy}\n onClick={() => clearContext(entry)}\n style={{\n ...controlStyle,\n cursor: readonly || busy ? 'default' : 'pointer',\n opacity: readonly || busy ? 0.5 : 1,\n }}\n >\n {t('card.capabilities.contextClear')}\n </button>\n </div>\n {contextError[key] !== undefined\n ? (\n <span style={{ margin: 0, fontSize: '12px', lineHeight: '18px', color: 'var(--dsw-alias-danger, #e5484d)' }}>\n {contextError[key]}\n </span>\n )\n : null}\n </label>\n </div>\n </div>\n )\n : null}\n </div>\n )\n })\n : null}\n </div>\n )\n })}\n {readonly ? <p style={hintStyle}>{t('card.readonly')}</p> : null}\n </div>\n )\n}\n\n/**\n * The card body, wrapped in a disclosure shell like every peer settings card:\n * a header (name + description + chevron) that toggles the body, expanded by\n * default so the family section reads as an open page of drawers.\n * @param props - locale copy and the injected scopes.\n */\nexport function ThinkingLevelsCard({ t, scope, piAiScope }: ThinkingLevelsCardProps): JSX.Element {\n const [open, setOpen] = useState(true)\n const snapshot = useSyncExternalStore(\n (listener) => scope.subscribe(listener),\n () => scope.getSnapshot(),\n )\n const unavailable = snapshot.status === 'unavailable'\n const readonly = unavailable || !snapshot.writable\n // configForms serves the STORED doc: volatile fields arrive as plain values\n // (simplify() unwraps the live refs before persistence), so the card sees a\n // plain config shape even though the host-side type carries Volatile unions.\n const value = (snapshot.value ?? {}) as unknown as Partial<{\n enabled: boolean\n level: EffortId\n allowDowngrade: boolean\n allowUpgrade: boolean\n }>\n const level = EFFORT_OPTIONS.includes(value.level as EffortId) ? value.level as EffortId : 'auto'\n\n return (\n <div style={{\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\n background: 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))',\n borderRadius: '12px',\n transition: 'border-color 0.16s, background 0.16s',\n }}>\n <button\n type=\"button\"\n aria-expanded={open}\n style={{\n appearance: 'none',\n width: '100%',\n font: 'inherit',\n color: 'inherit',\n textAlign: 'left',\n cursor: 'pointer',\n background: 'none',\n border: 0,\n borderRadius: '12px',\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n padding: '14px 16px',\n }}\n onClick={() => { setOpen(current => !current) }}\n >\n <span style={{ flex: '1 1 0%', minWidth: 0 }}>\n <div style={{ fontSize: '14px', fontWeight: 600, color: 'var(--dsw-alias-label-primary)' }}>{t('card.title')}</div>\n <div style={{ color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))', fontSize: '13px', lineHeight: 1.5 }}>{t('card.description')}</div>\n </span>\n <svg\n width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden\n style={{\n color: 'var(--dsw-alias-label-tertiary, rgba(127,127,127,0.8))',\n flex: '0 0 auto',\n transition: 'transform 0.16s',\n transform: open ? 'rotate(180deg)' : 'none',\n }}\n >\n <path d=\"M4 6l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n {open\n ? (\n <div style={{ padding: '12px 16px' }}>\n {unavailable\n ? (\n <div style={{ fontSize: '13px', color: 'var(--dsw-alias-label-tertiary)' }}>\n {t('card.unavailable')}\n </div>\n )\n : (\n <>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-level\" style={labelStyle}>{t('card.level')}</label>\n <select\n id=\"plugin-config-thinking-levels-level\"\n value={level}\n disabled={readonly}\n style={controlStyle}\n onChange={(event) => { void scope.set('level', event.currentTarget.value as EffortId) }}\n >\n {EFFORT_OPTIONS.map((option) => (\n <option key={option} value={option}>{t(`card.level.${option}`)}</option>\n ))}\n </select>\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-enabled\" style={labelStyle}>{t('card.enabled')}</label>\n <input\n id=\"plugin-config-thinking-levels-enabled\"\n type=\"checkbox\"\n checked={value.enabled ?? true}\n disabled={readonly}\n onChange={(event) => { void scope.set('enabled', event.currentTarget.checked) }}\n />\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-downgrade\" style={labelStyle}>{t('card.allowDowngrade')}</label>\n <input\n id=\"plugin-config-thinking-levels-downgrade\"\n type=\"checkbox\"\n checked={value.allowDowngrade ?? true}\n disabled={readonly || value.level !== 'auto'}\n onChange={(event) => { void scope.set('allowDowngrade', event.currentTarget.checked) }}\n />\n </div>\n <div style={rowStyle}>\n <label htmlFor=\"plugin-config-thinking-levels-upgrade\" style={labelStyle}>{t('card.allowUpgrade')}</label>\n <input\n id=\"plugin-config-thinking-levels-upgrade\"\n type=\"checkbox\"\n checked={value.allowUpgrade ?? false}\n disabled={readonly || value.level !== 'auto'}\n onChange={(event) => { void scope.set('allowUpgrade', event.currentTarget.checked) }}\n />\n </div>\n {!snapshot.writable\n && <p style={{ margin: '8px 0 0', fontSize: '12px', color: 'var(--dsw-alias-label-tertiary)' }}>{t('card.readonly')}</p>}\n <ModelCapabilities scope={piAiScope} t={t} readonly={readonly} />\n </>\n )}\n </div>\n )\n : null}\n </div>\n )\n}\n","/**\n * FamilySettingsSection — the top-level 「起子插件设置」 settings section.\n *\n * One `settings.section` nav entry (registered by this plugin) whose entry\n * declares the `dsh-family.tab` child slot; sibling plugins (session-guard\n * first) contribute their cards there via `ctx.slots.inject('dsh-family.tab',\n * …)`. The section renders the family's own thinking-levels card as the first\n * tab and every contributor as a following tab — the same tabs-around-pages\n * pattern the built-in Plugins section uses (ui-settings-plugins): the tab\n * ledger is a HostObservable projected from the child-slot registry, and the\n * active tab mounts through `renderSlot(key, {}, { only: id })`. Each card is\n * a disclosure drawer expanded by default, so an opened tab shows its full\n * panel right away.\n *\n * When this section is absent the whole family surface is absent; a\n * contributor's inject simply idles (an undischarged wait never blocks the\n * client half), so plugins stay fully functional without their card.\n */\nimport { useState } from 'react'\nimport type { JSX } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport { ThinkingLevelsCard, type ThinkingLevelsCardInjected } from './card.tsx'\n\n/**\n * Structural mirrors of the ui-slots faces this section consumes (the same\n * pattern as scope-face.ts: the package's `export *` type graph resolves\n * unreliably outside the harness workspace, so the handful of shapes are\n * declared locally instead).\n */\ntype HostObservable<T> = {\n getSnapshot(): T\n subscribe(listener: () => void): () => void\n}\n\n/** One contributor tab projected from the `dsh-family.tab` ledger. */\nexport interface FamilyTabEntry {\n id: string\n order: number\n label: string\n}\n\n/** Registration-side business face for the section. */\nexport interface FamilySectionInjected extends ThinkingLevelsCardInjected {\n hooks: {\n /** Ordered projection of the contributor ledger (locale-aware). */\n tabs: HostObservable<readonly FamilyTabEntry[]>\n }\n}\n\n/** The framework-delivered child-slot dispatcher, narrowed to our one child key. */\ninterface FamilyRenderSlots {\n renderSlot(key: 'dsh-family.tab', owner?: object, opts?: { only?: string; fallback?: React.ReactNode }): React.ReactNode\n}\n\n/** Full props: locale + contributor dispatcher + the resolved inject face. */\nexport type FamilySettingsSectionProps =\n PropsLocale<'thinking-levels'>\n & FamilyRenderSlots\n & FamilySectionInjected\n\n/** This plugin's own tab, always first: the thinking-levels card itself. */\nconst OWN_TAB_ID = 'thinking-levels'\n\n/** The hooks-compartment selector hook face (bound `use<Name>` hook). */\ninterface FamilyHooksFace {\n useTabs: <S>(selector: (value: readonly FamilyTabEntry[]) => S) => S\n}\n\nexport function FamilySettingsSection(props: FamilySettingsSectionProps): JSX.Element {\n const { t, renderSlot, scope, piAiScope } = props\n const { useTabs } = props as unknown as FamilyHooksFace\n const contributors = useTabs(value => value)\n const [activeId, setActiveId] = useState<string>(OWN_TAB_ID)\n const rows = [\n { id: OWN_TAB_ID, order: Number.NEGATIVE_INFINITY, label: t('card.title') },\n ...contributors,\n ]\n const active = rows.some(row => row.id === activeId) ? activeId : OWN_TAB_ID\n\n return (\n <div style={{ display: 'grid', gap: '12px' }}>\n <div role=\"tablist\" aria-label={t('family.title')} style={{ display: 'flex', flexWrap: 'wrap', gap: '4px' }}>\n {rows.map(row => (\n <button\n key={row.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={row.id === active}\n onClick={() => { setActiveId(row.id) }}\n style={{\n appearance: 'none',\n font: 'inherit',\n cursor: 'pointer',\n border: '1px solid var(--dsw-alias-border-l2, rgba(127,127,127,0.35))',\n background: row.id === active ? 'var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.08))' : 'none',\n color: 'var(--dsw-alias-label-primary, inherit)',\n borderRadius: '8px',\n padding: '5px 12px',\n fontSize: '13px',\n }}\n >\n {row.label}\n </button>\n ))}\n </div>\n <div role=\"tabpanel\">\n {active === OWN_TAB_ID\n ? <ThinkingLevelsCard t={t} scope={scope} piAiScope={piAiScope} />\n : renderSlot('dsh-family.tab', {}, { only: active, fallback: null })}\n </div>\n </div>\n )\n}\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 client registration since the DSH 0.1.7 line: the host renders the\r\n * 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 *\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 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, en, ja, ko, zh } from './locales.ts'\r\nimport { ModelPanel, type ModelPanelInjected } from './model-panel.tsx'\r\nimport { FamilySettingsSection, type FamilySectionInjected, type FamilyTabEntry } from './family-tab.tsx'\r\nimport type { ThinkingLevelsConfig } from '../index.ts'\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}\r\n\r\n/** Services required by the browser half. */\r\nexport const inject = ['slots', 'locale', 'configForms', 'modelDirectories']\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 const t = ctx.locale.bind(NS)\r\n // `register(ns, dicts)` is typed to the built-in locale ids (`zh` / `en`\r\n // only); the shipped `ja` / `ko` dictionaries go through the single-locale\r\n // overload, so they are installed 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 ]\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 ;(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 ctx.slots.inject('conversation.input.model', function* () {\r\n yield ctx.slots.register({\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 piAiScope: ctx.configForms.get<unknown>('llm-pi-ai'),\r\n deepseekScope: ctx.configForms.get<unknown>('llm-deepseek'),\r\n }\r\n },\r\n }, ModelPanel)\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 const sectionInjected = (): FamilySectionInjected => ({\r\n scope: ctx.configForms.get<ThinkingLevelsConfig>('dsh-thinking-levels'),\r\n piAiScope: ctx.configForms.get<unknown>('llm-pi-ai'),\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 ctx.slots.inject('settings.section', function* () {\r\n yield ctx.slots.register({\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 children: { 'dsh-family.tab': { kind: 'list', scope: 'root' } },\r\n }, FamilySettingsSection)\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,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,oCAAoC;GACpC,sCAAsC;GACtC,uCAAuC;GACvC,wCAAwC;GACxC,4BAA4B;GAC5B,8BAA8B;GAC9B,oCAAoC;GACpC,6BAA6B;GAC7B,qCAAqC;GACrC,oCAAoC;GACpC,qCAAqC;GACrC,gCAAgC;GAChC,oCAAoC;GACpC,6BAA6B;GAC7B,iCAAiC;GACjC,2BAA2B;GAC3B,oCAAoC;GACpC,4CAA4C;GAC5C,mCAAmC;GACnC,8CAA8C;GAC9C,kCAAkC;GAClC,oCAAoC;GACpC,kCAAkC;GAClC,iCAAiC;GACjC,uBAAuB;GACvB,4BAA4B;GAC5B,uBAAuB;GACvB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