dsh-thinking-levels 4.3.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.ja.md +26 -15
- package/CHANGELOG.ko.md +26 -15
- package/CHANGELOG.md +18 -2
- package/LICENSE +21 -21
- package/README.md +6 -0
- package/README.zh.md +6 -0
- package/cordis.patch.yml +3 -3
- package/dsh.plugin.json +1 -1
- package/lib/billing-projection.d.ts +22 -8
- package/lib/billing-projection.js +16 -9
- package/lib/client.js +674 -246
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +59 -6
- package/lib/index.js +57 -8
- package/lib/price-catalog.d.ts +23 -9
- package/lib/price-catalog.js +92 -12
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -28,6 +28,13 @@ window.__ModuleLoader__.load({
|
|
|
28
28
|
"card.enabled": "启用",
|
|
29
29
|
"card.allowDowngrade": "允许降档(auto 可降至 low)",
|
|
30
30
|
"card.allowUpgrade": "允许升档(auto 可升至 max)",
|
|
31
|
+
"card.defaultPricing": "目录外定价",
|
|
32
|
+
"card.defaultPricingHint": "定价目录未收录的模型(含其他插件接入的网关型号)如何计价;目录内模型始终按自己的目录价。改价只影响后续新账。",
|
|
33
|
+
"card.defaultPricing.estimate": "estimate — 典型价兜底估算(未校准·仅供参考,默认)",
|
|
34
|
+
"card.defaultPricing.cn": "cn — 人民币校准档(目录外仍按典型价估算)",
|
|
35
|
+
"card.defaultPricing.global": "global — 美元校准档(USD 目录补录前目录外仍为估算)",
|
|
36
|
+
"card.defaultPricing.custom": "custom — 自填价(未提供整行价时不计价)",
|
|
37
|
+
"card.defaultPricing.off": "off — 不计价(目录外显示「未计价」)",
|
|
31
38
|
"card.unavailable": "设置命名空间不可用:请确认 dsh-thinking-levels 已装配进 profile。",
|
|
32
39
|
"card.readonly": "只读",
|
|
33
40
|
"card.capabilities": "模型能力(llm-pi-ai 自定义提供方)",
|
|
@@ -92,6 +99,11 @@ window.__ModuleLoader__.load({
|
|
|
92
99
|
"model.panel.noTarget": "该模型没有可写的配置项",
|
|
93
100
|
"model.panel.unavailable": "当前会话的模型目录不可用",
|
|
94
101
|
"input.effort.title": "思考强度",
|
|
102
|
+
"panel.search.placeholder": "搜索模型…",
|
|
103
|
+
"card.takeoverUi": "模型界面接管",
|
|
104
|
+
"card.takeoverUiHint": "开启后由本插件重绘输入框的模型选择面板(含每行上下文/档位编辑与搜索);关闭(默认)保留官方模型弹窗——auto 档位照常出现,搜索与加载由官方界面负责。更改后需重载页面生效。",
|
|
105
|
+
"card.capabilities.apiUnsupported": "该提供方使用非 openai-completions 协议:思考兼容字段由宿主 pi-ai 原生处理,此处不可配置。",
|
|
106
|
+
"card.dsContextTitle": "官方 DeepSeek 模型上下文上限",
|
|
95
107
|
"input.effort.default": "提供方默认",
|
|
96
108
|
"input.effort.reset": "恢复提供方默认",
|
|
97
109
|
"card.capabilities.failed": "保存失败:配置被拒绝或冲突,请检查值。"
|
|
@@ -114,6 +126,13 @@ window.__ModuleLoader__.load({
|
|
|
114
126
|
"card.enabled": "Enabled",
|
|
115
127
|
"card.allowDowngrade": "Allow downgrade (auto may drop to low)",
|
|
116
128
|
"card.allowUpgrade": "Allow upgrade (auto may lift to max)",
|
|
129
|
+
"card.defaultPricing": "Off-catalog pricing",
|
|
130
|
+
"card.defaultPricingHint": "How to price models the catalog does not list (including gateway models brought in by other plugins); catalogued models always use their own rates. Pricing changes only affect new accounting from now on.",
|
|
131
|
+
"card.defaultPricing.estimate": "estimate — typical-price fallback (uncalibrated, reference only; default)",
|
|
132
|
+
"card.defaultPricing.cn": "cn — CNY calibration tier (off-catalog still falls back to the typical price)",
|
|
133
|
+
"card.defaultPricing.global": "global — USD calibration tier (off-catalog stays estimated until USD rows land)",
|
|
134
|
+
"card.defaultPricing.custom": "custom — self-entered rates (unpriced without a full row)",
|
|
135
|
+
"card.defaultPricing.off": "off — do not bill (off-catalog shows \"not billed\")",
|
|
117
136
|
"card.unavailable": "Settings namespace unavailable: make sure dsh-thinking-levels is assembled into this profile.",
|
|
118
137
|
"card.readonly": "Read-only",
|
|
119
138
|
"card.capabilities": "Model capabilities (llm-pi-ai custom providers)",
|
|
@@ -178,6 +197,11 @@ window.__ModuleLoader__.load({
|
|
|
178
197
|
"model.panel.noTarget": "No writable config entry for this model",
|
|
179
198
|
"model.panel.unavailable": "The model directory is unavailable for this session",
|
|
180
199
|
"input.effort.title": "Reasoning effort",
|
|
200
|
+
"panel.search.placeholder": "Search models…",
|
|
201
|
+
"card.takeoverUi": "Model UI takeover",
|
|
202
|
+
"card.takeoverUiHint": "On: this plugin replaces the composer model picker with its own panel (per-line context/effort editors + search). Off (default): the official popup stays — the auto level still appears, and search and loading remain the shipped selector’s. Reload the page after changing.",
|
|
203
|
+
"card.capabilities.apiUnsupported": "This provider uses a non-openai-completions protocol: the thinking-compat fields are handled natively by pi-ai and are not configurable here.",
|
|
204
|
+
"card.dsContextTitle": "Official DeepSeek context windows",
|
|
181
205
|
"input.effort.default": "Provider default",
|
|
182
206
|
"input.effort.reset": "Restore provider default",
|
|
183
207
|
"card.capabilities.failed": "Save failed: the value was rejected or conflicted. Check it."
|
|
@@ -200,6 +224,13 @@ window.__ModuleLoader__.load({
|
|
|
200
224
|
"card.enabled": "有効",
|
|
201
225
|
"card.allowDowngrade": "降格を許可(auto は low まで下げられる)",
|
|
202
226
|
"card.allowUpgrade": "昇格を許可(auto は max まで上げられる)",
|
|
227
|
+
"card.defaultPricing": "カタログ外モデルの価格",
|
|
228
|
+
"card.defaultPricingHint": "価格カタログに未登録のモデル(他プラグイン経由のゲートウェイモデル含む)の計算方法。登録済みモデルは常にカタログ価格を使用。価格変更は以降の新規記録のみ影響。",
|
|
229
|
+
"card.defaultPricing.estimate": "estimate — 典型価格でフォールバック見積り(未校正・参考値、デフォルト)",
|
|
230
|
+
"card.defaultPricing.cn": "cn — 人民元キャリブレーション(カタログ外は典型価格の見積りのまま)",
|
|
231
|
+
"card.defaultPricing.global": "global — ドルキャリブレーション(USD 行の補録前はカタログ外から見積り)",
|
|
232
|
+
"card.defaultPricing.custom": "custom — 手入力価格(行が不完全なら未計算)",
|
|
233
|
+
"card.defaultPricing.off": "off — 計算しない(カタログ外は「未計算」と表示)",
|
|
203
234
|
"card.unavailable": "設定名前空間が利用できません:dsh-thinking-levels が profile に組み込まれているか確認してください。",
|
|
204
235
|
"card.readonly": "読み取り専用",
|
|
205
236
|
"card.capabilities": "モデル能力(llm-pi-ai カスタムプロバイダー)",
|
|
@@ -264,6 +295,11 @@ window.__ModuleLoader__.load({
|
|
|
264
295
|
"model.panel.noTarget": "このモデルには書き込み可能な設定項目がありません",
|
|
265
296
|
"model.panel.unavailable": "このセッションのモデルディレクトリは利用できません",
|
|
266
297
|
"input.effort.title": "思考レベル",
|
|
298
|
+
"panel.search.placeholder": "モデルを検索…",
|
|
299
|
+
"card.takeoverUi": "モデルUI引き継ぎ",
|
|
300
|
+
"card.takeoverUiHint": "ON にするとこのプラグインが入力欄のモデル選択を独自パネル(行別のコンテキスト/レベル編集+検索)に置き換えます。OFF(既定)では公式ポップアップが維持され、auto レベルは引き続き表示され、検索と読み込みは標準セレクタの役割です。変更後はページの再読み込みが必要です。",
|
|
301
|
+
"card.capabilities.apiUnsupported": "このプロバイダーは openai-completions 以外のプロトコルを使用しています:思考互換フィールドは pi-ai がネイティブに処理するため、ここで設定できません。",
|
|
302
|
+
"card.dsContextTitle": "公式 DeepSeek モデルのコンテキスト上限",
|
|
267
303
|
"input.effort.default": "プロバイダーの既定",
|
|
268
304
|
"input.effort.reset": "プロバイダーの既定に戻す",
|
|
269
305
|
"card.capabilities.failed": "保存に失敗しました:値が拒否されたか競合しています。確認してください。"
|
|
@@ -286,6 +322,13 @@ window.__ModuleLoader__.load({
|
|
|
286
322
|
"card.enabled": "활성화",
|
|
287
323
|
"card.allowDowngrade": "다운그레이드 허용(auto가 low까지 내릴 수 있음)",
|
|
288
324
|
"card.allowUpgrade": "업그레이드 허용(auto가 max까지 올릴 수 있음)",
|
|
325
|
+
"card.defaultPricing": "카탈로그 외 과금",
|
|
326
|
+
"card.defaultPricingHint": "가격 카탈로그에 없는 모델(다른 플러그인으로 유입된 게이트웨이 모델 포함)의 과금 방식. 카탈로그 등재 모델은 항상 자체 등재가 사용. 가격 변경은 이후 신규 기록에만 반영.",
|
|
327
|
+
"card.defaultPricing.estimate": "estimate — 전형가 폴백 추정(미교정·참고용, 기본)",
|
|
328
|
+
"card.defaultPricing.cn": "cn — 위안화 보정 등급(카탈로그 외는 여전히 전형가 추정)",
|
|
329
|
+
"card.defaultPricing.global": "global — 달러 보정 등급(USD 행 보충 전 카탈로그 외는 추정)",
|
|
330
|
+
"card.defaultPricing.custom": "custom — 직접 입력 가격(행이 불완전하면 미과금)",
|
|
331
|
+
"card.defaultPricing.off": "off — 미과금(카탈로그 외는 \"미과금\" 표시)",
|
|
289
332
|
"card.unavailable": "설정 네임스페이스를 사용할 수 없습니다: dsh-thinking-levels가 이 profile에 조립되었는지 확인하세요.",
|
|
290
333
|
"card.readonly": "읽기 전용",
|
|
291
334
|
"card.capabilities": "모델 기능(llm-pi-ai 사용자 지정 제공자)",
|
|
@@ -350,6 +393,11 @@ window.__ModuleLoader__.load({
|
|
|
350
393
|
"model.panel.noTarget": "이 모델에는 쓰기 가능한 설정 항목이 없습니다",
|
|
351
394
|
"model.panel.unavailable": "이 세션의 모델 디렉터리를 사용할 수 없습니다",
|
|
352
395
|
"input.effort.title": "추론 강도",
|
|
396
|
+
"panel.search.placeholder": "모델 검색…",
|
|
397
|
+
"card.takeoverUi": "모델 UI 인수",
|
|
398
|
+
"card.takeoverUiHint": "켜면 이 플러그인이 입력창의 모델 선택을 자체 패널(행별 컨텍스트/레벨 편집 + 검색)로 대체합니다. 끄면(기본) 공식 팝업이 유지되며 auto 레벨은 계속 표시되고 검색과 로딩은 표준 셀렉터가 담당합니다. 변경 후 페이지 새로고침이 필요합니다.",
|
|
399
|
+
"card.capabilities.apiUnsupported": "이 제공자는 openai-completions 이외 프로토콜을 사용합니다: 사고 호환 필드는 pi-ai가 네이티브로 처리하므로 여기서 설정할 수 없습니다.",
|
|
400
|
+
"card.dsContextTitle": "공식 DeepSeek 모델 컨텍스트 상한",
|
|
353
401
|
"input.effort.default": "공급자 기본값",
|
|
354
402
|
"input.effort.reset": "공급자 기본값으로 복원",
|
|
355
403
|
"card.capabilities.failed": "저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요."
|
|
@@ -372,6 +420,13 @@ window.__ModuleLoader__.load({
|
|
|
372
420
|
"card.enabled": "Activé",
|
|
373
421
|
"card.allowDowngrade": "Autoriser la rétrogradation (auto peut descendre à low)",
|
|
374
422
|
"card.allowUpgrade": "Autoriser la montée (auto peut monter à max)",
|
|
423
|
+
"card.defaultPricing": "Tarification hors catalogue",
|
|
424
|
+
"card.defaultPricingHint": "Comment tarifer les modèles absents du catalogue (y compris les modèles de passerelle apportés par d'autres plugins) ; les modèles catalogués gardent leurs tarifs. Les changements ne touchent que les nouvelles lignes.",
|
|
425
|
+
"card.defaultPricing.estimate": "estimate — estimation par prix type (non calibrée, à titre indicatif ; par défaut)",
|
|
426
|
+
"card.defaultPricing.cn": "cn — palier calibré CNY (hors catalogue : estimation au prix type)",
|
|
427
|
+
"card.defaultPricing.global": "global — palier calibré USD (hors catalogue estimé tant que les lignes USD manquent)",
|
|
428
|
+
"card.defaultPricing.custom": "custom — tarifs saisis (non facturé sans ligne complète)",
|
|
429
|
+
"card.defaultPricing.off": "off — ne pas facturer (hors catalogue affiche « non facturé »)",
|
|
375
430
|
"card.unavailable": "Espace de noms des paramètres indisponible : assurez-vous que dsh-thinking-levels est assemblé dans ce profil.",
|
|
376
431
|
"card.readonly": "Lecture seule",
|
|
377
432
|
"card.capabilities": "Capacités du modèle (fournisseurs personnalisés llm-pi-ai)",
|
|
@@ -436,6 +491,11 @@ window.__ModuleLoader__.load({
|
|
|
436
491
|
"model.panel.noTarget": "Aucune entrée de configuration inscriptible pour ce modèle",
|
|
437
492
|
"model.panel.unavailable": "Le répertoire de modèles est indisponible pour cette session",
|
|
438
493
|
"input.effort.title": "Effort de raisonnement",
|
|
494
|
+
"panel.search.placeholder": "Rechercher des modèles…",
|
|
495
|
+
"card.takeoverUi": "Reprise de l'UI modèle",
|
|
496
|
+
"card.takeoverUiHint": "Activé, ce plugin remplace le sélecteur de modèle du composeur par son propre panneau (éditeurs contexte/niveau par ligne + recherche). Désactivé (défaut), la popup officielle reste en place — le niveau auto apparaît toujours, recherche et chargement appartiennent au sélecteur d'origine. Rechargez la page après modification.",
|
|
497
|
+
"card.capabilities.apiUnsupported": "Ce fournisseur utilise un protocole autre qu'openai-completions : les champs de compat de réflexion sont gérés nativement par pi-ai et ne sont pas configurables ici.",
|
|
498
|
+
"card.dsContextTitle": "Fenêtres de contexte DeepSeek officielles",
|
|
439
499
|
"input.effort.default": "Valeur par défaut du fournisseur",
|
|
440
500
|
"input.effort.reset": "Restaurer la valeur par défaut du fournisseur",
|
|
441
501
|
"card.capabilities.failed": "Échec de l'enregistrement : la valeur a été rejetée ou est en conflit. Vérifiez-la."
|
|
@@ -458,6 +518,13 @@ window.__ModuleLoader__.load({
|
|
|
458
518
|
"card.enabled": "Aktiviert",
|
|
459
519
|
"card.allowDowngrade": "Herabstufung erlauben (auto kann auf low fallen)",
|
|
460
520
|
"card.allowUpgrade": "Hochstufung erlauben (auto kann auf max steigen)",
|
|
521
|
+
"card.defaultPricing": "Preis außerhalb des Katalogs",
|
|
522
|
+
"card.defaultPricingHint": "Bepreisung von Modellen ohne Katalogeintrag (inkl. Gateway-Modelle anderer Plugins); katalogisierte Modelle nutzen immer ihre Katalogpreise. Änderungen wirken nur auf neue Buchungen.",
|
|
523
|
+
"card.defaultPricing.estimate": "estimate — Schätzung über Typicalpreis (unkalibriert, nur Referenz; Standard)",
|
|
524
|
+
"card.defaultPricing.cn": "cn — Kalibrierungsstufe CNY (ohne Katalogeintrag weiterhin Typicalpreis-Schätzung)",
|
|
525
|
+
"card.defaultPricing.global": "global — Kalibrierungsstufe USD (ohne Katalogeintrag geschätzt, bis USD-Zeilen ergänzt sind)",
|
|
526
|
+
"card.defaultPricing.custom": "custom — eigene Preise (ohne vollständige Zeile unbestückt)",
|
|
527
|
+
"card.defaultPricing.off": "off — nicht abrechnen (ohne Katalogeintrag „nicht abgerechnet“)",
|
|
461
528
|
"card.unavailable": "Einstellungs-Namensraum nicht verfügbar: Stellen Sie sicher, dass dsh-thinking-levels in diesem Profil eingebunden ist.",
|
|
462
529
|
"card.readonly": "Schreibgeschützt",
|
|
463
530
|
"card.capabilities": "Modellfähigkeiten (llm-pi-ai benutzerdefinierte Anbieter)",
|
|
@@ -522,6 +589,11 @@ window.__ModuleLoader__.load({
|
|
|
522
589
|
"model.panel.noTarget": "Kein beschreibbarer Konfigurationseintrag für dieses Modell",
|
|
523
590
|
"model.panel.unavailable": "Das Modellverzeichnis ist für diese Sitzung nicht verfügbar",
|
|
524
591
|
"input.effort.title": "Schlussfolgerungsaufwand",
|
|
592
|
+
"panel.search.placeholder": "Modelle suchen…",
|
|
593
|
+
"card.takeoverUi": "Modell-UI-Übernahme",
|
|
594
|
+
"card.takeoverUiHint": "Ein: dieses Plugin ersetzt die Modellauswahl des Composers durch ein eigenes Panel (Kontext-/Stufen-Editoren je Zeile + Suche). Aus (Standard): die offizielle Popup bleibt — die auto-Stufe erscheint weiterhin; Suche und Laden übernimmt der mitgelieferte Wähler. Nach der Änderung die Seite neu laden.",
|
|
595
|
+
"card.capabilities.apiUnsupported": "Dieser Provider nutzt ein anderes Protokoll als openai-completions: die Thinking-Kompatibilitätsfelder werden von pi-ai nativ behandelt und sind hier nicht konfigurierbar.",
|
|
596
|
+
"card.dsContextTitle": "Kontextfenster der offiziellen DeepSeek-Modelle",
|
|
525
597
|
"input.effort.default": "Anbieterstandard",
|
|
526
598
|
"input.effort.reset": "Auf Anbieterstandard zurücksetzen",
|
|
527
599
|
"card.capabilities.failed": "Speichern fehlgeschlagen: Der Wert wurde abgelehnt oder steht in Konflikt. Bitte überprüfen."
|
|
@@ -544,6 +616,13 @@ window.__ModuleLoader__.load({
|
|
|
544
616
|
"card.enabled": "Abilitato",
|
|
545
617
|
"card.allowDowngrade": "Consenti declassamento (auto può scendere a low)",
|
|
546
618
|
"card.allowUpgrade": "Consenti avanzamento (auto può salire a max)",
|
|
619
|
+
"card.defaultPricing": "Prezzi fuori catalogo",
|
|
620
|
+
"card.defaultPricingHint": "Come fatturare i modelli assenti dal catalogo (inclusi i modelli gateway di altri plugin); i modelli in catalogo usano sempre i propri prezzi. Le modifiche valgono solo per le nuove registrazioni.",
|
|
621
|
+
"card.defaultPricing.estimate": "estimate — stima a prezzo tipico (non calibrata, solo indicativa; predefinito)",
|
|
622
|
+
"card.defaultPricing.cn": "cn — livello calibrato CNY (fuori catalogo resta la stima a prezzo tipico)",
|
|
623
|
+
"card.defaultPricing.global": "global — livello calibrato USD (fuori catalogo stimato finché mancano le righe USD)",
|
|
624
|
+
"card.defaultPricing.custom": "custom — prezzi inseriti a mano (non fatturato senza riga completa)",
|
|
625
|
+
"card.defaultPricing.off": "off — non fatturare (fuori catalogo mostra \"non fatturato\")",
|
|
547
626
|
"card.unavailable": "Namespace delle impostazioni non disponibile: assicurati che dsh-thinking-levels sia integrato in questo profilo.",
|
|
548
627
|
"card.readonly": "Sola lettura",
|
|
549
628
|
"card.capabilities": "Capacità del modello (provider personalizzati llm-pi-ai)",
|
|
@@ -608,6 +687,11 @@ window.__ModuleLoader__.load({
|
|
|
608
687
|
"model.panel.noTarget": "Nessuna voce di configurazione scrivibile per questo modello",
|
|
609
688
|
"model.panel.unavailable": "La directory dei modelli non è disponibile per questa sessione",
|
|
610
689
|
"input.effort.title": "Sforzo di ragionamento",
|
|
690
|
+
"panel.search.placeholder": "Cerca modelli…",
|
|
691
|
+
"card.takeoverUi": "Sostituzione UI modello",
|
|
692
|
+
"card.takeoverUiHint": "Se attivo, questo plugin sostituisce il selettore modelli del compositore con un pannello proprio (editor contesto/livello per riga + ricerca). Se spento (predefinito) resta il popup ufficiale: il livello auto è comunque visibile, ricerca e caricamento sono a carico del selettore originale. Ricarica la pagina dopo la modifica.",
|
|
693
|
+
"card.capabilities.apiUnsupported": "Questo provider usa un protocollo diverso da openai-completions: i campi di compatibilità thinking sono gestiti nativamente da pi-ai e non sono configurabili qui.",
|
|
694
|
+
"card.dsContextTitle": "Finestra di contesto dei modelli DeepSeek ufficiali",
|
|
611
695
|
"input.effort.default": "Predefinito del provider",
|
|
612
696
|
"input.effort.reset": "Ripristina il predefinito del provider",
|
|
613
697
|
"card.capabilities.failed": "Salvataggio non riuscito: il valore è stato rifiutato o è in conflitto. Verifica."
|
|
@@ -630,6 +714,13 @@ window.__ModuleLoader__.load({
|
|
|
630
714
|
"card.enabled": "Включено",
|
|
631
715
|
"card.allowDowngrade": "Разрешить понижение (auto может снизить до low)",
|
|
632
716
|
"card.allowUpgrade": "Разрешить повышение (auto может поднять до max)",
|
|
717
|
+
"card.defaultPricing": "Внекаталожное ценообразование",
|
|
718
|
+
"card.defaultPricingHint": "Как считать модели, которых нет в каталоге цен (включая шлюзовые модели из других плагинов); каталожные модели всегда считаются по своему прайсу. Изменения влияют только на новые записи.",
|
|
719
|
+
"card.defaultPricing.estimate": "estimate — оценка по типовой цене (не откалибровано, справочно; по умолчанию)",
|
|
720
|
+
"card.defaultPricing.cn": "cn — калибровка CNY (вне каталога всё равно оценка по типовой цене)",
|
|
721
|
+
"card.defaultPricing.global": "global — калибровка USD (вне каталога оценивается, пока строки USD не добавлены)",
|
|
722
|
+
"card.defaultPricing.custom": "custom — свои цены (без полной строки — без расчёта)",
|
|
723
|
+
"card.defaultPricing.off": "off — не считать (вне каталога показ «не оплачено»)",
|
|
633
724
|
"card.unavailable": "Пространство имён настроек недоступно: убедитесь, что dsh-thinking-levels подключён к этому профилю.",
|
|
634
725
|
"card.readonly": "Только чтение",
|
|
635
726
|
"card.capabilities": "Возможности модели (пользовательские провайдеры llm-pi-ai)",
|
|
@@ -694,6 +785,11 @@ window.__ModuleLoader__.load({
|
|
|
694
785
|
"model.panel.noTarget": "Нет записываемой записи конфигурации для этой модели",
|
|
695
786
|
"model.panel.unavailable": "Каталог моделей недоступен для этой сессии",
|
|
696
787
|
"input.effort.title": "Усилие рассуждения",
|
|
788
|
+
"panel.search.placeholder": "Поиск моделей…",
|
|
789
|
+
"card.takeoverUi": "Перехват UI модели",
|
|
790
|
+
"card.takeoverUiHint": "Включено: этот плагин заменяет выбор модели в композиторе собственной панелью (редакторы контекста/уровня в строках + поиск). Выключено (по умолчанию) остаётся официальное popup-окно — уровень auto по-прежнему виден, поиск и загрузка обеспечиваются штатным селектором. После изменения перезагрузите страницу.",
|
|
791
|
+
"card.capabilities.apiUnsupported": "Этот провайдер использует протокол, отличный от openai-completions: поля совместимости thinking обрабатываются pi-ai нативно и здесь не настраиваются.",
|
|
792
|
+
"card.dsContextTitle": "Лимиты контекста официальных моделей DeepSeek",
|
|
697
793
|
"input.effort.default": "Значение провайдера по умолчанию",
|
|
698
794
|
"input.effort.reset": "Вернуть значение провайдера по умолчанию",
|
|
699
795
|
"card.capabilities.failed": "Ошибка сохранения: значение отклонено или конфликтует. Проверьте его."
|
|
@@ -716,6 +812,13 @@ window.__ModuleLoader__.load({
|
|
|
716
812
|
"card.enabled": "Activado",
|
|
717
813
|
"card.allowDowngrade": "Permitir degradación (auto puede bajar a low)",
|
|
718
814
|
"card.allowUpgrade": "Permitir mejora (auto puede subir a max)",
|
|
815
|
+
"card.defaultPricing": "Precio fuera del catálogo",
|
|
816
|
+
"card.defaultPricingHint": "Cómo facturar los modelos sin entrada en el catálogo (incluidos modelos de puerta de enlace de otros plugins); los modelos catalogados usan siempre sus precios. Los cambios solo afectan a registros nuevos.",
|
|
817
|
+
"card.defaultPricing.estimate": "estimate — estimación a precio típico (sin calibrar, solo referencia; predeterminado)",
|
|
818
|
+
"card.defaultPricing.cn": "cn — nivel calibrado en CNY (fuera del catálogo sigue siendo estimación a precio típico)",
|
|
819
|
+
"card.defaultPricing.global": "global — nivel calibrado en USD (fuera del catálogo estimado hasta que lleguen las filas USD)",
|
|
820
|
+
"card.defaultPricing.custom": "custom — precios introducidos (sin factura si falta la fila completa)",
|
|
821
|
+
"card.defaultPricing.off": "off — no facturar (fuera del catálogo muestra «sin facturar»)",
|
|
719
822
|
"card.unavailable": "Espacio de nombres de configuración no disponible: asegúrate de que dsh-thinking-levels esté ensamblado en este perfil.",
|
|
720
823
|
"card.readonly": "Solo lectura",
|
|
721
824
|
"card.capabilities": "Capacidades del modelo (proveedores personalizados llm-pi-ai)",
|
|
@@ -780,6 +883,11 @@ window.__ModuleLoader__.load({
|
|
|
780
883
|
"model.panel.noTarget": "No hay entrada de configuración escribible para este modelo",
|
|
781
884
|
"model.panel.unavailable": "El directorio de modelos no está disponible para esta sesión",
|
|
782
885
|
"input.effort.title": "Esfuerzo de razonamiento",
|
|
886
|
+
"panel.search.placeholder": "Buscar modelos…",
|
|
887
|
+
"card.takeoverUi": "Relevo de la UI de modelo",
|
|
888
|
+
"card.takeoverUiHint": "Si está activo, este plugin sustituye el selector de modelos del compositor por un panel propio (editores de contexto/nivel por línea + búsqueda). Si está desactivado (predeterminado) se mantiene el popup oficial: el nivel auto sigue apareciendo y la búsqueda y la carga corresponden al selector nativo. Recarga la página tras cambiarlo.",
|
|
889
|
+
"card.capabilities.apiUnsupported": "Este proveedor usa un protocolo distinto de openai-completions: los campos de compatibilidad de thinking los gestiona pi-ai de forma nativa y no son configurables aquí.",
|
|
890
|
+
"card.dsContextTitle": "Ventana de contexto de los modelos DeepSeek oficiales",
|
|
783
891
|
"input.effort.default": "Predeterminado del proveedor",
|
|
784
892
|
"input.effort.reset": "Restaurar el valor predeterminado del proveedor",
|
|
785
893
|
"card.capabilities.failed": "Error al guardar: el valor fue rechazado o está en conflicto. Verifícalo."
|
|
@@ -843,7 +951,8 @@ window.__ModuleLoader__.load({
|
|
|
843
951
|
billCustom: "自填价计价",
|
|
844
952
|
billPricedAs: (label) => `按 ${label} 计价`,
|
|
845
953
|
billPriced: "按目录价计价",
|
|
846
|
-
billEstimate: "目录外估算价"
|
|
954
|
+
billEstimate: "目录外估算价",
|
|
955
|
+
billUncalibratedHint: "未校准·仅供参考"
|
|
847
956
|
},
|
|
848
957
|
en: {
|
|
849
958
|
title: "Context check",
|
|
@@ -873,7 +982,8 @@ window.__ModuleLoader__.load({
|
|
|
873
982
|
billCustom: "priced at custom rates",
|
|
874
983
|
billPricedAs: (label) => `priced as ${label}`,
|
|
875
984
|
billPriced: "priced at catalog rates",
|
|
876
|
-
billEstimate: "estimated off-catalog"
|
|
985
|
+
billEstimate: "estimated off-catalog",
|
|
986
|
+
billUncalibratedHint: "uncalibrated — reference only"
|
|
877
987
|
}
|
|
878
988
|
};
|
|
879
989
|
const copy = () => typeof document !== "undefined" && document.documentElement.lang?.toLowerCase().startsWith("zh") ? COPY.zh : COPY.en;
|
|
@@ -1397,7 +1507,7 @@ window.__ModuleLoader__.load({
|
|
|
1397
1507
|
c.window,
|
|
1398
1508
|
": ",
|
|
1399
1509
|
hasReading ? window_.toLocaleString() : c.unset,
|
|
1400
|
-
billing?.available === true ? ` · ${billing.tier === "peak" ? c.billPeak : billing.tier === "offPeak" ? c.billOffPeak : billing.tier === "flat" ? c.billFlat : c.billUnpriced} · ${billing.priced === false ? c.billUnpriced : typeof billing.catalogLabel === "string" ? c.billPricedAs(billing.catalogLabel) : billing.pricingSource === "custom" ? c.billCustom : billing.modelMatched === false ? c.billEstimate : c.billPriced}` : ""
|
|
1510
|
+
billing?.available === true ? ` · ${billing.tier === "peak" ? c.billPeak : billing.tier === "offPeak" ? c.billOffPeak : billing.tier === "flat" ? c.billFlat : c.billUnpriced} · ${billing.priced === false ? c.billUnpriced : billing.estimated === true ? c.billUncalibratedHint : typeof billing.catalogLabel === "string" ? c.billPricedAs(billing.catalogLabel) : billing.pricingSource === "custom" ? c.billCustom : billing.modelMatched === false ? c.billEstimate : c.billPriced}` : ""
|
|
1401
1511
|
]
|
|
1402
1512
|
})
|
|
1403
1513
|
]
|
|
@@ -2167,7 +2277,8 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2167
2277
|
*/
|
|
2168
2278
|
/** The official DeepSeek provider route owned by the llm-deepseek adapter. */
|
|
2169
2279
|
const DEEPSEEK_PROVIDER = "deepseek-official";
|
|
2170
|
-
/** llm-deepseek's native default context capacity (DEFAULT_CONTEXT_WINDOW).
|
|
2280
|
+
/** llm-deepseek's native default context capacity (DEFAULT_CONTEXT_WINDOW).
|
|
2281
|
+
* exported for the settings-card editor (4.4.0, takeoverUi off). */
|
|
2171
2282
|
const DEEPSEEK_DEFAULT_WINDOW = 1e6;
|
|
2172
2283
|
/** Slider stop an unset window parks on: the thumb needs a position, the readout stays "unset". */
|
|
2173
2284
|
const UNSET_STOP_INDEX = CONTEXT_WINDOW_PRESETS.findIndex((preset) => preset.value === 256e3);
|
|
@@ -2185,6 +2296,21 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2185
2296
|
current: null,
|
|
2186
2297
|
error: null
|
|
2187
2298
|
};
|
|
2299
|
+
/**
|
|
2300
|
+
* The absent-own-settings-scope snapshot: a module-level CONSTANT —
|
|
2301
|
+
* `useSyncExternalStore` demands a stable getSnapshot value, an inline
|
|
2302
|
+
* literal re-renders forever (the #185 pattern proven on the capability
|
|
2303
|
+
* card's transport face).
|
|
2304
|
+
*/
|
|
2305
|
+
const TL_ABSENT_SNAPSHOT = Object.freeze({
|
|
2306
|
+
status: "unavailable",
|
|
2307
|
+
value: void 0,
|
|
2308
|
+
revision: void 0,
|
|
2309
|
+
writable: false,
|
|
2310
|
+
base: void 0,
|
|
2311
|
+
user: void 0,
|
|
2312
|
+
mode: "memory"
|
|
2313
|
+
});
|
|
2188
2314
|
const rootStyle = {
|
|
2189
2315
|
position: "relative",
|
|
2190
2316
|
display: "inline-flex"
|
|
@@ -2486,10 +2612,20 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2486
2612
|
* (the "max context window" editor moved into each line).
|
|
2487
2613
|
* @param props - injected directory + config forms, session seat, copy.
|
|
2488
2614
|
*/
|
|
2489
|
-
function ModelPanel({ directory, piAiScope, deepseekScope, t }) {
|
|
2615
|
+
function ModelPanel({ directory, piAiScope, deepseekScope, tlScope, sessionId, t }) {
|
|
2490
2616
|
const state = (0, react.useSyncExternalStore)((listener) => directory?.store.subscribe(listener) ?? (() => {}), () => directory?.store.getSnapshot() ?? UNAVAILABLE_STATE);
|
|
2491
2617
|
const piSnapshot = (0, react.useSyncExternalStore)((listener) => piAiScope.subscribe(listener), () => piAiScope.getSnapshot());
|
|
2492
2618
|
const dsSnapshot = (0, react.useSyncExternalStore)((listener) => deepseekScope.subscribe(listener), () => deepseekScope.getSnapshot());
|
|
2619
|
+
const tlSnapshot = (0, react.useSyncExternalStore)((listener) => tlScope?.subscribe(listener) ?? (() => {}), () => tlScope === void 0 ? TL_ABSENT_SNAPSHOT : tlScope.getSnapshot());
|
|
2620
|
+
/** The configured default level: the chip's user-intent fallback (issue #5). */
|
|
2621
|
+
const configLevel = (tlSnapshot.status === "ready" ? tlSnapshot.value?.level : void 0) ?? "auto";
|
|
2622
|
+
/**
|
|
2623
|
+
* The effort explicitly picked in THIS mount — the authoritative intent
|
|
2624
|
+
* until the session changes (issue #5). The directory's merged `current`
|
|
2625
|
+
* cannot tell a persisted `auto` pending from a scheduler-resolved wire
|
|
2626
|
+
* level apart; a local pick can, so it wins whenever it exists.
|
|
2627
|
+
*/
|
|
2628
|
+
const selectedEffortRef = (0, react.useRef)(void 0);
|
|
2493
2629
|
const [open, setOpen] = (0, react.useState)(false);
|
|
2494
2630
|
const [expanded, setExpanded] = (0, react.useState)(() => /* @__PURE__ */ new Set());
|
|
2495
2631
|
const [editing, setEditing] = (0, react.useState)(null);
|
|
@@ -2498,15 +2634,20 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2498
2634
|
const [raw, setRaw] = (0, react.useState)("");
|
|
2499
2635
|
const [error, setError] = (0, react.useState)(null);
|
|
2500
2636
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
2637
|
+
const [query, setQuery] = (0, react.useState)("");
|
|
2501
2638
|
const rootRef = (0, react.useRef)(null);
|
|
2502
2639
|
(0, react.useEffect)(() => {
|
|
2503
2640
|
if (!open) return;
|
|
2504
2641
|
directory?.load().catch(() => {});
|
|
2505
2642
|
}, [directory, open]);
|
|
2643
|
+
(0, react.useEffect)(() => {
|
|
2644
|
+
selectedEffortRef.current = void 0;
|
|
2645
|
+
}, [sessionId]);
|
|
2506
2646
|
const close = (0, react.useCallback)(() => {
|
|
2507
2647
|
setOpen(false);
|
|
2508
2648
|
setEditing(null);
|
|
2509
2649
|
setError(null);
|
|
2650
|
+
setQuery("");
|
|
2510
2651
|
}, []);
|
|
2511
2652
|
(0, react.useEffect)(() => {
|
|
2512
2653
|
if (!open) return;
|
|
@@ -2533,6 +2674,12 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2533
2674
|
}, [state]);
|
|
2534
2675
|
const providers = (0, react.useMemo)(() => providersOf$1(piSnapshot), [piSnapshot]);
|
|
2535
2676
|
const dsSection = (0, react.useMemo)(() => deepseekSectionOf(dsSnapshot), [dsSnapshot]);
|
|
2677
|
+
const needle = query.trim().toLowerCase();
|
|
2678
|
+
const showSearch = (0, react.useMemo)(() => state.groups.reduce((count, group) => count + group.models.length, 0), [state.groups]) > 4;
|
|
2679
|
+
const visibleGroups = (0, react.useMemo)(() => needle === "" ? state.groups : state.groups.map((group) => ({
|
|
2680
|
+
...group,
|
|
2681
|
+
models: group.models.filter((model) => model.name.toLowerCase().includes(needle) || model.id.toLowerCase().includes(needle))
|
|
2682
|
+
})).filter((group) => group.models.length > 0), [state.groups, needle]);
|
|
2536
2683
|
/** The effective window of one model line, resolved against its family.
|
|
2537
2684
|
* Declared BEFORE activeWindow: the ring's window-fallback memo calls this
|
|
2538
2685
|
* in its factory, and a const arrow below the first caller would be a
|
|
@@ -2658,6 +2805,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2658
2805
|
const chooseEffort = (provider, model, effort) => {
|
|
2659
2806
|
if (busy || directory === void 0) return;
|
|
2660
2807
|
setBusy(true);
|
|
2808
|
+
selectedEffortRef.current = effort === "" ? void 0 : effort;
|
|
2661
2809
|
directory.select({
|
|
2662
2810
|
provider,
|
|
2663
2811
|
model,
|
|
@@ -2670,8 +2818,12 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2670
2818
|
};
|
|
2671
2819
|
const triggerLabel = current?.name ?? state.current?.model ?? t("model.panel.choose");
|
|
2672
2820
|
const currentReasoning = current?.model.reasoning;
|
|
2673
|
-
const
|
|
2674
|
-
const
|
|
2821
|
+
const resolvedEffort = state.current?.reasoningEffort;
|
|
2822
|
+
const autoAdvertised = currentReasoning?.efforts.some((effort) => effort.id === "auto") === true;
|
|
2823
|
+
const intentEffort = selectedEffortRef.current ?? (resolvedEffort === "auto" || autoAdvertised && configLevel === "auto" ? "auto" : resolvedEffort ?? currentReasoning?.defaultEffort);
|
|
2824
|
+
const effortName = (id) => currentReasoning?.efforts.find((level) => level.id === id)?.name ?? id;
|
|
2825
|
+
const effortLabel = currentReasoning === void 0 ? void 0 : intentEffort === void 0 ? t("input.effort.default") : effortName(intentEffort);
|
|
2826
|
+
const resolvedHint = currentReasoning !== void 0 && intentEffort === "auto" && resolvedEffort !== void 0 && resolvedEffort !== "auto" ? `→ ${effortName(resolvedEffort)}` : void 0;
|
|
2675
2827
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2676
2828
|
ref: rootRef,
|
|
2677
2829
|
style: rootStyle,
|
|
@@ -2699,6 +2851,10 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2699
2851
|
style: triggerEffortStyle,
|
|
2700
2852
|
children: effortLabel
|
|
2701
2853
|
}),
|
|
2854
|
+
resolvedHint !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2855
|
+
style: triggerEffortStyle,
|
|
2856
|
+
children: resolvedHint
|
|
2857
|
+
}),
|
|
2702
2858
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2703
2859
|
style: chevronStyle,
|
|
2704
2860
|
children: open ? "▲" : "▼"
|
|
@@ -2713,243 +2869,263 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2713
2869
|
style: popStyle,
|
|
2714
2870
|
role: "dialog",
|
|
2715
2871
|
"aria-label": t("model.panel.choose"),
|
|
2716
|
-
children: [
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
}), isExpanded && group.models.map((model) => {
|
|
2751
|
-
const active = activeModel === model.id;
|
|
2752
|
-
const lineWritable = writableLine(group.id, model.id);
|
|
2753
|
-
const lineWindow = windowOf(group.id, model.id);
|
|
2754
|
-
const isContextEditing = editing !== null && editing.provider === group.id && editing.model === model.id && editing.kind === "context";
|
|
2755
|
-
const isEffortEditing = editing !== null && editing.provider === group.id && editing.model === model.id && editing.kind === "effort";
|
|
2756
|
-
const lineEffort = active ? state.current?.reasoningEffort ?? model.reasoning?.defaultEffort : model.reasoning?.defaultEffort;
|
|
2757
|
-
const lineStops = model.reasoning === void 0 ? [] : orderEffortsForSlider(model.reasoning.efforts);
|
|
2758
|
-
const lineEffortName = lineEffort === void 0 ? t("input.effort.default") : lineStops.find((stop) => stop.id === lineEffort)?.name ?? lineEffort;
|
|
2759
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2760
|
-
style: active ? modelRowActiveStyle : modelRowStyle$1,
|
|
2872
|
+
children: [
|
|
2873
|
+
showSearch && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2874
|
+
type: "text",
|
|
2875
|
+
value: query,
|
|
2876
|
+
placeholder: t("panel.search.placeholder"),
|
|
2877
|
+
"aria-label": t("panel.search.placeholder"),
|
|
2878
|
+
style: {
|
|
2879
|
+
...inputStyle,
|
|
2880
|
+
width: "100%",
|
|
2881
|
+
boxSizing: "border-box",
|
|
2882
|
+
margin: "2px 0 6px"
|
|
2883
|
+
},
|
|
2884
|
+
onChange: (event) => setQuery(event.currentTarget.value)
|
|
2885
|
+
}),
|
|
2886
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2887
|
+
style: modelsStyle,
|
|
2888
|
+
children: [
|
|
2889
|
+
directory === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2890
|
+
style: statusStyle,
|
|
2891
|
+
children: t("model.panel.unavailable")
|
|
2892
|
+
}),
|
|
2893
|
+
directory !== void 0 && state.status === "loading" && state.groups.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2894
|
+
style: statusStyle,
|
|
2895
|
+
children: t("model.panel.loading")
|
|
2896
|
+
}),
|
|
2897
|
+
directory !== void 0 && visibleGroups.map((group) => {
|
|
2898
|
+
const isExpanded = needle !== "" || expanded.has(group.id);
|
|
2899
|
+
const name = group.name ?? group.label ?? group.id;
|
|
2900
|
+
const activeModel = state.current?.provider === group.id ? state.current.model : void 0;
|
|
2901
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2902
|
+
type: "button",
|
|
2903
|
+
style: providerToggleStyle,
|
|
2904
|
+
"aria-expanded": isExpanded,
|
|
2905
|
+
onClick: () => toggleProvider(group.id),
|
|
2761
2906
|
children: [
|
|
2762
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
"aria-selected": active,
|
|
2766
|
-
style: modelPickStyle,
|
|
2767
|
-
disabled: busy,
|
|
2768
|
-
onClick: () => chooseModel(group.id, model.id),
|
|
2769
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2770
|
-
style: modelCopyStyle,
|
|
2771
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2772
|
-
style: modelNameStyle,
|
|
2773
|
-
children: model.name
|
|
2774
|
-
})
|
|
2775
|
-
}), active && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2776
|
-
style: checkStyle,
|
|
2777
|
-
"aria-hidden": "true",
|
|
2778
|
-
children: "✓"
|
|
2779
|
-
})]
|
|
2780
|
-
}),
|
|
2781
|
-
(model.reasoning?.efforts.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2782
|
-
role: "button",
|
|
2783
|
-
tabIndex: 0,
|
|
2784
|
-
"aria-label": t("input.effort.title"),
|
|
2785
|
-
title: t("input.effort.title"),
|
|
2786
|
-
"aria-expanded": isEffortEditing,
|
|
2787
|
-
style: effortChipStyle,
|
|
2788
|
-
onClick: (event) => {
|
|
2789
|
-
event.stopPropagation();
|
|
2790
|
-
if (!busy) toggleEffortEditor(group.id, model.id);
|
|
2791
|
-
},
|
|
2792
|
-
onKeyDown: (event) => {
|
|
2793
|
-
if (event.key !== "Enter" && event.key !== " ") return;
|
|
2794
|
-
event.preventDefault();
|
|
2795
|
-
event.stopPropagation();
|
|
2796
|
-
if (!busy) toggleEffortEditor(group.id, model.id);
|
|
2797
|
-
},
|
|
2798
|
-
children: lineEffortName
|
|
2799
|
-
}),
|
|
2800
|
-
isEffortEditing && model.reasoning !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2801
|
-
style: editorRowStyle,
|
|
2802
|
-
onClick: (event) => event.stopPropagation(),
|
|
2803
|
-
children: [
|
|
2804
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2805
|
-
style: labelStyle$1,
|
|
2806
|
-
children: t("input.effort.title")
|
|
2807
|
-
}),
|
|
2808
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(EffortSlider, {
|
|
2809
|
-
stops: lineStops,
|
|
2810
|
-
value: lineEffort,
|
|
2811
|
-
mascot: isDeepSeekLine(group.id, model.id, model.name),
|
|
2812
|
-
disabled: busy,
|
|
2813
|
-
onCommit: (id) => chooseEffort(group.id, model.id, id),
|
|
2814
|
-
t
|
|
2815
|
-
}),
|
|
2816
|
-
model.reasoning.defaultEffort !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2817
|
-
type: "button",
|
|
2818
|
-
disabled: busy,
|
|
2819
|
-
"aria-label": t("input.effort.reset"),
|
|
2820
|
-
title: t("input.effort.reset"),
|
|
2821
|
-
style: actionButtonStyle,
|
|
2822
|
-
onClick: (event) => {
|
|
2823
|
-
event.stopPropagation();
|
|
2824
|
-
const target = model.reasoning?.defaultEffort;
|
|
2825
|
-
if (target !== void 0) chooseEffort(group.id, model.id, target);
|
|
2826
|
-
},
|
|
2827
|
-
children: "↺"
|
|
2828
|
-
})
|
|
2829
|
-
]
|
|
2907
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2908
|
+
style: providerNameStyle$1,
|
|
2909
|
+
children: name
|
|
2830
2910
|
}),
|
|
2831
2911
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
"aria-label": t("input.context.title"),
|
|
2835
|
-
title: lineWritable ? t("input.context.globalHint") : t("model.panel.noTarget"),
|
|
2836
|
-
style: lineWritable && !busy ? chipStyle : chipDisabledStyle,
|
|
2837
|
-
onClick: (event) => {
|
|
2838
|
-
event.stopPropagation();
|
|
2839
|
-
if (!lineWritable || busy) return;
|
|
2840
|
-
if (isContextEditing) {
|
|
2841
|
-
setEditing(null);
|
|
2842
|
-
return;
|
|
2843
|
-
}
|
|
2844
|
-
openEditor(group.id, model.id);
|
|
2845
|
-
},
|
|
2846
|
-
onKeyDown: (event) => {
|
|
2847
|
-
if (event.key !== "Enter" && event.key !== " ") return;
|
|
2848
|
-
event.preventDefault();
|
|
2849
|
-
event.stopPropagation();
|
|
2850
|
-
if (!lineWritable || busy) return;
|
|
2851
|
-
openEditor(group.id, model.id);
|
|
2852
|
-
},
|
|
2853
|
-
children: lineWindow === void 0 ? t("input.context.unset") : formatContextWindow(lineWindow)
|
|
2912
|
+
style: providerMetaStyle,
|
|
2913
|
+
children: group.models.length
|
|
2854
2914
|
}),
|
|
2855
|
-
|
|
2856
|
-
style:
|
|
2857
|
-
children:
|
|
2858
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2859
|
-
style: labelStyle$1,
|
|
2860
|
-
title: t("input.context.globalHint"),
|
|
2861
|
-
children: t("model.panel.window")
|
|
2862
|
-
}),
|
|
2863
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2864
|
-
type: "range",
|
|
2865
|
-
min: 0,
|
|
2866
|
-
max: CONTEXT_WINDOW_PRESETS.length - 1,
|
|
2867
|
-
step: 1,
|
|
2868
|
-
value: draft ?? stopIndexOf(lineWindow),
|
|
2869
|
-
disabled: busy,
|
|
2870
|
-
"aria-label": t("input.context.title"),
|
|
2871
|
-
style: sliderStyle,
|
|
2872
|
-
onChange: (event) => {
|
|
2873
|
-
setDraft(Number(event.currentTarget.value));
|
|
2874
|
-
},
|
|
2875
|
-
onPointerUp: () => {
|
|
2876
|
-
if (draft === null) return;
|
|
2877
|
-
commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value);
|
|
2878
|
-
},
|
|
2879
|
-
onKeyUp: () => {
|
|
2880
|
-
if (draft === null) return;
|
|
2881
|
-
commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value);
|
|
2882
|
-
}
|
|
2883
|
-
}),
|
|
2884
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2885
|
-
style: valueStyle,
|
|
2886
|
-
children: draft === null ? lineWindow === void 0 ? t("input.context.unset") : formatContextWindow(lineWindow) : formatContextWindow(CONTEXT_WINDOW_PRESETS[draft]?.value ?? 0)
|
|
2887
|
-
}),
|
|
2888
|
-
custom ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2889
|
-
type: "text",
|
|
2890
|
-
inputMode: "numeric",
|
|
2891
|
-
value: raw,
|
|
2892
|
-
disabled: busy,
|
|
2893
|
-
placeholder: t("input.context.customPlaceholder"),
|
|
2894
|
-
"aria-label": t("input.context.customPlaceholder"),
|
|
2895
|
-
style: inputStyle,
|
|
2896
|
-
onChange: (event) => {
|
|
2897
|
-
setRaw(event.currentTarget.value);
|
|
2898
|
-
},
|
|
2899
|
-
onKeyDown: (event) => {
|
|
2900
|
-
if (event.key === "Enter") applyCustom();
|
|
2901
|
-
}
|
|
2902
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2903
|
-
type: "button",
|
|
2904
|
-
disabled: busy,
|
|
2905
|
-
style: actionButtonStyle,
|
|
2906
|
-
onClick: applyCustom,
|
|
2907
|
-
children: t("input.context.apply")
|
|
2908
|
-
})] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2909
|
-
type: "button",
|
|
2910
|
-
disabled: busy,
|
|
2911
|
-
"aria-label": t("input.context.custom"),
|
|
2912
|
-
title: t("input.context.custom"),
|
|
2913
|
-
style: actionButtonStyle,
|
|
2914
|
-
onClick: () => {
|
|
2915
|
-
setCustom(true);
|
|
2916
|
-
setError(null);
|
|
2917
|
-
},
|
|
2918
|
-
children: "⋯"
|
|
2919
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2920
|
-
type: "button",
|
|
2921
|
-
disabled: busy || lineWindow === void 0,
|
|
2922
|
-
style: {
|
|
2923
|
-
...actionButtonStyle,
|
|
2924
|
-
opacity: lineWindow === void 0 ? .55 : 1
|
|
2925
|
-
},
|
|
2926
|
-
onClick: () => {
|
|
2927
|
-
setDraft(null);
|
|
2928
|
-
setError(null);
|
|
2929
|
-
commitWindow(group.id, model.id, void 0);
|
|
2930
|
-
},
|
|
2931
|
-
children: t("input.context.clear")
|
|
2932
|
-
})] }),
|
|
2933
|
-
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2934
|
-
style: errorStyle,
|
|
2935
|
-
children: error
|
|
2936
|
-
})
|
|
2937
|
-
]
|
|
2915
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2916
|
+
style: chevronStyle,
|
|
2917
|
+
children: isExpanded ? "▼" : "▶"
|
|
2938
2918
|
})
|
|
2939
2919
|
]
|
|
2940
|
-
}, group.
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2920
|
+
}), isExpanded && group.models.map((model) => {
|
|
2921
|
+
const active = activeModel === model.id;
|
|
2922
|
+
const lineWritable = writableLine(group.id, model.id);
|
|
2923
|
+
const lineWindow = windowOf(group.id, model.id);
|
|
2924
|
+
const isContextEditing = editing !== null && editing.provider === group.id && editing.model === model.id && editing.kind === "context";
|
|
2925
|
+
const isEffortEditing = editing !== null && editing.provider === group.id && editing.model === model.id && editing.kind === "effort";
|
|
2926
|
+
const lineEffort = active ? state.current?.reasoningEffort ?? model.reasoning?.defaultEffort : model.reasoning?.defaultEffort;
|
|
2927
|
+
const lineStops = model.reasoning === void 0 ? [] : orderEffortsForSlider(model.reasoning.efforts);
|
|
2928
|
+
const lineEffortName = lineEffort === void 0 ? t("input.effort.default") : lineStops.find((stop) => stop.id === lineEffort)?.name ?? lineEffort;
|
|
2929
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2930
|
+
style: active ? modelRowActiveStyle : modelRowStyle$1,
|
|
2931
|
+
children: [
|
|
2932
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2933
|
+
type: "button",
|
|
2934
|
+
role: "option",
|
|
2935
|
+
"aria-selected": active,
|
|
2936
|
+
style: modelPickStyle,
|
|
2937
|
+
disabled: busy,
|
|
2938
|
+
onClick: () => chooseModel(group.id, model.id),
|
|
2939
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2940
|
+
style: modelCopyStyle,
|
|
2941
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2942
|
+
style: modelNameStyle,
|
|
2943
|
+
children: model.name
|
|
2944
|
+
})
|
|
2945
|
+
}), active && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2946
|
+
style: checkStyle,
|
|
2947
|
+
"aria-hidden": "true",
|
|
2948
|
+
children: "✓"
|
|
2949
|
+
})]
|
|
2950
|
+
}),
|
|
2951
|
+
(model.reasoning?.efforts.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2952
|
+
role: "button",
|
|
2953
|
+
tabIndex: 0,
|
|
2954
|
+
"aria-label": t("input.effort.title"),
|
|
2955
|
+
title: t("input.effort.title"),
|
|
2956
|
+
"aria-expanded": isEffortEditing,
|
|
2957
|
+
style: effortChipStyle,
|
|
2958
|
+
onClick: (event) => {
|
|
2959
|
+
event.stopPropagation();
|
|
2960
|
+
if (!busy) toggleEffortEditor(group.id, model.id);
|
|
2961
|
+
},
|
|
2962
|
+
onKeyDown: (event) => {
|
|
2963
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
2964
|
+
event.preventDefault();
|
|
2965
|
+
event.stopPropagation();
|
|
2966
|
+
if (!busy) toggleEffortEditor(group.id, model.id);
|
|
2967
|
+
},
|
|
2968
|
+
children: lineEffortName
|
|
2969
|
+
}),
|
|
2970
|
+
isEffortEditing && model.reasoning !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2971
|
+
style: editorRowStyle,
|
|
2972
|
+
onClick: (event) => event.stopPropagation(),
|
|
2973
|
+
children: [
|
|
2974
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2975
|
+
style: labelStyle$1,
|
|
2976
|
+
children: t("input.effort.title")
|
|
2977
|
+
}),
|
|
2978
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(EffortSlider, {
|
|
2979
|
+
stops: lineStops,
|
|
2980
|
+
value: lineEffort,
|
|
2981
|
+
mascot: isDeepSeekLine(group.id, model.id, model.name),
|
|
2982
|
+
disabled: busy,
|
|
2983
|
+
onCommit: (id) => chooseEffort(group.id, model.id, id),
|
|
2984
|
+
t
|
|
2985
|
+
}),
|
|
2986
|
+
model.reasoning.defaultEffort !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2987
|
+
type: "button",
|
|
2988
|
+
disabled: busy,
|
|
2989
|
+
"aria-label": t("input.effort.reset"),
|
|
2990
|
+
title: t("input.effort.reset"),
|
|
2991
|
+
style: actionButtonStyle,
|
|
2992
|
+
onClick: (event) => {
|
|
2993
|
+
event.stopPropagation();
|
|
2994
|
+
const target = model.reasoning?.defaultEffort;
|
|
2995
|
+
if (target !== void 0) chooseEffort(group.id, model.id, target);
|
|
2996
|
+
},
|
|
2997
|
+
children: "↺"
|
|
2998
|
+
})
|
|
2999
|
+
]
|
|
3000
|
+
}),
|
|
3001
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3002
|
+
role: "button",
|
|
3003
|
+
tabIndex: 0,
|
|
3004
|
+
"aria-label": t("input.context.title"),
|
|
3005
|
+
title: lineWritable ? t("input.context.globalHint") : t("model.panel.noTarget"),
|
|
3006
|
+
style: lineWritable && !busy ? chipStyle : chipDisabledStyle,
|
|
3007
|
+
onClick: (event) => {
|
|
3008
|
+
event.stopPropagation();
|
|
3009
|
+
if (!lineWritable || busy) return;
|
|
3010
|
+
if (isContextEditing) {
|
|
3011
|
+
setEditing(null);
|
|
3012
|
+
return;
|
|
3013
|
+
}
|
|
3014
|
+
openEditor(group.id, model.id);
|
|
3015
|
+
},
|
|
3016
|
+
onKeyDown: (event) => {
|
|
3017
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
3018
|
+
event.preventDefault();
|
|
3019
|
+
event.stopPropagation();
|
|
3020
|
+
if (!lineWritable || busy) return;
|
|
3021
|
+
openEditor(group.id, model.id);
|
|
3022
|
+
},
|
|
3023
|
+
children: lineWindow === void 0 ? t("input.context.unset") : formatContextWindow(lineWindow)
|
|
3024
|
+
}),
|
|
3025
|
+
isContextEditing && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3026
|
+
style: editorRowStyle,
|
|
3027
|
+
children: [
|
|
3028
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3029
|
+
style: labelStyle$1,
|
|
3030
|
+
title: t("input.context.globalHint"),
|
|
3031
|
+
children: t("model.panel.window")
|
|
3032
|
+
}),
|
|
3033
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3034
|
+
type: "range",
|
|
3035
|
+
min: 0,
|
|
3036
|
+
max: CONTEXT_WINDOW_PRESETS.length - 1,
|
|
3037
|
+
step: 1,
|
|
3038
|
+
value: draft ?? stopIndexOf(lineWindow),
|
|
3039
|
+
disabled: busy,
|
|
3040
|
+
"aria-label": t("input.context.title"),
|
|
3041
|
+
style: sliderStyle,
|
|
3042
|
+
onChange: (event) => {
|
|
3043
|
+
setDraft(Number(event.currentTarget.value));
|
|
3044
|
+
},
|
|
3045
|
+
onPointerUp: () => {
|
|
3046
|
+
if (draft === null) return;
|
|
3047
|
+
commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value);
|
|
3048
|
+
},
|
|
3049
|
+
onKeyUp: () => {
|
|
3050
|
+
if (draft === null) return;
|
|
3051
|
+
commitWindow(group.id, model.id, CONTEXT_WINDOW_PRESETS[draft]?.value);
|
|
3052
|
+
}
|
|
3053
|
+
}),
|
|
3054
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3055
|
+
style: valueStyle,
|
|
3056
|
+
children: draft === null ? lineWindow === void 0 ? t("input.context.unset") : formatContextWindow(lineWindow) : formatContextWindow(CONTEXT_WINDOW_PRESETS[draft]?.value ?? 0)
|
|
3057
|
+
}),
|
|
3058
|
+
custom ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3059
|
+
type: "text",
|
|
3060
|
+
inputMode: "numeric",
|
|
3061
|
+
value: raw,
|
|
3062
|
+
disabled: busy,
|
|
3063
|
+
placeholder: t("input.context.customPlaceholder"),
|
|
3064
|
+
"aria-label": t("input.context.customPlaceholder"),
|
|
3065
|
+
style: inputStyle,
|
|
3066
|
+
onChange: (event) => {
|
|
3067
|
+
setRaw(event.currentTarget.value);
|
|
3068
|
+
},
|
|
3069
|
+
onKeyDown: (event) => {
|
|
3070
|
+
if (event.key === "Enter") applyCustom();
|
|
3071
|
+
}
|
|
3072
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3073
|
+
type: "button",
|
|
3074
|
+
disabled: busy,
|
|
3075
|
+
style: actionButtonStyle,
|
|
3076
|
+
onClick: applyCustom,
|
|
3077
|
+
children: t("input.context.apply")
|
|
3078
|
+
})] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3079
|
+
type: "button",
|
|
3080
|
+
disabled: busy,
|
|
3081
|
+
"aria-label": t("input.context.custom"),
|
|
3082
|
+
title: t("input.context.custom"),
|
|
3083
|
+
style: actionButtonStyle,
|
|
3084
|
+
onClick: () => {
|
|
3085
|
+
setCustom(true);
|
|
3086
|
+
setError(null);
|
|
3087
|
+
},
|
|
3088
|
+
children: "⋯"
|
|
3089
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3090
|
+
type: "button",
|
|
3091
|
+
disabled: busy || lineWindow === void 0,
|
|
3092
|
+
style: {
|
|
3093
|
+
...actionButtonStyle,
|
|
3094
|
+
opacity: lineWindow === void 0 ? .55 : 1
|
|
3095
|
+
},
|
|
3096
|
+
onClick: () => {
|
|
3097
|
+
setDraft(null);
|
|
3098
|
+
setError(null);
|
|
3099
|
+
commitWindow(group.id, model.id, void 0);
|
|
3100
|
+
},
|
|
3101
|
+
children: t("input.context.clear")
|
|
3102
|
+
})] }),
|
|
3103
|
+
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3104
|
+
style: errorStyle,
|
|
3105
|
+
children: error
|
|
3106
|
+
})
|
|
3107
|
+
]
|
|
3108
|
+
})
|
|
3109
|
+
]
|
|
3110
|
+
}, group.id + ":" + model.id);
|
|
3111
|
+
})] }, group.id);
|
|
3112
|
+
}),
|
|
3113
|
+
directory !== void 0 && state.status !== "loading" && state.groups.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3114
|
+
style: statusStyle,
|
|
3115
|
+
children: t("model.panel.empty")
|
|
3116
|
+
}),
|
|
3117
|
+
directory !== void 0 && needle !== "" && visibleGroups.length === 0 && state.groups.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3118
|
+
style: statusStyle,
|
|
3119
|
+
children: t("model.panel.empty")
|
|
3120
|
+
})
|
|
3121
|
+
]
|
|
3122
|
+
}),
|
|
3123
|
+
directory !== void 0 && state.error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3124
|
+
style: errorBannerStyle,
|
|
3125
|
+
role: "status",
|
|
3126
|
+
children: state.error
|
|
3127
|
+
})
|
|
3128
|
+
]
|
|
2953
3129
|
})] }) : null
|
|
2954
3130
|
]
|
|
2955
3131
|
});
|
|
@@ -2992,6 +3168,14 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2992
3168
|
"max",
|
|
2993
3169
|
"auto"
|
|
2994
3170
|
];
|
|
3171
|
+
/** 计价兜底档,in picker order:缺省 estimate(典型价估算,未校准仅供参考)。 */
|
|
3172
|
+
const PRICING_OPTIONS = [
|
|
3173
|
+
"estimate",
|
|
3174
|
+
"cn",
|
|
3175
|
+
"global",
|
|
3176
|
+
"custom",
|
|
3177
|
+
"off"
|
|
3178
|
+
];
|
|
2995
3179
|
/**
|
|
2996
3180
|
* The levels the capability editor offers. This is the llm-pi-ai
|
|
2997
3181
|
* `reasoningEfforts` table-key space — pi-ai's fixed seven levels (schema
|
|
@@ -3293,6 +3477,18 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3293
3477
|
...own
|
|
3294
3478
|
} : base;
|
|
3295
3479
|
}
|
|
3480
|
+
/**
|
|
3481
|
+
* Whether the model-level thinking-compat fields (`compat.thinkingFormat`,
|
|
3482
|
+
* `compat.supportsReasoningEffort`) may be written for this entry's provider
|
|
3483
|
+
* (issue #2): the host llm-pi-ai gate offers them ONLY on the
|
|
3484
|
+
* openai-completions protocol — a Responses route carrying them fails the
|
|
3485
|
+
* WHOLE providers write (`not configurable here`). An absent `api` keeps
|
|
3486
|
+
* pi-ai's openai-completions default, so the row stays editable.
|
|
3487
|
+
* (exported for the gate's unit regression, issue #2)
|
|
3488
|
+
*/
|
|
3489
|
+
function effortCompatConfigurable(entry) {
|
|
3490
|
+
return typeof entry.providerApi !== "string" || entry.providerApi === "openai-completions";
|
|
3491
|
+
}
|
|
3296
3492
|
/** Flatten the user-layer providers into capability entries (models arrays only). */
|
|
3297
3493
|
function entriesOf(providers) {
|
|
3298
3494
|
return Object.entries(providers).flatMap(([providerId, profile]) => {
|
|
@@ -3307,7 +3503,8 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3307
3503
|
model: typeof model === "object" && model !== null && !Array.isArray(model) ? model : {},
|
|
3308
3504
|
modelId: typeof model === "object" && model !== null && typeof model["id"] === "string" ? model["id"] : `#${index + 1}`,
|
|
3309
3505
|
providerCompat,
|
|
3310
|
-
providerInput
|
|
3506
|
+
providerInput,
|
|
3507
|
+
providerApi: raw["api"]
|
|
3311
3508
|
}));
|
|
3312
3509
|
});
|
|
3313
3510
|
}
|
|
@@ -3797,6 +3994,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3797
3994
|
const thinking = typeof effortsOf(entry.model) === "object";
|
|
3798
3995
|
const compat = compatOf(entry);
|
|
3799
3996
|
const supportsEffort = compat["supportsReasoningEffort"] === true;
|
|
3997
|
+
const apiGated = !effortCompatConfigurable(entry);
|
|
3800
3998
|
const meta = summaryOf(entry);
|
|
3801
3999
|
const format = typeof compat["thinkingFormat"] === "string" ? compat["thinkingFormat"] : void 0;
|
|
3802
4000
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3863,6 +4061,10 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3863
4061
|
borderTop: "1px solid var(--dsw-alias-border-l2)"
|
|
3864
4062
|
},
|
|
3865
4063
|
children: [
|
|
4064
|
+
apiGated && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4065
|
+
style: hintStyle,
|
|
4066
|
+
children: t("card.capabilities.apiUnsupported")
|
|
4067
|
+
}),
|
|
3866
4068
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3867
4069
|
style: {
|
|
3868
4070
|
display: "flex",
|
|
@@ -3878,10 +4080,11 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3878
4080
|
gap: "6px",
|
|
3879
4081
|
fontSize: "12px"
|
|
3880
4082
|
},
|
|
4083
|
+
title: apiGated ? t("card.capabilities.apiUnsupported") : void 0,
|
|
3881
4084
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3882
4085
|
type: "checkbox",
|
|
3883
4086
|
checked: thinking,
|
|
3884
|
-
disabled: readonly || busy,
|
|
4087
|
+
disabled: readonly || busy || apiGated,
|
|
3885
4088
|
onChange: (event) => toggleThinking(entry, event.currentTarget.checked)
|
|
3886
4089
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("card.capabilities.thinking") })]
|
|
3887
4090
|
}),
|
|
@@ -3929,10 +4132,11 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3929
4132
|
fontSize: "12px",
|
|
3930
4133
|
margin: "0 0 8px"
|
|
3931
4134
|
},
|
|
4135
|
+
title: apiGated ? t("card.capabilities.apiUnsupported") : void 0,
|
|
3932
4136
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3933
4137
|
type: "checkbox",
|
|
3934
4138
|
checked: supportsEffort,
|
|
3935
|
-
disabled: readonly || busy,
|
|
4139
|
+
disabled: readonly || busy || apiGated,
|
|
3936
4140
|
onChange: (event) => toggleEffortCapable(entry, event.currentTarget.checked)
|
|
3937
4141
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("card.capabilities.supportsEffort") })]
|
|
3938
4142
|
}) : null,
|
|
@@ -4042,7 +4246,8 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4042
4246
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
4043
4247
|
style: controlStyle,
|
|
4044
4248
|
value: format ?? "inherit",
|
|
4045
|
-
disabled: readonly || busy,
|
|
4249
|
+
disabled: readonly || busy || apiGated,
|
|
4250
|
+
title: apiGated ? t("card.capabilities.apiUnsupported") : void 0,
|
|
4046
4251
|
onChange: (event) => {
|
|
4047
4252
|
const next = event.currentTarget.value;
|
|
4048
4253
|
patchModel(entry.providerId, entry.index, (row) => {
|
|
@@ -4155,12 +4360,184 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4155
4360
|
});
|
|
4156
4361
|
}
|
|
4157
4362
|
/**
|
|
4363
|
+
* The absent-llm-deepseek snapshot: module-level CONSTANT (the stable-snapshot
|
|
4364
|
+
* rule that killed the first-ever panel mount, #185).
|
|
4365
|
+
*/
|
|
4366
|
+
const DS_ABSENT_SNAPSHOT = Object.freeze({
|
|
4367
|
+
status: "unavailable",
|
|
4368
|
+
value: void 0,
|
|
4369
|
+
revision: void 0,
|
|
4370
|
+
writable: false,
|
|
4371
|
+
base: void 0,
|
|
4372
|
+
user: void 0,
|
|
4373
|
+
mode: "memory"
|
|
4374
|
+
});
|
|
4375
|
+
/**
|
|
4376
|
+
* Official DeepSeek model context-window editor (4.4.0): the per-line editor
|
|
4377
|
+
* lived only in the ModelPanel; with the seat takeover off by default the
|
|
4378
|
+
* card owns it. Writes mirror the panel's DEEPSEEK branch exactly: the model
|
|
4379
|
+
* entry's `contextWindow` when listed, the route `defaultContextWindow`
|
|
4380
|
+
* otherwise (clear = back to the native 1M).
|
|
4381
|
+
* @param props - the llm-deepseek scope (absent = section hidden), copy, fence.
|
|
4382
|
+
* @returns the editor block, or null when the namespace/scope is unavailable.
|
|
4383
|
+
*/
|
|
4384
|
+
function DeepSeekContextSection(props) {
|
|
4385
|
+
const { scope, t, readonly } = props;
|
|
4386
|
+
const subscribe = (0, react.useCallback)((listener) => scope !== void 0 ? scope.subscribe(listener) : () => {}, [scope]);
|
|
4387
|
+
const getSnapshot = (0, react.useCallback)(() => scope === void 0 ? DS_ABSENT_SNAPSHOT : scope.getSnapshot(), [scope]);
|
|
4388
|
+
const snapshot = (0, react.useSyncExternalStore)(subscribe, getSnapshot);
|
|
4389
|
+
const [raw, setRaw] = (0, react.useState)({});
|
|
4390
|
+
const [errors, setErrors] = (0, react.useState)({});
|
|
4391
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
4392
|
+
if (snapshot.status !== "ready") return null;
|
|
4393
|
+
const section = deepseekSectionOf(snapshot);
|
|
4394
|
+
const models = section.models ?? [];
|
|
4395
|
+
if (models.length === 0 && section.defaultContextWindow === void 0) return null;
|
|
4396
|
+
const writable = snapshot.writable && !readonly && !busy;
|
|
4397
|
+
/** Commit one row's window (index -1 = the route default layer). */
|
|
4398
|
+
const commit = (index, value) => {
|
|
4399
|
+
if (scope === void 0 || !writable) return;
|
|
4400
|
+
setBusy(true);
|
|
4401
|
+
const rows = (deepseekSectionOf(scope.getSnapshot()).models ?? []).map((entry) => ({ ...entry }));
|
|
4402
|
+
(index >= 0 ? scope.set("models", rows.map((entry, at) => {
|
|
4403
|
+
if (at !== index) return entry;
|
|
4404
|
+
if (value === void 0) {
|
|
4405
|
+
const rest = { ...entry };
|
|
4406
|
+
delete rest["contextWindow"];
|
|
4407
|
+
return rest;
|
|
4408
|
+
}
|
|
4409
|
+
return {
|
|
4410
|
+
...entry,
|
|
4411
|
+
contextWindow: value
|
|
4412
|
+
};
|
|
4413
|
+
})) : scope.set("defaultContextWindow", value ?? 1e6)).then(() => {
|
|
4414
|
+
setBusy(false);
|
|
4415
|
+
setErrors((cur) => {
|
|
4416
|
+
const next = { ...cur };
|
|
4417
|
+
delete next[String(index)];
|
|
4418
|
+
return next;
|
|
4419
|
+
});
|
|
4420
|
+
}, () => {
|
|
4421
|
+
setBusy(false);
|
|
4422
|
+
setErrors((cur) => ({
|
|
4423
|
+
...cur,
|
|
4424
|
+
[String(index)]: t("card.capabilities.failed")
|
|
4425
|
+
}));
|
|
4426
|
+
});
|
|
4427
|
+
};
|
|
4428
|
+
/** Validate and commit the custom input; empty clears. */
|
|
4429
|
+
const applyCustom = (index) => {
|
|
4430
|
+
const key = String(index);
|
|
4431
|
+
const trimmed = (raw[key] ?? "").trim();
|
|
4432
|
+
if (trimmed === "") {
|
|
4433
|
+
commit(index, void 0);
|
|
4434
|
+
return;
|
|
4435
|
+
}
|
|
4436
|
+
const validation = validateContextWindow(trimmed);
|
|
4437
|
+
if (!validation.ok) {
|
|
4438
|
+
setErrors((cur) => ({
|
|
4439
|
+
...cur,
|
|
4440
|
+
[key]: t(validation.reason === "integer" ? "input.context.integer" : "input.context.range")
|
|
4441
|
+
}));
|
|
4442
|
+
return;
|
|
4443
|
+
}
|
|
4444
|
+
commit(index, validation.value);
|
|
4445
|
+
};
|
|
4446
|
+
const rows = [...models.map((entry, index) => ({
|
|
4447
|
+
label: String(entry["name"] ?? entry["id"] ?? index),
|
|
4448
|
+
index,
|
|
4449
|
+
value: contextWindowOf(entry)
|
|
4450
|
+
})), {
|
|
4451
|
+
label: t("model.panel.window"),
|
|
4452
|
+
index: -1,
|
|
4453
|
+
value: section.defaultContextWindow
|
|
4454
|
+
}];
|
|
4455
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4456
|
+
style: sectionStyle,
|
|
4457
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4458
|
+
style: fieldLabelStyle,
|
|
4459
|
+
children: t("card.dsContextTitle")
|
|
4460
|
+
}), rows.map((row) => {
|
|
4461
|
+
const key = String(row.index);
|
|
4462
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4463
|
+
style: {
|
|
4464
|
+
display: "flex",
|
|
4465
|
+
gap: "8px",
|
|
4466
|
+
flexWrap: "wrap",
|
|
4467
|
+
alignItems: "center",
|
|
4468
|
+
margin: "6px 0"
|
|
4469
|
+
},
|
|
4470
|
+
children: [
|
|
4471
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4472
|
+
style: {
|
|
4473
|
+
...fieldLabelStyle,
|
|
4474
|
+
margin: 0
|
|
4475
|
+
},
|
|
4476
|
+
children: row.label
|
|
4477
|
+
}),
|
|
4478
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4479
|
+
style: badgeStyle,
|
|
4480
|
+
children: row.value === void 0 ? t("input.context.unset") : formatContextWindow(row.value)
|
|
4481
|
+
}),
|
|
4482
|
+
CONTEXT_WINDOW_PRESETS.map((preset) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4483
|
+
type: "button",
|
|
4484
|
+
disabled: !writable,
|
|
4485
|
+
onClick: () => commit(row.index, preset.value),
|
|
4486
|
+
style: {
|
|
4487
|
+
...controlStyle,
|
|
4488
|
+
padding: "2px 8px",
|
|
4489
|
+
cursor: writable ? "pointer" : "default",
|
|
4490
|
+
opacity: writable ? 1 : .5
|
|
4491
|
+
},
|
|
4492
|
+
children: preset.label
|
|
4493
|
+
}, preset.value)),
|
|
4494
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
4495
|
+
type: "text",
|
|
4496
|
+
inputMode: "numeric",
|
|
4497
|
+
value: raw[key] ?? "",
|
|
4498
|
+
disabled: !writable,
|
|
4499
|
+
placeholder: t("card.capabilities.contextCustomPlaceholder"),
|
|
4500
|
+
style: {
|
|
4501
|
+
...controlStyle,
|
|
4502
|
+
width: "120px"
|
|
4503
|
+
},
|
|
4504
|
+
onChange: (event) => setRaw((cur) => ({
|
|
4505
|
+
...cur,
|
|
4506
|
+
[key]: event.currentTarget.value
|
|
4507
|
+
})),
|
|
4508
|
+
onKeyDown: (event) => {
|
|
4509
|
+
if (event.key === "Enter") applyCustom(row.index);
|
|
4510
|
+
}
|
|
4511
|
+
}),
|
|
4512
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4513
|
+
type: "button",
|
|
4514
|
+
disabled: !writable || row.value === void 0,
|
|
4515
|
+
onClick: () => commit(row.index, void 0),
|
|
4516
|
+
style: {
|
|
4517
|
+
...controlStyle,
|
|
4518
|
+
padding: "2px 8px"
|
|
4519
|
+
},
|
|
4520
|
+
children: t("input.context.clear")
|
|
4521
|
+
}),
|
|
4522
|
+
errors[key] !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4523
|
+
style: {
|
|
4524
|
+
fontSize: "12px",
|
|
4525
|
+
color: "var(--dsw-alias-danger, #e5484d)"
|
|
4526
|
+
},
|
|
4527
|
+
children: errors[key]
|
|
4528
|
+
})
|
|
4529
|
+
]
|
|
4530
|
+
}, key);
|
|
4531
|
+
})]
|
|
4532
|
+
});
|
|
4533
|
+
}
|
|
4534
|
+
/**
|
|
4158
4535
|
* The card body, wrapped in a disclosure shell like every peer settings card:
|
|
4159
4536
|
* a header (name + description + chevron) that toggles the body, expanded by
|
|
4160
4537
|
* default so the family section reads as an open page of drawers.
|
|
4161
4538
|
* @param props - locale copy and the injected scopes.
|
|
4162
4539
|
*/
|
|
4163
|
-
function ThinkingLevelsCard({ t, scope, piAiScope, ocScope }) {
|
|
4540
|
+
function ThinkingLevelsCard({ t, scope, piAiScope, ocScope, deepseekScope }) {
|
|
4164
4541
|
const [open, setOpen] = (0, react.useState)(true);
|
|
4165
4542
|
const subscribe = (0, react.useCallback)((listener) => scope.subscribe(listener), [scope]);
|
|
4166
4543
|
const getSnapshot = (0, react.useCallback)(() => scope.getSnapshot(), [scope]);
|
|
@@ -4175,6 +4552,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4175
4552
|
...pendingTl
|
|
4176
4553
|
};
|
|
4177
4554
|
const level = EFFORT_OPTIONS.includes(viewValue.level) ? viewValue.level : "auto";
|
|
4555
|
+
const defaultPricing = PRICING_OPTIONS.includes(viewValue.defaultPricing) ? viewValue.defaultPricing : "estimate";
|
|
4178
4556
|
const writeTl = (field, v) => {
|
|
4179
4557
|
setPendingTl((cur) => ({
|
|
4180
4558
|
...cur,
|
|
@@ -4323,6 +4701,24 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4323
4701
|
}
|
|
4324
4702
|
})]
|
|
4325
4703
|
}),
|
|
4704
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4705
|
+
style: rowStyle,
|
|
4706
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
4707
|
+
htmlFor: "plugin-config-thinking-levels-takeover-ui",
|
|
4708
|
+
style: labelStyle,
|
|
4709
|
+
title: t("card.takeoverUiHint"),
|
|
4710
|
+
children: t("card.takeoverUi")
|
|
4711
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
4712
|
+
id: "plugin-config-thinking-levels-takeover-ui",
|
|
4713
|
+
type: "checkbox",
|
|
4714
|
+
checked: viewValue.takeoverUi ?? false,
|
|
4715
|
+
disabled: readonly,
|
|
4716
|
+
title: t("card.takeoverUiHint"),
|
|
4717
|
+
onChange: (event) => {
|
|
4718
|
+
writeTl("takeoverUi", event.currentTarget.checked);
|
|
4719
|
+
}
|
|
4720
|
+
})]
|
|
4721
|
+
}),
|
|
4326
4722
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4327
4723
|
style: rowStyle,
|
|
4328
4724
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
@@ -4355,6 +4751,27 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4355
4751
|
}
|
|
4356
4752
|
})]
|
|
4357
4753
|
}),
|
|
4754
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4755
|
+
style: rowStyle,
|
|
4756
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
4757
|
+
htmlFor: "plugin-config-thinking-levels-default-pricing",
|
|
4758
|
+
style: labelStyle,
|
|
4759
|
+
title: t("card.defaultPricingHint"),
|
|
4760
|
+
children: t("card.defaultPricing")
|
|
4761
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
4762
|
+
id: "plugin-config-thinking-levels-default-pricing",
|
|
4763
|
+
value: defaultPricing,
|
|
4764
|
+
disabled: readonly,
|
|
4765
|
+
style: controlStyle,
|
|
4766
|
+
onChange: (event) => {
|
|
4767
|
+
writeTl("defaultPricing", event.currentTarget.value);
|
|
4768
|
+
},
|
|
4769
|
+
children: PRICING_OPTIONS.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
4770
|
+
value: option,
|
|
4771
|
+
children: t(`card.defaultPricing.${option}`)
|
|
4772
|
+
}, option))
|
|
4773
|
+
})]
|
|
4774
|
+
}),
|
|
4358
4775
|
writeErrorTl !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
4359
4776
|
style: {
|
|
4360
4777
|
margin: "8px 0 0",
|
|
@@ -4378,6 +4795,11 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4378
4795
|
tlScope: scope,
|
|
4379
4796
|
t,
|
|
4380
4797
|
readonly
|
|
4798
|
+
}),
|
|
4799
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DeepSeekContextSection, {
|
|
4800
|
+
scope: deepseekScope,
|
|
4801
|
+
t,
|
|
4802
|
+
readonly
|
|
4381
4803
|
})
|
|
4382
4804
|
] })
|
|
4383
4805
|
}) : null]
|
|
@@ -4424,7 +4846,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4424
4846
|
return polled;
|
|
4425
4847
|
}
|
|
4426
4848
|
function FamilySettingsSection(props) {
|
|
4427
|
-
const { t: tHost, renderSlot, scope, piAiScope, ocScope } = props;
|
|
4849
|
+
const { t: tHost, renderSlot, scope, piAiScope, ocScope, deepseekScope } = props;
|
|
4428
4850
|
const t = tHost ?? props.tFallback ?? ((key) => key);
|
|
4429
4851
|
const contributors = useContributorTabs(props, props.hooks?.tabs);
|
|
4430
4852
|
const [activeId, setActiveId] = (0, react.useState)(OWN_TAB_ID);
|
|
@@ -4474,7 +4896,8 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4474
4896
|
t,
|
|
4475
4897
|
scope,
|
|
4476
4898
|
piAiScope,
|
|
4477
|
-
ocScope
|
|
4899
|
+
ocScope,
|
|
4900
|
+
deepseekScope
|
|
4478
4901
|
}) : renderSlot ? renderSlot("dsh-family.tab", {}, {
|
|
4479
4902
|
only: active,
|
|
4480
4903
|
fallback: null
|
|
@@ -4597,6 +5020,9 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4597
5020
|
const directories = scope.modelDirectories;
|
|
4598
5021
|
if (directories === void 0) return;
|
|
4599
5022
|
ctx.slots.inject("conversation.input.model", function* () {
|
|
5023
|
+
const tlHandle = scopeOf === void 0 ? void 0 : tlSettingsScopeOf(scopeOf);
|
|
5024
|
+
const tlSnap = typeof tlHandle?.getSnapshot === "function" ? tlHandle.getSnapshot() : void 0;
|
|
5025
|
+
if (!(tlSnap?.status === "ready" && tlSnap.value?.takeoverUi === true)) return;
|
|
4600
5026
|
yield ctx.slots.register({
|
|
4601
5027
|
name: "conversation.input.model",
|
|
4602
5028
|
id: "context-window-model-panel",
|
|
@@ -4612,7 +5038,8 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4612
5038
|
return {
|
|
4613
5039
|
directory,
|
|
4614
5040
|
piAiScope: scopeOf?.("llm-pi-ai"),
|
|
4615
|
-
deepseekScope: scopeOf?.("llm-deepseek")
|
|
5041
|
+
deepseekScope: scopeOf?.("llm-deepseek"),
|
|
5042
|
+
tlScope: scopeOf === void 0 ? void 0 : tlSettingsScopeOf(scopeOf)
|
|
4616
5043
|
};
|
|
4617
5044
|
}
|
|
4618
5045
|
}, ModelPanel);
|
|
@@ -4645,6 +5072,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4645
5072
|
const sectionInjected = () => ({
|
|
4646
5073
|
scope: tlSettingsScopeOf(scopeOf),
|
|
4647
5074
|
piAiScope: scopeOf("llm-pi-ai"),
|
|
5075
|
+
deepseekScope: scopeOf("llm-deepseek"),
|
|
4648
5076
|
ocScope: ocTransportScopeOf(scopeOf),
|
|
4649
5077
|
tFallback: t,
|
|
4650
5078
|
renderContributor,
|