dsh-thinking-levels 4.3.1 → 4.3.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/CHANGELOG.md +25 -16
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.it.md +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +10 -10
- package/README.ru.md +1 -1
- package/README.zh.md +10 -10
- package/dsh.plugin.json +16 -16
- package/lib/billing-projection.d.ts +22 -8
- package/lib/billing-projection.js +16 -9
- package/lib/client.js +98 -3
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +7 -6
- package/lib/index.js +3 -3
- package/lib/price-catalog.d.ts +23 -9
- package/lib/price-catalog.js +92 -12
- package/package.json +135 -135
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 自定义提供方)",
|
|
@@ -114,6 +121,13 @@ window.__ModuleLoader__.load({
|
|
|
114
121
|
"card.enabled": "Enabled",
|
|
115
122
|
"card.allowDowngrade": "Allow downgrade (auto may drop to low)",
|
|
116
123
|
"card.allowUpgrade": "Allow upgrade (auto may lift to max)",
|
|
124
|
+
"card.defaultPricing": "Off-catalog pricing",
|
|
125
|
+
"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.",
|
|
126
|
+
"card.defaultPricing.estimate": "estimate — typical-price fallback (uncalibrated, reference only; default)",
|
|
127
|
+
"card.defaultPricing.cn": "cn — CNY calibration tier (off-catalog still falls back to the typical price)",
|
|
128
|
+
"card.defaultPricing.global": "global — USD calibration tier (off-catalog stays estimated until USD rows land)",
|
|
129
|
+
"card.defaultPricing.custom": "custom — self-entered rates (unpriced without a full row)",
|
|
130
|
+
"card.defaultPricing.off": "off — do not bill (off-catalog shows \"not billed\")",
|
|
117
131
|
"card.unavailable": "Settings namespace unavailable: make sure dsh-thinking-levels is assembled into this profile.",
|
|
118
132
|
"card.readonly": "Read-only",
|
|
119
133
|
"card.capabilities": "Model capabilities (llm-pi-ai custom providers)",
|
|
@@ -200,6 +214,13 @@ window.__ModuleLoader__.load({
|
|
|
200
214
|
"card.enabled": "有効",
|
|
201
215
|
"card.allowDowngrade": "降格を許可(auto は low まで下げられる)",
|
|
202
216
|
"card.allowUpgrade": "昇格を許可(auto は max まで上げられる)",
|
|
217
|
+
"card.defaultPricing": "カタログ外モデルの価格",
|
|
218
|
+
"card.defaultPricingHint": "価格カタログに未登録のモデル(他プラグイン経由のゲートウェイモデル含む)の計算方法。登録済みモデルは常にカタログ価格を使用。価格変更は以降の新規記録のみ影響。",
|
|
219
|
+
"card.defaultPricing.estimate": "estimate — 典型価格でフォールバック見積り(未校正・参考値、デフォルト)",
|
|
220
|
+
"card.defaultPricing.cn": "cn — 人民元キャリブレーション(カタログ外は典型価格の見積りのまま)",
|
|
221
|
+
"card.defaultPricing.global": "global — ドルキャリブレーション(USD 行の補録前はカタログ外から見積り)",
|
|
222
|
+
"card.defaultPricing.custom": "custom — 手入力価格(行が不完全なら未計算)",
|
|
223
|
+
"card.defaultPricing.off": "off — 計算しない(カタログ外は「未計算」と表示)",
|
|
203
224
|
"card.unavailable": "設定名前空間が利用できません:dsh-thinking-levels が profile に組み込まれているか確認してください。",
|
|
204
225
|
"card.readonly": "読み取り専用",
|
|
205
226
|
"card.capabilities": "モデル能力(llm-pi-ai カスタムプロバイダー)",
|
|
@@ -286,6 +307,13 @@ window.__ModuleLoader__.load({
|
|
|
286
307
|
"card.enabled": "활성화",
|
|
287
308
|
"card.allowDowngrade": "다운그레이드 허용(auto가 low까지 내릴 수 있음)",
|
|
288
309
|
"card.allowUpgrade": "업그레이드 허용(auto가 max까지 올릴 수 있음)",
|
|
310
|
+
"card.defaultPricing": "카탈로그 외 과금",
|
|
311
|
+
"card.defaultPricingHint": "가격 카탈로그에 없는 모델(다른 플러그인으로 유입된 게이트웨이 모델 포함)의 과금 방식. 카탈로그 등재 모델은 항상 자체 등재가 사용. 가격 변경은 이후 신규 기록에만 반영.",
|
|
312
|
+
"card.defaultPricing.estimate": "estimate — 전형가 폴백 추정(미교정·참고용, 기본)",
|
|
313
|
+
"card.defaultPricing.cn": "cn — 위안화 보정 등급(카탈로그 외는 여전히 전형가 추정)",
|
|
314
|
+
"card.defaultPricing.global": "global — 달러 보정 등급(USD 행 보충 전 카탈로그 외는 추정)",
|
|
315
|
+
"card.defaultPricing.custom": "custom — 직접 입력 가격(행이 불완전하면 미과금)",
|
|
316
|
+
"card.defaultPricing.off": "off — 미과금(카탈로그 외는 \"미과금\" 표시)",
|
|
289
317
|
"card.unavailable": "설정 네임스페이스를 사용할 수 없습니다: dsh-thinking-levels가 이 profile에 조립되었는지 확인하세요.",
|
|
290
318
|
"card.readonly": "읽기 전용",
|
|
291
319
|
"card.capabilities": "모델 기능(llm-pi-ai 사용자 지정 제공자)",
|
|
@@ -372,6 +400,13 @@ window.__ModuleLoader__.load({
|
|
|
372
400
|
"card.enabled": "Activé",
|
|
373
401
|
"card.allowDowngrade": "Autoriser la rétrogradation (auto peut descendre à low)",
|
|
374
402
|
"card.allowUpgrade": "Autoriser la montée (auto peut monter à max)",
|
|
403
|
+
"card.defaultPricing": "Tarification hors catalogue",
|
|
404
|
+
"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.",
|
|
405
|
+
"card.defaultPricing.estimate": "estimate — estimation par prix type (non calibrée, à titre indicatif ; par défaut)",
|
|
406
|
+
"card.defaultPricing.cn": "cn — palier calibré CNY (hors catalogue : estimation au prix type)",
|
|
407
|
+
"card.defaultPricing.global": "global — palier calibré USD (hors catalogue estimé tant que les lignes USD manquent)",
|
|
408
|
+
"card.defaultPricing.custom": "custom — tarifs saisis (non facturé sans ligne complète)",
|
|
409
|
+
"card.defaultPricing.off": "off — ne pas facturer (hors catalogue affiche « non facturé »)",
|
|
375
410
|
"card.unavailable": "Espace de noms des paramètres indisponible : assurez-vous que dsh-thinking-levels est assemblé dans ce profil.",
|
|
376
411
|
"card.readonly": "Lecture seule",
|
|
377
412
|
"card.capabilities": "Capacités du modèle (fournisseurs personnalisés llm-pi-ai)",
|
|
@@ -458,6 +493,13 @@ window.__ModuleLoader__.load({
|
|
|
458
493
|
"card.enabled": "Aktiviert",
|
|
459
494
|
"card.allowDowngrade": "Herabstufung erlauben (auto kann auf low fallen)",
|
|
460
495
|
"card.allowUpgrade": "Hochstufung erlauben (auto kann auf max steigen)",
|
|
496
|
+
"card.defaultPricing": "Preis außerhalb des Katalogs",
|
|
497
|
+
"card.defaultPricingHint": "Bepreisung von Modellen ohne Katalogeintrag (inkl. Gateway-Modelle anderer Plugins); katalogisierte Modelle nutzen immer ihre Katalogpreise. Änderungen wirken nur auf neue Buchungen.",
|
|
498
|
+
"card.defaultPricing.estimate": "estimate — Schätzung über Typicalpreis (unkalibriert, nur Referenz; Standard)",
|
|
499
|
+
"card.defaultPricing.cn": "cn — Kalibrierungsstufe CNY (ohne Katalogeintrag weiterhin Typicalpreis-Schätzung)",
|
|
500
|
+
"card.defaultPricing.global": "global — Kalibrierungsstufe USD (ohne Katalogeintrag geschätzt, bis USD-Zeilen ergänzt sind)",
|
|
501
|
+
"card.defaultPricing.custom": "custom — eigene Preise (ohne vollständige Zeile unbestückt)",
|
|
502
|
+
"card.defaultPricing.off": "off — nicht abrechnen (ohne Katalogeintrag „nicht abgerechnet“)",
|
|
461
503
|
"card.unavailable": "Einstellungs-Namensraum nicht verfügbar: Stellen Sie sicher, dass dsh-thinking-levels in diesem Profil eingebunden ist.",
|
|
462
504
|
"card.readonly": "Schreibgeschützt",
|
|
463
505
|
"card.capabilities": "Modellfähigkeiten (llm-pi-ai benutzerdefinierte Anbieter)",
|
|
@@ -544,6 +586,13 @@ window.__ModuleLoader__.load({
|
|
|
544
586
|
"card.enabled": "Abilitato",
|
|
545
587
|
"card.allowDowngrade": "Consenti declassamento (auto può scendere a low)",
|
|
546
588
|
"card.allowUpgrade": "Consenti avanzamento (auto può salire a max)",
|
|
589
|
+
"card.defaultPricing": "Prezzi fuori catalogo",
|
|
590
|
+
"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.",
|
|
591
|
+
"card.defaultPricing.estimate": "estimate — stima a prezzo tipico (non calibrata, solo indicativa; predefinito)",
|
|
592
|
+
"card.defaultPricing.cn": "cn — livello calibrato CNY (fuori catalogo resta la stima a prezzo tipico)",
|
|
593
|
+
"card.defaultPricing.global": "global — livello calibrato USD (fuori catalogo stimato finché mancano le righe USD)",
|
|
594
|
+
"card.defaultPricing.custom": "custom — prezzi inseriti a mano (non fatturato senza riga completa)",
|
|
595
|
+
"card.defaultPricing.off": "off — non fatturare (fuori catalogo mostra \"non fatturato\")",
|
|
547
596
|
"card.unavailable": "Namespace delle impostazioni non disponibile: assicurati che dsh-thinking-levels sia integrato in questo profilo.",
|
|
548
597
|
"card.readonly": "Sola lettura",
|
|
549
598
|
"card.capabilities": "Capacità del modello (provider personalizzati llm-pi-ai)",
|
|
@@ -630,6 +679,13 @@ window.__ModuleLoader__.load({
|
|
|
630
679
|
"card.enabled": "Включено",
|
|
631
680
|
"card.allowDowngrade": "Разрешить понижение (auto может снизить до low)",
|
|
632
681
|
"card.allowUpgrade": "Разрешить повышение (auto может поднять до max)",
|
|
682
|
+
"card.defaultPricing": "Внекаталожное ценообразование",
|
|
683
|
+
"card.defaultPricingHint": "Как считать модели, которых нет в каталоге цен (включая шлюзовые модели из других плагинов); каталожные модели всегда считаются по своему прайсу. Изменения влияют только на новые записи.",
|
|
684
|
+
"card.defaultPricing.estimate": "estimate — оценка по типовой цене (не откалибровано, справочно; по умолчанию)",
|
|
685
|
+
"card.defaultPricing.cn": "cn — калибровка CNY (вне каталога всё равно оценка по типовой цене)",
|
|
686
|
+
"card.defaultPricing.global": "global — калибровка USD (вне каталога оценивается, пока строки USD не добавлены)",
|
|
687
|
+
"card.defaultPricing.custom": "custom — свои цены (без полной строки — без расчёта)",
|
|
688
|
+
"card.defaultPricing.off": "off — не считать (вне каталога показ «не оплачено»)",
|
|
633
689
|
"card.unavailable": "Пространство имён настроек недоступно: убедитесь, что dsh-thinking-levels подключён к этому профилю.",
|
|
634
690
|
"card.readonly": "Только чтение",
|
|
635
691
|
"card.capabilities": "Возможности модели (пользовательские провайдеры llm-pi-ai)",
|
|
@@ -716,6 +772,13 @@ window.__ModuleLoader__.load({
|
|
|
716
772
|
"card.enabled": "Activado",
|
|
717
773
|
"card.allowDowngrade": "Permitir degradación (auto puede bajar a low)",
|
|
718
774
|
"card.allowUpgrade": "Permitir mejora (auto puede subir a max)",
|
|
775
|
+
"card.defaultPricing": "Precio fuera del catálogo",
|
|
776
|
+
"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.",
|
|
777
|
+
"card.defaultPricing.estimate": "estimate — estimación a precio típico (sin calibrar, solo referencia; predeterminado)",
|
|
778
|
+
"card.defaultPricing.cn": "cn — nivel calibrado en CNY (fuera del catálogo sigue siendo estimación a precio típico)",
|
|
779
|
+
"card.defaultPricing.global": "global — nivel calibrado en USD (fuera del catálogo estimado hasta que lleguen las filas USD)",
|
|
780
|
+
"card.defaultPricing.custom": "custom — precios introducidos (sin factura si falta la fila completa)",
|
|
781
|
+
"card.defaultPricing.off": "off — no facturar (fuera del catálogo muestra «sin facturar»)",
|
|
719
782
|
"card.unavailable": "Espacio de nombres de configuración no disponible: asegúrate de que dsh-thinking-levels esté ensamblado en este perfil.",
|
|
720
783
|
"card.readonly": "Solo lectura",
|
|
721
784
|
"card.capabilities": "Capacidades del modelo (proveedores personalizados llm-pi-ai)",
|
|
@@ -843,7 +906,8 @@ window.__ModuleLoader__.load({
|
|
|
843
906
|
billCustom: "自填价计价",
|
|
844
907
|
billPricedAs: (label) => `按 ${label} 计价`,
|
|
845
908
|
billPriced: "按目录价计价",
|
|
846
|
-
billEstimate: "目录外估算价"
|
|
909
|
+
billEstimate: "目录外估算价",
|
|
910
|
+
billUncalibratedHint: "未校准·仅供参考"
|
|
847
911
|
},
|
|
848
912
|
en: {
|
|
849
913
|
title: "Context check",
|
|
@@ -873,7 +937,8 @@ window.__ModuleLoader__.load({
|
|
|
873
937
|
billCustom: "priced at custom rates",
|
|
874
938
|
billPricedAs: (label) => `priced as ${label}`,
|
|
875
939
|
billPriced: "priced at catalog rates",
|
|
876
|
-
billEstimate: "estimated off-catalog"
|
|
940
|
+
billEstimate: "estimated off-catalog",
|
|
941
|
+
billUncalibratedHint: "uncalibrated — reference only"
|
|
877
942
|
}
|
|
878
943
|
};
|
|
879
944
|
const copy = () => typeof document !== "undefined" && document.documentElement.lang?.toLowerCase().startsWith("zh") ? COPY.zh : COPY.en;
|
|
@@ -1397,7 +1462,7 @@ window.__ModuleLoader__.load({
|
|
|
1397
1462
|
c.window,
|
|
1398
1463
|
": ",
|
|
1399
1464
|
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}` : ""
|
|
1465
|
+
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
1466
|
]
|
|
1402
1467
|
})
|
|
1403
1468
|
]
|
|
@@ -2992,6 +3057,14 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
2992
3057
|
"max",
|
|
2993
3058
|
"auto"
|
|
2994
3059
|
];
|
|
3060
|
+
/** 计价兜底档,in picker order:缺省 estimate(典型价估算,未校准仅供参考)。 */
|
|
3061
|
+
const PRICING_OPTIONS = [
|
|
3062
|
+
"estimate",
|
|
3063
|
+
"cn",
|
|
3064
|
+
"global",
|
|
3065
|
+
"custom",
|
|
3066
|
+
"off"
|
|
3067
|
+
];
|
|
2995
3068
|
/**
|
|
2996
3069
|
* The levels the capability editor offers. This is the llm-pi-ai
|
|
2997
3070
|
* `reasoningEfforts` table-key space — pi-ai's fixed seven levels (schema
|
|
@@ -4175,6 +4248,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4175
4248
|
...pendingTl
|
|
4176
4249
|
};
|
|
4177
4250
|
const level = EFFORT_OPTIONS.includes(viewValue.level) ? viewValue.level : "auto";
|
|
4251
|
+
const defaultPricing = PRICING_OPTIONS.includes(viewValue.defaultPricing) ? viewValue.defaultPricing : "estimate";
|
|
4178
4252
|
const writeTl = (field, v) => {
|
|
4179
4253
|
setPendingTl((cur) => ({
|
|
4180
4254
|
...cur,
|
|
@@ -4355,6 +4429,27 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4355
4429
|
}
|
|
4356
4430
|
})]
|
|
4357
4431
|
}),
|
|
4432
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4433
|
+
style: rowStyle,
|
|
4434
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
4435
|
+
htmlFor: "plugin-config-thinking-levels-default-pricing",
|
|
4436
|
+
style: labelStyle,
|
|
4437
|
+
title: t("card.defaultPricingHint"),
|
|
4438
|
+
children: t("card.defaultPricing")
|
|
4439
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
4440
|
+
id: "plugin-config-thinking-levels-default-pricing",
|
|
4441
|
+
value: defaultPricing,
|
|
4442
|
+
disabled: readonly,
|
|
4443
|
+
style: controlStyle,
|
|
4444
|
+
onChange: (event) => {
|
|
4445
|
+
writeTl("defaultPricing", event.currentTarget.value);
|
|
4446
|
+
},
|
|
4447
|
+
children: PRICING_OPTIONS.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
4448
|
+
value: option,
|
|
4449
|
+
children: t(`card.defaultPricing.${option}`)
|
|
4450
|
+
}, option))
|
|
4451
|
+
})]
|
|
4452
|
+
}),
|
|
4358
4453
|
writeErrorTl !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
4359
4454
|
style: {
|
|
4360
4455
|
margin: "8px 0 0",
|