@eddyskywalker/dsh-chatgpt-subscription 0.85.0 → 0.87.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/README.md +1 -0
- package/lib/client.js +1779 -560
- package/lib/client.js.map +1 -1
- package/lib/codemode.js +6 -5
- package/lib/index.js +5687 -2532
- package/lib/types/client/common/ModelChecklist.d.ts +13 -1
- package/lib/types/client/common/ModelChecklist.d.ts.map +1 -1
- package/lib/types/client/common/model-checklist-labels.d.ts +31 -0
- package/lib/types/client/common/model-checklist-labels.d.ts.map +1 -0
- package/lib/types/client/common/model-vendors.d.ts +30 -0
- package/lib/types/client/common/model-vendors.d.ts.map +1 -0
- package/lib/types/client/features/progress-updates/locales.d.ts +3 -3
- package/lib/types/client/features/session-quota/adapters.d.ts +4 -0
- package/lib/types/client/features/session-quota/adapters.d.ts.map +1 -1
- package/lib/types/client/hub/HubOverview.d.ts +1 -1
- package/lib/types/client/hub/HubOverview.d.ts.map +1 -1
- package/lib/types/client/hub/HubProviderRow.d.ts +4 -0
- package/lib/types/client/hub/HubProviderRow.d.ts.map +1 -1
- package/lib/types/client/hub/brand-icons.d.ts +1 -1
- package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
- package/lib/types/client/hub/hub-styles.d.ts.map +1 -1
- package/lib/types/client/hub/providers.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +4 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/client/locales-ru/model-checklist.d.ts +4 -0
- package/lib/types/client/locales-ru/model-checklist.d.ts.map +1 -0
- package/lib/types/client/locales-ru/opencode-go.d.ts +3 -0
- package/lib/types/client/locales-ru/opencode-go.d.ts.map +1 -0
- package/lib/types/client/providers/antigravity-acp/AntigravityAcpSection.d.ts.map +1 -1
- package/lib/types/client/providers/cline-pass/ClinePassSection.d.ts.map +1 -1
- package/lib/types/client/providers/codex-chatgpt/locales.d.ts +3 -1
- package/lib/types/client/providers/codex-chatgpt/locales.d.ts.map +1 -1
- package/lib/types/client/providers/command-code/model-vendors.d.ts +1 -8
- package/lib/types/client/providers/command-code/model-vendors.d.ts.map +1 -1
- package/lib/types/client/providers/ollama/OllamaSection.d.ts.map +1 -1
- package/lib/types/client/providers/opencode-go/OpenCodeGoComposerQuota.d.ts +14 -0
- package/lib/types/client/providers/opencode-go/OpenCodeGoComposerQuota.d.ts.map +1 -0
- package/lib/types/client/providers/opencode-go/OpenCodeGoQuotaCard.d.ts +12 -0
- package/lib/types/client/providers/opencode-go/OpenCodeGoQuotaCard.d.ts.map +1 -0
- package/lib/types/client/providers/opencode-go/OpenCodeGoSection.d.ts +8 -0
- package/lib/types/client/providers/opencode-go/OpenCodeGoSection.d.ts.map +1 -0
- package/lib/types/client/providers/opencode-go/locales.d.ts +318 -0
- package/lib/types/client/providers/opencode-go/locales.d.ts.map +1 -0
- package/lib/types/client/providers/opencode-go/styles.d.ts +4 -0
- package/lib/types/client/providers/opencode-go/styles.d.ts.map +1 -0
- package/lib/types/client/providers/opendesign/OpenDesignSection.d.ts.map +1 -1
- package/lib/types/client/providers/qianwen-token-plan/useQianwenSection.d.ts +1 -0
- package/lib/types/client/providers/qianwen-token-plan/useQianwenSection.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/QoderSection.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/useQoderSection.d.ts +1 -0
- package/lib/types/client/providers/qoder/useQoderSection.d.ts.map +1 -1
- package/lib/types/client/providers/relayone/useRelayOneSection.d.ts +1 -0
- package/lib/types/client/providers/relayone/useRelayOneSection.d.ts.map +1 -1
- package/lib/types/client/providers/workbuddy/WorkBuddySection.d.ts.map +1 -1
- package/lib/types/client/providers/workbuddy/useWorkBuddySection.d.ts +1 -0
- package/lib/types/client/providers/workbuddy/useWorkBuddySection.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/common/account-pool.d.ts +17 -7
- package/lib/types/host/common/account-pool.d.ts.map +1 -1
- package/lib/types/host/common/model-request-control.d.ts +1 -1
- package/lib/types/host/common/model-request-control.d.ts.map +1 -1
- package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -1
- package/lib/types/host/common/request-diagnostics.d.ts +1 -1
- package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
- package/lib/types/host/providers/minimax-code/media-files.d.ts +29 -0
- package/lib/types/host/providers/minimax-code/media-files.d.ts.map +1 -0
- package/lib/types/host/providers/minimax-code/media-tool.d.ts +20 -0
- package/lib/types/host/providers/minimax-code/media-tool.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/account-pool.d.ts +50 -0
- package/lib/types/host/providers/opencode-go/account-pool.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/adapter.d.ts +36 -0
- package/lib/types/host/providers/opencode-go/adapter.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/client.d.ts +13 -0
- package/lib/types/host/providers/opencode-go/client.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/mapper-gemini.d.ts +13 -0
- package/lib/types/host/providers/opencode-go/mapper-gemini.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/mapper-messages.d.ts +8 -0
- package/lib/types/host/providers/opencode-go/mapper-messages.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/mapper-responses.d.ts +9 -0
- package/lib/types/host/providers/opencode-go/mapper-responses.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/mapper.d.ts +38 -0
- package/lib/types/host/providers/opencode-go/mapper.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/model-catalog.d.ts +57 -0
- package/lib/types/host/providers/opencode-go/model-catalog.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/native-shared.d.ts +31 -0
- package/lib/types/host/providers/opencode-go/native-shared.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/protocol.d.ts +13 -0
- package/lib/types/host/providers/opencode-go/protocol.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/routes.d.ts +13 -0
- package/lib/types/host/providers/opencode-go/routes.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/token-store.d.ts +29 -0
- package/lib/types/host/providers/opencode-go/token-store.d.ts.map +1 -0
- package/lib/types/host/providers/opencode-go/types.d.ts +20 -0
- package/lib/types/host/providers/opencode-go/types.d.ts.map +1 -0
- package/lib/types/host/providers/workbuddy/account-pool.d.ts.map +1 -1
- package/lib/types/host/runtime/codemode/rules.d.ts +1 -1
- package/lib/types/index.d.ts +6 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +1 -1
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/lib/types/shared/opencode-go-contracts.d.ts +80 -0
- package/lib/types/shared/opencode-go-contracts.d.ts.map +1 -0
- package/package.json +1 -1
- package/presets/dispatch/README.md +2 -2
- package/presets/dispatch/agent.cordis.yml +1 -1
package/lib/client.js
CHANGED
|
@@ -611,7 +611,7 @@ window.__ModuleLoader__.load({
|
|
|
611
611
|
//#endregion
|
|
612
612
|
//#region src/client/providers/codex-chatgpt/locales.ts
|
|
613
613
|
const NS = "dsh-chatgpt-subscription";
|
|
614
|
-
const zh$
|
|
614
|
+
const zh$23 = {
|
|
615
615
|
...accountPoolZh,
|
|
616
616
|
title: "ChatGPT",
|
|
617
617
|
hubTitle: "订阅服务",
|
|
@@ -869,6 +869,7 @@ window.__ModuleLoader__.load({
|
|
|
869
869
|
"cardName.relayone": "RelayOne",
|
|
870
870
|
"cardName.claude-api": "Claude API",
|
|
871
871
|
"cardName.aws-quick": "AWS Quick",
|
|
872
|
+
"cardName.opencode-go": "OpenCode Go(订阅)",
|
|
872
873
|
modelChecklistCount: "已启用 {count}/{total}",
|
|
873
874
|
codeRunTitle: "代码",
|
|
874
875
|
codeRunOutput: "输出",
|
|
@@ -882,8 +883,8 @@ window.__ModuleLoader__.load({
|
|
|
882
883
|
codeRunFailed: "失败",
|
|
883
884
|
codeRunStopped: "已停止"
|
|
884
885
|
};
|
|
885
|
-
const dictionaries$
|
|
886
|
-
zh: zh$
|
|
886
|
+
const dictionaries$23 = {
|
|
887
|
+
zh: zh$23,
|
|
887
888
|
en: {
|
|
888
889
|
...accountPoolEn,
|
|
889
890
|
title: "ChatGPT",
|
|
@@ -1142,6 +1143,7 @@ window.__ModuleLoader__.load({
|
|
|
1142
1143
|
"cardName.relayone": "RelayOne",
|
|
1143
1144
|
"cardName.claude-api": "Claude API",
|
|
1144
1145
|
"cardName.aws-quick": "AWS Quick",
|
|
1146
|
+
"cardName.opencode-go": "OpenCode Go Subscription",
|
|
1145
1147
|
modelChecklistCount: "{count}/{total} enabled",
|
|
1146
1148
|
codeRunTitle: "Code",
|
|
1147
1149
|
codeRunOutput: "Output",
|
|
@@ -1267,7 +1269,7 @@ window.__ModuleLoader__.load({
|
|
|
1267
1269
|
* reads).
|
|
1268
1270
|
*/
|
|
1269
1271
|
function LineProxySection({ line, fetchSnapshot, onSave, idPrefix, snapshot: provided }) {
|
|
1270
|
-
const labels = useLineDict(NS, zh$
|
|
1272
|
+
const labels = useLineDict(NS, zh$23);
|
|
1271
1273
|
const readSnapshotFromRoute = (0, react.useCallback)(() => (fetchSnapshot ?? (() => fetchLineProxySnapshot("/api/dsh-chatgpt-subscription")))(), [fetchSnapshot]);
|
|
1272
1274
|
const writePreferences = (0, react.useCallback)((patch) => (onSave ?? ((next) => savePreferences("/api/dsh-chatgpt-subscription", next)))(patch), [onSave]);
|
|
1273
1275
|
const [readSnapshot, setReadSnapshot] = (0, react.useState)(null);
|
|
@@ -1638,6 +1640,13 @@ window.__ModuleLoader__.load({
|
|
|
1638
1640
|
fit: "cover"
|
|
1639
1641
|
},
|
|
1640
1642
|
tile: "#FFFFFF"
|
|
1643
|
+
},
|
|
1644
|
+
"opencode-go": {
|
|
1645
|
+
image: {
|
|
1646
|
+
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAABzUlEQVR4AeycQQrCQBAEF1+g6J/0o5LPCXmCnnNx0E2nNqGEPciw024VffV0PZ/fHo7BqflBCSgAxd+aAhQAE4DjbYACYAJwvA1QAEwAjrcBCgAIDBRpA2AZClAATACOtwEKgAnA8TZAATABOD7egNc8tz2ftJ+4gPQD9r5fAbDBDQXALx00XgGwGAUoACYAx9sABcAE4HgboACYABxvAxSwJHC7XFryLNP4bzYg7KBar4CKUHiugDDgar0CKkLhuQLCgKv1CqgIhecKCAOu1iugIhSeKyAMuFqvgIpQeK6AMOBq/XAC7o9H6z5fdlRAtp4PJ2BrAHSeAmADClAATACOtwEKgAnA8TZAATABON4GKAAmAMev2AD4JTuNVwAsTgEKgAnA8TZAATABON4GKAAmAMfbAAXABOB4G9ApoPe6AnoJdt5XQCfA3uvDCXhOU0ueXmBr3x9OwNoPHH2fAmBDClAATACOtwEKgAnA8TZAAX8QONAVGwDLVIACYAJwfLwByf/+2WJ32k9cQPoBe9+vANigAhQAE4DjbYACYAJw/A8NgH/pQeMVAItVgAJgAnC8DVAATACOtwEKgAnA8TZAATABON4GFALS4w8AAAD//x7wkLQAAAAGSURBVAMAKj5LkLSa6SQAAAAASUVORK5CYII=",
|
|
1647
|
+
fit: "contain"
|
|
1648
|
+
},
|
|
1649
|
+
tile: "#FFFFFF"
|
|
1641
1650
|
}
|
|
1642
1651
|
};
|
|
1643
1652
|
/** One brand mark at a given box size; the artwork is decorative. */
|
|
@@ -2658,16 +2667,232 @@ window.__ModuleLoader__.load({
|
|
|
2658
2667
|
});
|
|
2659
2668
|
}
|
|
2660
2669
|
//#endregion
|
|
2661
|
-
//#region src/client/common/
|
|
2670
|
+
//#region src/client/common/model-checklist-labels.ts
|
|
2662
2671
|
/**
|
|
2663
|
-
*
|
|
2664
|
-
* renders.
|
|
2672
|
+
* Copy of the shared model checklist's split vendor view.
|
|
2665
2673
|
*
|
|
2666
|
-
*
|
|
2667
|
-
*
|
|
2668
|
-
*
|
|
2669
|
-
* Single-vendor and ungrouped callers continue to render a compact flat list.
|
|
2674
|
+
* The checklist owns this namespace so every provider line gets the same
|
|
2675
|
+
* vendor-view wording without carrying its own copy of these keys; a line may
|
|
2676
|
+
* still override any label through the checklist's `labels` prop.
|
|
2670
2677
|
*/
|
|
2678
|
+
const NS_MODEL_CHECKLIST = "dsh-model-checklist";
|
|
2679
|
+
const zh$22 = {
|
|
2680
|
+
allGroups: "全部",
|
|
2681
|
+
enabledGroup: "已启用",
|
|
2682
|
+
otherGroup: "其他",
|
|
2683
|
+
searchPlaceholder: "搜索模型或厂商…",
|
|
2684
|
+
noMatches: "没有匹配的模型",
|
|
2685
|
+
groupsNav: "模型厂商"
|
|
2686
|
+
};
|
|
2687
|
+
const en$22 = {
|
|
2688
|
+
allGroups: "All",
|
|
2689
|
+
enabledGroup: "Enabled",
|
|
2690
|
+
otherGroup: "Other",
|
|
2691
|
+
searchPlaceholder: "Search models or vendors…",
|
|
2692
|
+
noMatches: "No matching models",
|
|
2693
|
+
groupsNav: "Model vendors"
|
|
2694
|
+
};
|
|
2695
|
+
const modelChecklistZh = zh$22;
|
|
2696
|
+
const dictionaries$22 = {
|
|
2697
|
+
zh: zh$22,
|
|
2698
|
+
en: en$22
|
|
2699
|
+
};
|
|
2700
|
+
//#endregion
|
|
2701
|
+
//#region src/client/common/model-vendors.ts
|
|
2702
|
+
function vendor(key, label, mark = null) {
|
|
2703
|
+
return {
|
|
2704
|
+
key,
|
|
2705
|
+
label,
|
|
2706
|
+
mark
|
|
2707
|
+
};
|
|
2708
|
+
}
|
|
2709
|
+
const ANTHROPIC = vendor("anthropic", "Anthropic", "claude");
|
|
2710
|
+
const OPENAI = vendor("openai", "OpenAI", "openai");
|
|
2711
|
+
const DEEPSEEK = vendor("deepseek", "DeepSeek", "deepseek");
|
|
2712
|
+
const MOONSHOT = vendor("moonshot", "Moonshot", "kimi");
|
|
2713
|
+
const ZAI = vendor("zai", "Z.ai", "glm");
|
|
2714
|
+
const MINIMAX = vendor("minimax", "MiniMax", "minimax");
|
|
2715
|
+
const QWEN = vendor("qwen", "Qwen", "qwen");
|
|
2716
|
+
const GOOGLE = vendor("google", "Google", "gemini");
|
|
2717
|
+
const XAI = vendor("xai", "xAI", "grok");
|
|
2718
|
+
const STEPFUN = vendor("stepfun", "StepFun", "step-code");
|
|
2719
|
+
const META = vendor("meta", "Meta");
|
|
2720
|
+
const XIAOMI = vendor("xiaomi", "Xiaomi");
|
|
2721
|
+
const TENCENT = vendor("tencent", "Tencent");
|
|
2722
|
+
const MISTRAL = vendor("mistral", "Mistral");
|
|
2723
|
+
const NVIDIA = vendor("nvidia", "NVIDIA");
|
|
2724
|
+
const MEITUAN = vendor("meituan", "Meituan");
|
|
2725
|
+
const MICROSOFT = vendor("microsoft", "Microsoft");
|
|
2726
|
+
const IBM = vendor("ibm", "IBM");
|
|
2727
|
+
const COHERE = vendor("cohere", "Cohere");
|
|
2728
|
+
const PREFIX_VENDORS = {
|
|
2729
|
+
anthropic: ANTHROPIC,
|
|
2730
|
+
openai: OPENAI,
|
|
2731
|
+
deepseek: DEEPSEEK,
|
|
2732
|
+
"deepseek-ai": DEEPSEEK,
|
|
2733
|
+
moonshotai: MOONSHOT,
|
|
2734
|
+
moonshot: MOONSHOT,
|
|
2735
|
+
kimi: MOONSHOT,
|
|
2736
|
+
"z-ai": ZAI,
|
|
2737
|
+
"zai-org": ZAI,
|
|
2738
|
+
zai: ZAI,
|
|
2739
|
+
zhipu: ZAI,
|
|
2740
|
+
thudm: ZAI,
|
|
2741
|
+
minimax: MINIMAX,
|
|
2742
|
+
minimaxai: MINIMAX,
|
|
2743
|
+
qwen: QWEN,
|
|
2744
|
+
alibaba: QWEN,
|
|
2745
|
+
google: GOOGLE,
|
|
2746
|
+
xai: XAI,
|
|
2747
|
+
"x-ai": XAI,
|
|
2748
|
+
stepfun: STEPFUN,
|
|
2749
|
+
"stepfun-ai": STEPFUN,
|
|
2750
|
+
meta: META,
|
|
2751
|
+
"meta-llama": META,
|
|
2752
|
+
xiaomi: XIAOMI,
|
|
2753
|
+
xiaomimimo: XIAOMI,
|
|
2754
|
+
tencent: TENCENT,
|
|
2755
|
+
mistral: MISTRAL,
|
|
2756
|
+
mistralai: MISTRAL,
|
|
2757
|
+
nvidia: NVIDIA,
|
|
2758
|
+
meituan: MEITUAN,
|
|
2759
|
+
"meituan-longcat": MEITUAN,
|
|
2760
|
+
microsoft: MICROSOFT,
|
|
2761
|
+
ibm: IBM,
|
|
2762
|
+
"ibm-granite": IBM,
|
|
2763
|
+
cohere: COHERE,
|
|
2764
|
+
inclusionai: vendor("inclusionai", "InclusionAI"),
|
|
2765
|
+
thinkingmachines: vendor("thinkingmachines", "Thinking Machines"),
|
|
2766
|
+
stealth: vendor("stealth", "Stealth"),
|
|
2767
|
+
sakana: vendor("sakana", "Sakana"),
|
|
2768
|
+
ornith: vendor("ornith", "Ornith"),
|
|
2769
|
+
reflection: vendor("reflection", "Reflection"),
|
|
2770
|
+
poolside: vendor("poolside", "Poolside")
|
|
2771
|
+
};
|
|
2772
|
+
/**
|
|
2773
|
+
* Model families recognised from a bare model name (lower-cased, prefix-free).
|
|
2774
|
+
* First match wins; anchored at the start so a family name inside another
|
|
2775
|
+
* vendor's id (a fine-tune called `foo-llama`) does not steal it.
|
|
2776
|
+
*/
|
|
2777
|
+
const FAMILY_RULES = [
|
|
2778
|
+
{
|
|
2779
|
+
re: /^claude/,
|
|
2780
|
+
vendor: ANTHROPIC
|
|
2781
|
+
},
|
|
2782
|
+
{
|
|
2783
|
+
re: /^(gpt|chatgpt|codex|o[1-9](?![0-9])|davinci|text-embedding)/,
|
|
2784
|
+
vendor: OPENAI
|
|
2785
|
+
},
|
|
2786
|
+
{
|
|
2787
|
+
re: /^deepseek/,
|
|
2788
|
+
vendor: DEEPSEEK
|
|
2789
|
+
},
|
|
2790
|
+
{
|
|
2791
|
+
re: /^(kimi|moonshot|k[0-9])/,
|
|
2792
|
+
vendor: MOONSHOT
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
re: /^(glm|chatglm|codegeex|cogview)/,
|
|
2796
|
+
vendor: ZAI
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
re: /^(minimax|abab)/,
|
|
2800
|
+
vendor: MINIMAX
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
re: /^(qwen|qwq|qvq|tongyi)/,
|
|
2804
|
+
vendor: QWEN
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
re: /^(gemini|gemma|codegemma|palm)/,
|
|
2808
|
+
vendor: GOOGLE
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
re: /^grok/,
|
|
2812
|
+
vendor: XAI
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
re: /^step[-_0-9]/,
|
|
2816
|
+
vendor: STEPFUN
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
re: /^(llama|codellama)/,
|
|
2820
|
+
vendor: META
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
re: /^(mistral|mixtral|codestral|devstral|magistral|ministral|pixtral)/,
|
|
2824
|
+
vendor: MISTRAL
|
|
2825
|
+
},
|
|
2826
|
+
{
|
|
2827
|
+
re: /^(hunyuan|hy[0-9])/,
|
|
2828
|
+
vendor: TENCENT
|
|
2829
|
+
},
|
|
2830
|
+
{
|
|
2831
|
+
re: /^mimo/,
|
|
2832
|
+
vendor: XIAOMI
|
|
2833
|
+
},
|
|
2834
|
+
{
|
|
2835
|
+
re: /^(nemotron|nvidia)/,
|
|
2836
|
+
vendor: NVIDIA
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
re: /^longcat/,
|
|
2840
|
+
vendor: MEITUAN
|
|
2841
|
+
},
|
|
2842
|
+
{
|
|
2843
|
+
re: /^phi[-0-9]/,
|
|
2844
|
+
vendor: MICROSOFT
|
|
2845
|
+
},
|
|
2846
|
+
{
|
|
2847
|
+
re: /^granite/,
|
|
2848
|
+
vendor: IBM
|
|
2849
|
+
},
|
|
2850
|
+
{
|
|
2851
|
+
re: /^(command-r|command-a|aya)/,
|
|
2852
|
+
vendor: COHERE
|
|
2853
|
+
}
|
|
2854
|
+
];
|
|
2855
|
+
function titleCasePrefix(raw) {
|
|
2856
|
+
return raw.split(/[-_\s]+/).filter(Boolean).map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join(" ");
|
|
2857
|
+
}
|
|
2858
|
+
/**
|
|
2859
|
+
* The display vendor of one model id.
|
|
2860
|
+
*
|
|
2861
|
+
* @param modelId - the model id as the line's catalog lists it.
|
|
2862
|
+
* @param otherLabel - label of the bucket for ids no rule claims.
|
|
2863
|
+
* @param options - line-specific prefixes to skip.
|
|
2864
|
+
*/
|
|
2865
|
+
function modelVendorGroup(modelId, otherLabel, options = {}) {
|
|
2866
|
+
let segments = modelId.trim().split("/").filter(Boolean);
|
|
2867
|
+
const ignored = options.ignorePrefixes ?? [];
|
|
2868
|
+
while (segments.length > 1 && ignored.includes(segments[0].toLowerCase())) segments = segments.slice(1);
|
|
2869
|
+
const prefix = segments.length > 1 ? segments[0] : null;
|
|
2870
|
+
if (prefix !== null) {
|
|
2871
|
+
const known = PREFIX_VENDORS[prefix.toLowerCase()];
|
|
2872
|
+
if (known !== void 0) return known;
|
|
2873
|
+
}
|
|
2874
|
+
const name = (segments[segments.length - 1] ?? "").toLowerCase();
|
|
2875
|
+
for (const rule of FAMILY_RULES) if (rule.re.test(name)) return rule.vendor;
|
|
2876
|
+
if (prefix !== null) return {
|
|
2877
|
+
key: prefix.toLowerCase(),
|
|
2878
|
+
label: titleCasePrefix(prefix),
|
|
2879
|
+
mark: null
|
|
2880
|
+
};
|
|
2881
|
+
return {
|
|
2882
|
+
key: "other",
|
|
2883
|
+
label: otherLabel,
|
|
2884
|
+
mark: null
|
|
2885
|
+
};
|
|
2886
|
+
}
|
|
2887
|
+
/**
|
|
2888
|
+
* The enabled-id list after a whole vendor group is switched on or off,
|
|
2889
|
+
* keeping the caller's existing order and every id outside the group.
|
|
2890
|
+
*/
|
|
2891
|
+
function nextGroupSelection(currentEnabled, groupIds, enabled) {
|
|
2892
|
+
if (enabled) return [.../* @__PURE__ */ new Set([...currentEnabled, ...groupIds])];
|
|
2893
|
+
const drop = new Set(groupIds);
|
|
2894
|
+
return currentEnabled.filter((id) => !drop.has(id));
|
|
2895
|
+
}
|
|
2671
2896
|
const ALL_TAB = "__all__";
|
|
2672
2897
|
const ENABLED_TAB = "__enabled__";
|
|
2673
2898
|
const CHECK_SVG = "<svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 8.5l3.2 3.2L13 5\"/></svg>";
|
|
@@ -2676,7 +2901,7 @@ window.__ModuleLoader__.load({
|
|
|
2676
2901
|
return first ? first.toUpperCase() : "?";
|
|
2677
2902
|
}
|
|
2678
2903
|
function renderOptionRow(item, busy, onToggle) {
|
|
2679
|
-
const mark = item.group?.mark
|
|
2904
|
+
const mark = item.group?.mark ?? modelBrandMark(item.id);
|
|
2680
2905
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2681
2906
|
type: "button",
|
|
2682
2907
|
role: "checkbox",
|
|
@@ -2709,7 +2934,25 @@ window.__ModuleLoader__.load({
|
|
|
2709
2934
|
]
|
|
2710
2935
|
}, item.id);
|
|
2711
2936
|
}
|
|
2712
|
-
function ModelChecklist({ items, busy, onToggle, onToggleAll, onToggleGroup, labels }) {
|
|
2937
|
+
function ModelChecklist({ items: rawItems, busy, onToggle, onToggleAll, onToggleGroup, groupByVendor, labels }) {
|
|
2938
|
+
const copy = useLineDict(NS_MODEL_CHECKLIST, modelChecklistZh);
|
|
2939
|
+
const otherLabel = copy.otherGroup;
|
|
2940
|
+
const minItems = typeof groupByVendor === "object" ? groupByVendor.minItems ?? 10 : 10;
|
|
2941
|
+
const grouping = groupByVendor !== void 0 && groupByVendor !== false && rawItems.length >= minItems;
|
|
2942
|
+
const ignoreKey = typeof groupByVendor === "object" ? (groupByVendor.ignorePrefixes ?? []).join("\n") : "";
|
|
2943
|
+
const items = (0, react.useMemo)(() => {
|
|
2944
|
+
if (!grouping) return rawItems;
|
|
2945
|
+
const options = ignoreKey === "" ? {} : { ignorePrefixes: ignoreKey.split("\n") };
|
|
2946
|
+
return rawItems.map((item) => item.group !== void 0 ? item : {
|
|
2947
|
+
...item,
|
|
2948
|
+
group: modelVendorGroup(item.id, otherLabel, options)
|
|
2949
|
+
});
|
|
2950
|
+
}, [
|
|
2951
|
+
rawItems,
|
|
2952
|
+
grouping,
|
|
2953
|
+
ignoreKey,
|
|
2954
|
+
otherLabel
|
|
2955
|
+
]);
|
|
2713
2956
|
const enabledCount = items.filter((item) => item.enabled).length;
|
|
2714
2957
|
const count = (labels.countTemplate ?? "{count}/{total}").replace("{count}", String(enabledCount)).replace("{total}", String(items.length));
|
|
2715
2958
|
const vendors = (0, react.useMemo)(() => {
|
|
@@ -2730,7 +2973,8 @@ window.__ModuleLoader__.load({
|
|
|
2730
2973
|
bucket.items.push(item);
|
|
2731
2974
|
if (item.enabled) bucket.enabledCount += 1;
|
|
2732
2975
|
}
|
|
2733
|
-
|
|
2976
|
+
const buckets = [...map.values()];
|
|
2977
|
+
return [...buckets.filter((b) => b.key !== "other"), ...buckets.filter((b) => b.key === "other")];
|
|
2734
2978
|
}, [items]);
|
|
2735
2979
|
const splitMode = vendors.length >= 2;
|
|
2736
2980
|
const [selectedTab, setSelectedTab] = (0, react.useState)(null);
|
|
@@ -2807,8 +3051,8 @@ window.__ModuleLoader__.load({
|
|
|
2807
3051
|
children: items.map((item) => renderOptionRow(item, busy, onToggle))
|
|
2808
3052
|
})]
|
|
2809
3053
|
});
|
|
2810
|
-
const allLabel = labels.allGroups ??
|
|
2811
|
-
const enabledLabel = labels.enabledGroup ??
|
|
3054
|
+
const allLabel = labels.allGroups ?? copy.allGroups;
|
|
3055
|
+
const enabledLabel = labels.enabledGroup ?? copy.enabledGroup;
|
|
2812
3056
|
const paneTitle = searching ? `${visibleItems.length}/${items.length}` : activeTab === ALL_TAB ? allLabel : activeTab === ENABLED_TAB ? enabledLabel : activeVendor?.label ?? allLabel;
|
|
2813
3057
|
const paneEnabledCount = visibleItems.filter((item) => item.enabled).length;
|
|
2814
3058
|
const showGroupActions = onToggleGroup !== void 0 && !searching && activeVendor !== null && activeVendor.items.length > 0;
|
|
@@ -2825,8 +3069,8 @@ window.__ModuleLoader__.load({
|
|
|
2825
3069
|
type: "search",
|
|
2826
3070
|
className: "dsh-mcl-search",
|
|
2827
3071
|
value: query,
|
|
2828
|
-
placeholder: labels.searchPlaceholder ??
|
|
2829
|
-
"aria-label": labels.searchPlaceholder ??
|
|
3072
|
+
placeholder: labels.searchPlaceholder ?? copy.searchPlaceholder,
|
|
3073
|
+
"aria-label": labels.searchPlaceholder ?? copy.searchPlaceholder,
|
|
2830
3074
|
onChange: (event) => setQuery(event.currentTarget.value),
|
|
2831
3075
|
onKeyDown: handleSearchKeyDown
|
|
2832
3076
|
}),
|
|
@@ -2853,7 +3097,7 @@ window.__ModuleLoader__.load({
|
|
|
2853
3097
|
className: "dsh-mcl-vendors",
|
|
2854
3098
|
role: "tablist",
|
|
2855
3099
|
"aria-orientation": "vertical",
|
|
2856
|
-
"aria-label": labels.groupsNav ??
|
|
3100
|
+
"aria-label": labels.groupsNav ?? copy.groupsNav,
|
|
2857
3101
|
children: [
|
|
2858
3102
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2859
3103
|
type: "button",
|
|
@@ -2965,7 +3209,7 @@ window.__ModuleLoader__.load({
|
|
|
2965
3209
|
children: visibleItems.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2966
3210
|
className: "dsh-mcl-empty",
|
|
2967
3211
|
role: "status",
|
|
2968
|
-
children: labels.noMatches ??
|
|
3212
|
+
children: labels.noMatches ?? copy.noMatches
|
|
2969
3213
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2970
3214
|
className: "dsh-mcl-list",
|
|
2971
3215
|
role: "group",
|
|
@@ -4478,7 +4722,7 @@ window.__ModuleLoader__.load({
|
|
|
4478
4722
|
//#endregion
|
|
4479
4723
|
//#region src/client/providers/command-code/locales.ts
|
|
4480
4724
|
const NS_COMMAND_CODE = "dsh-command-code";
|
|
4481
|
-
const zh$
|
|
4725
|
+
const zh$21 = {
|
|
4482
4726
|
...accountPoolZh,
|
|
4483
4727
|
title: "Command Code",
|
|
4484
4728
|
pageDesc: "登录 Command Code,管理可用模型、上下文窗口与额度。",
|
|
@@ -4552,7 +4796,7 @@ window.__ModuleLoader__.load({
|
|
|
4552
4796
|
loginFailed: "登录失败",
|
|
4553
4797
|
tokens: "tokens"
|
|
4554
4798
|
};
|
|
4555
|
-
const en$
|
|
4799
|
+
const en$21 = {
|
|
4556
4800
|
...accountPoolEn,
|
|
4557
4801
|
title: "Command Code",
|
|
4558
4802
|
pageDesc: "Sign in to Command Code and manage models, context windows, and quota.",
|
|
@@ -4626,211 +4870,17 @@ window.__ModuleLoader__.load({
|
|
|
4626
4870
|
loginFailed: "Sign-in failed",
|
|
4627
4871
|
tokens: "tokens"
|
|
4628
4872
|
};
|
|
4629
|
-
const dictionaries$
|
|
4630
|
-
zh: zh$
|
|
4631
|
-
"zh-CN": zh$
|
|
4632
|
-
en: en$
|
|
4633
|
-
"en-US": en$
|
|
4873
|
+
const dictionaries$21 = {
|
|
4874
|
+
zh: zh$21,
|
|
4875
|
+
"zh-CN": zh$21,
|
|
4876
|
+
en: en$21,
|
|
4877
|
+
"en-US": en$21
|
|
4634
4878
|
};
|
|
4635
4879
|
//#endregion
|
|
4636
4880
|
//#region src/client/providers/command-code/model-vendors.ts
|
|
4637
|
-
|
|
4638
|
-
anthropic: {
|
|
4639
|
-
key: "anthropic",
|
|
4640
|
-
label: "Anthropic",
|
|
4641
|
-
mark: "claude"
|
|
4642
|
-
},
|
|
4643
|
-
openai: {
|
|
4644
|
-
key: "openai",
|
|
4645
|
-
label: "OpenAI",
|
|
4646
|
-
mark: "openai"
|
|
4647
|
-
},
|
|
4648
|
-
deepseek: {
|
|
4649
|
-
key: "deepseek",
|
|
4650
|
-
label: "DeepSeek",
|
|
4651
|
-
mark: "deepseek"
|
|
4652
|
-
},
|
|
4653
|
-
moonshotai: {
|
|
4654
|
-
key: "moonshot",
|
|
4655
|
-
label: "Moonshot",
|
|
4656
|
-
mark: "kimi"
|
|
4657
|
-
},
|
|
4658
|
-
moonshot: {
|
|
4659
|
-
key: "moonshot",
|
|
4660
|
-
label: "Moonshot",
|
|
4661
|
-
mark: "kimi"
|
|
4662
|
-
},
|
|
4663
|
-
kimi: {
|
|
4664
|
-
key: "moonshot",
|
|
4665
|
-
label: "Moonshot",
|
|
4666
|
-
mark: "kimi"
|
|
4667
|
-
},
|
|
4668
|
-
"z-ai": {
|
|
4669
|
-
key: "zai",
|
|
4670
|
-
label: "Z.ai",
|
|
4671
|
-
mark: "glm"
|
|
4672
|
-
},
|
|
4673
|
-
"zai-org": {
|
|
4674
|
-
key: "zai",
|
|
4675
|
-
label: "Z.ai",
|
|
4676
|
-
mark: "glm"
|
|
4677
|
-
},
|
|
4678
|
-
zhipu: {
|
|
4679
|
-
key: "zai",
|
|
4680
|
-
label: "Z.ai",
|
|
4681
|
-
mark: "glm"
|
|
4682
|
-
},
|
|
4683
|
-
minimax: {
|
|
4684
|
-
key: "minimax",
|
|
4685
|
-
label: "MiniMax",
|
|
4686
|
-
mark: "minimax"
|
|
4687
|
-
},
|
|
4688
|
-
minimaxai: {
|
|
4689
|
-
key: "minimax",
|
|
4690
|
-
label: "MiniMax",
|
|
4691
|
-
mark: "minimax"
|
|
4692
|
-
},
|
|
4693
|
-
qwen: {
|
|
4694
|
-
key: "qwen",
|
|
4695
|
-
label: "Qwen",
|
|
4696
|
-
mark: "qwen"
|
|
4697
|
-
},
|
|
4698
|
-
google: {
|
|
4699
|
-
key: "google",
|
|
4700
|
-
label: "Google",
|
|
4701
|
-
mark: "gemini"
|
|
4702
|
-
},
|
|
4703
|
-
xai: {
|
|
4704
|
-
key: "xai",
|
|
4705
|
-
label: "xAI",
|
|
4706
|
-
mark: "grok"
|
|
4707
|
-
},
|
|
4708
|
-
"x-ai": {
|
|
4709
|
-
key: "xai",
|
|
4710
|
-
label: "xAI",
|
|
4711
|
-
mark: "grok"
|
|
4712
|
-
},
|
|
4713
|
-
stepfun: {
|
|
4714
|
-
key: "stepfun",
|
|
4715
|
-
label: "StepFun",
|
|
4716
|
-
mark: "step-code"
|
|
4717
|
-
},
|
|
4718
|
-
meta: {
|
|
4719
|
-
key: "meta",
|
|
4720
|
-
label: "Meta",
|
|
4721
|
-
mark: null
|
|
4722
|
-
},
|
|
4723
|
-
"meta-llama": {
|
|
4724
|
-
key: "meta",
|
|
4725
|
-
label: "Meta",
|
|
4726
|
-
mark: null
|
|
4727
|
-
},
|
|
4728
|
-
xiaomi: {
|
|
4729
|
-
key: "xiaomi",
|
|
4730
|
-
label: "Xiaomi",
|
|
4731
|
-
mark: null
|
|
4732
|
-
},
|
|
4733
|
-
tencent: {
|
|
4734
|
-
key: "tencent",
|
|
4735
|
-
label: "Tencent",
|
|
4736
|
-
mark: null
|
|
4737
|
-
},
|
|
4738
|
-
mistral: {
|
|
4739
|
-
key: "mistral",
|
|
4740
|
-
label: "Mistral",
|
|
4741
|
-
mark: null
|
|
4742
|
-
},
|
|
4743
|
-
mistralai: {
|
|
4744
|
-
key: "mistral",
|
|
4745
|
-
label: "Mistral",
|
|
4746
|
-
mark: null
|
|
4747
|
-
},
|
|
4748
|
-
nvidia: {
|
|
4749
|
-
key: "nvidia",
|
|
4750
|
-
label: "NVIDIA",
|
|
4751
|
-
mark: null
|
|
4752
|
-
},
|
|
4753
|
-
meituan: {
|
|
4754
|
-
key: "meituan",
|
|
4755
|
-
label: "Meituan",
|
|
4756
|
-
mark: null
|
|
4757
|
-
},
|
|
4758
|
-
inclusionai: {
|
|
4759
|
-
key: "inclusionai",
|
|
4760
|
-
label: "InclusionAI",
|
|
4761
|
-
mark: null
|
|
4762
|
-
},
|
|
4763
|
-
thinkingmachines: {
|
|
4764
|
-
key: "thinkingmachines",
|
|
4765
|
-
label: "Thinking Machines",
|
|
4766
|
-
mark: null
|
|
4767
|
-
},
|
|
4768
|
-
stealth: {
|
|
4769
|
-
key: "stealth",
|
|
4770
|
-
label: "Stealth",
|
|
4771
|
-
mark: null
|
|
4772
|
-
},
|
|
4773
|
-
sakana: {
|
|
4774
|
-
key: "sakana",
|
|
4775
|
-
label: "Sakana",
|
|
4776
|
-
mark: null
|
|
4777
|
-
},
|
|
4778
|
-
ornith: {
|
|
4779
|
-
key: "ornith",
|
|
4780
|
-
label: "Ornith",
|
|
4781
|
-
mark: null
|
|
4782
|
-
},
|
|
4783
|
-
reflection: {
|
|
4784
|
-
key: "reflection",
|
|
4785
|
-
label: "Reflection",
|
|
4786
|
-
mark: null
|
|
4787
|
-
},
|
|
4788
|
-
poolside: {
|
|
4789
|
-
key: "poolside",
|
|
4790
|
-
label: "Poolside",
|
|
4791
|
-
mark: null
|
|
4792
|
-
}
|
|
4793
|
-
};
|
|
4794
|
-
function titleCasePrefix(raw) {
|
|
4795
|
-
return raw.split(/[-_\s]+/).filter(Boolean).map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join(" ");
|
|
4796
|
-
}
|
|
4797
|
-
/**
|
|
4798
|
-
* Resolves the display vendor for a Command Code model id.
|
|
4799
|
-
*
|
|
4800
|
-
* Uses the `vendor/model` prefix when present (merging aliases like `z-ai` and
|
|
4801
|
-
* `zai-org`, or `minimax` and `MiniMaxAI`), then falls back to bare model-id
|
|
4802
|
-
* families (`claude-*`, `gpt-*`, etc.) before grouping unknown entries under
|
|
4803
|
-
* `otherLabel`.
|
|
4804
|
-
*/
|
|
4881
|
+
/** Display vendor of a Command Code model; see `common/model-vendors.ts`. */
|
|
4805
4882
|
function commandCodeModelVendor(model, otherLabel) {
|
|
4806
|
-
|
|
4807
|
-
const lower = id.toLowerCase();
|
|
4808
|
-
const slash = lower.indexOf("/");
|
|
4809
|
-
if (slash > 0) {
|
|
4810
|
-
const prefix = lower.slice(0, slash);
|
|
4811
|
-
const known = PREFIX_VENDORS[prefix];
|
|
4812
|
-
if (known !== void 0) return known;
|
|
4813
|
-
return {
|
|
4814
|
-
key: prefix,
|
|
4815
|
-
label: titleCasePrefix(id.slice(0, slash)),
|
|
4816
|
-
mark: modelBrandMark(id)
|
|
4817
|
-
};
|
|
4818
|
-
}
|
|
4819
|
-
if (/^claude\b/.test(lower)) return PREFIX_VENDORS.anthropic;
|
|
4820
|
-
if (/^(gpt|codex|o[1-9])\b/.test(lower) || /^gpt-/.test(lower)) return PREFIX_VENDORS.openai;
|
|
4821
|
-
if (/^deepseek\b/.test(lower)) return PREFIX_VENDORS.deepseek;
|
|
4822
|
-
if (/^(kimi|moonshot)\b/.test(lower)) return PREFIX_VENDORS.moonshot;
|
|
4823
|
-
if (/^glm\b/.test(lower)) return PREFIX_VENDORS["z-ai"];
|
|
4824
|
-
if (/^minimax\b/.test(lower)) return PREFIX_VENDORS.minimax;
|
|
4825
|
-
if (/^qwen\b/.test(lower)) return PREFIX_VENDORS.qwen;
|
|
4826
|
-
if (/^gemini\b/.test(lower)) return PREFIX_VENDORS.google;
|
|
4827
|
-
if (/^grok\b/.test(lower)) return PREFIX_VENDORS.xai;
|
|
4828
|
-
if (/^step\b/.test(lower)) return PREFIX_VENDORS.stepfun;
|
|
4829
|
-
return {
|
|
4830
|
-
key: "other",
|
|
4831
|
-
label: otherLabel,
|
|
4832
|
-
mark: null
|
|
4833
|
-
};
|
|
4883
|
+
return modelVendorGroup(model.id, otherLabel);
|
|
4834
4884
|
}
|
|
4835
4885
|
//#endregion
|
|
4836
4886
|
//#region src/client/providers/command-code/CommandCodeSection.tsx
|
|
@@ -4847,7 +4897,7 @@ window.__ModuleLoader__.load({
|
|
|
4847
4897
|
xhigh: "X-High",
|
|
4848
4898
|
max: "Max"
|
|
4849
4899
|
};
|
|
4850
|
-
const api$
|
|
4900
|
+
const api$20 = createLineApi("/command-code/api", "Command Code");
|
|
4851
4901
|
/**
|
|
4852
4902
|
* Route name shown next to a model.
|
|
4853
4903
|
*
|
|
@@ -4871,7 +4921,7 @@ window.__ModuleLoader__.load({
|
|
|
4871
4921
|
const [apiKey, setApiKey] = (0, react.useState)("");
|
|
4872
4922
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
4873
4923
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
4874
|
-
const t = useLineDict(NS_COMMAND_CODE, zh$
|
|
4924
|
+
const t = useLineDict(NS_COMMAND_CODE, zh$21);
|
|
4875
4925
|
const notifyChange = (0, react.useCallback)(() => {
|
|
4876
4926
|
onModelChange?.();
|
|
4877
4927
|
loadModelDirectory?.();
|
|
@@ -4879,7 +4929,7 @@ window.__ModuleLoader__.load({
|
|
|
4879
4929
|
const loadStatus = (0, react.useCallback)(async (quiet = false) => {
|
|
4880
4930
|
if (!quiet) setError(null);
|
|
4881
4931
|
try {
|
|
4882
|
-
const data = await api$
|
|
4932
|
+
const data = await api$20.request("/status");
|
|
4883
4933
|
setStatus(data);
|
|
4884
4934
|
setContextDrafts(contextDraftsFor(data));
|
|
4885
4935
|
quotaFollowUp.current ??= createQuotaFollowUp();
|
|
@@ -4910,12 +4960,12 @@ window.__ModuleLoader__.load({
|
|
|
4910
4960
|
setBusy("login");
|
|
4911
4961
|
setError(null);
|
|
4912
4962
|
setLoginProgress(null);
|
|
4913
|
-
const flow = await api$
|
|
4963
|
+
const flow = await api$20.request("/login", { method: "POST" });
|
|
4914
4964
|
if (flow.authUrl) window.open(flow.authUrl, "_blank");
|
|
4915
4965
|
const pollTimer = window.setInterval(() => {
|
|
4916
4966
|
(async () => {
|
|
4917
4967
|
try {
|
|
4918
|
-
const poll = await api$
|
|
4968
|
+
const poll = await api$20.request("/login/status");
|
|
4919
4969
|
if (poll.progress) setLoginProgress(poll.progress);
|
|
4920
4970
|
if (poll.status === "complete") {
|
|
4921
4971
|
window.clearInterval(pollTimer);
|
|
@@ -4947,7 +4997,7 @@ window.__ModuleLoader__.load({
|
|
|
4947
4997
|
try {
|
|
4948
4998
|
setBusy("apikey");
|
|
4949
4999
|
setError(null);
|
|
4950
|
-
const updated = await api$
|
|
5000
|
+
const updated = await api$20.request("/login/apikey", {
|
|
4951
5001
|
method: "POST",
|
|
4952
5002
|
body: JSON.stringify({ apiKey })
|
|
4953
5003
|
});
|
|
@@ -4965,7 +5015,7 @@ window.__ModuleLoader__.load({
|
|
|
4965
5015
|
try {
|
|
4966
5016
|
setBusy(`${action}-${accountId}`);
|
|
4967
5017
|
setError(null);
|
|
4968
|
-
const updated = await api$
|
|
5018
|
+
const updated = await api$20.request("/accounts", {
|
|
4969
5019
|
method: "POST",
|
|
4970
5020
|
body: JSON.stringify({
|
|
4971
5021
|
action,
|
|
@@ -4984,7 +5034,7 @@ window.__ModuleLoader__.load({
|
|
|
4984
5034
|
try {
|
|
4985
5035
|
setBusy("strategy");
|
|
4986
5036
|
setError(null);
|
|
4987
|
-
const updated = await api$
|
|
5037
|
+
const updated = await api$20.request("/accounts", {
|
|
4988
5038
|
method: "POST",
|
|
4989
5039
|
body: JSON.stringify({
|
|
4990
5040
|
action: "strategy",
|
|
@@ -5007,7 +5057,7 @@ window.__ModuleLoader__.load({
|
|
|
5007
5057
|
const handleRelogin = (accountId) => {
|
|
5008
5058
|
(async () => {
|
|
5009
5059
|
try {
|
|
5010
|
-
const updated = await api$
|
|
5060
|
+
const updated = await api$20.request("/accounts", {
|
|
5011
5061
|
method: "POST",
|
|
5012
5062
|
body: JSON.stringify({
|
|
5013
5063
|
action: "relogin",
|
|
@@ -5026,7 +5076,7 @@ window.__ModuleLoader__.load({
|
|
|
5026
5076
|
try {
|
|
5027
5077
|
setBusy("quota");
|
|
5028
5078
|
setError(null);
|
|
5029
|
-
const updated = await api$
|
|
5079
|
+
const updated = await api$20.request("/quota", { method: "POST" });
|
|
5030
5080
|
setStatus(updated);
|
|
5031
5081
|
} catch (err) {
|
|
5032
5082
|
setError(err instanceof Error ? err.message : String(err));
|
|
@@ -5038,7 +5088,7 @@ window.__ModuleLoader__.load({
|
|
|
5038
5088
|
try {
|
|
5039
5089
|
setBusy("catalog");
|
|
5040
5090
|
setError(null);
|
|
5041
|
-
const updated = await api$
|
|
5091
|
+
const updated = await api$20.request("/catalog/refresh", { method: "POST" });
|
|
5042
5092
|
setStatus(updated);
|
|
5043
5093
|
setContextDrafts(contextDraftsFor(updated));
|
|
5044
5094
|
notifyChange();
|
|
@@ -5052,7 +5102,7 @@ window.__ModuleLoader__.load({
|
|
|
5052
5102
|
try {
|
|
5053
5103
|
setBusy("connection");
|
|
5054
5104
|
setError(null);
|
|
5055
|
-
await api$
|
|
5105
|
+
await api$20.post("/connection/test");
|
|
5056
5106
|
await loadStatus(true);
|
|
5057
5107
|
} catch (err) {
|
|
5058
5108
|
setError(err instanceof Error ? err.message : String(err));
|
|
@@ -5062,7 +5112,7 @@ window.__ModuleLoader__.load({
|
|
|
5062
5112
|
};
|
|
5063
5113
|
const applyEnabled = async (enabledModelIds) => {
|
|
5064
5114
|
try {
|
|
5065
|
-
const updated = await api$
|
|
5115
|
+
const updated = await api$20.request("/models", {
|
|
5066
5116
|
method: "POST",
|
|
5067
5117
|
body: JSON.stringify({ enabledModelIds })
|
|
5068
5118
|
});
|
|
@@ -5092,7 +5142,7 @@ window.__ModuleLoader__.load({
|
|
|
5092
5142
|
};
|
|
5093
5143
|
const handleUpdateEffort = async (effort) => {
|
|
5094
5144
|
try {
|
|
5095
|
-
const updated = await api$
|
|
5145
|
+
const updated = await api$20.request("/settings", {
|
|
5096
5146
|
method: "POST",
|
|
5097
5147
|
body: JSON.stringify({ defaultReasoningEffort: effort })
|
|
5098
5148
|
});
|
|
@@ -5112,7 +5162,7 @@ window.__ModuleLoader__.load({
|
|
|
5112
5162
|
try {
|
|
5113
5163
|
setSavingModel(modelId);
|
|
5114
5164
|
setError(null);
|
|
5115
|
-
const updated = await api$
|
|
5165
|
+
const updated = await api$20.request("/settings", {
|
|
5116
5166
|
method: "POST",
|
|
5117
5167
|
body: JSON.stringify({ contextWindowOverrides: { [modelId]: parsed } })
|
|
5118
5168
|
});
|
|
@@ -5133,7 +5183,7 @@ window.__ModuleLoader__.load({
|
|
|
5133
5183
|
try {
|
|
5134
5184
|
setSavingModel(modelId);
|
|
5135
5185
|
setError(null);
|
|
5136
|
-
const updated = await api$
|
|
5186
|
+
const updated = await api$20.request("/settings", {
|
|
5137
5187
|
method: "POST",
|
|
5138
5188
|
body: JSON.stringify({ contextWindowOverrides: { [modelId]: null } })
|
|
5139
5189
|
});
|
|
@@ -5160,7 +5210,7 @@ window.__ModuleLoader__.load({
|
|
|
5160
5210
|
try {
|
|
5161
5211
|
setBusy("context");
|
|
5162
5212
|
setError(null);
|
|
5163
|
-
const updated = await api$
|
|
5213
|
+
const updated = await api$20.request("/settings", {
|
|
5164
5214
|
method: "POST",
|
|
5165
5215
|
body: JSON.stringify({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) })
|
|
5166
5216
|
});
|
|
@@ -5647,7 +5697,7 @@ window.__ModuleLoader__.load({
|
|
|
5647
5697
|
//#endregion
|
|
5648
5698
|
//#region src/client/providers/kimi-code/locales.ts
|
|
5649
5699
|
const NS_KIMI_CODE = "dsh-kimi-code";
|
|
5650
|
-
const zh$
|
|
5700
|
+
const zh$20 = {
|
|
5651
5701
|
...accountPoolZh,
|
|
5652
5702
|
title: "Kimi Code",
|
|
5653
5703
|
pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -5843,7 +5893,7 @@ window.__ModuleLoader__.load({
|
|
|
5843
5893
|
compactionRouteNoImage: "该模型不接受图片:摘要里的截图会被替换为占位文本。",
|
|
5844
5894
|
compactionRouteEmpty: "没有可用的线路——先登录任意一条线路再回来设置。"
|
|
5845
5895
|
};
|
|
5846
|
-
const en$
|
|
5896
|
+
const en$20 = {
|
|
5847
5897
|
...accountPoolEn,
|
|
5848
5898
|
title: "Kimi Code",
|
|
5849
5899
|
pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.",
|
|
@@ -6039,11 +6089,11 @@ window.__ModuleLoader__.load({
|
|
|
6039
6089
|
compactionRouteNoImage: "This model takes no images: screenshots become placeholder text in the summary.",
|
|
6040
6090
|
compactionRouteEmpty: "No route is available — sign in to one first."
|
|
6041
6091
|
};
|
|
6042
|
-
const dictionaries$
|
|
6043
|
-
zh: zh$
|
|
6044
|
-
"zh-CN": zh$
|
|
6045
|
-
en: en$
|
|
6046
|
-
"en-US": en$
|
|
6092
|
+
const dictionaries$20 = {
|
|
6093
|
+
zh: zh$20,
|
|
6094
|
+
"zh-CN": zh$20,
|
|
6095
|
+
en: en$20,
|
|
6096
|
+
"en-US": en$20
|
|
6047
6097
|
};
|
|
6048
6098
|
//#endregion
|
|
6049
6099
|
//#region src/shared/kimi-code-contracts.ts
|
|
@@ -6155,7 +6205,7 @@ window.__ModuleLoader__.load({
|
|
|
6155
6205
|
return `${value}x`;
|
|
6156
6206
|
}
|
|
6157
6207
|
function KimiModelCapabilities({ models }) {
|
|
6158
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
6208
|
+
const t = useLineDict(NS_KIMI_CODE, zh$20);
|
|
6159
6209
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6160
6210
|
className: "dsha-cap-table",
|
|
6161
6211
|
children: [
|
|
@@ -6557,7 +6607,7 @@ window.__ModuleLoader__.load({
|
|
|
6557
6607
|
}
|
|
6558
6608
|
//#endregion
|
|
6559
6609
|
//#region src/client/providers/kimi-code/KimiCodeSection.tsx
|
|
6560
|
-
const api$
|
|
6610
|
+
const api$19 = createLineApi("/kimi-code/api", "Kimi Code");
|
|
6561
6611
|
/**
|
|
6562
6612
|
* One token count as the card prints it.
|
|
6563
6613
|
*
|
|
@@ -6687,7 +6737,7 @@ window.__ModuleLoader__.load({
|
|
|
6687
6737
|
statusGeneration.current += 1;
|
|
6688
6738
|
setStatus(next);
|
|
6689
6739
|
}, []);
|
|
6690
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
6740
|
+
const t = useLineDict(NS_KIMI_CODE, zh$20);
|
|
6691
6741
|
const notifyChange = (0, react.useCallback)(() => {
|
|
6692
6742
|
onModelChange?.();
|
|
6693
6743
|
loadModelDirectory?.();
|
|
@@ -6696,7 +6746,7 @@ window.__ModuleLoader__.load({
|
|
|
6696
6746
|
const generation = ++statusGeneration.current;
|
|
6697
6747
|
if (!quiet) setError(null);
|
|
6698
6748
|
try {
|
|
6699
|
-
const data = await api$
|
|
6749
|
+
const data = await api$19.request("/status");
|
|
6700
6750
|
if (generation !== statusGeneration.current) return;
|
|
6701
6751
|
setStatus(data);
|
|
6702
6752
|
setContextDrafts(contextDraftsFor(data));
|
|
@@ -6738,7 +6788,7 @@ window.__ModuleLoader__.load({
|
|
|
6738
6788
|
const timer = window.setInterval(() => {
|
|
6739
6789
|
(async () => {
|
|
6740
6790
|
try {
|
|
6741
|
-
const poll = await api$
|
|
6791
|
+
const poll = await api$19.request("/login/status");
|
|
6742
6792
|
setFlow(poll);
|
|
6743
6793
|
if (poll.status === "complete") {
|
|
6744
6794
|
await loadStatus();
|
|
@@ -6760,7 +6810,7 @@ window.__ModuleLoader__.load({
|
|
|
6760
6810
|
setBusy("login");
|
|
6761
6811
|
setError(null);
|
|
6762
6812
|
setCopied(false);
|
|
6763
|
-
const next = await api$
|
|
6813
|
+
const next = await api$19.request("/login", {
|
|
6764
6814
|
method: "POST",
|
|
6765
6815
|
body: JSON.stringify(accountId === void 0 ? {} : { accountId })
|
|
6766
6816
|
});
|
|
@@ -6773,7 +6823,7 @@ window.__ModuleLoader__.load({
|
|
|
6773
6823
|
};
|
|
6774
6824
|
const handleCancelLogin = async () => {
|
|
6775
6825
|
try {
|
|
6776
|
-
await api$
|
|
6826
|
+
await api$19.request("/login/cancel", { method: "POST" });
|
|
6777
6827
|
setFlow({ status: "idle" });
|
|
6778
6828
|
} catch (err) {
|
|
6779
6829
|
setError(err instanceof Error ? err.message : String(err));
|
|
@@ -6793,7 +6843,7 @@ window.__ModuleLoader__.load({
|
|
|
6793
6843
|
try {
|
|
6794
6844
|
setBusy(`${action}-${accountId}`);
|
|
6795
6845
|
setError(null);
|
|
6796
|
-
const updated = await api$
|
|
6846
|
+
const updated = await api$19.request("/accounts", {
|
|
6797
6847
|
method: "POST",
|
|
6798
6848
|
body: JSON.stringify({
|
|
6799
6849
|
action,
|
|
@@ -6813,7 +6863,7 @@ window.__ModuleLoader__.load({
|
|
|
6813
6863
|
try {
|
|
6814
6864
|
setBusy("strategy");
|
|
6815
6865
|
setError(null);
|
|
6816
|
-
const updated = await api$
|
|
6866
|
+
const updated = await api$19.request("/accounts", {
|
|
6817
6867
|
method: "POST",
|
|
6818
6868
|
body: JSON.stringify({
|
|
6819
6869
|
action: "strategy",
|
|
@@ -6843,7 +6893,7 @@ window.__ModuleLoader__.load({
|
|
|
6843
6893
|
try {
|
|
6844
6894
|
setBusy("login-api-key");
|
|
6845
6895
|
setError(null);
|
|
6846
|
-
const updated = await api$
|
|
6896
|
+
const updated = await api$19.request("/login/api-key", {
|
|
6847
6897
|
method: "POST",
|
|
6848
6898
|
body: JSON.stringify(apiKeyTarget === null ? { apiKey } : {
|
|
6849
6899
|
apiKey,
|
|
@@ -6879,7 +6929,7 @@ window.__ModuleLoader__.load({
|
|
|
6879
6929
|
}
|
|
6880
6930
|
(async () => {
|
|
6881
6931
|
try {
|
|
6882
|
-
const updated = await api$
|
|
6932
|
+
const updated = await api$19.request("/accounts", {
|
|
6883
6933
|
method: "POST",
|
|
6884
6934
|
body: JSON.stringify({
|
|
6885
6935
|
action: "relogin",
|
|
@@ -6898,7 +6948,7 @@ window.__ModuleLoader__.load({
|
|
|
6898
6948
|
try {
|
|
6899
6949
|
setBusy("quota");
|
|
6900
6950
|
setError(null);
|
|
6901
|
-
const updated = await api$
|
|
6951
|
+
const updated = await api$19.request("/quota", { method: "POST" });
|
|
6902
6952
|
applyStatus(updated);
|
|
6903
6953
|
} catch (err) {
|
|
6904
6954
|
setError(err instanceof Error ? err.message : String(err));
|
|
@@ -6911,7 +6961,7 @@ window.__ModuleLoader__.load({
|
|
|
6911
6961
|
try {
|
|
6912
6962
|
setBusy("catalog");
|
|
6913
6963
|
setError(null);
|
|
6914
|
-
const updated = await api$
|
|
6964
|
+
const updated = await api$19.request("/catalog/refresh", { method: "POST" });
|
|
6915
6965
|
applyStatus(updated);
|
|
6916
6966
|
setContextDrafts(contextDraftsFor(updated));
|
|
6917
6967
|
notifyChange();
|
|
@@ -6926,7 +6976,7 @@ window.__ModuleLoader__.load({
|
|
|
6926
6976
|
setBusy("connection");
|
|
6927
6977
|
setError(null);
|
|
6928
6978
|
setConnectionNotice(null);
|
|
6929
|
-
const result = await api$
|
|
6979
|
+
const result = await api$19.request("/connection/test", { method: "POST" });
|
|
6930
6980
|
setConnectionNotice(result.connected ? `${t.testSuccess} · ${result.latencyMs} ms` : t.testFailed);
|
|
6931
6981
|
await loadStatus(true);
|
|
6932
6982
|
} catch (err) {
|
|
@@ -6937,7 +6987,7 @@ window.__ModuleLoader__.load({
|
|
|
6937
6987
|
};
|
|
6938
6988
|
const applyEnabled = async (enabledModelIds) => {
|
|
6939
6989
|
try {
|
|
6940
|
-
const updated = await api$
|
|
6990
|
+
const updated = await api$19.request("/models", {
|
|
6941
6991
|
method: "POST",
|
|
6942
6992
|
body: JSON.stringify({ enabledModelIds })
|
|
6943
6993
|
});
|
|
@@ -6960,7 +7010,7 @@ window.__ModuleLoader__.load({
|
|
|
6960
7010
|
};
|
|
6961
7011
|
const handleUpdateEffort = async (effort) => {
|
|
6962
7012
|
try {
|
|
6963
|
-
const updated = await api$
|
|
7013
|
+
const updated = await api$19.request("/settings", {
|
|
6964
7014
|
method: "POST",
|
|
6965
7015
|
body: JSON.stringify({ defaultReasoningEffort: effort })
|
|
6966
7016
|
});
|
|
@@ -6980,7 +7030,7 @@ window.__ModuleLoader__.load({
|
|
|
6980
7030
|
try {
|
|
6981
7031
|
setSavingModel(modelId);
|
|
6982
7032
|
setError(null);
|
|
6983
|
-
const updated = await api$
|
|
7033
|
+
const updated = await api$19.request("/settings", {
|
|
6984
7034
|
method: "POST",
|
|
6985
7035
|
body: JSON.stringify({ contextWindowOverrides: { [modelId]: parsed } })
|
|
6986
7036
|
});
|
|
@@ -7001,7 +7051,7 @@ window.__ModuleLoader__.load({
|
|
|
7001
7051
|
try {
|
|
7002
7052
|
setSavingModel(modelId);
|
|
7003
7053
|
setError(null);
|
|
7004
|
-
const updated = await api$
|
|
7054
|
+
const updated = await api$19.request("/settings", {
|
|
7005
7055
|
method: "POST",
|
|
7006
7056
|
body: JSON.stringify({ contextWindowOverrides: { [modelId]: null } })
|
|
7007
7057
|
});
|
|
@@ -7028,7 +7078,7 @@ window.__ModuleLoader__.load({
|
|
|
7028
7078
|
try {
|
|
7029
7079
|
setBusy("context");
|
|
7030
7080
|
setError(null);
|
|
7031
|
-
const updated = await api$
|
|
7081
|
+
const updated = await api$19.request("/settings", {
|
|
7032
7082
|
method: "POST",
|
|
7033
7083
|
body: JSON.stringify({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) })
|
|
7034
7084
|
});
|
|
@@ -7559,10 +7609,10 @@ window.__ModuleLoader__.load({
|
|
|
7559
7609
|
* The names stay as they were so the hook that consumes them does not have to
|
|
7560
7610
|
* change with the reader.
|
|
7561
7611
|
*/
|
|
7562
|
-
const api$
|
|
7563
|
-
api$
|
|
7564
|
-
const get$6 = api$
|
|
7565
|
-
const post$8 = api$
|
|
7612
|
+
const api$18 = createLineApi(MINIMAX_CODE_ROUTE_PREFIX, "MiniMax Code");
|
|
7613
|
+
api$18.request;
|
|
7614
|
+
const get$6 = api$18.get;
|
|
7615
|
+
const post$8 = api$18.post;
|
|
7566
7616
|
function messageOf$6(cause) {
|
|
7567
7617
|
return cause instanceof Error ? cause.message : String(cause);
|
|
7568
7618
|
}
|
|
@@ -7589,7 +7639,7 @@ window.__ModuleLoader__.load({
|
|
|
7589
7639
|
//#endregion
|
|
7590
7640
|
//#region src/client/providers/minimax-code/locales.ts
|
|
7591
7641
|
const NS_MINIMAX_CODE = "dsh-minimax-code";
|
|
7592
|
-
const zh$
|
|
7642
|
+
const zh$19 = {
|
|
7593
7643
|
...accountPoolZh,
|
|
7594
7644
|
title: "MiniMax Code",
|
|
7595
7645
|
pageDesc: "登录 MiniMax Code 编程订阅(设备码 OAuth),复用本机 MiniMax Code 的登录态,管理账号、连接与模型。",
|
|
@@ -7787,7 +7837,7 @@ window.__ModuleLoader__.load({
|
|
|
7787
7837
|
videoHistoryEncrypted: "已由系统凭据后端加密",
|
|
7788
7838
|
videoHistoryPlain: "本机没有可用的凭据后端,记录为明文"
|
|
7789
7839
|
};
|
|
7790
|
-
const en$
|
|
7840
|
+
const en$19 = {
|
|
7791
7841
|
...accountPoolEn,
|
|
7792
7842
|
title: "MiniMax Code",
|
|
7793
7843
|
pageDesc: "Sign in to the MiniMax Code coding subscription (device-code OAuth) and reuse the local MiniMax Code sign-in to manage the account, connection, and models.",
|
|
@@ -7985,11 +8035,11 @@ window.__ModuleLoader__.load({
|
|
|
7985
8035
|
videoHistoryEncrypted: "Encrypted by the platform credential backend",
|
|
7986
8036
|
videoHistoryPlain: "No credential backend on this host; stored as plain text"
|
|
7987
8037
|
};
|
|
7988
|
-
const dictionaries$
|
|
7989
|
-
zh: zh$
|
|
7990
|
-
"zh-CN": zh$
|
|
7991
|
-
en: en$
|
|
7992
|
-
"en-US": en$
|
|
8038
|
+
const dictionaries$19 = {
|
|
8039
|
+
zh: zh$19,
|
|
8040
|
+
"zh-CN": zh$19,
|
|
8041
|
+
en: en$19,
|
|
8042
|
+
"en-US": en$19
|
|
7993
8043
|
};
|
|
7994
8044
|
//#endregion
|
|
7995
8045
|
//#region src/client/providers/minimax-code/useMinimaxCodeSection.ts
|
|
@@ -8003,7 +8053,7 @@ window.__ModuleLoader__.load({
|
|
|
8003
8053
|
* rather than inferred from the JSX.
|
|
8004
8054
|
*/
|
|
8005
8055
|
/** The card's own dictionary; stable identity keeps effect dependencies intact. */
|
|
8006
|
-
const fallbackTranslate$7 = (key) => zh$
|
|
8056
|
+
const fallbackTranslate$7 = (key) => zh$19[key];
|
|
8007
8057
|
/**
|
|
8008
8058
|
* The shared pool card's labels, resolved through this card's dictionary.
|
|
8009
8059
|
*
|
|
@@ -10019,7 +10069,7 @@ window.__ModuleLoader__.load({
|
|
|
10019
10069
|
* 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
|
|
10020
10070
|
*/
|
|
10021
10071
|
const NS_GLM_CODING_PLAN = "dsh-glm-coding-plan";
|
|
10022
|
-
const zh$
|
|
10072
|
+
const zh$18 = {
|
|
10023
10073
|
...accountPoolZh,
|
|
10024
10074
|
title: "GLM(ZCode 账号)",
|
|
10025
10075
|
pageDesc: "用 ZCode 账号授权接入 GLM Coding Plan(国区 bigmodel.cn / 国际区 z.ai),管理账号池、套餐额度与模型勾选。两个区域的凭据各自独立,池内可以同时存在两区账号。",
|
|
@@ -10113,7 +10163,7 @@ window.__ModuleLoader__.load({
|
|
|
10113
10163
|
quotaAllowanceUnknown: "未判定",
|
|
10114
10164
|
quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。"
|
|
10115
10165
|
};
|
|
10116
|
-
const en$
|
|
10166
|
+
const en$18 = {
|
|
10117
10167
|
...accountPoolEn,
|
|
10118
10168
|
title: "GLM (ZCode account)",
|
|
10119
10169
|
pageDesc: "Sign in with a ZCode account to reach GLM Coding Plan (China bigmodel.cn / International z.ai), and manage the account pool, plan quota and model selection. The two regions hold independent credentials, so a pool can carry accounts from both.",
|
|
@@ -10207,11 +10257,11 @@ window.__ModuleLoader__.load({
|
|
|
10207
10257
|
quotaAllowanceUnknown: "Undetermined",
|
|
10208
10258
|
quotaAllowanceHint: "The allowance source established by the sign-in probe. “Free trial allowance” means 8M tokens per day for 5 days from first use, granted automatically to new accounts."
|
|
10209
10259
|
};
|
|
10210
|
-
const dictionaries$
|
|
10211
|
-
zh: zh$
|
|
10212
|
-
"zh-CN": zh$
|
|
10213
|
-
en: en$
|
|
10214
|
-
"en-US": en$
|
|
10260
|
+
const dictionaries$18 = {
|
|
10261
|
+
zh: zh$18,
|
|
10262
|
+
"zh-CN": zh$18,
|
|
10263
|
+
en: en$18,
|
|
10264
|
+
"en-US": en$18
|
|
10215
10265
|
};
|
|
10216
10266
|
/** 一个配额窗口的键到「窗口长度(分钟)」的映射。 */
|
|
10217
10267
|
const QUOTA_WINDOW_MINUTES$1 = {
|
|
@@ -10270,9 +10320,9 @@ window.__ModuleLoader__.load({
|
|
|
10270
10320
|
* 除 adopt 与 connection/test 外,全部走共享的 { ok, value } 信封,
|
|
10271
10321
|
* 因此答案都是裸 DTO——createLineApi 已经把信封拆掉了。
|
|
10272
10322
|
*/
|
|
10273
|
-
const api$
|
|
10274
|
-
const get$5 = api$
|
|
10275
|
-
const post$7 = api$
|
|
10323
|
+
const api$17 = createLineApi(GLM_CODING_PLAN_ROUTE_PREFIX, GLM_CODING_PLAN_PROVIDER_NAME);
|
|
10324
|
+
const get$5 = api$17.get;
|
|
10325
|
+
const post$7 = api$17.post;
|
|
10276
10326
|
function messageOf$5(cause) {
|
|
10277
10327
|
return cause instanceof Error ? cause.message : String(cause);
|
|
10278
10328
|
}
|
|
@@ -10292,7 +10342,7 @@ window.__ModuleLoader__.load({
|
|
|
10292
10342
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
10293
10343
|
const LOGIN_POLL_INTERVAL_MS$2 = 2e3;
|
|
10294
10344
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
10295
|
-
const fallbackTranslate$6 = (key) => zh$
|
|
10345
|
+
const fallbackTranslate$6 = (key) => zh$18[key];
|
|
10296
10346
|
/**
|
|
10297
10347
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
10298
10348
|
*
|
|
@@ -10718,7 +10768,7 @@ window.__ModuleLoader__.load({
|
|
|
10718
10768
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
10719
10769
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels } = derived;
|
|
10720
10770
|
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
10721
|
-
const t = useLineDict(NS_GLM_CODING_PLAN, zh$
|
|
10771
|
+
const t = useLineDict(NS_GLM_CODING_PLAN, zh$18);
|
|
10722
10772
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10723
10773
|
className: "dsha-page",
|
|
10724
10774
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -11184,7 +11234,7 @@ window.__ModuleLoader__.load({
|
|
|
11184
11234
|
* provider — the same reason every sibling line has one.
|
|
11185
11235
|
*/
|
|
11186
11236
|
const NS_CLAUDE = "dsh-claude";
|
|
11187
|
-
const zh$
|
|
11237
|
+
const zh$17 = {
|
|
11188
11238
|
...accountPoolZh,
|
|
11189
11239
|
title: "Claude(订阅)",
|
|
11190
11240
|
pageDesc: "登录 Claude Pro/Max 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -11305,7 +11355,7 @@ window.__ModuleLoader__.load({
|
|
|
11305
11355
|
copy: "复制",
|
|
11306
11356
|
copied: "已复制"
|
|
11307
11357
|
};
|
|
11308
|
-
const en$
|
|
11358
|
+
const en$17 = {
|
|
11309
11359
|
...accountPoolEn,
|
|
11310
11360
|
title: "Claude (subscription)",
|
|
11311
11361
|
pageDesc: "Sign in to a Claude Pro/Max subscription and manage models, thinking levels, context windows and quota.",
|
|
@@ -11426,11 +11476,11 @@ window.__ModuleLoader__.load({
|
|
|
11426
11476
|
copy: "Copy",
|
|
11427
11477
|
copied: "Copied"
|
|
11428
11478
|
};
|
|
11429
|
-
const dictionaries$
|
|
11430
|
-
zh: zh$
|
|
11431
|
-
"zh-CN": zh$
|
|
11432
|
-
en: en$
|
|
11433
|
-
"en-US": en$
|
|
11479
|
+
const dictionaries$17 = {
|
|
11480
|
+
zh: zh$17,
|
|
11481
|
+
"zh-CN": zh$17,
|
|
11482
|
+
en: en$17,
|
|
11483
|
+
"en-US": en$17
|
|
11434
11484
|
};
|
|
11435
11485
|
//#endregion
|
|
11436
11486
|
//#region src/client/providers/claude/useClaudeSection.ts
|
|
@@ -11443,7 +11493,7 @@ window.__ModuleLoader__.load({
|
|
|
11443
11493
|
* `ClaudeSectionView` — so the contract between the two is visible here rather
|
|
11444
11494
|
* than inferred from a thousand lines of JSX.
|
|
11445
11495
|
*/
|
|
11446
|
-
const api$
|
|
11496
|
+
const api$16 = createLineApi("/claude/api", "Claude");
|
|
11447
11497
|
/**
|
|
11448
11498
|
* The poll cadence of a pending sign-in.
|
|
11449
11499
|
*
|
|
@@ -11464,7 +11514,7 @@ window.__ModuleLoader__.load({
|
|
|
11464
11514
|
const [connection, setConnection] = (0, react.useState)(null);
|
|
11465
11515
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
11466
11516
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
11467
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
11517
|
+
const t = useLineDict(NS_CLAUDE, zh$17);
|
|
11468
11518
|
const notifyChange = (0, react.useCallback)(() => {
|
|
11469
11519
|
onModelChange?.();
|
|
11470
11520
|
loadModelDirectory?.();
|
|
@@ -11476,7 +11526,7 @@ window.__ModuleLoader__.load({
|
|
|
11476
11526
|
const loadStatus = (0, react.useCallback)(async (quiet = false) => {
|
|
11477
11527
|
if (!quiet) setError(null);
|
|
11478
11528
|
try {
|
|
11479
|
-
const data = await api$
|
|
11529
|
+
const data = await api$16.request("/status");
|
|
11480
11530
|
setStatus(data);
|
|
11481
11531
|
setContextDrafts(contextDraftsFor(data));
|
|
11482
11532
|
quotaFollowUp.current ??= createQuotaFollowUp();
|
|
@@ -11507,7 +11557,7 @@ window.__ModuleLoader__.load({
|
|
|
11507
11557
|
const timer = window.setInterval(() => {
|
|
11508
11558
|
(async () => {
|
|
11509
11559
|
try {
|
|
11510
|
-
const poll = await api$
|
|
11560
|
+
const poll = await api$16.request("/login/status");
|
|
11511
11561
|
setFlow(poll);
|
|
11512
11562
|
if (poll.status === "complete") {
|
|
11513
11563
|
setPasteValue("");
|
|
@@ -11529,7 +11579,7 @@ window.__ModuleLoader__.load({
|
|
|
11529
11579
|
setBusy("login");
|
|
11530
11580
|
setError(null);
|
|
11531
11581
|
setPasteValue("");
|
|
11532
|
-
const next = await api$
|
|
11582
|
+
const next = await api$16.request("/login", {
|
|
11533
11583
|
method: "POST",
|
|
11534
11584
|
body: JSON.stringify({})
|
|
11535
11585
|
});
|
|
@@ -11543,7 +11593,7 @@ window.__ModuleLoader__.load({
|
|
|
11543
11593
|
};
|
|
11544
11594
|
const cancelLogin = async () => {
|
|
11545
11595
|
try {
|
|
11546
|
-
const next = await api$
|
|
11596
|
+
const next = await api$16.request("/login/cancel", { method: "POST" });
|
|
11547
11597
|
setFlow(next);
|
|
11548
11598
|
} catch (err) {
|
|
11549
11599
|
reportError(err);
|
|
@@ -11555,7 +11605,7 @@ window.__ModuleLoader__.load({
|
|
|
11555
11605
|
try {
|
|
11556
11606
|
setBusy("login-input");
|
|
11557
11607
|
setError(null);
|
|
11558
|
-
const updated = await api$
|
|
11608
|
+
const updated = await api$16.request("/login/input", {
|
|
11559
11609
|
method: "POST",
|
|
11560
11610
|
body: JSON.stringify({ input: pasteValue })
|
|
11561
11611
|
});
|
|
@@ -11579,7 +11629,7 @@ window.__ModuleLoader__.load({
|
|
|
11579
11629
|
try {
|
|
11580
11630
|
setBusy("adopt");
|
|
11581
11631
|
setError(null);
|
|
11582
|
-
const updated = await api$
|
|
11632
|
+
const updated = await api$16.request("/adopt", { method: "POST" });
|
|
11583
11633
|
setStatus(updated);
|
|
11584
11634
|
setContextDrafts(contextDraftsFor(updated));
|
|
11585
11635
|
notifyChange();
|
|
@@ -11594,7 +11644,7 @@ window.__ModuleLoader__.load({
|
|
|
11594
11644
|
try {
|
|
11595
11645
|
setBusy(accountId === void 0 ? "adopt-disable" : `adopt-disable-${accountId}`);
|
|
11596
11646
|
setError(null);
|
|
11597
|
-
const updated = await api$
|
|
11647
|
+
const updated = await api$16.request("/adopt/disable", {
|
|
11598
11648
|
method: "POST",
|
|
11599
11649
|
body: JSON.stringify(accountId === void 0 ? {} : { accountId })
|
|
11600
11650
|
});
|
|
@@ -11611,7 +11661,7 @@ window.__ModuleLoader__.load({
|
|
|
11611
11661
|
try {
|
|
11612
11662
|
setBusy(`${action}-${accountId}`);
|
|
11613
11663
|
setError(null);
|
|
11614
|
-
const updated = await api$
|
|
11664
|
+
const updated = await api$16.request("/accounts", {
|
|
11615
11665
|
method: "POST",
|
|
11616
11666
|
body: JSON.stringify({
|
|
11617
11667
|
action,
|
|
@@ -11630,7 +11680,7 @@ window.__ModuleLoader__.load({
|
|
|
11630
11680
|
try {
|
|
11631
11681
|
setBusy("strategy");
|
|
11632
11682
|
setError(null);
|
|
11633
|
-
const updated = await api$
|
|
11683
|
+
const updated = await api$16.request("/accounts", {
|
|
11634
11684
|
method: "POST",
|
|
11635
11685
|
body: JSON.stringify({
|
|
11636
11686
|
action: "strategy",
|
|
@@ -11657,7 +11707,7 @@ window.__ModuleLoader__.load({
|
|
|
11657
11707
|
setBusy(`relogin-${accountId}`);
|
|
11658
11708
|
setError(null);
|
|
11659
11709
|
setPasteValue("");
|
|
11660
|
-
const next = await api$
|
|
11710
|
+
const next = await api$16.request("/login", {
|
|
11661
11711
|
method: "POST",
|
|
11662
11712
|
body: JSON.stringify({ accountId })
|
|
11663
11713
|
});
|
|
@@ -11674,7 +11724,7 @@ window.__ModuleLoader__.load({
|
|
|
11674
11724
|
try {
|
|
11675
11725
|
setBusy("quota");
|
|
11676
11726
|
setError(null);
|
|
11677
|
-
const updated = await api$
|
|
11727
|
+
const updated = await api$16.request("/quota", { method: "POST" });
|
|
11678
11728
|
setStatus(updated);
|
|
11679
11729
|
} catch (err) {
|
|
11680
11730
|
reportError(err);
|
|
@@ -11687,7 +11737,7 @@ window.__ModuleLoader__.load({
|
|
|
11687
11737
|
try {
|
|
11688
11738
|
setBusy("catalog");
|
|
11689
11739
|
setError(null);
|
|
11690
|
-
const updated = await api$
|
|
11740
|
+
const updated = await api$16.request("/catalog/refresh", { method: "POST" });
|
|
11691
11741
|
setStatus(updated);
|
|
11692
11742
|
setContextDrafts(contextDraftsFor(updated));
|
|
11693
11743
|
notifyChange();
|
|
@@ -11702,7 +11752,7 @@ window.__ModuleLoader__.load({
|
|
|
11702
11752
|
setBusy("connection");
|
|
11703
11753
|
setError(null);
|
|
11704
11754
|
setConnection(null);
|
|
11705
|
-
const result = await api$
|
|
11755
|
+
const result = await api$16.request("/connection/test", { method: "POST" });
|
|
11706
11756
|
setConnection(result);
|
|
11707
11757
|
await loadStatus(true);
|
|
11708
11758
|
} catch (err) {
|
|
@@ -11713,7 +11763,7 @@ window.__ModuleLoader__.load({
|
|
|
11713
11763
|
};
|
|
11714
11764
|
const applyEnabled = async (enabledModelIds) => {
|
|
11715
11765
|
try {
|
|
11716
|
-
const updated = await api$
|
|
11766
|
+
const updated = await api$16.request("/models", {
|
|
11717
11767
|
method: "POST",
|
|
11718
11768
|
body: JSON.stringify({ enabledModelIds })
|
|
11719
11769
|
});
|
|
@@ -11736,7 +11786,7 @@ window.__ModuleLoader__.load({
|
|
|
11736
11786
|
};
|
|
11737
11787
|
const updateEffort = async (effort) => {
|
|
11738
11788
|
try {
|
|
11739
|
-
const updated = await api$
|
|
11789
|
+
const updated = await api$16.request("/settings", {
|
|
11740
11790
|
method: "POST",
|
|
11741
11791
|
body: JSON.stringify({ defaultReasoningEffort: effort })
|
|
11742
11792
|
});
|
|
@@ -11748,7 +11798,7 @@ window.__ModuleLoader__.load({
|
|
|
11748
11798
|
};
|
|
11749
11799
|
const updateCacheTtl = async (ttl) => {
|
|
11750
11800
|
try {
|
|
11751
|
-
const updated = await api$
|
|
11801
|
+
const updated = await api$16.request("/settings", {
|
|
11752
11802
|
method: "POST",
|
|
11753
11803
|
body: JSON.stringify({ cacheTtl: ttl })
|
|
11754
11804
|
});
|
|
@@ -11760,7 +11810,7 @@ window.__ModuleLoader__.load({
|
|
|
11760
11810
|
};
|
|
11761
11811
|
const updateBooleanSetting = async (field, checked) => {
|
|
11762
11812
|
try {
|
|
11763
|
-
const updated = await api$
|
|
11813
|
+
const updated = await api$16.request("/settings", {
|
|
11764
11814
|
method: "POST",
|
|
11765
11815
|
body: JSON.stringify({ [field]: checked })
|
|
11766
11816
|
});
|
|
@@ -11782,7 +11832,7 @@ window.__ModuleLoader__.load({
|
|
|
11782
11832
|
try {
|
|
11783
11833
|
setSavingModel(modelId);
|
|
11784
11834
|
setError(null);
|
|
11785
|
-
const updated = await api$
|
|
11835
|
+
const updated = await api$16.request("/settings", {
|
|
11786
11836
|
method: "POST",
|
|
11787
11837
|
body: JSON.stringify({ contextWindowOverrides: { [modelId]: parsed } })
|
|
11788
11838
|
});
|
|
@@ -11809,7 +11859,7 @@ window.__ModuleLoader__.load({
|
|
|
11809
11859
|
try {
|
|
11810
11860
|
setSavingModel(modelId);
|
|
11811
11861
|
setError(null);
|
|
11812
|
-
const updated = await api$
|
|
11862
|
+
const updated = await api$16.request("/settings", {
|
|
11813
11863
|
method: "POST",
|
|
11814
11864
|
body: JSON.stringify({ contextWindowOverrides: { [modelId]: null } })
|
|
11815
11865
|
});
|
|
@@ -11836,7 +11886,7 @@ window.__ModuleLoader__.load({
|
|
|
11836
11886
|
try {
|
|
11837
11887
|
setBusy("context");
|
|
11838
11888
|
setError(null);
|
|
11839
|
-
const updated = await api$
|
|
11889
|
+
const updated = await api$16.request("/settings", {
|
|
11840
11890
|
method: "POST",
|
|
11841
11891
|
body: JSON.stringify({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) })
|
|
11842
11892
|
});
|
|
@@ -11927,11 +11977,11 @@ window.__ModuleLoader__.load({
|
|
|
11927
11977
|
* out here would hide a choice the host would accept and a catalog may expose.
|
|
11928
11978
|
*/
|
|
11929
11979
|
const EFFORT_LABELS$2 = {
|
|
11930
|
-
low: zh$
|
|
11931
|
-
medium: zh$
|
|
11932
|
-
high: zh$
|
|
11933
|
-
xhigh: zh$
|
|
11934
|
-
max: zh$
|
|
11980
|
+
low: zh$17.effortLow,
|
|
11981
|
+
medium: zh$17.effortMedium,
|
|
11982
|
+
high: zh$17.effortHigh,
|
|
11983
|
+
xhigh: zh$17.effortXHigh,
|
|
11984
|
+
max: zh$17.effortMax
|
|
11935
11985
|
};
|
|
11936
11986
|
/** One-line capability summary shown as a model pill's hover title. */
|
|
11937
11987
|
function modelFacts(model, t) {
|
|
@@ -11952,7 +12002,7 @@ window.__ModuleLoader__.load({
|
|
|
11952
12002
|
const { status, loading, busy, error, flow, connection, pasteValue, contextDrafts, savingModel } = state;
|
|
11953
12003
|
const { accounts, hasAdopted, contextModels, overrideCount, quota, windows, poolLabels } = derived;
|
|
11954
12004
|
const { login, cancelLogin, submitPaste, adopt, stopImporting, accountAction, setStrategy, relogin, refreshQuota, refreshCatalog, testConnection, toggleModel, setAllModels, updateEffort, updateCacheTtl, updateFastMode, updateCacheKeepalive, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setPasteValue } = actions;
|
|
11955
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
12005
|
+
const t = useLineDict(NS_CLAUDE, zh$17);
|
|
11956
12006
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11957
12007
|
className: "dsha-page",
|
|
11958
12008
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -12574,7 +12624,7 @@ window.__ModuleLoader__.load({
|
|
|
12574
12624
|
//#endregion
|
|
12575
12625
|
//#region src/client/providers/ollama/locales.ts
|
|
12576
12626
|
const NS_OLLAMA = "dsh-ollama";
|
|
12577
|
-
const zh$
|
|
12627
|
+
const zh$16 = {
|
|
12578
12628
|
...accountPoolZh,
|
|
12579
12629
|
relogin: "更换 Key",
|
|
12580
12630
|
needsRelogin: "Key 已失效",
|
|
@@ -12626,7 +12676,7 @@ window.__ModuleLoader__.load({
|
|
|
12626
12676
|
usageNone: "尚无请求",
|
|
12627
12677
|
usageHint: "按 Ollama 每次响应自带的 token 计数本地累加。"
|
|
12628
12678
|
};
|
|
12629
|
-
const en$
|
|
12679
|
+
const en$16 = {
|
|
12630
12680
|
...accountPoolEn,
|
|
12631
12681
|
relogin: "Replace Key",
|
|
12632
12682
|
needsRelogin: "Key rejected",
|
|
@@ -12678,11 +12728,11 @@ window.__ModuleLoader__.load({
|
|
|
12678
12728
|
usageNone: "No requests yet",
|
|
12679
12729
|
usageHint: "Summed locally from the token counts Ollama returns on each response."
|
|
12680
12730
|
};
|
|
12681
|
-
const dictionaries$
|
|
12682
|
-
zh: zh$
|
|
12683
|
-
"zh-CN": zh$
|
|
12684
|
-
en: en$
|
|
12685
|
-
"en-US": en$
|
|
12731
|
+
const dictionaries$16 = {
|
|
12732
|
+
zh: zh$16,
|
|
12733
|
+
"zh-CN": zh$16,
|
|
12734
|
+
en: en$16,
|
|
12735
|
+
"en-US": en$16
|
|
12686
12736
|
};
|
|
12687
12737
|
//#endregion
|
|
12688
12738
|
//#region src/client/providers/ollama/OllamaSection.tsx
|
|
@@ -12805,10 +12855,20 @@ window.__ModuleLoader__.load({
|
|
|
12805
12855
|
const setAllModels = (0, react.useCallback)((selectAll) => {
|
|
12806
12856
|
applyEnabled(selectAll ? null : []);
|
|
12807
12857
|
}, [applyEnabled]);
|
|
12858
|
+
const setModelGroup = (0, react.useCallback)((ids, checked) => {
|
|
12859
|
+
if (status === null || ids.length === 0) return;
|
|
12860
|
+
const all = status.models ?? [];
|
|
12861
|
+
const next = nextGroupSelection(all.filter((model) => isModelEnabled(model.id)).map((model) => model.id), ids, checked);
|
|
12862
|
+
applyEnabled(next.length === all.length ? null : next);
|
|
12863
|
+
}, [
|
|
12864
|
+
status,
|
|
12865
|
+
isModelEnabled,
|
|
12866
|
+
applyEnabled
|
|
12867
|
+
]);
|
|
12808
12868
|
const setEffort = (0, react.useCallback)((value) => {
|
|
12809
12869
|
run("effort", () => API$8.setDefaultReasoningEffort(value === "" ? null : value));
|
|
12810
12870
|
}, [run]);
|
|
12811
|
-
const t = useLineDict(NS_OLLAMA, zh$
|
|
12871
|
+
const t = useLineDict(NS_OLLAMA, zh$16);
|
|
12812
12872
|
const pool = status?.pool;
|
|
12813
12873
|
const models = status?.models ?? [];
|
|
12814
12874
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
@@ -12923,7 +12983,7 @@ window.__ModuleLoader__.load({
|
|
|
12923
12983
|
className: "dsha-btn",
|
|
12924
12984
|
disabled: busy !== null,
|
|
12925
12985
|
onClick: () => setShowKeyForm(false),
|
|
12926
|
-
children: zh$
|
|
12986
|
+
children: zh$16.deleteAccount
|
|
12927
12987
|
})]
|
|
12928
12988
|
})
|
|
12929
12989
|
]
|
|
@@ -12973,6 +13033,8 @@ window.__ModuleLoader__.load({
|
|
|
12973
13033
|
busy: busy !== null,
|
|
12974
13034
|
onToggle: (id, enabled) => void toggleModel(id, enabled),
|
|
12975
13035
|
onToggleAll: (enabled) => void setAllModels(enabled),
|
|
13036
|
+
onToggleGroup: setModelGroup,
|
|
13037
|
+
groupByVendor: true,
|
|
12976
13038
|
labels: {
|
|
12977
13039
|
selectAll: t.selectAll,
|
|
12978
13040
|
clearAll: t.unselectAll,
|
|
@@ -13122,7 +13184,7 @@ window.__ModuleLoader__.load({
|
|
|
13122
13184
|
//#endregion
|
|
13123
13185
|
//#region src/client/providers/antigravity-acp/locales.ts
|
|
13124
13186
|
const NS_ANTIGRAVITY_ACP = "dsh-antigravity-acp";
|
|
13125
|
-
const zh$
|
|
13187
|
+
const zh$15 = {
|
|
13126
13188
|
title: "Antigravity(ACP)",
|
|
13127
13189
|
pageDesc: "通过 Google 官方 Antigravity CLI 的 Agent Client Protocol(ACP)接入:模型、工具与会话全部由官方进程驱动,登录态由官方进程自己保管。",
|
|
13128
13190
|
routeOwned: "模型路由由本插件提供",
|
|
@@ -13214,7 +13276,7 @@ window.__ModuleLoader__.load({
|
|
|
13214
13276
|
enabledHint: "该线路当前已启用。",
|
|
13215
13277
|
toggleHint: "可在「订阅服务」总览页的该线路卡片上随时停用。"
|
|
13216
13278
|
};
|
|
13217
|
-
const en$
|
|
13279
|
+
const en$15 = {
|
|
13218
13280
|
title: "Antigravity (ACP)",
|
|
13219
13281
|
pageDesc: "Connect through Google's official Antigravity CLI over the Agent Client Protocol (ACP): the model, its tools and its sessions all come from the official process, which also keeps its own sign-in state.",
|
|
13220
13282
|
routeOwned: "Model route served by this plugin",
|
|
@@ -13306,11 +13368,11 @@ window.__ModuleLoader__.load({
|
|
|
13306
13368
|
enabledHint: "This line is enabled.",
|
|
13307
13369
|
toggleHint: "You can switch it off at any time from its card in the subscription overview."
|
|
13308
13370
|
};
|
|
13309
|
-
const dictionaries$
|
|
13310
|
-
zh: zh$
|
|
13311
|
-
"zh-CN": zh$
|
|
13312
|
-
en: en$
|
|
13313
|
-
"en-US": en$
|
|
13371
|
+
const dictionaries$15 = {
|
|
13372
|
+
zh: zh$15,
|
|
13373
|
+
"zh-CN": zh$15,
|
|
13374
|
+
en: en$15,
|
|
13375
|
+
"en-US": en$15
|
|
13314
13376
|
};
|
|
13315
13377
|
//#endregion
|
|
13316
13378
|
//#region src/client/providers/antigravity-acp/AntigravityAcpSection.tsx
|
|
@@ -13367,7 +13429,7 @@ window.__ModuleLoader__.load({
|
|
|
13367
13429
|
setBusy(null);
|
|
13368
13430
|
}
|
|
13369
13431
|
}, [props]);
|
|
13370
|
-
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$
|
|
13432
|
+
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$15);
|
|
13371
13433
|
const models = status?.models ?? [];
|
|
13372
13434
|
const auth = status?.auth;
|
|
13373
13435
|
const usage = status?.usage;
|
|
@@ -13396,6 +13458,16 @@ window.__ModuleLoader__.load({
|
|
|
13396
13458
|
const setAllModels = (0, react.useCallback)((selectAll) => {
|
|
13397
13459
|
applyEnabled(selectAll ? null : []);
|
|
13398
13460
|
}, [applyEnabled]);
|
|
13461
|
+
const setModelGroup = (0, react.useCallback)((ids, checked) => {
|
|
13462
|
+
if (status === null || ids.length === 0) return;
|
|
13463
|
+
const all = status.models ?? [];
|
|
13464
|
+
const next = nextGroupSelection(all.filter((model) => isModelEnabled(model.id)).map((model) => model.id), ids, checked);
|
|
13465
|
+
applyEnabled(next.length === all.length ? null : next);
|
|
13466
|
+
}, [
|
|
13467
|
+
status,
|
|
13468
|
+
isModelEnabled,
|
|
13469
|
+
applyEnabled
|
|
13470
|
+
]);
|
|
13399
13471
|
const signIn = (0, react.useCallback)(() => {
|
|
13400
13472
|
setBusy("login");
|
|
13401
13473
|
setError(null);
|
|
@@ -13654,6 +13726,8 @@ window.__ModuleLoader__.load({
|
|
|
13654
13726
|
busy: busy !== null,
|
|
13655
13727
|
onToggle: (id, value) => toggleModel(id, value),
|
|
13656
13728
|
onToggleAll: (value) => setAllModels(value),
|
|
13729
|
+
onToggleGroup: setModelGroup,
|
|
13730
|
+
groupByVendor: true,
|
|
13657
13731
|
labels: {
|
|
13658
13732
|
selectAll: t.selectAll,
|
|
13659
13733
|
clearAll: t.unselectAll,
|
|
@@ -13850,20 +13924,20 @@ window.__ModuleLoader__.load({
|
|
|
13850
13924
|
}
|
|
13851
13925
|
//#endregion
|
|
13852
13926
|
//#region src/client/providers/aws-quick/api.ts
|
|
13853
|
-
const api$
|
|
13927
|
+
const api$15 = createLineApi("/aws-quick/api", "AWS Quick");
|
|
13854
13928
|
const AwsQuickApi = {
|
|
13855
|
-
status: () => api$
|
|
13856
|
-
update: (patch) => api$
|
|
13857
|
-
refresh: () => api$
|
|
13858
|
-
startLogin: () => api$
|
|
13859
|
-
cancelLogin: () => api$
|
|
13860
|
-
prepareTools: () => api$
|
|
13861
|
-
logout: () => api$
|
|
13929
|
+
status: () => api$15.get("/status"),
|
|
13930
|
+
update: (patch) => api$15.post("/settings", patch),
|
|
13931
|
+
refresh: () => api$15.post("/refresh", {}),
|
|
13932
|
+
startLogin: () => api$15.post("/login/start", {}),
|
|
13933
|
+
cancelLogin: () => api$15.post("/login/cancel", {}),
|
|
13934
|
+
prepareTools: () => api$15.post("/tools/prepare", {}),
|
|
13935
|
+
logout: () => api$15.post("/logout", {})
|
|
13862
13936
|
};
|
|
13863
13937
|
//#endregion
|
|
13864
13938
|
//#region src/client/providers/aws-quick/locales.ts
|
|
13865
13939
|
const NS_AWS_QUICK = "dsh-aws-quick";
|
|
13866
|
-
const zh$
|
|
13940
|
+
const zh$14 = {
|
|
13867
13941
|
title: "AWS Quick",
|
|
13868
13942
|
pageDesc: "通过本机 AWS Quick Desktop 官方 agent 使用 Quick 订阅,支持流式文本、思考与三种响应模式。",
|
|
13869
13943
|
refresh: "刷新状态",
|
|
@@ -13918,8 +13992,8 @@ window.__ModuleLoader__.load({
|
|
|
13918
13992
|
toolsError: "工具初始化失败",
|
|
13919
13993
|
toolsHint: "提前创建 Quick 原生连接器;插件不会绕过 Quick 批准。"
|
|
13920
13994
|
};
|
|
13921
|
-
const dictionaries$
|
|
13922
|
-
zh: zh$
|
|
13995
|
+
const dictionaries$14 = {
|
|
13996
|
+
zh: zh$14,
|
|
13923
13997
|
en: {
|
|
13924
13998
|
title: "AWS Quick",
|
|
13925
13999
|
pageDesc: "Use an AWS Quick subscription through the official local Quick Desktop agent, with streaming text, reasoning and three response modes.",
|
|
@@ -13984,7 +14058,7 @@ window.__ModuleLoader__.load({
|
|
|
13984
14058
|
const [error, setError] = (0, react.useState)(null);
|
|
13985
14059
|
const [selected, setSelected] = (0, react.useState)(null);
|
|
13986
14060
|
const [binaryPath, setBinaryPath] = (0, react.useState)("");
|
|
13987
|
-
const t = useLineDict(NS_AWS_QUICK, zh$
|
|
14061
|
+
const t = useLineDict(NS_AWS_QUICK, zh$14);
|
|
13988
14062
|
const apply = (0, react.useCallback)((next) => {
|
|
13989
14063
|
setStatus(next);
|
|
13990
14064
|
setSelected(next.enabledModelIds === null ? null : new Set(next.enabledModelIds));
|
|
@@ -14347,6 +14421,792 @@ window.__ModuleLoader__.load({
|
|
|
14347
14421
|
] });
|
|
14348
14422
|
}
|
|
14349
14423
|
//#endregion
|
|
14424
|
+
//#region src/shared/opencode-go-contracts.ts
|
|
14425
|
+
/** Public settings contracts for the OpenCode Go subscription line. No secrets cross this module. */
|
|
14426
|
+
const OPENCODE_GO_PROVIDER_ID = "opencode-go";
|
|
14427
|
+
const OPENCODE_GO_PROVIDER_NAME = "OpenCode Go(订阅)";
|
|
14428
|
+
const OPENCODE_GO_ROUTE_PREFIX = "/opencode-go/api";
|
|
14429
|
+
const OPENCODE_GO_REASONING_EFFORTS = [
|
|
14430
|
+
"none",
|
|
14431
|
+
"minimal",
|
|
14432
|
+
"low",
|
|
14433
|
+
"medium",
|
|
14434
|
+
"high",
|
|
14435
|
+
"xhigh",
|
|
14436
|
+
"max"
|
|
14437
|
+
];
|
|
14438
|
+
//#endregion
|
|
14439
|
+
//#region src/client/providers/opencode-go/locales.ts
|
|
14440
|
+
const NS_OPENCODE_GO = "dsh-opencode-go";
|
|
14441
|
+
const zh$13 = {
|
|
14442
|
+
...accountPoolZh,
|
|
14443
|
+
title: "OpenCode Go",
|
|
14444
|
+
pageDesc: "使用 OpenCode Go 订阅,管理账号、模型、思考档位与额度。",
|
|
14445
|
+
loading: "加载中...",
|
|
14446
|
+
connection: "连接",
|
|
14447
|
+
testConnection: "测试连接",
|
|
14448
|
+
testingConnection: "测试中...",
|
|
14449
|
+
testSuccess: "连接正常",
|
|
14450
|
+
testFailed: "连接失败",
|
|
14451
|
+
routeOwned: "模型路由由本插件提供",
|
|
14452
|
+
routeConflict: "模型路由已被其他 Provider 占用:{detail}。请移除重复配置后重试。",
|
|
14453
|
+
modelsSection: "模型",
|
|
14454
|
+
otherGroup: "其他",
|
|
14455
|
+
modelsHint: "勾选后模型才会出现在对话页的模型选择列表中。目录与可用能力来自当前账号。",
|
|
14456
|
+
refreshCatalog: "刷新模型目录",
|
|
14457
|
+
refreshingCatalog: "刷新中...",
|
|
14458
|
+
selectAll: "全选",
|
|
14459
|
+
unselectAll: "全不选",
|
|
14460
|
+
enhanced: "思考与上下文",
|
|
14461
|
+
defaultReasoningEffort: "默认思考档位",
|
|
14462
|
+
defaultReasoningEffortHint: "仅显示已勾选模型实际支持的档位;留空时使用模型默认值。",
|
|
14463
|
+
defaultEffortAuto: "使用模型默认值",
|
|
14464
|
+
effortNone: "关闭思考",
|
|
14465
|
+
effortMinimal: "最低 (minimal)",
|
|
14466
|
+
effortLow: "低 (low)",
|
|
14467
|
+
effortMedium: "中 (medium)",
|
|
14468
|
+
effortHigh: "高 (high)",
|
|
14469
|
+
effortXhigh: "很高 (xhigh)",
|
|
14470
|
+
effortMax: "最高 (max)",
|
|
14471
|
+
contextWindowSection: "模型上下文窗口",
|
|
14472
|
+
contextWindowHint: "默认取模型目录的上下文长度,可按模型覆盖。",
|
|
14473
|
+
contextWindowReset: "恢复默认",
|
|
14474
|
+
contextWindowResetAll: "全部恢复默认",
|
|
14475
|
+
contextWindowResetAllConfirm: "确定把所有模型的上下文窗口恢复为默认值吗?",
|
|
14476
|
+
contextWindowNoneEnabled: "还没有勾选模型。",
|
|
14477
|
+
save: "保存",
|
|
14478
|
+
saving: "保存中...",
|
|
14479
|
+
tokens: "tokens",
|
|
14480
|
+
refreshQuota: "刷新额度",
|
|
14481
|
+
refreshingQuota: "刷新中...",
|
|
14482
|
+
quotaEmpty: "尚未读取额度,点击「刷新额度」获取。",
|
|
14483
|
+
planUnknown: "OpenCode Go",
|
|
14484
|
+
kqTotal: "月度共享额度",
|
|
14485
|
+
kqUsedSuffix: "已用",
|
|
14486
|
+
kqTip: "本月额度已使用 {pct}",
|
|
14487
|
+
kqUsed: "已用 {pct}",
|
|
14488
|
+
kqRest: "剩余 {pct}",
|
|
14489
|
+
kqResetAfter: "{time} 重置",
|
|
14490
|
+
kqWindow5h: "5 小时窗口",
|
|
14491
|
+
kqWindowWeekly: "每周窗口",
|
|
14492
|
+
kqRollingNote: "短时请求窗口",
|
|
14493
|
+
kqWeeklyNote: "与月度额度联动扣减",
|
|
14494
|
+
kqNoReset: "重置时间未提供",
|
|
14495
|
+
kqNoLastUsed: "尚未发起请求",
|
|
14496
|
+
kqLastUsed: "最近使用:{time}",
|
|
14497
|
+
kqUpdated: "{time}更新",
|
|
14498
|
+
kqJustNow: "刚刚",
|
|
14499
|
+
kqMinutesAgo: "{n} 分钟前",
|
|
14500
|
+
kqHoursAgo: "{n} 小时前",
|
|
14501
|
+
kqDaysAgo: "{n} 天前",
|
|
14502
|
+
apiKeyLogin: "API Key 登录",
|
|
14503
|
+
apiKeyHint: "粘贴在 OpenCode Console 创建的个人 API Key。Key 仅保存在本机,提交前会先验证。",
|
|
14504
|
+
apiKeyReplaceHint: "为「{alias}」粘贴新的 API Key,账号名称与轮换位置保持不变。",
|
|
14505
|
+
apiKeyPlaceholder: "oc_sk_…",
|
|
14506
|
+
apiKeySubmit: "验证并添加",
|
|
14507
|
+
apiKeyReplace: "替换 Key",
|
|
14508
|
+
apiKeySubmitting: "验证中...",
|
|
14509
|
+
apiKeyEmpty: "请先粘贴 API Key。",
|
|
14510
|
+
authMethod: "认证方式",
|
|
14511
|
+
authMethodApiKey: "个人 API Key",
|
|
14512
|
+
composerLabel: "OpenCode Go 剩余额度"
|
|
14513
|
+
};
|
|
14514
|
+
const en$13 = {
|
|
14515
|
+
...accountPoolEn,
|
|
14516
|
+
title: "OpenCode Go",
|
|
14517
|
+
pageDesc: "Use an OpenCode Go subscription and manage accounts, models, reasoning levels, and quota.",
|
|
14518
|
+
loading: "Loading...",
|
|
14519
|
+
connection: "Connection",
|
|
14520
|
+
testConnection: "Test connection",
|
|
14521
|
+
testingConnection: "Testing...",
|
|
14522
|
+
testSuccess: "Connection healthy",
|
|
14523
|
+
testFailed: "Connection failed",
|
|
14524
|
+
routeOwned: "This plugin owns the model route",
|
|
14525
|
+
routeConflict: "Another Provider owns this model route: {detail}. Remove the duplicate configuration and retry.",
|
|
14526
|
+
modelsSection: "Models",
|
|
14527
|
+
otherGroup: "Other",
|
|
14528
|
+
modelsHint: "Only checked models appear in the conversation model picker. Capabilities come from the current account catalog.",
|
|
14529
|
+
refreshCatalog: "Refresh catalog",
|
|
14530
|
+
refreshingCatalog: "Refreshing...",
|
|
14531
|
+
selectAll: "Select all",
|
|
14532
|
+
unselectAll: "Clear all",
|
|
14533
|
+
enhanced: "Reasoning and context",
|
|
14534
|
+
defaultReasoningEffort: "Default reasoning effort",
|
|
14535
|
+
defaultReasoningEffortHint: "Only levels supported by checked models are offered. Leave unset for the model default.",
|
|
14536
|
+
defaultEffortAuto: "Use the model default",
|
|
14537
|
+
effortNone: "Disable reasoning",
|
|
14538
|
+
effortMinimal: "Minimal",
|
|
14539
|
+
effortLow: "Low",
|
|
14540
|
+
effortMedium: "Medium",
|
|
14541
|
+
effortHigh: "High",
|
|
14542
|
+
effortXhigh: "Extra high",
|
|
14543
|
+
effortMax: "Maximum",
|
|
14544
|
+
contextWindowSection: "Model context windows",
|
|
14545
|
+
contextWindowHint: "Catalog context lengths are used by default and can be overridden per model.",
|
|
14546
|
+
contextWindowReset: "Reset",
|
|
14547
|
+
contextWindowResetAll: "Reset all",
|
|
14548
|
+
contextWindowResetAllConfirm: "Reset every model context window to its catalog default?",
|
|
14549
|
+
contextWindowNoneEnabled: "No models are checked yet.",
|
|
14550
|
+
save: "Save",
|
|
14551
|
+
saving: "Saving...",
|
|
14552
|
+
tokens: "tokens",
|
|
14553
|
+
refreshQuota: "Refresh quota",
|
|
14554
|
+
refreshingQuota: "Refreshing...",
|
|
14555
|
+
quotaEmpty: "No quota has been read yet. Select Refresh quota to read it.",
|
|
14556
|
+
planUnknown: "OpenCode Go",
|
|
14557
|
+
kqTotal: "Monthly shared allowance",
|
|
14558
|
+
kqUsedSuffix: "used",
|
|
14559
|
+
kqTip: "{pct} of this month’s allowance used",
|
|
14560
|
+
kqUsed: "{pct} used",
|
|
14561
|
+
kqRest: "{pct} left",
|
|
14562
|
+
kqResetAfter: "Resets {time}",
|
|
14563
|
+
kqWindow5h: "5-hour window",
|
|
14564
|
+
kqWindowWeekly: "Weekly window",
|
|
14565
|
+
kqRollingNote: "Short request window",
|
|
14566
|
+
kqWeeklyNote: "Draws from the same monthly allowance",
|
|
14567
|
+
kqNoReset: "No reset time reported",
|
|
14568
|
+
kqNoLastUsed: "No requests yet",
|
|
14569
|
+
kqLastUsed: "Last used: {time}",
|
|
14570
|
+
kqUpdated: "Updated {time}",
|
|
14571
|
+
kqJustNow: "just now",
|
|
14572
|
+
kqMinutesAgo: "{n} min ago",
|
|
14573
|
+
kqHoursAgo: "{n} hr ago",
|
|
14574
|
+
kqDaysAgo: "{n} days ago",
|
|
14575
|
+
apiKeyLogin: "Sign in with API Key",
|
|
14576
|
+
apiKeyHint: "Paste a personal API key created in OpenCode Console. The key stays on this machine and is verified before it is added.",
|
|
14577
|
+
apiKeyReplaceHint: "Paste a new API key for {alias}. Its name and rotation position stay unchanged.",
|
|
14578
|
+
apiKeyPlaceholder: "oc_sk_…",
|
|
14579
|
+
apiKeySubmit: "Verify and add",
|
|
14580
|
+
apiKeyReplace: "Replace Key",
|
|
14581
|
+
apiKeySubmitting: "Verifying...",
|
|
14582
|
+
apiKeyEmpty: "Paste an API Key first.",
|
|
14583
|
+
authMethod: "Authentication",
|
|
14584
|
+
authMethodApiKey: "Personal API Key",
|
|
14585
|
+
composerLabel: "OpenCode Go allowance left"
|
|
14586
|
+
};
|
|
14587
|
+
const dictionaries$13 = {
|
|
14588
|
+
zh: zh$13,
|
|
14589
|
+
"zh-CN": zh$13,
|
|
14590
|
+
en: en$13,
|
|
14591
|
+
"en-US": en$13
|
|
14592
|
+
};
|
|
14593
|
+
//#endregion
|
|
14594
|
+
//#region src/client/providers/opencode-go/OpenCodeGoQuotaCard.tsx
|
|
14595
|
+
function isMonthly(window) {
|
|
14596
|
+
return (window.windowDurationMins ?? 0) >= 43200;
|
|
14597
|
+
}
|
|
14598
|
+
function isRolling(window) {
|
|
14599
|
+
return window.windowDurationMins === 300;
|
|
14600
|
+
}
|
|
14601
|
+
function isWeekly(window) {
|
|
14602
|
+
return window.windowDurationMins === 10080;
|
|
14603
|
+
}
|
|
14604
|
+
function percent(value) {
|
|
14605
|
+
return formatPercent$1(Math.max(0, Math.min(100, value))) + "%";
|
|
14606
|
+
}
|
|
14607
|
+
function ago(t, ms, now) {
|
|
14608
|
+
const minutes = Math.floor(Math.max(0, now - ms) / 6e4);
|
|
14609
|
+
if (minutes < 1) return t.kqJustNow;
|
|
14610
|
+
if (minutes < 60) return t.kqMinutesAgo.replace("{n}", String(minutes));
|
|
14611
|
+
const hours = Math.floor(minutes / 60);
|
|
14612
|
+
if (hours < 24) return t.kqHoursAgo.replace("{n}", String(hours));
|
|
14613
|
+
return t.kqDaysAgo.replace("{n}", String(Math.floor(hours / 24)));
|
|
14614
|
+
}
|
|
14615
|
+
function OpenCodeGoQuotaCard({ quota, planName, lastUsedAt, labels: t }) {
|
|
14616
|
+
const [grown, setGrown] = (0, react.useState)(false);
|
|
14617
|
+
const now = Date.now();
|
|
14618
|
+
(0, react.useEffect)(() => {
|
|
14619
|
+
const frame = requestAnimationFrame(() => setGrown(true));
|
|
14620
|
+
return () => cancelAnimationFrame(frame);
|
|
14621
|
+
}, []);
|
|
14622
|
+
if (quota === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
14623
|
+
className: "dsha-muted dshoc-quota-empty",
|
|
14624
|
+
children: t.quotaEmpty
|
|
14625
|
+
});
|
|
14626
|
+
const windows = quota.windows ?? [];
|
|
14627
|
+
const monthly = windows.find(isMonthly) ?? windows.find(isWeekly) ?? windows.find(isRolling);
|
|
14628
|
+
if (monthly === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
14629
|
+
className: "dsha-muted dshoc-quota-empty",
|
|
14630
|
+
children: t.quotaEmpty
|
|
14631
|
+
});
|
|
14632
|
+
const rolling = windows.find(isRolling);
|
|
14633
|
+
const weekly = windows.find(isWeekly);
|
|
14634
|
+
const used = Math.max(0, Math.min(100, monthly.usedPercent));
|
|
14635
|
+
const resetAt = monthly.resetsAt;
|
|
14636
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14637
|
+
className: "dsha-kq dshoc-quota",
|
|
14638
|
+
children: [
|
|
14639
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14640
|
+
className: "dsha-kq-head",
|
|
14641
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14642
|
+
className: "dsha-kq-tier",
|
|
14643
|
+
children: planName || t.planUnknown
|
|
14644
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
14645
|
+
className: "dsha-kq-staff",
|
|
14646
|
+
"aria-hidden": "true",
|
|
14647
|
+
children: [
|
|
14648
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
|
|
14649
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
|
|
14650
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
|
|
14651
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
|
|
14652
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
|
|
14653
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
14654
|
+
className: "dshoc-art",
|
|
14655
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14656
|
+
width: "140",
|
|
14657
|
+
height: "64",
|
|
14658
|
+
viewBox: "0 0 140 64",
|
|
14659
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
|
|
14660
|
+
fontFamily: "Georgia,'Times New Roman',serif",
|
|
14661
|
+
fontSize: "20",
|
|
14662
|
+
fontWeight: "400",
|
|
14663
|
+
children: [
|
|
14664
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
14665
|
+
x: "1",
|
|
14666
|
+
y: "26",
|
|
14667
|
+
style: { "--i": 0 },
|
|
14668
|
+
children: "O"
|
|
14669
|
+
}),
|
|
14670
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
14671
|
+
x: "19",
|
|
14672
|
+
y: "26",
|
|
14673
|
+
style: { "--i": 1 },
|
|
14674
|
+
children: "P"
|
|
14675
|
+
}),
|
|
14676
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
14677
|
+
x: "35",
|
|
14678
|
+
y: "26",
|
|
14679
|
+
style: { "--i": 2 },
|
|
14680
|
+
children: "E"
|
|
14681
|
+
}),
|
|
14682
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
14683
|
+
x: "51",
|
|
14684
|
+
y: "26",
|
|
14685
|
+
style: { "--i": 3 },
|
|
14686
|
+
children: "N"
|
|
14687
|
+
}),
|
|
14688
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
14689
|
+
x: "70",
|
|
14690
|
+
y: "26",
|
|
14691
|
+
style: { "--i": 4 },
|
|
14692
|
+
children: "C"
|
|
14693
|
+
}),
|
|
14694
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
14695
|
+
x: "87",
|
|
14696
|
+
y: "26",
|
|
14697
|
+
style: { "--i": 5 },
|
|
14698
|
+
children: "O"
|
|
14699
|
+
}),
|
|
14700
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
14701
|
+
x: "106",
|
|
14702
|
+
y: "26",
|
|
14703
|
+
style: { "--i": 6 },
|
|
14704
|
+
children: "D"
|
|
14705
|
+
}),
|
|
14706
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
14707
|
+
x: "124",
|
|
14708
|
+
y: "26",
|
|
14709
|
+
style: { "--i": 7 },
|
|
14710
|
+
children: "E"
|
|
14711
|
+
})
|
|
14712
|
+
]
|
|
14713
|
+
})
|
|
14714
|
+
})
|
|
14715
|
+
]
|
|
14716
|
+
})]
|
|
14717
|
+
}),
|
|
14718
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14719
|
+
className: "dsha-kq-total",
|
|
14720
|
+
children: [
|
|
14721
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14722
|
+
className: "dsha-kq-row",
|
|
14723
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14724
|
+
className: "dsha-kq-label",
|
|
14725
|
+
children: t.kqTotal
|
|
14726
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
14727
|
+
className: "dsha-kq-value",
|
|
14728
|
+
children: [
|
|
14729
|
+
percent(used),
|
|
14730
|
+
" ",
|
|
14731
|
+
t.kqUsedSuffix
|
|
14732
|
+
]
|
|
14733
|
+
})]
|
|
14734
|
+
}),
|
|
14735
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14736
|
+
className: "dsha-kq-barwrap",
|
|
14737
|
+
tabIndex: 0,
|
|
14738
|
+
"aria-label": t.kqTotal + " " + percent(used),
|
|
14739
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14740
|
+
className: "dsha-kq-meter dsha-kq-meter--total",
|
|
14741
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14742
|
+
className: "dsha-kq-seg dsha-kq-seg--recent",
|
|
14743
|
+
style: { width: grown ? `${used}%` : "0%" }
|
|
14744
|
+
})
|
|
14745
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14746
|
+
className: "dsha-kq-tip",
|
|
14747
|
+
role: "tooltip",
|
|
14748
|
+
children: t.kqTip.replace("{pct}", percent(used))
|
|
14749
|
+
})]
|
|
14750
|
+
}),
|
|
14751
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14752
|
+
className: "dsha-kq-legend",
|
|
14753
|
+
children: [
|
|
14754
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
14755
|
+
className: "dsha-kq-legend-item",
|
|
14756
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: "dsha-kq-dot dsha-kq-dot--recent" }), t.kqUsed.replace("{pct}", percent(used))]
|
|
14757
|
+
}),
|
|
14758
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
14759
|
+
className: "dsha-kq-legend-item",
|
|
14760
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: "dsha-kq-dot dsha-kq-dot--rest" }), t.kqRest.replace("{pct}", percent(100 - used))]
|
|
14761
|
+
}),
|
|
14762
|
+
resetAt !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14763
|
+
className: "dsha-kq-reset",
|
|
14764
|
+
children: t.kqResetAfter.replace("{time}", formatAccountDate(resetAt))
|
|
14765
|
+
})
|
|
14766
|
+
]
|
|
14767
|
+
})
|
|
14768
|
+
]
|
|
14769
|
+
}),
|
|
14770
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", { className: "dsha-kq-sep" }),
|
|
14771
|
+
[rolling, weekly].map((window, index) => window === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14772
|
+
className: "dsha-kq-window",
|
|
14773
|
+
children: [
|
|
14774
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14775
|
+
className: "dsha-kq-row",
|
|
14776
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14777
|
+
className: "dsha-kq-window-label",
|
|
14778
|
+
children: index === 0 ? t.kqWindow5h : t.kqWindowWeekly
|
|
14779
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14780
|
+
className: "dsha-kq-window-pct",
|
|
14781
|
+
children: percent(window.usedPercent)
|
|
14782
|
+
})]
|
|
14783
|
+
}),
|
|
14784
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14785
|
+
className: "dsha-kq-meter",
|
|
14786
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14787
|
+
className: index === 0 ? "dsha-kq-seg dsha-kq-seg--recent" : "dsha-kq-seg dsha-kq-seg--cyan",
|
|
14788
|
+
style: { width: grown ? `${Math.max(0, Math.min(100, window.usedPercent))}%` : "0%" }
|
|
14789
|
+
})
|
|
14790
|
+
}),
|
|
14791
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14792
|
+
className: "dsha-kq-window-meta",
|
|
14793
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: index === 0 ? t.kqRollingNote : t.kqWeeklyNote }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: window.resetsAt === null ? t.kqNoReset : t.kqResetAfter.replace("{time}", formatAccountDate(window.resetsAt)) })]
|
|
14794
|
+
})
|
|
14795
|
+
]
|
|
14796
|
+
}, index)),
|
|
14797
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14798
|
+
className: "dsha-kq-foot",
|
|
14799
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: lastUsedAt === void 0 ? t.kqNoLastUsed : t.kqLastUsed.replace("{time}", formatAccountDate(lastUsedAt)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t.kqUpdated.replace("{time}", ago(t, quota.fetchedAt, now)) })]
|
|
14800
|
+
})
|
|
14801
|
+
]
|
|
14802
|
+
});
|
|
14803
|
+
}
|
|
14804
|
+
//#endregion
|
|
14805
|
+
//#region src/client/providers/opencode-go/OpenCodeGoSection.tsx
|
|
14806
|
+
const api$14 = createLineApi("/opencode-go/api", "OpenCode Go");
|
|
14807
|
+
const QUOTA_POLL_MS$1 = 3e4;
|
|
14808
|
+
function OpenCodeGoSection({ onModelChange, loadModelDirectory }) {
|
|
14809
|
+
const t = useLineDict(NS_OPENCODE_GO, zh$13);
|
|
14810
|
+
const [status, setStatus] = (0, react.useState)(null);
|
|
14811
|
+
const [loading, setLoading] = (0, react.useState)(true);
|
|
14812
|
+
const [busy, setBusy] = (0, react.useState)(null);
|
|
14813
|
+
const [error, setError] = (0, react.useState)(null);
|
|
14814
|
+
const [apiKeyOpen, setApiKeyOpen] = (0, react.useState)(false);
|
|
14815
|
+
const [apiKeyValue, setApiKeyValue] = (0, react.useState)("");
|
|
14816
|
+
const [apiKeyTarget, setApiKeyTarget] = (0, react.useState)(null);
|
|
14817
|
+
const [contextDrafts, setContextDrafts] = (0, react.useState)({});
|
|
14818
|
+
const [savingModel, setSavingModel] = (0, react.useState)(null);
|
|
14819
|
+
const quotaRequest = (0, react.useRef)(null);
|
|
14820
|
+
const authenticated = status?.authenticated === true;
|
|
14821
|
+
const notifyChange = (0, react.useCallback)(() => {
|
|
14822
|
+
onModelChange?.();
|
|
14823
|
+
loadModelDirectory?.();
|
|
14824
|
+
}, [onModelChange, loadModelDirectory]);
|
|
14825
|
+
const applyStatus = (0, react.useCallback)((next) => {
|
|
14826
|
+
setStatus(next);
|
|
14827
|
+
setContextDrafts(contextDraftsFor(next));
|
|
14828
|
+
}, []);
|
|
14829
|
+
const load = (0, react.useCallback)(async () => {
|
|
14830
|
+
try {
|
|
14831
|
+
setError(null);
|
|
14832
|
+
applyStatus(await api$14.get("/status"));
|
|
14833
|
+
} catch (err) {
|
|
14834
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
14835
|
+
} finally {
|
|
14836
|
+
setLoading(false);
|
|
14837
|
+
}
|
|
14838
|
+
}, [applyStatus]);
|
|
14839
|
+
(0, react.useEffect)(() => {
|
|
14840
|
+
load();
|
|
14841
|
+
}, [load]);
|
|
14842
|
+
const requestQuota = (0, react.useCallback)(() => {
|
|
14843
|
+
quotaRequest.current ??= api$14.post("/quota/refresh").finally(() => {
|
|
14844
|
+
quotaRequest.current = null;
|
|
14845
|
+
});
|
|
14846
|
+
return quotaRequest.current;
|
|
14847
|
+
}, []);
|
|
14848
|
+
(0, react.useEffect)(() => {
|
|
14849
|
+
if (!authenticated || busy !== null) return;
|
|
14850
|
+
let active = true;
|
|
14851
|
+
const timer = window.setInterval(async () => {
|
|
14852
|
+
if (document.hidden || quotaRequest.current !== null) return;
|
|
14853
|
+
try {
|
|
14854
|
+
const next = await requestQuota();
|
|
14855
|
+
if (!active) return;
|
|
14856
|
+
const accounts = new Map(next.accounts.map((account) => [account.id, account]));
|
|
14857
|
+
setStatus((current) => current === null ? current : {
|
|
14858
|
+
...current,
|
|
14859
|
+
quotaError: next.quotaError,
|
|
14860
|
+
accounts: current.accounts.map((account) => {
|
|
14861
|
+
const update = accounts.get(account.id);
|
|
14862
|
+
return update === void 0 ? account : {
|
|
14863
|
+
...account,
|
|
14864
|
+
quota: update.quota,
|
|
14865
|
+
planName: update.planName,
|
|
14866
|
+
lastUsedAt: update.lastUsedAt
|
|
14867
|
+
};
|
|
14868
|
+
})
|
|
14869
|
+
});
|
|
14870
|
+
} catch {}
|
|
14871
|
+
}, QUOTA_POLL_MS$1);
|
|
14872
|
+
return () => {
|
|
14873
|
+
active = false;
|
|
14874
|
+
window.clearInterval(timer);
|
|
14875
|
+
};
|
|
14876
|
+
}, [
|
|
14877
|
+
authenticated,
|
|
14878
|
+
busy,
|
|
14879
|
+
requestQuota
|
|
14880
|
+
]);
|
|
14881
|
+
const commit = (0, react.useCallback)(async (kind, action, notify = true) => {
|
|
14882
|
+
try {
|
|
14883
|
+
setBusy(kind);
|
|
14884
|
+
setError(null);
|
|
14885
|
+
applyStatus(await action());
|
|
14886
|
+
if (notify) notifyChange();
|
|
14887
|
+
} catch (err) {
|
|
14888
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
14889
|
+
} finally {
|
|
14890
|
+
setBusy(null);
|
|
14891
|
+
}
|
|
14892
|
+
}, [applyStatus, notifyChange]);
|
|
14893
|
+
const submitKey = async () => {
|
|
14894
|
+
const apiKey = apiKeyValue.trim();
|
|
14895
|
+
if (apiKey === "") {
|
|
14896
|
+
setError(t.apiKeyEmpty);
|
|
14897
|
+
return;
|
|
14898
|
+
}
|
|
14899
|
+
await commit("login", () => api$14.post("/accounts", {
|
|
14900
|
+
apiKey,
|
|
14901
|
+
...apiKeyTarget === null ? {} : { accountId: apiKeyTarget }
|
|
14902
|
+
}));
|
|
14903
|
+
setApiKeyValue("");
|
|
14904
|
+
setApiKeyTarget(null);
|
|
14905
|
+
setApiKeyOpen(false);
|
|
14906
|
+
};
|
|
14907
|
+
const accountAction = (action, accountId, extra = {}) => commit("account", () => api$14.post("/accounts/action", {
|
|
14908
|
+
action,
|
|
14909
|
+
accountId,
|
|
14910
|
+
...extra
|
|
14911
|
+
}));
|
|
14912
|
+
const saveSettings = (patch, kind = "settings") => commit(kind, () => api$14.post("/settings", patch));
|
|
14913
|
+
const setModelGroup = (ids, enabled) => {
|
|
14914
|
+
if (status === null) return;
|
|
14915
|
+
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
14916
|
+
saveSettings({ enabledModelIds: nextGroupSelection(current, ids, enabled) });
|
|
14917
|
+
};
|
|
14918
|
+
const setAllModels = (enabled) => {
|
|
14919
|
+
if (status !== null) saveSettings({ enabledModelIds: enabled ? status.models.map((model) => model.id) : [] });
|
|
14920
|
+
};
|
|
14921
|
+
const saveContext = async (id) => {
|
|
14922
|
+
const parsed = parsePositiveCapacity$1(contextDrafts[id] ?? "");
|
|
14923
|
+
if (parsed === null) {
|
|
14924
|
+
setError(t.contextWindowHint);
|
|
14925
|
+
return;
|
|
14926
|
+
}
|
|
14927
|
+
setSavingModel(id);
|
|
14928
|
+
await commit("context", () => api$14.post("/settings", { contextWindowOverrides: { [id]: parsed } }), false);
|
|
14929
|
+
setSavingModel(null);
|
|
14930
|
+
};
|
|
14931
|
+
const resetContext = async (id) => {
|
|
14932
|
+
setSavingModel(id);
|
|
14933
|
+
await commit("context", () => api$14.post("/settings", { contextWindowOverrides: { [id]: null } }), false);
|
|
14934
|
+
setSavingModel(null);
|
|
14935
|
+
};
|
|
14936
|
+
const resetAllContexts = async () => {
|
|
14937
|
+
if (status === null || !window.confirm(t.contextWindowResetAllConfirm)) return;
|
|
14938
|
+
await commit("context", () => api$14.post("/settings", { contextWindowOverrides: Object.fromEntries(Object.keys(status.contextWindowOverrides).map((id) => [id, null])) }), false);
|
|
14939
|
+
};
|
|
14940
|
+
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14941
|
+
className: "dsha-page",
|
|
14942
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14943
|
+
className: "dsha-empty",
|
|
14944
|
+
children: t.loading
|
|
14945
|
+
})
|
|
14946
|
+
});
|
|
14947
|
+
const models = status?.models ?? [];
|
|
14948
|
+
const enabledModels = models.filter((model) => model.enabled);
|
|
14949
|
+
const offeredEfforts = OPENCODE_GO_REASONING_EFFORTS.filter((effort) => enabledModels.some((model) => model.reasoningEfforts.includes(effort)));
|
|
14950
|
+
const apiKeyTargetAlias = apiKeyTarget === null ? null : status?.accounts.find((account) => account.id === apiKeyTarget)?.alias ?? apiKeyTarget;
|
|
14951
|
+
const effortLabel = (effort) => ({
|
|
14952
|
+
none: t.effortNone,
|
|
14953
|
+
minimal: t.effortMinimal,
|
|
14954
|
+
low: t.effortLow,
|
|
14955
|
+
medium: t.effortMedium,
|
|
14956
|
+
high: t.effortHigh,
|
|
14957
|
+
xhigh: t.effortXhigh,
|
|
14958
|
+
max: t.effortMax
|
|
14959
|
+
})[effort];
|
|
14960
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14961
|
+
className: "dsha-page dshoc-page",
|
|
14962
|
+
children: [
|
|
14963
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AccountPoolSection, {
|
|
14964
|
+
accounts: status?.accounts ?? [],
|
|
14965
|
+
activeAccountId: status?.activeAccountId,
|
|
14966
|
+
rotationStrategy: status?.rotationStrategy ?? "sequential",
|
|
14967
|
+
busy,
|
|
14968
|
+
labels: t,
|
|
14969
|
+
onLogin: () => {
|
|
14970
|
+
setApiKeyTarget(null);
|
|
14971
|
+
setApiKeyOpen((value) => !value);
|
|
14972
|
+
},
|
|
14973
|
+
renderLoginActions: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
14974
|
+
className: "dsha-btn dsha-btn-primary",
|
|
14975
|
+
disabled: busy !== null,
|
|
14976
|
+
"aria-expanded": apiKeyOpen,
|
|
14977
|
+
onClick: () => {
|
|
14978
|
+
setApiKeyTarget(null);
|
|
14979
|
+
setApiKeyOpen((value) => !value);
|
|
14980
|
+
},
|
|
14981
|
+
children: t.apiKeyLogin
|
|
14982
|
+
}),
|
|
14983
|
+
renderDetails: () => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
14984
|
+
t.authMethod,
|
|
14985
|
+
": ",
|
|
14986
|
+
t.authMethodApiKey
|
|
14987
|
+
] }),
|
|
14988
|
+
renderAccountActions: (account) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
14989
|
+
className: "dsha-btn",
|
|
14990
|
+
disabled: busy !== null,
|
|
14991
|
+
onClick: () => {
|
|
14992
|
+
setApiKeyTarget(account.id);
|
|
14993
|
+
setApiKeyOpen(true);
|
|
14994
|
+
},
|
|
14995
|
+
children: t.apiKeyReplace
|
|
14996
|
+
}),
|
|
14997
|
+
onSetPrimary: (accountId) => void accountAction("set-primary", accountId),
|
|
14998
|
+
onDelete: (accountId) => void accountAction("delete", accountId),
|
|
14999
|
+
onClearCooldown: (accountId) => void accountAction("clear-cooldown", accountId),
|
|
15000
|
+
onRelogin: (accountId) => {
|
|
15001
|
+
setApiKeyTarget(accountId);
|
|
15002
|
+
setApiKeyOpen(true);
|
|
15003
|
+
},
|
|
15004
|
+
onSetStrategy: (strategy) => void accountAction("strategy", void 0, { strategy }),
|
|
15005
|
+
showQuota: true,
|
|
15006
|
+
accountCardClassName: "dsha-account-card--kimi dshoc-account",
|
|
15007
|
+
omitDetails: ["lastUsed", "expires"],
|
|
15008
|
+
renderQuota: (account) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenCodeGoQuotaCard, {
|
|
15009
|
+
quota: account.quota,
|
|
15010
|
+
planName: account.planName,
|
|
15011
|
+
lastUsedAt: account.lastUsedAt,
|
|
15012
|
+
labels: t
|
|
15013
|
+
}),
|
|
15014
|
+
children: [
|
|
15015
|
+
apiKeyOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15016
|
+
className: "dshoc-apikey",
|
|
15017
|
+
id: "dshoc-apikey-body",
|
|
15018
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15019
|
+
className: "dsha-muted",
|
|
15020
|
+
children: apiKeyTargetAlias === null ? t.apiKeyHint : t.apiKeyReplaceHint.replace("{alias}", apiKeyTargetAlias)
|
|
15021
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15022
|
+
className: "dshoc-apikey-row",
|
|
15023
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
15024
|
+
type: "password",
|
|
15025
|
+
className: "dsha-select",
|
|
15026
|
+
autoComplete: "off",
|
|
15027
|
+
spellCheck: false,
|
|
15028
|
+
"aria-label": t.apiKeyLogin,
|
|
15029
|
+
placeholder: t.apiKeyPlaceholder,
|
|
15030
|
+
value: apiKeyValue,
|
|
15031
|
+
disabled: busy !== null,
|
|
15032
|
+
onChange: (event) => setApiKeyValue(event.currentTarget.value),
|
|
15033
|
+
onKeyDown: (event) => {
|
|
15034
|
+
if (event.key === "Enter") submitKey();
|
|
15035
|
+
}
|
|
15036
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
15037
|
+
className: "dsha-btn dsha-btn-primary",
|
|
15038
|
+
disabled: busy !== null || apiKeyValue.trim() === "",
|
|
15039
|
+
onClick: () => void submitKey(),
|
|
15040
|
+
children: busy === "login" ? t.apiKeySubmitting : t.apiKeySubmit
|
|
15041
|
+
})]
|
|
15042
|
+
})]
|
|
15043
|
+
}),
|
|
15044
|
+
status?.quotaError != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15045
|
+
className: "dsha-notice",
|
|
15046
|
+
children: status.quotaError
|
|
15047
|
+
}),
|
|
15048
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15049
|
+
className: "dsha-actions",
|
|
15050
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
15051
|
+
className: "dsha-btn",
|
|
15052
|
+
disabled: busy !== null || !status?.authenticated,
|
|
15053
|
+
onClick: () => void commit("quota", requestQuota, false),
|
|
15054
|
+
children: busy === "quota" ? t.refreshingQuota : t.refreshQuota
|
|
15055
|
+
})
|
|
15056
|
+
})
|
|
15057
|
+
]
|
|
15058
|
+
}),
|
|
15059
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
15060
|
+
className: "dsha-group",
|
|
15061
|
+
children: [
|
|
15062
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15063
|
+
className: "dsha-grouphead",
|
|
15064
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.connection })
|
|
15065
|
+
}),
|
|
15066
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15067
|
+
className: "dsha-notice",
|
|
15068
|
+
children: status?.serving === false && status.conflict ? t.routeConflict.replace("{detail}", status.conflict) : t.routeOwned
|
|
15069
|
+
}),
|
|
15070
|
+
status?.connection !== null && status?.connection !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
15071
|
+
className: "dsha-muted",
|
|
15072
|
+
children: [
|
|
15073
|
+
status.connection.connected ? t.testSuccess : t.testFailed,
|
|
15074
|
+
status.connection.model === null ? "" : " · " + status.connection.model,
|
|
15075
|
+
status.connection.error === void 0 ? "" : " · " + status.connection.error
|
|
15076
|
+
]
|
|
15077
|
+
}),
|
|
15078
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15079
|
+
className: "dsha-actions",
|
|
15080
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
15081
|
+
className: "dsha-btn",
|
|
15082
|
+
disabled: busy !== null || !status?.authenticated,
|
|
15083
|
+
onClick: async () => {
|
|
15084
|
+
try {
|
|
15085
|
+
setBusy("connection");
|
|
15086
|
+
setError(null);
|
|
15087
|
+
const result = await api$14.post("/connection/test");
|
|
15088
|
+
setStatus((current) => current === null ? current : {
|
|
15089
|
+
...current,
|
|
15090
|
+
connection: result
|
|
15091
|
+
});
|
|
15092
|
+
} catch (err) {
|
|
15093
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
15094
|
+
} finally {
|
|
15095
|
+
setBusy(null);
|
|
15096
|
+
}
|
|
15097
|
+
},
|
|
15098
|
+
children: busy === "connection" ? t.testingConnection : t.testConnection
|
|
15099
|
+
})
|
|
15100
|
+
})
|
|
15101
|
+
]
|
|
15102
|
+
}),
|
|
15103
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
15104
|
+
className: "dsha-group",
|
|
15105
|
+
children: [
|
|
15106
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15107
|
+
className: "dsha-grouphead",
|
|
15108
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.modelsSection }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
15109
|
+
className: "dsha-btn",
|
|
15110
|
+
disabled: busy !== null || !status?.authenticated,
|
|
15111
|
+
onClick: () => void commit("catalog", () => api$14.post("/models/refresh")),
|
|
15112
|
+
children: busy === "catalog" ? t.refreshingCatalog : t.refreshCatalog
|
|
15113
|
+
})]
|
|
15114
|
+
}),
|
|
15115
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15116
|
+
className: "dsha-muted dsha-models-hint",
|
|
15117
|
+
children: t.modelsHint
|
|
15118
|
+
}),
|
|
15119
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelChecklist, {
|
|
15120
|
+
items: models.map((model) => ({
|
|
15121
|
+
id: model.id,
|
|
15122
|
+
name: model.name,
|
|
15123
|
+
hint: model.hint,
|
|
15124
|
+
enabled: model.enabled,
|
|
15125
|
+
group: modelVendorGroup(model.canonicalId ?? model.id, t.otherGroup)
|
|
15126
|
+
})),
|
|
15127
|
+
busy: busy !== null,
|
|
15128
|
+
onToggle: (id, enabled) => setModelGroup([id], enabled),
|
|
15129
|
+
onToggleAll: setAllModels,
|
|
15130
|
+
onToggleGroup: setModelGroup,
|
|
15131
|
+
groupByVendor: true,
|
|
15132
|
+
labels: {
|
|
15133
|
+
selectAll: t.selectAll,
|
|
15134
|
+
clearAll: t.unselectAll,
|
|
15135
|
+
list: t.modelsSection
|
|
15136
|
+
}
|
|
15137
|
+
})
|
|
15138
|
+
]
|
|
15139
|
+
}),
|
|
15140
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
15141
|
+
className: "dsha-group",
|
|
15142
|
+
children: [
|
|
15143
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15144
|
+
className: "dsha-grouphead",
|
|
15145
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.enhanced })
|
|
15146
|
+
}),
|
|
15147
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15148
|
+
className: "dsha-pref-row",
|
|
15149
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.defaultReasoningEffort }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15150
|
+
className: "dsha-muted",
|
|
15151
|
+
children: t.defaultReasoningEffortHint
|
|
15152
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
15153
|
+
className: "dsha-select",
|
|
15154
|
+
"aria-label": t.defaultReasoningEffort,
|
|
15155
|
+
value: status?.defaultReasoningEffort ?? "",
|
|
15156
|
+
disabled: busy !== null,
|
|
15157
|
+
onChange: (event) => {
|
|
15158
|
+
const value = event.currentTarget.value;
|
|
15159
|
+
saveSettings({ defaultReasoningEffort: value === "" ? null : value });
|
|
15160
|
+
},
|
|
15161
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
15162
|
+
value: "",
|
|
15163
|
+
children: t.defaultEffortAuto
|
|
15164
|
+
}), offeredEfforts.map((effort) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
15165
|
+
value: effort,
|
|
15166
|
+
children: effortLabel(effort)
|
|
15167
|
+
}, effort))]
|
|
15168
|
+
})]
|
|
15169
|
+
}),
|
|
15170
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextWindowEditor, {
|
|
15171
|
+
rows: enabledModels.map((model) => ({
|
|
15172
|
+
id: model.id,
|
|
15173
|
+
name: model.name,
|
|
15174
|
+
draft: contextDrafts[model.id] ?? formatCapacity$1(model.defaultContextWindow),
|
|
15175
|
+
meta: model.contextWindow > model.defaultContextWindow ? formatCapacity$1(model.contextWindow) : void 0,
|
|
15176
|
+
inputLabel: model.name,
|
|
15177
|
+
hasOverride: status?.contextWindowOverrides[model.id] !== void 0,
|
|
15178
|
+
saving: savingModel === model.id
|
|
15179
|
+
})),
|
|
15180
|
+
labels: {
|
|
15181
|
+
tokens: t.tokens,
|
|
15182
|
+
save: t.save,
|
|
15183
|
+
saving: t.saving,
|
|
15184
|
+
reset: t.contextWindowReset,
|
|
15185
|
+
resetAll: t.contextWindowResetAll,
|
|
15186
|
+
empty: t.contextWindowNoneEnabled
|
|
15187
|
+
},
|
|
15188
|
+
busy: busy !== null,
|
|
15189
|
+
overrideCount: Object.keys(status?.contextWindowOverrides ?? {}).length,
|
|
15190
|
+
onDraftChange: (id, draft) => setContextDrafts((current) => ({
|
|
15191
|
+
...current,
|
|
15192
|
+
[id]: draft
|
|
15193
|
+
})),
|
|
15194
|
+
onCommit: (id) => void saveContext(id),
|
|
15195
|
+
onReset: (id) => void resetContext(id),
|
|
15196
|
+
onResetAll: () => void resetAllContexts()
|
|
15197
|
+
})
|
|
15198
|
+
]
|
|
15199
|
+
}),
|
|
15200
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "opencode-go" }),
|
|
15201
|
+
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15202
|
+
className: "dsha-error",
|
|
15203
|
+
role: "alert",
|
|
15204
|
+
children: error
|
|
15205
|
+
})
|
|
15206
|
+
]
|
|
15207
|
+
});
|
|
15208
|
+
}
|
|
15209
|
+
//#endregion
|
|
14350
15210
|
//#region src/client/providers/step-code/locales.ts
|
|
14351
15211
|
/**
|
|
14352
15212
|
* Step Code(Step Plan 订阅)线路的客户端命名空间。
|
|
@@ -14762,9 +15622,9 @@ window.__ModuleLoader__.load({
|
|
|
14762
15622
|
/**
|
|
14763
15623
|
* 本线路的 host 路由由这一个文件描述,卡片与输入框胶囊都从这里取。
|
|
14764
15624
|
*/
|
|
14765
|
-
const api$
|
|
14766
|
-
const get$4 = api$
|
|
14767
|
-
const post$4 = api$
|
|
15625
|
+
const api$13 = createLineApi(STEP_CODE_ROUTE_PREFIX, STEP_CODE_PROVIDER_NAME);
|
|
15626
|
+
const get$4 = api$13.get;
|
|
15627
|
+
const post$4 = api$13.post;
|
|
14768
15628
|
function messageOf$4(cause) {
|
|
14769
15629
|
return cause instanceof Error ? cause.message : String(cause);
|
|
14770
15630
|
}
|
|
@@ -16264,7 +17124,7 @@ window.__ModuleLoader__.load({
|
|
|
16264
17124
|
}
|
|
16265
17125
|
//#endregion
|
|
16266
17126
|
//#region src/client/providers/cline-pass/api.ts
|
|
16267
|
-
const api$
|
|
17127
|
+
const api$12 = createLineApi(CLINE_PASS_ROUTE_PREFIX, "Cline Pass");
|
|
16268
17128
|
/**
|
|
16269
17129
|
* Whether the host is refreshing the quota behind this answer.
|
|
16270
17130
|
*
|
|
@@ -16295,62 +17155,62 @@ window.__ModuleLoader__.load({
|
|
|
16295
17155
|
* raw quota payload.
|
|
16296
17156
|
*/
|
|
16297
17157
|
status(refresh = false) {
|
|
16298
|
-
if (!refresh) return api$
|
|
16299
|
-
return api$
|
|
17158
|
+
if (!refresh) return api$12.get("/status");
|
|
17159
|
+
return api$12.post("/usage", {}).then((outcome) => outcome.status);
|
|
16300
17160
|
}
|
|
16301
17161
|
updateSettings(patch) {
|
|
16302
|
-
return api$
|
|
17162
|
+
return api$12.post("/settings", patch).then(() => this.status());
|
|
16303
17163
|
}
|
|
16304
17164
|
accountAction(action, body = {}) {
|
|
16305
|
-
return api$
|
|
17165
|
+
return api$12.post("/accounts", {
|
|
16306
17166
|
action,
|
|
16307
17167
|
...body
|
|
16308
17168
|
});
|
|
16309
17169
|
}
|
|
16310
17170
|
/** Verify a key without storing it; the host answers the verdict directly. */
|
|
16311
17171
|
testKey(body) {
|
|
16312
|
-
return api$
|
|
17172
|
+
return api$12.post("/accounts", {
|
|
16313
17173
|
action: "test",
|
|
16314
17174
|
...body
|
|
16315
17175
|
});
|
|
16316
17176
|
}
|
|
16317
17177
|
/** Start the Cline device-code sign-in. */
|
|
16318
17178
|
startLogin() {
|
|
16319
|
-
return api$
|
|
17179
|
+
return api$12.post("/login/start", {});
|
|
16320
17180
|
}
|
|
16321
17181
|
/** One poll of the pending sign-in; the host throttles it to WorkOS's interval. */
|
|
16322
17182
|
loginStatus(id) {
|
|
16323
|
-
return api$
|
|
17183
|
+
return api$12.get(`/login/status?id=${encodeURIComponent(id)}`);
|
|
16324
17184
|
}
|
|
16325
17185
|
cancelLogin(id) {
|
|
16326
|
-
return api$
|
|
17186
|
+
return api$12.post("/login/cancel", { id });
|
|
16327
17187
|
}
|
|
16328
17188
|
setEnabledModels(enabledModelIds) {
|
|
16329
|
-
return api$
|
|
17189
|
+
return api$12.post("/models", { enabledModelIds });
|
|
16330
17190
|
}
|
|
16331
17191
|
setContextWindow(model, contextWindow) {
|
|
16332
|
-
return api$
|
|
17192
|
+
return api$12.post("/models/context-window", {
|
|
16333
17193
|
model,
|
|
16334
17194
|
contextWindow
|
|
16335
17195
|
});
|
|
16336
17196
|
}
|
|
16337
17197
|
test(model) {
|
|
16338
|
-
return api$
|
|
17198
|
+
return api$12.post("/models/test", { model });
|
|
16339
17199
|
}
|
|
16340
17200
|
setVisibility(model, visible) {
|
|
16341
|
-
return api$
|
|
17201
|
+
return api$12.post("/models/visibility", {
|
|
16342
17202
|
model,
|
|
16343
17203
|
visible
|
|
16344
17204
|
});
|
|
16345
17205
|
}
|
|
16346
17206
|
setVisibilityAll(mode) {
|
|
16347
|
-
return api$
|
|
17207
|
+
return api$12.post("/models/visibility-all", { mode });
|
|
16348
17208
|
}
|
|
16349
17209
|
refreshCatalog() {
|
|
16350
|
-
return api$
|
|
17210
|
+
return api$12.post("/catalog/refresh", {});
|
|
16351
17211
|
}
|
|
16352
17212
|
searchCatalog(query) {
|
|
16353
|
-
return api$
|
|
17213
|
+
return api$12.get("/catalog/search?q=" + encodeURIComponent(query));
|
|
16354
17214
|
}
|
|
16355
17215
|
/**
|
|
16356
17216
|
* Add one search hit.
|
|
@@ -16359,20 +17219,20 @@ window.__ModuleLoader__.load({
|
|
|
16359
17219
|
* refuses it until the caller acknowledges that (`acknowledgeBilling`).
|
|
16360
17220
|
*/
|
|
16361
17221
|
addCatalogModel(model, acknowledgeBilling = false) {
|
|
16362
|
-
return api$
|
|
17222
|
+
return api$12.post("/catalog/add", acknowledgeBilling ? {
|
|
16363
17223
|
model,
|
|
16364
17224
|
acknowledgeBilling: true
|
|
16365
17225
|
} : { model });
|
|
16366
17226
|
}
|
|
16367
17227
|
readUsage() {
|
|
16368
|
-
return api$
|
|
17228
|
+
return api$12.post("/usage", {});
|
|
16369
17229
|
}
|
|
16370
17230
|
history(limit = 25, model = "") {
|
|
16371
17231
|
const query = new URLSearchParams({
|
|
16372
17232
|
limit: String(limit),
|
|
16373
17233
|
...model === "" ? {} : { model }
|
|
16374
17234
|
});
|
|
16375
|
-
return api$
|
|
17235
|
+
return api$12.get("/history?" + query.toString());
|
|
16376
17236
|
}
|
|
16377
17237
|
};
|
|
16378
17238
|
//#endregion
|
|
@@ -16635,6 +17495,8 @@ window.__ModuleLoader__.load({
|
|
|
16635
17495
|
//#endregion
|
|
16636
17496
|
//#region src/client/providers/cline-pass/ClinePassSection.tsx
|
|
16637
17497
|
const API$5 = new ClinePassApi();
|
|
17498
|
+
/** Plan-own ids read `cline-pass/<model>`: the vendor is the model after the prefix. */
|
|
17499
|
+
const CLINE_VENDOR_GROUPING = { ignorePrefixes: ["cline-pass"] };
|
|
16638
17500
|
/**
|
|
16639
17501
|
* How often an open card re-reads the quota.
|
|
16640
17502
|
*
|
|
@@ -16855,6 +17717,16 @@ window.__ModuleLoader__.load({
|
|
|
16855
17717
|
return await API$5.setEnabledModels(selectAll ? null : []);
|
|
16856
17718
|
});
|
|
16857
17719
|
}, [run]);
|
|
17720
|
+
const setModelGroup = (0, react.useCallback)((ids, checked) => {
|
|
17721
|
+
if (status === null || ids.length === 0) return;
|
|
17722
|
+
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
17723
|
+
const next = nextGroupSelection(current, ids, checked);
|
|
17724
|
+
const turnedOn = checked ? ids.filter((id) => !current.includes(id)) : [];
|
|
17725
|
+
run("models", async () => {
|
|
17726
|
+
for (const id of turnedOn) await API$5.setVisibility(id, true);
|
|
17727
|
+
return await API$5.setEnabledModels(next.length === status.models.length ? null : next);
|
|
17728
|
+
});
|
|
17729
|
+
}, [status, run]);
|
|
16858
17730
|
const commitContext = (0, react.useCallback)((id) => {
|
|
16859
17731
|
const model = status?.models.find((entry) => entry.id === id);
|
|
16860
17732
|
if (model === void 0) return;
|
|
@@ -17301,6 +18173,8 @@ window.__ModuleLoader__.load({
|
|
|
17301
18173
|
busy: busyAny,
|
|
17302
18174
|
onToggle: (id, enabled) => toggleModel(id, enabled),
|
|
17303
18175
|
onToggleAll: (enabled) => setAllModels(enabled),
|
|
18176
|
+
onToggleGroup: setModelGroup,
|
|
18177
|
+
groupByVendor: CLINE_VENDOR_GROUPING,
|
|
17304
18178
|
labels: {
|
|
17305
18179
|
selectAll: t.selectAll,
|
|
17306
18180
|
clearAll: t.unselectAll,
|
|
@@ -18045,9 +18919,9 @@ window.__ModuleLoader__.load({
|
|
|
18045
18919
|
* 凭据边界也写在这里:/login/manual 的请求体是本文件里**唯一**带秘密的形状,
|
|
18046
18920
|
* 它只在这个函数调用点的字面量里出现,既不进 URL、也不进日志。
|
|
18047
18921
|
*/
|
|
18048
|
-
const api$
|
|
18049
|
-
const get$3 = api$
|
|
18050
|
-
const post$3 = api$
|
|
18922
|
+
const api$11 = createLineApi(QODER_ROUTE_PREFIX, QODER_PROVIDER_NAME);
|
|
18923
|
+
const get$3 = api$11.get;
|
|
18924
|
+
const post$3 = api$11.post;
|
|
18051
18925
|
function messageOf$3(cause) {
|
|
18052
18926
|
return cause instanceof Error ? cause.message : String(cause);
|
|
18053
18927
|
}
|
|
@@ -18399,6 +19273,11 @@ window.__ModuleLoader__.load({
|
|
|
18399
19273
|
if (status === null || status.models.length === 0) return;
|
|
18400
19274
|
applyEnabledModels(enabled ? status.models.map((model) => model.id) : []);
|
|
18401
19275
|
};
|
|
19276
|
+
const setModelGroup = (ids, enabled) => {
|
|
19277
|
+
if (status === null || ids.length === 0) return;
|
|
19278
|
+
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
19279
|
+
applyEnabledModels(nextGroupSelection(current, ids, enabled));
|
|
19280
|
+
};
|
|
18402
19281
|
const saveContextWindow = async (modelId) => {
|
|
18403
19282
|
const raw = contextDrafts[modelId] ?? "";
|
|
18404
19283
|
const parsed = parsePositiveCapacity$1(raw);
|
|
@@ -18539,6 +19418,7 @@ window.__ModuleLoader__.load({
|
|
|
18539
19418
|
setStrategy,
|
|
18540
19419
|
toggleModel,
|
|
18541
19420
|
setAllModels,
|
|
19421
|
+
setModelGroup,
|
|
18542
19422
|
saveContextWindow,
|
|
18543
19423
|
resetContextWindow,
|
|
18544
19424
|
resetAllContextWindows,
|
|
@@ -18642,7 +19522,7 @@ window.__ModuleLoader__.load({
|
|
|
18642
19522
|
const { state, derived, actions } = useQoderSection({ onModelChange });
|
|
18643
19523
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
18644
19524
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio } = derived;
|
|
18645
|
-
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
19525
|
+
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, setModelGroup, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
18646
19526
|
const t = useLineDict(NS_QODER, zh$10);
|
|
18647
19527
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
18648
19528
|
className: "dsha-page",
|
|
@@ -18971,6 +19851,8 @@ window.__ModuleLoader__.load({
|
|
|
18971
19851
|
busy: busy !== null,
|
|
18972
19852
|
onToggle: toggleModel,
|
|
18973
19853
|
onToggleAll: setAllModels,
|
|
19854
|
+
onToggleGroup: setModelGroup,
|
|
19855
|
+
groupByVendor: true,
|
|
18974
19856
|
labels: {
|
|
18975
19857
|
selectAll: t.selectAll,
|
|
18976
19858
|
clearAll: t.unselectAll,
|
|
@@ -19172,7 +20054,7 @@ window.__ModuleLoader__.load({
|
|
|
19172
20054
|
const OPENDESIGN_ROUTE_PREFIX = "/opendesign/api";
|
|
19173
20055
|
//#endregion
|
|
19174
20056
|
//#region src/client/providers/opendesign/api.ts
|
|
19175
|
-
const api$
|
|
20057
|
+
const api$10 = createLineApi(OPENDESIGN_ROUTE_PREFIX, "OpenDesign");
|
|
19176
20058
|
/**
|
|
19177
20059
|
* The OpenDesign settings API, as the card uses it.
|
|
19178
20060
|
*
|
|
@@ -19181,59 +20063,59 @@ window.__ModuleLoader__.load({
|
|
|
19181
20063
|
*/
|
|
19182
20064
|
var OpenDesignApi = class {
|
|
19183
20065
|
status() {
|
|
19184
|
-
return api$
|
|
20066
|
+
return api$10.get("/status");
|
|
19185
20067
|
}
|
|
19186
20068
|
updateSettings(patch) {
|
|
19187
|
-
return api$
|
|
20069
|
+
return api$10.post("/settings", patch).then(() => this.status());
|
|
19188
20070
|
}
|
|
19189
20071
|
accountAction(action, body = {}) {
|
|
19190
|
-
return api$
|
|
20072
|
+
return api$10.post("/accounts", {
|
|
19191
20073
|
action,
|
|
19192
20074
|
...body
|
|
19193
20075
|
});
|
|
19194
20076
|
}
|
|
19195
20077
|
/** Verify a key without storing it; the host answers the verdict directly. */
|
|
19196
20078
|
testKey(body) {
|
|
19197
|
-
return api$
|
|
20079
|
+
return api$10.post("/accounts", {
|
|
19198
20080
|
action: "test",
|
|
19199
20081
|
...body
|
|
19200
20082
|
});
|
|
19201
20083
|
}
|
|
19202
20084
|
/** Start the browser device-authorization sign-in. */
|
|
19203
20085
|
startLogin() {
|
|
19204
|
-
return api$
|
|
20086
|
+
return api$10.post("/login/start", {});
|
|
19205
20087
|
}
|
|
19206
20088
|
/** One poll of the pending sign-in; the host throttles it to the advertised interval. */
|
|
19207
20089
|
loginStatus(id) {
|
|
19208
|
-
return api$
|
|
20090
|
+
return api$10.get(`/login/status?id=${encodeURIComponent(id)}`);
|
|
19209
20091
|
}
|
|
19210
20092
|
cancelLogin(id) {
|
|
19211
|
-
return api$
|
|
20093
|
+
return api$10.post("/login/cancel", { id });
|
|
19212
20094
|
}
|
|
19213
20095
|
/** Read each OAuth account's wallet balance once (one upstream call per account). */
|
|
19214
20096
|
readUsage() {
|
|
19215
|
-
return api$
|
|
20097
|
+
return api$10.post("/usage", {});
|
|
19216
20098
|
}
|
|
19217
20099
|
setEnabledModels(enabledModelIds) {
|
|
19218
|
-
return api$
|
|
20100
|
+
return api$10.post("/models", { enabledModelIds });
|
|
19219
20101
|
}
|
|
19220
20102
|
setContextWindow(model, contextWindow) {
|
|
19221
|
-
return api$
|
|
20103
|
+
return api$10.post("/models/context-window", {
|
|
19222
20104
|
model,
|
|
19223
20105
|
contextWindow
|
|
19224
20106
|
});
|
|
19225
20107
|
}
|
|
19226
20108
|
setVisibility(model, visible) {
|
|
19227
|
-
return api$
|
|
20109
|
+
return api$10.post("/models/visibility", {
|
|
19228
20110
|
model,
|
|
19229
20111
|
visible
|
|
19230
20112
|
});
|
|
19231
20113
|
}
|
|
19232
20114
|
setVisibilityAll(mode) {
|
|
19233
|
-
return api$
|
|
20115
|
+
return api$10.post("/models/visibility-all", { mode });
|
|
19234
20116
|
}
|
|
19235
20117
|
refreshCatalog() {
|
|
19236
|
-
return api$
|
|
20118
|
+
return api$10.post("/catalog/refresh", {});
|
|
19237
20119
|
}
|
|
19238
20120
|
};
|
|
19239
20121
|
//#endregion
|
|
@@ -19924,6 +20806,16 @@ window.__ModuleLoader__.load({
|
|
|
19924
20806
|
return await API$4.setEnabledModels(selectAll ? null : []);
|
|
19925
20807
|
});
|
|
19926
20808
|
}, [run]);
|
|
20809
|
+
const setModelGroup = (0, react.useCallback)((ids, checked) => {
|
|
20810
|
+
if (status === null || ids.length === 0) return;
|
|
20811
|
+
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
20812
|
+
const next = nextGroupSelection(current, ids, checked);
|
|
20813
|
+
const turnedOn = checked ? ids.filter((id) => !current.includes(id)) : [];
|
|
20814
|
+
run("models", async () => {
|
|
20815
|
+
for (const id of turnedOn) await API$4.setVisibility(id, true);
|
|
20816
|
+
return await API$4.setEnabledModels(next.length === status.models.length ? null : next);
|
|
20817
|
+
});
|
|
20818
|
+
}, [status, run]);
|
|
19927
20819
|
const commitContext = (0, react.useCallback)((id) => {
|
|
19928
20820
|
const model = status?.models.find((entry) => entry.id === id);
|
|
19929
20821
|
if (model === void 0) return;
|
|
@@ -20309,6 +21201,8 @@ window.__ModuleLoader__.load({
|
|
|
20309
21201
|
busy: busyAny,
|
|
20310
21202
|
onToggle: (id, enabled) => toggleModel(id, enabled),
|
|
20311
21203
|
onToggleAll: (enabled) => setAllModels(enabled),
|
|
21204
|
+
onToggleGroup: setModelGroup,
|
|
21205
|
+
groupByVendor: true,
|
|
20312
21206
|
labels: {
|
|
20313
21207
|
selectAll: t.selectAll,
|
|
20314
21208
|
clearAll: t.unselectAll,
|
|
@@ -20810,7 +21704,7 @@ window.__ModuleLoader__.load({
|
|
|
20810
21704
|
* is exactly what a stale host half produces) be reported as such instead of as
|
|
20811
21705
|
* a bare "Unexpected end of JSON input".
|
|
20812
21706
|
*/
|
|
20813
|
-
const api$
|
|
21707
|
+
const api$9 = createLineApi(API$3, "WorkBuddy");
|
|
20814
21708
|
/**
|
|
20815
21709
|
* Reasoning levels the default-effort control may offer.
|
|
20816
21710
|
*
|
|
@@ -20879,7 +21773,7 @@ window.__ModuleLoader__.load({
|
|
|
20879
21773
|
const loadStatus = (0, react.useCallback)(async (quiet = false) => {
|
|
20880
21774
|
if (!quiet) setError(null);
|
|
20881
21775
|
try {
|
|
20882
|
-
const data = await api$
|
|
21776
|
+
const data = await api$9.request("/status");
|
|
20883
21777
|
const normalized = normalizeStatus(data);
|
|
20884
21778
|
setStatus(normalized);
|
|
20885
21779
|
setStatusFailed(false);
|
|
@@ -20914,7 +21808,7 @@ window.__ModuleLoader__.load({
|
|
|
20914
21808
|
try {
|
|
20915
21809
|
setBusy("rescan");
|
|
20916
21810
|
setError(null);
|
|
20917
|
-
const updated = await api$
|
|
21811
|
+
const updated = await api$9.request("/rescan", { method: "POST" });
|
|
20918
21812
|
setStatus(normalizeStatus(updated));
|
|
20919
21813
|
notifyChange();
|
|
20920
21814
|
} catch (err) {
|
|
@@ -20928,7 +21822,7 @@ window.__ModuleLoader__.load({
|
|
|
20928
21822
|
setBusy(`login:${region}`);
|
|
20929
21823
|
setError(null);
|
|
20930
21824
|
setLoginProgress(t.loginWaiting);
|
|
20931
|
-
const flow = await api$
|
|
21825
|
+
const flow = await api$9.request("/accounts/login", {
|
|
20932
21826
|
method: "POST",
|
|
20933
21827
|
body: JSON.stringify({ region })
|
|
20934
21828
|
});
|
|
@@ -20938,7 +21832,7 @@ window.__ModuleLoader__.load({
|
|
|
20938
21832
|
const timer = window.setInterval(() => {
|
|
20939
21833
|
(async () => {
|
|
20940
21834
|
try {
|
|
20941
|
-
const poll = await api$
|
|
21835
|
+
const poll = await api$9.request("/accounts/login/status");
|
|
20942
21836
|
if (poll.progress) setLoginProgress(poll.progress);
|
|
20943
21837
|
if (poll.status === "complete") {
|
|
20944
21838
|
window.clearInterval(timer);
|
|
@@ -20947,7 +21841,7 @@ window.__ModuleLoader__.load({
|
|
|
20947
21841
|
loginTimeoutRef.current = null;
|
|
20948
21842
|
setBusy(null);
|
|
20949
21843
|
setLoginProgress(null);
|
|
20950
|
-
if (poll.accountId) await api$
|
|
21844
|
+
if (poll.accountId) await api$9.request("/settings", {
|
|
20951
21845
|
method: "POST",
|
|
20952
21846
|
body: JSON.stringify({ selectedAccountId: poll.accountId })
|
|
20953
21847
|
});
|
|
@@ -20987,7 +21881,7 @@ window.__ModuleLoader__.load({
|
|
|
20987
21881
|
try {
|
|
20988
21882
|
setBusy(`${action}:${accountId}`);
|
|
20989
21883
|
setError(null);
|
|
20990
|
-
const updated = await api$
|
|
21884
|
+
const updated = await api$9.request("/accounts/action", {
|
|
20991
21885
|
method: "POST",
|
|
20992
21886
|
body: JSON.stringify({
|
|
20993
21887
|
action,
|
|
@@ -21010,7 +21904,7 @@ window.__ModuleLoader__.load({
|
|
|
21010
21904
|
try {
|
|
21011
21905
|
setBusy("strategy");
|
|
21012
21906
|
setError(null);
|
|
21013
|
-
const updated = await api$
|
|
21907
|
+
const updated = await api$9.request("/accounts/strategy", {
|
|
21014
21908
|
method: "POST",
|
|
21015
21909
|
body: JSON.stringify({ strategy })
|
|
21016
21910
|
});
|
|
@@ -21025,7 +21919,7 @@ window.__ModuleLoader__.load({
|
|
|
21025
21919
|
try {
|
|
21026
21920
|
setBusy("connection");
|
|
21027
21921
|
setError(null);
|
|
21028
|
-
setConnection(await api$
|
|
21922
|
+
setConnection(await api$9.request("/connection/test", { method: "POST" }));
|
|
21029
21923
|
} catch (err) {
|
|
21030
21924
|
setError(err instanceof Error ? err.message : String(err));
|
|
21031
21925
|
} finally {
|
|
@@ -21036,7 +21930,7 @@ window.__ModuleLoader__.load({
|
|
|
21036
21930
|
try {
|
|
21037
21931
|
setBusy("quota");
|
|
21038
21932
|
setError(null);
|
|
21039
|
-
const updated = await api$
|
|
21933
|
+
const updated = await api$9.request("/quota", { method: "POST" });
|
|
21040
21934
|
setStatus(updated);
|
|
21041
21935
|
} catch (err) {
|
|
21042
21936
|
setError(err instanceof Error ? err.message : String(err));
|
|
@@ -21048,7 +21942,7 @@ window.__ModuleLoader__.load({
|
|
|
21048
21942
|
try {
|
|
21049
21943
|
setBusy("checkin");
|
|
21050
21944
|
setError(null);
|
|
21051
|
-
const updated = await api$
|
|
21945
|
+
const updated = await api$9.request("/checkin/now", { method: "POST" });
|
|
21052
21946
|
setStatus(normalizeStatus(updated));
|
|
21053
21947
|
} catch (err) {
|
|
21054
21948
|
setError(err instanceof Error ? err.message : String(err));
|
|
@@ -21060,7 +21954,7 @@ window.__ModuleLoader__.load({
|
|
|
21060
21954
|
try {
|
|
21061
21955
|
setBusy("checkin");
|
|
21062
21956
|
setError(null);
|
|
21063
|
-
const updated = await api$
|
|
21957
|
+
const updated = await api$9.request("/settings", {
|
|
21064
21958
|
method: "POST",
|
|
21065
21959
|
body: JSON.stringify({ checkin })
|
|
21066
21960
|
});
|
|
@@ -21076,7 +21970,7 @@ window.__ModuleLoader__.load({
|
|
|
21076
21970
|
try {
|
|
21077
21971
|
setBusy("outbound");
|
|
21078
21972
|
setError(null);
|
|
21079
|
-
const updated = await api$
|
|
21973
|
+
const updated = await api$9.request("/settings", {
|
|
21080
21974
|
method: "POST",
|
|
21081
21975
|
body: JSON.stringify({ outboundIdentity })
|
|
21082
21976
|
});
|
|
@@ -21092,7 +21986,7 @@ window.__ModuleLoader__.load({
|
|
|
21092
21986
|
try {
|
|
21093
21987
|
setBusy("guardrails");
|
|
21094
21988
|
setError(null);
|
|
21095
|
-
const updated = await api$
|
|
21989
|
+
const updated = await api$9.request("/settings", {
|
|
21096
21990
|
method: "POST",
|
|
21097
21991
|
body: JSON.stringify({ guardrails })
|
|
21098
21992
|
});
|
|
@@ -21108,7 +22002,7 @@ window.__ModuleLoader__.load({
|
|
|
21108
22002
|
try {
|
|
21109
22003
|
setBusy("atrest");
|
|
21110
22004
|
setError(null);
|
|
21111
|
-
const updated = await api$
|
|
22005
|
+
const updated = await api$9.request("/at-rest-key", {
|
|
21112
22006
|
method: "POST",
|
|
21113
22007
|
body: JSON.stringify({ key })
|
|
21114
22008
|
});
|
|
@@ -21124,7 +22018,7 @@ window.__ModuleLoader__.load({
|
|
|
21124
22018
|
try {
|
|
21125
22019
|
setBusy("atrest");
|
|
21126
22020
|
setError(null);
|
|
21127
|
-
const updated = await api$
|
|
22021
|
+
const updated = await api$9.request("/at-rest-key", { method: "DELETE" });
|
|
21128
22022
|
setStatus(normalizeStatus(updated));
|
|
21129
22023
|
} catch (err) {
|
|
21130
22024
|
setError(err instanceof Error ? err.message : String(err));
|
|
@@ -21139,7 +22033,7 @@ window.__ModuleLoader__.load({
|
|
|
21139
22033
|
try {
|
|
21140
22034
|
setBusy(`model:${modelId}`);
|
|
21141
22035
|
setError(null);
|
|
21142
|
-
const normalized = normalizeStatus(await api$
|
|
22036
|
+
const normalized = normalizeStatus(await api$9.request("/settings", {
|
|
21143
22037
|
method: "POST",
|
|
21144
22038
|
body: JSON.stringify({ enabledModelIds: next })
|
|
21145
22039
|
}));
|
|
@@ -21157,7 +22051,7 @@ window.__ModuleLoader__.load({
|
|
|
21157
22051
|
try {
|
|
21158
22052
|
setBusy("models-all");
|
|
21159
22053
|
setError(null);
|
|
21160
|
-
const normalized = normalizeStatus(await api$
|
|
22054
|
+
const normalized = normalizeStatus(await api$9.request("/settings", {
|
|
21161
22055
|
method: "POST",
|
|
21162
22056
|
body: JSON.stringify({ enabledModelIds: enabled ? status.models.map((model) => model.id) : [] })
|
|
21163
22057
|
}));
|
|
@@ -21170,11 +22064,30 @@ window.__ModuleLoader__.load({
|
|
|
21170
22064
|
setBusy(null);
|
|
21171
22065
|
}
|
|
21172
22066
|
};
|
|
22067
|
+
const setModelGroup = async (ids, enabled) => {
|
|
22068
|
+
if (status === null || ids.length === 0) return;
|
|
22069
|
+
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
22070
|
+
try {
|
|
22071
|
+
setBusy("models-all");
|
|
22072
|
+
setError(null);
|
|
22073
|
+
const normalized = normalizeStatus(await api$9.request("/settings", {
|
|
22074
|
+
method: "POST",
|
|
22075
|
+
body: JSON.stringify({ enabledModelIds: nextGroupSelection(current, ids, enabled) })
|
|
22076
|
+
}));
|
|
22077
|
+
setStatus(normalized);
|
|
22078
|
+
setContextDrafts(contextDraftsFor(normalized));
|
|
22079
|
+
notifyChange();
|
|
22080
|
+
} catch (err) {
|
|
22081
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
22082
|
+
} finally {
|
|
22083
|
+
setBusy(null);
|
|
22084
|
+
}
|
|
22085
|
+
};
|
|
21173
22086
|
const updateEffort = async (effort) => {
|
|
21174
22087
|
try {
|
|
21175
22088
|
setBusy("effort");
|
|
21176
22089
|
setError(null);
|
|
21177
|
-
const updated = await api$
|
|
22090
|
+
const updated = await api$9.request("/settings", {
|
|
21178
22091
|
method: "POST",
|
|
21179
22092
|
body: JSON.stringify({ defaultReasoningEffort: effort })
|
|
21180
22093
|
});
|
|
@@ -21190,7 +22103,7 @@ window.__ModuleLoader__.load({
|
|
|
21190
22103
|
try {
|
|
21191
22104
|
setBusy("catalog");
|
|
21192
22105
|
setError(null);
|
|
21193
|
-
const normalized = normalizeStatus(await api$
|
|
22106
|
+
const normalized = normalizeStatus(await api$9.request("/catalog/refresh", { method: "POST" }));
|
|
21194
22107
|
setStatus(normalized);
|
|
21195
22108
|
setContextDrafts(contextDraftsFor(normalized));
|
|
21196
22109
|
notifyChange();
|
|
@@ -21210,7 +22123,7 @@ window.__ModuleLoader__.load({
|
|
|
21210
22123
|
try {
|
|
21211
22124
|
setSavingModel(modelId);
|
|
21212
22125
|
setError(null);
|
|
21213
|
-
const updated = await api$
|
|
22126
|
+
const updated = await api$9.request("/settings", {
|
|
21214
22127
|
method: "POST",
|
|
21215
22128
|
body: JSON.stringify({ contextWindowOverrides: { [modelId]: parsed } })
|
|
21216
22129
|
});
|
|
@@ -21231,7 +22144,7 @@ window.__ModuleLoader__.load({
|
|
|
21231
22144
|
try {
|
|
21232
22145
|
setSavingModel(modelId);
|
|
21233
22146
|
setError(null);
|
|
21234
|
-
const updated = normalizeStatus(await api$
|
|
22147
|
+
const updated = normalizeStatus(await api$9.request("/settings", {
|
|
21235
22148
|
method: "POST",
|
|
21236
22149
|
body: JSON.stringify({ contextWindowOverrides: { [modelId]: null } })
|
|
21237
22150
|
}));
|
|
@@ -21258,7 +22171,7 @@ window.__ModuleLoader__.load({
|
|
|
21258
22171
|
try {
|
|
21259
22172
|
setBusy("context");
|
|
21260
22173
|
setError(null);
|
|
21261
|
-
const updated = normalizeStatus(await api$
|
|
22174
|
+
const updated = normalizeStatus(await api$9.request("/settings", {
|
|
21262
22175
|
method: "POST",
|
|
21263
22176
|
body: JSON.stringify({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) })
|
|
21264
22177
|
}));
|
|
@@ -21316,6 +22229,7 @@ window.__ModuleLoader__.load({
|
|
|
21316
22229
|
updateCheckin,
|
|
21317
22230
|
toggleModel,
|
|
21318
22231
|
setAllModels,
|
|
22232
|
+
setModelGroup,
|
|
21319
22233
|
updateEffort,
|
|
21320
22234
|
refreshCatalog,
|
|
21321
22235
|
saveContextWindow,
|
|
@@ -21462,7 +22376,7 @@ window.__ModuleLoader__.load({
|
|
|
21462
22376
|
const { status, loading, busy, error, connection, loginProgress, contextDrafts, savingModel } = state;
|
|
21463
22377
|
const { poolAccounts, effortChoices, allModels, strayEffort, contextModels, overrideCount, quota, authenticated, unreachable, poolLabels } = derived;
|
|
21464
22378
|
const sealedCount = status?.sealedAccounts ?? 0;
|
|
21465
|
-
const { login, rescan, accountAction, deleteAccount, setStrategy, testConnection, refreshQuota, checkinNow, updateCheckin, toggleModel, setAllModels, updateEffort, refreshCatalog, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, updateOutboundIdentity, saveAtRestKey, clearAtRestKey, updateGuardrails } = actions;
|
|
22379
|
+
const { login, rescan, accountAction, deleteAccount, setStrategy, testConnection, refreshQuota, checkinNow, updateCheckin, toggleModel, setAllModels, setModelGroup, updateEffort, refreshCatalog, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, updateOutboundIdentity, saveAtRestKey, clearAtRestKey, updateGuardrails } = actions;
|
|
21466
22380
|
const [keyDraft, setKeyDraft] = (0, react.useState)("");
|
|
21467
22381
|
const [guardrailDrafts, setGuardrailDrafts] = (0, react.useState)({});
|
|
21468
22382
|
const pool = status?.pool;
|
|
@@ -21872,6 +22786,8 @@ window.__ModuleLoader__.load({
|
|
|
21872
22786
|
busy: busy !== null,
|
|
21873
22787
|
onToggle: (id, enabled) => void toggleModel(id, enabled),
|
|
21874
22788
|
onToggleAll: (enabled) => void setAllModels(enabled),
|
|
22789
|
+
onToggleGroup: (ids, enabled) => void setModelGroup(ids, enabled),
|
|
22790
|
+
groupByVendor: true,
|
|
21875
22791
|
labels: {
|
|
21876
22792
|
selectAll: t.selectAll,
|
|
21877
22793
|
clearAll: t.unselectAll,
|
|
@@ -22259,10 +23175,10 @@ window.__ModuleLoader__.load({
|
|
|
22259
23175
|
};
|
|
22260
23176
|
//#endregion
|
|
22261
23177
|
//#region src/client/providers/qianwen-token-plan/api.ts
|
|
22262
|
-
const api$
|
|
22263
|
-
const get$2 = api$
|
|
22264
|
-
const post$2 = api$
|
|
22265
|
-
const request$2 = api$
|
|
23178
|
+
const api$8 = createLineApi(QIANWEN_TOKEN_PLAN_ROUTE_PREFIX, QIANWEN_TOKEN_PLAN_PROVIDER_NAME);
|
|
23179
|
+
const get$2 = api$8.get;
|
|
23180
|
+
const post$2 = api$8.post;
|
|
23181
|
+
const request$2 = api$8.request;
|
|
22266
23182
|
const messageOf$2 = (cause) => cause instanceof Error ? cause.message : String(cause);
|
|
22267
23183
|
//#endregion
|
|
22268
23184
|
//#region src/client/providers/qianwen-token-plan/useQianwenSection.ts
|
|
@@ -22396,6 +23312,11 @@ window.__ModuleLoader__.load({
|
|
|
22396
23312
|
if (status === null) return;
|
|
22397
23313
|
update({ enabledModelIds: enabled ? status.models.map((model) => model.id) : [] }, "models").catch(() => void 0);
|
|
22398
23314
|
}, [status, update]),
|
|
23315
|
+
setModelGroup: (0, react.useCallback)((ids, enabled) => {
|
|
23316
|
+
if (status === null || ids.length === 0) return;
|
|
23317
|
+
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
23318
|
+
update({ enabledModelIds: nextGroupSelection(current, ids, enabled) }, "models").catch(() => void 0);
|
|
23319
|
+
}, [status, update]),
|
|
22399
23320
|
saveContextWindow: (0, react.useCallback)(async (id) => {
|
|
22400
23321
|
const raw = contextDrafts[id] ?? "";
|
|
22401
23322
|
const parsed = parsePositiveCapacity$1(raw);
|
|
@@ -22666,6 +23587,8 @@ window.__ModuleLoader__.load({
|
|
|
22666
23587
|
busy: busy !== null,
|
|
22667
23588
|
onToggle: view.toggleModel,
|
|
22668
23589
|
onToggleAll: view.setAllModels,
|
|
23590
|
+
onToggleGroup: view.setModelGroup,
|
|
23591
|
+
groupByVendor: true,
|
|
22669
23592
|
labels: {
|
|
22670
23593
|
selectAll: t.selectAll,
|
|
22671
23594
|
clearAll: t.clearAll,
|
|
@@ -23027,10 +23950,10 @@ window.__ModuleLoader__.load({
|
|
|
23027
23950
|
};
|
|
23028
23951
|
//#endregion
|
|
23029
23952
|
//#region src/client/providers/relayone/api.ts
|
|
23030
|
-
const api$
|
|
23031
|
-
const get$1 = api$
|
|
23032
|
-
const post$1 = api$
|
|
23033
|
-
const request$1 = api$
|
|
23953
|
+
const api$7 = createLineApi(RELAYONE_ROUTE_PREFIX, RELAYONE_PROVIDER_NAME);
|
|
23954
|
+
const get$1 = api$7.get;
|
|
23955
|
+
const post$1 = api$7.post;
|
|
23956
|
+
const request$1 = api$7.request;
|
|
23034
23957
|
const messageOf$1 = (cause) => cause instanceof Error ? cause.message : String(cause);
|
|
23035
23958
|
//#endregion
|
|
23036
23959
|
//#region src/client/providers/relayone/useRelayOneSection.ts
|
|
@@ -23218,6 +24141,11 @@ window.__ModuleLoader__.load({
|
|
|
23218
24141
|
if (status === null) return;
|
|
23219
24142
|
update({ enabledModelIds: enabled ? status.models.map((model) => model.id) : [] }, "models").catch(() => void 0);
|
|
23220
24143
|
}, [status, update]),
|
|
24144
|
+
setModelGroup: (0, react.useCallback)((ids, enabled) => {
|
|
24145
|
+
if (status === null || ids.length === 0) return;
|
|
24146
|
+
const current = status.models.filter((model) => model.enabled).map((model) => model.id);
|
|
24147
|
+
update({ enabledModelIds: nextGroupSelection(current, ids, enabled) }, "models").catch(() => void 0);
|
|
24148
|
+
}, [status, update]),
|
|
23221
24149
|
saveContextWindow: (0, react.useCallback)(async (id) => {
|
|
23222
24150
|
const parsed = parsePositiveCapacity$1(contextDrafts[id] ?? "");
|
|
23223
24151
|
if (parsed === null) {
|
|
@@ -23464,6 +24392,8 @@ window.__ModuleLoader__.load({
|
|
|
23464
24392
|
busy: busy !== null,
|
|
23465
24393
|
onToggle: view.toggleModel,
|
|
23466
24394
|
onToggleAll: view.setAllModels,
|
|
24395
|
+
onToggleGroup: view.setModelGroup,
|
|
24396
|
+
groupByVendor: true,
|
|
23467
24397
|
labels: {
|
|
23468
24398
|
selectAll: t.selectAll,
|
|
23469
24399
|
clearAll: t.clearAll,
|
|
@@ -23861,10 +24791,10 @@ window.__ModuleLoader__.load({
|
|
|
23861
24791
|
test: "/test",
|
|
23862
24792
|
catalogRefresh: "/catalog/refresh"
|
|
23863
24793
|
};
|
|
23864
|
-
const api$
|
|
23865
|
-
const get = api$
|
|
23866
|
-
const post = api$
|
|
23867
|
-
const request = api$
|
|
24794
|
+
const api$6 = createLineApi(CLAUDE_API_ROUTE_PREFIX, CLAUDE_API_PROVIDER_NAME);
|
|
24795
|
+
const get = api$6.get;
|
|
24796
|
+
const post = api$6.post;
|
|
24797
|
+
const request = api$6.request;
|
|
23868
24798
|
const messageOf = (cause) => cause instanceof Error ? cause.message : String(cause);
|
|
23869
24799
|
//#endregion
|
|
23870
24800
|
//#region src/client/providers/claude-api/useClaudeApiSection.ts
|
|
@@ -24690,6 +25620,14 @@ window.__ModuleLoader__.load({
|
|
|
24690
25620
|
category: "local",
|
|
24691
25621
|
setEnabled: (enabled) => postLineSettings("/aws-quick/api", { enabled }),
|
|
24692
25622
|
renderDetail: ({ onModelChange }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AwsQuickSection, { onModelChange })
|
|
25623
|
+
},
|
|
25624
|
+
{
|
|
25625
|
+
id: "opencode-go",
|
|
25626
|
+
proxyLine: "opencode-go",
|
|
25627
|
+
name: OPENCODE_GO_PROVIDER_NAME,
|
|
25628
|
+
category: "api-key",
|
|
25629
|
+
setEnabled: (enabled) => postLineSettings(OPENCODE_GO_ROUTE_PREFIX, { enabled }),
|
|
25630
|
+
renderDetail: ({ onModelChange }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenCodeGoSection, { onModelChange })
|
|
24693
25631
|
}
|
|
24694
25632
|
];
|
|
24695
25633
|
function hubProviderDescriptor(id) {
|
|
@@ -25119,14 +26057,7 @@ window.__ModuleLoader__.load({
|
|
|
25119
26057
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
25120
26058
|
className: "dsh-hub-badge",
|
|
25121
26059
|
children: t(categoryBadgeKey(descriptor.category))
|
|
25122
|
-
})
|
|
25123
|
-
proxyMode === "direct" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
25124
|
-
className: "dsh-hub-badge is-proxy",
|
|
25125
|
-
children: t("hubProxyDirect")
|
|
25126
|
-
}) : proxyMode === "custom" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
25127
|
-
className: "dsh-hub-badge is-proxy",
|
|
25128
|
-
children: t("hubProxyCustom")
|
|
25129
|
-
}) : null
|
|
26060
|
+
})
|
|
25130
26061
|
]
|
|
25131
26062
|
}),
|
|
25132
26063
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -25146,23 +26077,53 @@ window.__ModuleLoader__.load({
|
|
|
25146
26077
|
}),
|
|
25147
26078
|
!props.selecting ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
25148
26079
|
className: "dsh-hub-tail",
|
|
25149
|
-
children: [
|
|
25150
|
-
|
|
25151
|
-
|
|
25152
|
-
|
|
25153
|
-
|
|
25154
|
-
|
|
25155
|
-
|
|
25156
|
-
|
|
25157
|
-
event.stopPropagation()
|
|
25158
|
-
|
|
25159
|
-
|
|
25160
|
-
|
|
25161
|
-
|
|
25162
|
-
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
26080
|
+
children: [
|
|
26081
|
+
descriptor.proxyLine !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
26082
|
+
className: "dsh-hub-proxy-select",
|
|
26083
|
+
"aria-label": formatPoolLabel(t("hubProxyMode"), { name: cardName }),
|
|
26084
|
+
title: props.proxyLoadError ?? t("proxyModeHint"),
|
|
26085
|
+
value: proxyMode ?? "auto",
|
|
26086
|
+
disabled: props.proxyBusy || props.proxySnapshot === null || summary === void 0,
|
|
26087
|
+
onClick: (event) => event.stopPropagation(),
|
|
26088
|
+
onKeyDown: (event) => event.stopPropagation(),
|
|
26089
|
+
onChange: (event) => {
|
|
26090
|
+
event.stopPropagation();
|
|
26091
|
+
props.onProxyMode(descriptor, event.currentTarget.value);
|
|
26092
|
+
},
|
|
26093
|
+
children: [
|
|
26094
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
26095
|
+
value: "auto",
|
|
26096
|
+
children: t("hubProxyAuto")
|
|
26097
|
+
}),
|
|
26098
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
26099
|
+
value: "custom",
|
|
26100
|
+
children: t("hubProxyCustom")
|
|
26101
|
+
}),
|
|
26102
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
26103
|
+
value: "direct",
|
|
26104
|
+
children: t("hubProxyDirect")
|
|
26105
|
+
})
|
|
26106
|
+
]
|
|
26107
|
+
}) : null,
|
|
26108
|
+
canToggle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
26109
|
+
type: "button",
|
|
26110
|
+
role: "switch",
|
|
26111
|
+
"aria-checked": enabled,
|
|
26112
|
+
"aria-label": formatPoolLabel(t(enabled ? "hubSwitchOff" : "hubSwitchOn"), { name: cardName }),
|
|
26113
|
+
className: "dsh-hub-switch",
|
|
26114
|
+
disabled: props.busy || summary === void 0,
|
|
26115
|
+
onClick: (event) => {
|
|
26116
|
+
event.stopPropagation();
|
|
26117
|
+
if (summary === void 0) return;
|
|
26118
|
+
props.onToggle(descriptor, summary, !enabled);
|
|
26119
|
+
}
|
|
26120
|
+
}) : null,
|
|
26121
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26122
|
+
className: "dsh-hub-chevron",
|
|
26123
|
+
"aria-hidden": "true",
|
|
26124
|
+
dangerouslySetInnerHTML: { __html: CHEVRON_SVG }
|
|
26125
|
+
})
|
|
26126
|
+
]
|
|
25166
26127
|
}) : null
|
|
25167
26128
|
]
|
|
25168
26129
|
});
|
|
@@ -25183,7 +26144,9 @@ window.__ModuleLoader__.load({
|
|
|
25183
26144
|
const [summaries, setSummaries] = (0, react.useState)(readCachedSummaries);
|
|
25184
26145
|
const [proxySnapshot, setProxySnapshot] = (0, react.useState)(readCachedProxySnapshot);
|
|
25185
26146
|
const [loadError, setLoadError] = (0, react.useState)(null);
|
|
26147
|
+
const [proxyLoadError, setProxyLoadError] = (0, react.useState)(null);
|
|
25186
26148
|
const [busyId, setBusyId] = (0, react.useState)(null);
|
|
26149
|
+
const [proxyBusyId, setProxyBusyId] = (0, react.useState)(null);
|
|
25187
26150
|
const [cardErrors, setCardErrors] = (0, react.useState)(/* @__PURE__ */ new Map());
|
|
25188
26151
|
const [draggedId, setDraggedId] = (0, react.useState)(null);
|
|
25189
26152
|
const [dropTargetId, setDropTargetId] = (0, react.useState)(null);
|
|
@@ -25197,6 +26160,8 @@ window.__ModuleLoader__.load({
|
|
|
25197
26160
|
const [addedIds, setAddedIds] = (0, react.useState)(() => readIdSet(HUB_ADDED_PROVIDERS_STORAGE_KEY));
|
|
25198
26161
|
const [hiddenIds, setHiddenIds] = (0, react.useState)(() => readIdSet(HUB_HIDDEN_PROVIDERS_STORAGE_KEY));
|
|
25199
26162
|
const [addSheetOpen, setAddSheetOpen] = (0, react.useState)(false);
|
|
26163
|
+
const [justAddedId, setJustAddedId] = (0, react.useState)(null);
|
|
26164
|
+
const overviewRef = (0, react.useRef)(null);
|
|
25200
26165
|
const [addSheetQuery, setAddSheetQuery] = (0, react.useState)("");
|
|
25201
26166
|
const addBtnRef = (0, react.useRef)(null);
|
|
25202
26167
|
const [uncontrolledSelecting, setUncontrolledSelecting] = (0, react.useState)(false);
|
|
@@ -25224,7 +26189,10 @@ window.__ModuleLoader__.load({
|
|
|
25224
26189
|
const snapshot = await fetchLineProxySnapshot(ROUTE_PREFIX);
|
|
25225
26190
|
setProxySnapshot(snapshot);
|
|
25226
26191
|
saveCachedProxySnapshot(snapshot);
|
|
25227
|
-
|
|
26192
|
+
setProxyLoadError(null);
|
|
26193
|
+
} catch (error) {
|
|
26194
|
+
setProxyLoadError(error instanceof Error ? error.message : String(error));
|
|
26195
|
+
}
|
|
25228
26196
|
}, []);
|
|
25229
26197
|
(0, react.useEffect)(() => {
|
|
25230
26198
|
load();
|
|
@@ -25302,6 +26270,37 @@ window.__ModuleLoader__.load({
|
|
|
25302
26270
|
setBusyId(null);
|
|
25303
26271
|
}
|
|
25304
26272
|
}, [clearCardError, load]);
|
|
26273
|
+
const changeProxyMode = (0, react.useCallback)(async (descriptor, mode) => {
|
|
26274
|
+
const line = descriptor.proxyLine;
|
|
26275
|
+
if (line === null || proxyBusyId !== null) return;
|
|
26276
|
+
const customProxyUrl = (proxySnapshot?.lineProxies?.[line])?.customProxyUrl?.trim() ?? "";
|
|
26277
|
+
if (mode === "custom" && customProxyUrl === "") {
|
|
26278
|
+
const name = hubCardName(descriptor, t);
|
|
26279
|
+
globalThis.alert(formatPoolLabel(t("hubCustomProxyMissing"), { name }));
|
|
26280
|
+
onOpen(descriptor.id);
|
|
26281
|
+
return;
|
|
26282
|
+
}
|
|
26283
|
+
setProxyBusyId(descriptor.id);
|
|
26284
|
+
clearCardError(descriptor.id);
|
|
26285
|
+
try {
|
|
26286
|
+
await savePreferences(ROUTE_PREFIX, { lineProxies: { [line]: {
|
|
26287
|
+
mode,
|
|
26288
|
+
customProxyUrl: mode === "custom" ? customProxyUrl : null
|
|
26289
|
+
} } });
|
|
26290
|
+
await loadProxy();
|
|
26291
|
+
} catch (error) {
|
|
26292
|
+
setCardErrors((current) => new Map(current).set(descriptor.id, error instanceof Error ? error.message : String(error)));
|
|
26293
|
+
} finally {
|
|
26294
|
+
setProxyBusyId(null);
|
|
26295
|
+
}
|
|
26296
|
+
}, [
|
|
26297
|
+
clearCardError,
|
|
26298
|
+
loadProxy,
|
|
26299
|
+
onOpen,
|
|
26300
|
+
proxyBusyId,
|
|
26301
|
+
proxySnapshot,
|
|
26302
|
+
t
|
|
26303
|
+
]);
|
|
25305
26304
|
const reorder = (0, react.useCallback)((sourceId, targetId) => {
|
|
25306
26305
|
setProviders((current) => {
|
|
25307
26306
|
const next = moveBeforeTarget(current, sourceId, targetId);
|
|
@@ -25452,8 +26451,18 @@ window.__ModuleLoader__.load({
|
|
|
25452
26451
|
});
|
|
25453
26452
|
setAddSheetOpen(false);
|
|
25454
26453
|
setAddSheetQuery("");
|
|
25455
|
-
|
|
25456
|
-
|
|
26454
|
+
const summary = summaries?.get(descriptor.id);
|
|
26455
|
+
if (summary !== void 0 && summary.canToggle && !summary.enabled) setOffFolded(false);
|
|
26456
|
+
setJustAddedId(descriptor.id);
|
|
26457
|
+
}, [summaries]);
|
|
26458
|
+
(0, react.useEffect)(() => {
|
|
26459
|
+
if (justAddedId === null) return;
|
|
26460
|
+
(overviewRef.current?.querySelector(`.dsh-hub-card[data-id="${justAddedId}"]`))?.scrollIntoView?.({
|
|
26461
|
+
behavior: "smooth",
|
|
26462
|
+
block: "nearest"
|
|
26463
|
+
});
|
|
26464
|
+
setJustAddedId(null);
|
|
26465
|
+
}, [justAddedId]);
|
|
25457
26466
|
const handleCloseAddSheet = (0, react.useCallback)(() => {
|
|
25458
26467
|
setAddSheetOpen(false);
|
|
25459
26468
|
setAddSheetQuery("");
|
|
@@ -25496,6 +26505,8 @@ window.__ModuleLoader__.load({
|
|
|
25496
26505
|
summary,
|
|
25497
26506
|
busy: busyId === descriptor.id,
|
|
25498
26507
|
proxySnapshot,
|
|
26508
|
+
proxyBusy: proxyBusyId !== null,
|
|
26509
|
+
proxyLoadError,
|
|
25499
26510
|
cardError: cardErrors.get(descriptor.id) ?? null,
|
|
25500
26511
|
matchedModels,
|
|
25501
26512
|
selecting,
|
|
@@ -25505,6 +26516,7 @@ window.__ModuleLoader__.load({
|
|
|
25505
26516
|
t,
|
|
25506
26517
|
onOpen,
|
|
25507
26518
|
onToggle: toggle,
|
|
26519
|
+
onProxyMode: changeProxyMode,
|
|
25508
26520
|
onPick: handlePick,
|
|
25509
26521
|
onContextMenu: handleRowContextMenu,
|
|
25510
26522
|
onDragStart: (event) => {
|
|
@@ -25531,6 +26543,7 @@ window.__ModuleLoader__.load({
|
|
|
25531
26543
|
};
|
|
25532
26544
|
const menuOnIndex = menu === null ? -1 : onRows.findIndex((entry) => entry.descriptor.id === menu.id);
|
|
25533
26545
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26546
|
+
ref: overviewRef,
|
|
25534
26547
|
className: "dsh-hub-overview",
|
|
25535
26548
|
children: [loadError !== null && summaries === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
25536
26549
|
className: "dsh-codex-error",
|
|
@@ -26313,7 +27326,7 @@ window.__ModuleLoader__.load({
|
|
|
26313
27326
|
settingsToolRunawayGuardName: "工具失控治理",
|
|
26314
27327
|
settingsToolRunawayGuardNote: "同一工具与参数连续重复时分级提醒;Kimi 保留第 12 次强停,其他线路只提醒",
|
|
26315
27328
|
settingsMediaToolsName: "媒体工具",
|
|
26316
|
-
settingsMediaToolsNote: "统一注册 Codex 生图、Kimi 视频挂载与 MiniMax
|
|
27329
|
+
settingsMediaToolsNote: "统一注册 Codex 生图、Kimi 视频挂载与 MiniMax 图像、音频和视频工具;重载插件或重启后生效,Kimi 既有会话在工具表变化后会重建一次前缀缓存",
|
|
26317
27330
|
settingsTeamPolicyCacheGuardName: "智能体团队策略段",
|
|
26318
27331
|
settingsTeamPolicyCacheGuardNote: "把内置 Agent Teams 的策略段从系统提示词摘掉,改为开启团队协作时以尾部消息投递一次;会话中途切开关不再刷掉整段前缀缓存(默认开启)",
|
|
26319
27332
|
settingsThresholdName: "催促阈值",
|
|
@@ -26368,7 +27381,7 @@ window.__ModuleLoader__.load({
|
|
|
26368
27381
|
settingsToolRunawayGuardName: "Tool runaway guard",
|
|
26369
27382
|
settingsToolRunawayGuardNote: "Remind the agent when the same tool call repeats; Kimi keeps its 12th-call handoff, while other lines receive reminders only",
|
|
26370
27383
|
settingsMediaToolsName: "Media tools",
|
|
26371
|
-
settingsMediaToolsNote: "Register Codex image generation, Kimi video attachment, and MiniMax video tools together; reload the plugin or restart DSH to apply. Existing Kimi sessions rebuild their prefix once after the tool table changes",
|
|
27384
|
+
settingsMediaToolsNote: "Register Codex image generation, Kimi video attachment, and MiniMax image, audio, and video tools together; reload the plugin or restart DSH to apply. Existing Kimi sessions rebuild their prefix once after the tool table changes",
|
|
26372
27385
|
settingsTeamPolicyCacheGuardName: "Agent Teams policy section",
|
|
26373
27386
|
settingsTeamPolicyCacheGuardNote: "Lift the built-in Agent Teams policy section out of the system prompt and deliver it as one tail message when team collaboration is switched on, so toggling mid-session no longer rebuilds the whole prefix cache (on by default)",
|
|
26374
27387
|
settingsThresholdName: "Nudge threshold",
|
|
@@ -26538,7 +27551,7 @@ window.__ModuleLoader__.load({
|
|
|
26538
27551
|
* account-pool labels come from `./account-pool.ts`, with the same overrides the
|
|
26539
27552
|
* source applies on top of them.
|
|
26540
27553
|
*/
|
|
26541
|
-
const dictionary$
|
|
27554
|
+
const dictionary$22 = {
|
|
26542
27555
|
...accountPoolRu,
|
|
26543
27556
|
title: "Claude (подписка)",
|
|
26544
27557
|
pageDesc: "Войдите в подписку Claude Pro/Max и управляйте моделями, уровнями рассуждений, контекстными окнами и квотой.",
|
|
@@ -26661,7 +27674,7 @@ window.__ModuleLoader__.load({
|
|
|
26661
27674
|
};
|
|
26662
27675
|
//#endregion
|
|
26663
27676
|
//#region src/client/locales-ru/cline-pass.ts
|
|
26664
|
-
const dictionary$
|
|
27677
|
+
const dictionary$21 = {
|
|
26665
27678
|
...accountPoolRu,
|
|
26666
27679
|
relogin: "Войти заново",
|
|
26667
27680
|
needsRelogin: "Вход истёк",
|
|
@@ -26787,7 +27800,7 @@ window.__ModuleLoader__.load({
|
|
|
26787
27800
|
};
|
|
26788
27801
|
//#endregion
|
|
26789
27802
|
//#region src/client/locales-ru/command-code.ts
|
|
26790
|
-
const dictionary$
|
|
27803
|
+
const dictionary$20 = {
|
|
26791
27804
|
...accountPoolRu,
|
|
26792
27805
|
title: "Command Code",
|
|
26793
27806
|
pageDesc: "Войдите в Command Code и управляйте моделями, контекстными окнами и квотой.",
|
|
@@ -26863,7 +27876,7 @@ window.__ModuleLoader__.load({
|
|
|
26863
27876
|
};
|
|
26864
27877
|
//#endregion
|
|
26865
27878
|
//#region src/client/locales-ru/glm-coding-plan.ts
|
|
26866
|
-
const dictionary$
|
|
27879
|
+
const dictionary$19 = {
|
|
26867
27880
|
...accountPoolRu,
|
|
26868
27881
|
title: "GLM (аккаунт ZCode)",
|
|
26869
27882
|
pageDesc: "Вход аккаунтом ZCode подключает GLM Coding Plan (Китай — bigmodel.cn, международный — z.ai). Здесь же пул аккаунтов, квота тарифа и выбор моделей. Учётные данные двух регионов независимы, поэтому в одном пуле могут быть аккаунты обоих.",
|
|
@@ -26966,7 +27979,7 @@ window.__ModuleLoader__.load({
|
|
|
26966
27979
|
* account-pool labels come from `./account-pool.ts`, with the same overrides the
|
|
26967
27980
|
* source applies on top of them.
|
|
26968
27981
|
*/
|
|
26969
|
-
const dictionary$
|
|
27982
|
+
const dictionary$18 = {
|
|
26970
27983
|
...accountPoolRu,
|
|
26971
27984
|
title: "ChatGPT",
|
|
26972
27985
|
hubTitle: "Подписки",
|
|
@@ -27224,6 +28237,7 @@ window.__ModuleLoader__.load({
|
|
|
27224
28237
|
"cardName.relayone": "RelayOne",
|
|
27225
28238
|
"cardName.claude-api": "Claude API",
|
|
27226
28239
|
"cardName.aws-quick": "AWS Quick",
|
|
28240
|
+
"cardName.opencode-go": "OpenCode Go (подписка)",
|
|
27227
28241
|
modelChecklistCount: "Включено {count}/{total}",
|
|
27228
28242
|
codeRunTitle: "Код",
|
|
27229
28243
|
codeRunOutput: "Вывод",
|
|
@@ -27239,7 +28253,7 @@ window.__ModuleLoader__.load({
|
|
|
27239
28253
|
};
|
|
27240
28254
|
//#endregion
|
|
27241
28255
|
//#region src/client/locales-ru/kimi-code.ts
|
|
27242
|
-
const dictionary$
|
|
28256
|
+
const dictionary$17 = {
|
|
27243
28257
|
...accountPoolRu,
|
|
27244
28258
|
title: "Kimi Code",
|
|
27245
28259
|
pageDesc: "Вход в подписку Kimi Code: модели, уровень рассуждений, контекстные окна и квота.",
|
|
@@ -27437,7 +28451,7 @@ window.__ModuleLoader__.load({
|
|
|
27437
28451
|
};
|
|
27438
28452
|
//#endregion
|
|
27439
28453
|
//#region src/client/locales-ru/minimax-code.ts
|
|
27440
|
-
const dictionary$
|
|
28454
|
+
const dictionary$16 = {
|
|
27441
28455
|
...accountPoolRu,
|
|
27442
28456
|
title: "MiniMax Code",
|
|
27443
28457
|
pageDesc: "Вход в подписку MiniMax Code для программирования (OAuth по коду устройства) с переиспользованием локального входа MiniMax Code: управление аккаунтом, подключением и моделями.",
|
|
@@ -27637,7 +28651,7 @@ window.__ModuleLoader__.load({
|
|
|
27637
28651
|
};
|
|
27638
28652
|
//#endregion
|
|
27639
28653
|
//#region src/client/locales-ru/ollama.ts
|
|
27640
|
-
const dictionary$
|
|
28654
|
+
const dictionary$15 = {
|
|
27641
28655
|
...accountPoolRu,
|
|
27642
28656
|
relogin: "Заменить ключ",
|
|
27643
28657
|
needsRelogin: "Ключ отклонён",
|
|
@@ -27691,7 +28705,7 @@ window.__ModuleLoader__.load({
|
|
|
27691
28705
|
};
|
|
27692
28706
|
//#endregion
|
|
27693
28707
|
//#region src/client/locales-ru/antigravity-acp.ts
|
|
27694
|
-
const dictionary$
|
|
28708
|
+
const dictionary$14 = {
|
|
27695
28709
|
title: "Antigravity (ACP)",
|
|
27696
28710
|
pageDesc: "Подключение через официальный Antigravity CLI от Google по Agent Client Protocol (ACP): модель, инструменты и сессии приходят от официального процесса, и он же хранит состояние входа.",
|
|
27697
28711
|
routeOwned: "Маршрут моделей обслуживает этот плагин",
|
|
@@ -27785,7 +28799,7 @@ window.__ModuleLoader__.load({
|
|
|
27785
28799
|
};
|
|
27786
28800
|
//#endregion
|
|
27787
28801
|
//#region src/client/locales-ru/opendesign.ts
|
|
27788
|
-
const dictionary$
|
|
28802
|
+
const dictionary$13 = {
|
|
27789
28803
|
...accountPoolRu,
|
|
27790
28804
|
relogin: "Добавить заново",
|
|
27791
28805
|
needsRelogin: "API-ключ недействителен",
|
|
@@ -27895,7 +28909,7 @@ window.__ModuleLoader__.load({
|
|
|
27895
28909
|
};
|
|
27896
28910
|
//#endregion
|
|
27897
28911
|
//#region src/client/locales-ru/dispatch-ledger.ts
|
|
27898
|
-
const dictionary$
|
|
28912
|
+
const dictionary$12 = {
|
|
27899
28913
|
mandateTitle: "Запуск субагента",
|
|
27900
28914
|
mandateTitleFork: "Запуск субагента (с контекстом)",
|
|
27901
28915
|
mandatePreparing: "Сборка задания",
|
|
@@ -27920,7 +28934,7 @@ window.__ModuleLoader__.load({
|
|
|
27920
28934
|
};
|
|
27921
28935
|
//#endregion
|
|
27922
28936
|
//#region src/client/locales-ru/progress-updates.ts
|
|
27923
|
-
const dictionary$
|
|
28937
|
+
const dictionary$11 = {
|
|
27924
28938
|
navTitle: "Ход работы",
|
|
27925
28939
|
progressTitle: "Ход работы",
|
|
27926
28940
|
progressGuideNote: "Каждый шаг, о котором сообщает агент, собирается здесь",
|
|
@@ -27958,7 +28972,7 @@ window.__ModuleLoader__.load({
|
|
|
27958
28972
|
settingsToolRunawayGuardName: "Защита от циклов инструментов",
|
|
27959
28973
|
settingsToolRunawayGuardNote: "Напоминать агенту о повторяющихся вызовах; Kimi сохраняет передачу управления на 12-м вызове, другие линии получают только напоминания",
|
|
27960
28974
|
settingsMediaToolsName: "Медиаинструменты",
|
|
27961
|
-
settingsMediaToolsNote: "Единая регистрация генерации изображений Codex, прикрепления видео Kimi и
|
|
28975
|
+
settingsMediaToolsNote: "Единая регистрация генерации изображений Codex, прикрепления видео Kimi и инструментов изображений, аудио и видео MiniMax; применяется после перезагрузки плагина или DSH. В существующих сессиях Kimi после изменения набора инструментов префиксный кеш один раз пересобирается",
|
|
27962
28976
|
settingsTeamPolicyCacheGuardName: "Раздел политики Agent Teams",
|
|
27963
28977
|
settingsTeamPolicyCacheGuardNote: "Убрать встроенный раздел политики Agent Teams из системного промпта и передавать его одним сообщением в хвосте при включении командной работы, чтобы переключение посреди сессии больше не пересобирало весь префиксный кеш (включено по умолчанию)",
|
|
27964
28978
|
settingsThresholdName: "Порог напоминания",
|
|
@@ -27976,7 +28990,7 @@ window.__ModuleLoader__.load({
|
|
|
27976
28990
|
};
|
|
27977
28991
|
//#endregion
|
|
27978
28992
|
//#region src/client/locales-ru/qoder.ts
|
|
27979
|
-
const dictionary$
|
|
28993
|
+
const dictionary$10 = {
|
|
27980
28994
|
modelRowEfforts: "уровни {list}",
|
|
27981
28995
|
modelRowNoEfforts: "без уровней",
|
|
27982
28996
|
modelRowOutput: "вывод {cap}",
|
|
@@ -28098,7 +29112,7 @@ window.__ModuleLoader__.load({
|
|
|
28098
29112
|
};
|
|
28099
29113
|
//#endregion
|
|
28100
29114
|
//#region src/client/locales-ru/step-code.ts
|
|
28101
|
-
const dictionary$
|
|
29115
|
+
const dictionary$9 = {
|
|
28102
29116
|
...accountPoolRu,
|
|
28103
29117
|
title: "Step Code (подписка Step Plan)",
|
|
28104
29118
|
pageDesc: "Подключение к StepFun по подписке Step Plan (Китай api.stepfun.com / международный api.stepfun.ai) или по API-ключу открытой платформы: пул аккаунтов, квота тарифа, расход кеша и выбор моделей. Регион — свойство учётных данных, и два региона несовместимы, поэтому в пуле могут быть аккаунты из обоих.",
|
|
@@ -28275,7 +29289,7 @@ window.__ModuleLoader__.load({
|
|
|
28275
29289
|
* dropped '{placeholder}' would turn a sentence into a bald claim. 'test/
|
|
28276
29290
|
* russian-locale.test.tsx' pins both rules.
|
|
28277
29291
|
*/
|
|
28278
|
-
const dictionary$
|
|
29292
|
+
const dictionary$8 = {
|
|
28279
29293
|
title: "WorkBuddy",
|
|
28280
29294
|
pageDesc: "Повторно использует локальный вход CodeBuddy, чтобы управлять моделями WorkBuddy (подписка CodeBuddy), контекстными окнами и квотой.",
|
|
28281
29295
|
account: "Аккаунт",
|
|
@@ -28403,7 +29417,7 @@ window.__ModuleLoader__.load({
|
|
|
28403
29417
|
};
|
|
28404
29418
|
//#endregion
|
|
28405
29419
|
//#region src/client/locales-ru/qianwen-token-plan.ts
|
|
28406
|
-
const dictionary$
|
|
29420
|
+
const dictionary$7 = {
|
|
28407
29421
|
title: "Qwen Token Plan",
|
|
28408
29422
|
pageDesc: "Подключение Qwen4 по выделенному API-ключу Qianwen Token Plan: явный кеш, воспроизведение размышлений, уровни reasoning, модели и визуальный бюджет.",
|
|
28409
29423
|
loading: "Загрузка…",
|
|
@@ -28478,7 +29492,7 @@ window.__ModuleLoader__.load({
|
|
|
28478
29492
|
};
|
|
28479
29493
|
//#endregion
|
|
28480
29494
|
//#region src/client/locales-ru/relayone.ts
|
|
28481
|
-
const dictionary$
|
|
29495
|
+
const dictionary$6 = {
|
|
28482
29496
|
title: "RelayOne",
|
|
28483
29497
|
pageDesc: "Один API-ключ для диалоговых и медиамоделей, доступных в его текущей группе.",
|
|
28484
29498
|
enabled: "Включить RelayOne",
|
|
@@ -28587,7 +29601,7 @@ window.__ModuleLoader__.load({
|
|
|
28587
29601
|
};
|
|
28588
29602
|
//#endregion
|
|
28589
29603
|
//#region src/client/locales-ru/claude-api.ts
|
|
28590
|
-
const dictionary$
|
|
29604
|
+
const dictionary$5 = {
|
|
28591
29605
|
title: "Claude API",
|
|
28592
29606
|
pageDesc: "Один API-ключ для эндпоинта Anthropic Messages или совместимого шлюза; запросы отправляются в формате официального клиента Claude Code.",
|
|
28593
29607
|
loading: "Чтение состояния линии…",
|
|
@@ -28666,7 +29680,7 @@ window.__ModuleLoader__.load({
|
|
|
28666
29680
|
};
|
|
28667
29681
|
//#endregion
|
|
28668
29682
|
//#region src/client/locales-ru/aws-quick.ts
|
|
28669
|
-
const dictionary$
|
|
29683
|
+
const dictionary$4 = {
|
|
28670
29684
|
title: "AWS Quick",
|
|
28671
29685
|
pageDesc: "Используйте подписку AWS Quick через официальный локальный agent Quick Desktop: потоковый текст, reasoning и три режима ответа.",
|
|
28672
29686
|
refresh: "Обновить",
|
|
@@ -28723,7 +29737,7 @@ window.__ModuleLoader__.load({
|
|
|
28723
29737
|
};
|
|
28724
29738
|
//#endregion
|
|
28725
29739
|
//#region src/client/locales-ru/compact-after-turn.ts
|
|
28726
|
-
const dictionary$
|
|
29740
|
+
const dictionary$3 = {
|
|
28727
29741
|
label: "Сжать после этого хода",
|
|
28728
29742
|
infoLabel: "О сжатии после этого хода",
|
|
28729
29743
|
hint: "Когда включено, контекст сжимается один раз сразу после окончания этого хода, затем переключатель выключается сам. Ход, остановленный вручную, не считается: переключатель остаётся включённым до конца следующего хода.",
|
|
@@ -28738,7 +29752,7 @@ window.__ModuleLoader__.load({
|
|
|
28738
29752
|
};
|
|
28739
29753
|
//#endregion
|
|
28740
29754
|
//#region src/client/locales-ru/session-quota.ts
|
|
28741
|
-
const dictionary = {
|
|
29755
|
+
const dictionary$2 = {
|
|
28742
29756
|
sectionTitle: "Лимиты плана",
|
|
28743
29757
|
refresh: "Обновить",
|
|
28744
29758
|
refreshing: "Обновление…",
|
|
@@ -28770,6 +29784,91 @@ window.__ModuleLoader__.load({
|
|
|
28770
29784
|
creditBucket: "Пул кредитов #{index}",
|
|
28771
29785
|
resetCredits: "Купоны сброса"
|
|
28772
29786
|
};
|
|
29787
|
+
//#endregion
|
|
29788
|
+
//#region src/client/locales-ru/model-checklist.ts
|
|
29789
|
+
const dictionary$1 = {
|
|
29790
|
+
allGroups: "Все",
|
|
29791
|
+
enabledGroup: "Включённые",
|
|
29792
|
+
otherGroup: "Другие",
|
|
29793
|
+
searchPlaceholder: "Поиск моделей или провайдеров…",
|
|
29794
|
+
noMatches: "Подходящих моделей не найдено",
|
|
29795
|
+
groupsNav: "Провайдеры моделей"
|
|
29796
|
+
};
|
|
29797
|
+
//#endregion
|
|
29798
|
+
//#region src/client/locales-ru/opencode-go.ts
|
|
29799
|
+
const dictionary = {
|
|
29800
|
+
...accountPoolRu,
|
|
29801
|
+
title: "OpenCode Go",
|
|
29802
|
+
pageDesc: "Используйте подписку OpenCode Go: аккаунты, модели, уровень рассуждений и квота.",
|
|
29803
|
+
loading: "Загрузка...",
|
|
29804
|
+
connection: "Подключение",
|
|
29805
|
+
testConnection: "Проверить подключение",
|
|
29806
|
+
testingConnection: "Проверка...",
|
|
29807
|
+
testSuccess: "Подключение работает",
|
|
29808
|
+
testFailed: "Ошибка подключения",
|
|
29809
|
+
routeOwned: "Маршрут моделей обслуживается этим плагином",
|
|
29810
|
+
routeConflict: "Другой провайдер уже занял маршрут: {detail}. Удалите дубликат и повторите.",
|
|
29811
|
+
modelsSection: "Модели",
|
|
29812
|
+
otherGroup: "Другие",
|
|
29813
|
+
modelsHint: "В списке моделей диалога появляются только отмеченные модели. Возможности берутся из каталога аккаунта.",
|
|
29814
|
+
refreshCatalog: "Обновить каталог",
|
|
29815
|
+
refreshingCatalog: "Обновление...",
|
|
29816
|
+
selectAll: "Выбрать все",
|
|
29817
|
+
unselectAll: "Снять все",
|
|
29818
|
+
enhanced: "Рассуждения и контекст",
|
|
29819
|
+
defaultReasoningEffort: "Уровень рассуждений по умолчанию",
|
|
29820
|
+
defaultReasoningEffortHint: "Предлагаются только уровни выбранных моделей. По умолчанию используется значение модели.",
|
|
29821
|
+
defaultEffortAuto: "Значение модели по умолчанию",
|
|
29822
|
+
effortNone: "Отключить рассуждения",
|
|
29823
|
+
effortMinimal: "Минимальный",
|
|
29824
|
+
effortLow: "Низкий",
|
|
29825
|
+
effortMedium: "Средний",
|
|
29826
|
+
effortHigh: "Высокий",
|
|
29827
|
+
effortXhigh: "Очень высокий",
|
|
29828
|
+
effortMax: "Максимальный",
|
|
29829
|
+
contextWindowSection: "Контекстные окна моделей",
|
|
29830
|
+
contextWindowHint: "По умолчанию используется длина из каталога; для каждой модели её можно изменить.",
|
|
29831
|
+
contextWindowReset: "Сбросить",
|
|
29832
|
+
contextWindowResetAll: "Сбросить все",
|
|
29833
|
+
contextWindowResetAllConfirm: "Вернуть всем моделям контекстное окно из каталога?",
|
|
29834
|
+
contextWindowNoneEnabled: "Модели ещё не выбраны.",
|
|
29835
|
+
save: "Сохранить",
|
|
29836
|
+
saving: "Сохранение...",
|
|
29837
|
+
tokens: "токены",
|
|
29838
|
+
refreshQuota: "Обновить квоту",
|
|
29839
|
+
refreshingQuota: "Обновление...",
|
|
29840
|
+
quotaEmpty: "Квота ещё не прочитана. Нажмите «Обновить квоту».",
|
|
29841
|
+
planUnknown: "OpenCode Go",
|
|
29842
|
+
kqTotal: "Общая месячная квота",
|
|
29843
|
+
kqUsedSuffix: "использовано",
|
|
29844
|
+
kqTip: "Израсходовано {pct} месячной квоты",
|
|
29845
|
+
kqUsed: "Использовано {pct}",
|
|
29846
|
+
kqRest: "Осталось {pct}",
|
|
29847
|
+
kqResetAfter: "Сброс: {time}",
|
|
29848
|
+
kqWindow5h: "Окно 5 часов",
|
|
29849
|
+
kqWindowWeekly: "Недельное окно",
|
|
29850
|
+
kqRollingNote: "Короткое окно запросов",
|
|
29851
|
+
kqWeeklyNote: "Расходует общую месячную квоту",
|
|
29852
|
+
kqNoReset: "Время сброса не указано",
|
|
29853
|
+
kqNoLastUsed: "Запросов ещё не было",
|
|
29854
|
+
kqLastUsed: "Последний вызов: {time}",
|
|
29855
|
+
kqUpdated: "Обновлено {time}",
|
|
29856
|
+
kqJustNow: "только что",
|
|
29857
|
+
kqMinutesAgo: "{n} мин назад",
|
|
29858
|
+
kqHoursAgo: "{n} ч назад",
|
|
29859
|
+
kqDaysAgo: "{n} дн назад",
|
|
29860
|
+
apiKeyLogin: "Войти с API Key",
|
|
29861
|
+
apiKeyHint: "Вставьте личный API Key из OpenCode Console. Ключ остаётся на этом устройстве и проверяется перед добавлением.",
|
|
29862
|
+
apiKeyReplaceHint: "Вставьте новый API Key для {alias}. Имя и позиция в ротации сохранятся.",
|
|
29863
|
+
apiKeyPlaceholder: "oc_sk_…",
|
|
29864
|
+
apiKeySubmit: "Проверить и добавить",
|
|
29865
|
+
apiKeyReplace: "Заменить Key",
|
|
29866
|
+
apiKeySubmitting: "Проверка...",
|
|
29867
|
+
apiKeyEmpty: "Сначала вставьте API Key.",
|
|
29868
|
+
authMethod: "Аутентификация",
|
|
29869
|
+
authMethodApiKey: "Личный API Key",
|
|
29870
|
+
composerLabel: "Остаток квоты OpenCode Go"
|
|
29871
|
+
};
|
|
28773
29872
|
/**
|
|
28774
29873
|
* Register the Russian language and every dictionary it covers.
|
|
28775
29874
|
*
|
|
@@ -28792,27 +29891,29 @@ window.__ModuleLoader__.load({
|
|
|
28792
29891
|
}
|
|
28793
29892
|
}, "dsh-chatgpt-subscription: ru language");
|
|
28794
29893
|
const dictionaries = [
|
|
28795
|
-
[NS, dictionary$
|
|
28796
|
-
[NS_CLAUDE, dictionary$
|
|
28797
|
-
[NS_COMMAND_CODE, dictionary$
|
|
28798
|
-
[NS_KIMI_CODE, dictionary$
|
|
28799
|
-
[NS_MINIMAX_CODE, dictionary$
|
|
28800
|
-
[NS_GLM_CODING_PLAN, dictionary$
|
|
28801
|
-
[NS_OLLAMA, dictionary$
|
|
28802
|
-
[NS_STEP_CODE, dictionary$
|
|
28803
|
-
[NS_CLINE_PASS, dictionary$
|
|
28804
|
-
[NS_QODER, dictionary$
|
|
28805
|
-
[NS_OPENDESIGN, dictionary$
|
|
28806
|
-
[NS_PROGRESS_UPDATES, dictionary$
|
|
28807
|
-
[NS_WORKBUDDY, dictionary$
|
|
28808
|
-
[NS_DISPATCH_LEDGER, dictionary$
|
|
28809
|
-
[NS_ANTIGRAVITY_ACP, dictionary$
|
|
28810
|
-
[NS_QIANWEN, dictionary$
|
|
28811
|
-
[NS_RELAYONE, dictionary$
|
|
28812
|
-
[NS_CLAUDE_API, dictionary$
|
|
28813
|
-
[NS_AWS_QUICK, dictionary$
|
|
28814
|
-
[NS_COMPACT_AFTER_TURN, dictionary$
|
|
28815
|
-
[NS_SESSION_QUOTA, dictionary]
|
|
29894
|
+
[NS, dictionary$18],
|
|
29895
|
+
[NS_CLAUDE, dictionary$22],
|
|
29896
|
+
[NS_COMMAND_CODE, dictionary$20],
|
|
29897
|
+
[NS_KIMI_CODE, dictionary$17],
|
|
29898
|
+
[NS_MINIMAX_CODE, dictionary$16],
|
|
29899
|
+
[NS_GLM_CODING_PLAN, dictionary$19],
|
|
29900
|
+
[NS_OLLAMA, dictionary$15],
|
|
29901
|
+
[NS_STEP_CODE, dictionary$9],
|
|
29902
|
+
[NS_CLINE_PASS, dictionary$21],
|
|
29903
|
+
[NS_QODER, dictionary$10],
|
|
29904
|
+
[NS_OPENDESIGN, dictionary$13],
|
|
29905
|
+
[NS_PROGRESS_UPDATES, dictionary$11],
|
|
29906
|
+
[NS_WORKBUDDY, dictionary$8],
|
|
29907
|
+
[NS_DISPATCH_LEDGER, dictionary$12],
|
|
29908
|
+
[NS_ANTIGRAVITY_ACP, dictionary$14],
|
|
29909
|
+
[NS_QIANWEN, dictionary$7],
|
|
29910
|
+
[NS_RELAYONE, dictionary$6],
|
|
29911
|
+
[NS_CLAUDE_API, dictionary$5],
|
|
29912
|
+
[NS_AWS_QUICK, dictionary$4],
|
|
29913
|
+
[NS_COMPACT_AFTER_TURN, dictionary$3],
|
|
29914
|
+
[NS_SESSION_QUOTA, dictionary$2],
|
|
29915
|
+
[NS_MODEL_CHECKLIST, dictionary$1],
|
|
29916
|
+
[NS_OPENCODE_GO, dictionary]
|
|
28816
29917
|
];
|
|
28817
29918
|
for (const [ns, dictionary] of dictionaries) ctx.effect(() => {
|
|
28818
29919
|
try {
|
|
@@ -29039,7 +30140,7 @@ window.__ModuleLoader__.load({
|
|
|
29039
30140
|
.dsh-hub-sel-bar{align-items:center;background:var(--dsw-alias-bg-layer-1,#fff);border:1px solid var(--dsw-alias-border-l2,#e3e1d5);border-radius:10px;display:flex;flex-wrap:wrap;gap:6px;padding:7px 10px}
|
|
29040
30141
|
.dsh-hub-sel-count{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:12.5px;font-weight:550;margin-right:auto}
|
|
29041
30142
|
.dsh-hub-list{background:var(--dsw-alias-bg-layer-1,#fff);border:1px solid var(--dsw-alias-border-l2,#e3e1d5);border-radius:12px;overflow:hidden}
|
|
29042
|
-
.dsh-hub-row{align-items:center;background:transparent;border:none;color:var(--dsw-alias-label-primary,#141413);cursor:pointer;display:flex;gap:
|
|
30143
|
+
.dsh-hub-row{align-items:center;background:transparent;border:none;color:var(--dsw-alias-label-primary,#141413);cursor:pointer;display:flex;gap:10px;min-height:58px;padding:10px 14px;position:relative;text-align:left;transition:background .14s ease;width:100%}
|
|
29043
30144
|
.dsh-hub-row+.dsh-hub-row{border-top:0.5px solid var(--dsw-alias-border-l2,#eceadf)}
|
|
29044
30145
|
.dsh-hub-row:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(0,0,0,.035))}
|
|
29045
30146
|
.dsh-hub-row:focus-visible{outline:2px solid var(--dsw-alias-button-info-fill,#397ee8);outline-offset:-2px}
|
|
@@ -29055,20 +30156,23 @@ window.__ModuleLoader__.load({
|
|
|
29055
30156
|
.dsh-hub-card-name{font-size:13.5px;font-weight:600;line-height:1.35;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
29056
30157
|
.dsh-hub-badge{background:var(--dsw-alias-bg-layer-2,#f2f1ea);border-radius:4px;color:var(--dsw-alias-label-secondary,#5d5c52);flex:none;font-size:10.5px;font-weight:500;line-height:1.5;padding:0 5px;white-space:nowrap}
|
|
29057
30158
|
.dsh-hub-badge.is-off{color:var(--dsw-alias-label-tertiary,#8f8d84)}
|
|
29058
|
-
.dsh-hub-badge.is-proxy{border:0.5px solid var(--dsw-alias-border-l2,#e3e1d5);color:var(--dsw-alias-label-tertiary,#8f8d84)}
|
|
29059
30159
|
.dsh-hub-card-note{color:var(--dsw-alias-label-tertiary,#8f8d84);font-size:12px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
29060
30160
|
.dsh-hub-card-note.dsh-hub-note-danger{color:var(--dsw-alias-label-danger,#d94b4b)}
|
|
29061
30161
|
.dsh-hub-hits{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:11.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
29062
|
-
.dsh-hub-status{align-items:center;border-radius:6px;color:var(--dsw-alias-label-secondary,#5d5c52);display:inline-flex;flex:none;font-size:12px;gap:6px;height:22px;max-width:168px;min-width:0;padding:0
|
|
30162
|
+
.dsh-hub-status{align-items:center;border-radius:6px;color:var(--dsw-alias-label-secondary,#5d5c52);display:inline-flex;flex:none;font-size:12px;gap:6px;height:22px;max-width:168px;min-width:0;padding:0}
|
|
29063
30163
|
.dsh-hub-status::before{background:#2ea043;border-radius:50%;content:"";flex:none;height:6px;width:6px}
|
|
29064
30164
|
.dsh-hub-status>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
29065
30165
|
.dsh-hub-status.is-idle{color:var(--dsw-alias-label-caption,#a6a094)}
|
|
29066
30166
|
.dsh-hub-status.is-idle::before{background:var(--dsw-alias-label-caption,#a6a094)}
|
|
29067
|
-
.dsh-hub-status.is-warn{background:color-mix(in srgb,#d97706 12%,transparent);color:#d97706}
|
|
30167
|
+
.dsh-hub-status.is-warn{background:color-mix(in srgb,#d97706 12%,transparent);color:#d97706;padding:0 6px}
|
|
29068
30168
|
.dsh-hub-status.is-warn::before{background:#d97706}
|
|
29069
|
-
.dsh-hub-status.is-error{background:color-mix(in srgb,var(--dsw-alias-label-danger,#d94b4b) 12%,transparent);color:var(--dsw-alias-label-danger,#d94b4b)}
|
|
30169
|
+
.dsh-hub-status.is-error{background:color-mix(in srgb,var(--dsw-alias-label-danger,#d94b4b) 12%,transparent);color:var(--dsw-alias-label-danger,#d94b4b);padding:0 6px}
|
|
29070
30170
|
.dsh-hub-status.is-error::before{background:var(--dsw-alias-label-danger,#d94b4b)}
|
|
29071
30171
|
.dsh-hub-tail{align-items:center;display:flex;flex:none;gap:10px}
|
|
30172
|
+
.dsh-hub-proxy-select{background:var(--dsw-alias-bg-layer-1,#fff);border:0.5px solid var(--dsw-alias-border-l2,#e3e1d5);border-radius:7px;color:var(--dsw-alias-label-secondary,#5d5c52);cursor:pointer;flex:none;font:inherit;font-size:12px;height:28px;max-width:112px;min-width:0;padding:0 8px;width:112px}
|
|
30173
|
+
.dsh-hub-proxy-select:hover:not(:disabled){border-color:var(--dsw-alias-label-caption,#a6a094);color:var(--dsw-alias-label-primary,#141413)}
|
|
30174
|
+
.dsh-hub-proxy-select:focus-visible{outline:2px solid var(--dsw-alias-button-info-fill,#397ee8);outline-offset:2px}
|
|
30175
|
+
.dsh-hub-proxy-select:disabled{cursor:default;opacity:.55}
|
|
29072
30176
|
.dsh-hub-chevron{color:var(--dsw-alias-label-caption,#a6a094);display:inline-flex;flex:none}
|
|
29073
30177
|
.dsh-hub-brand-tile{align-items:center;background:var(--dsh-hub-brand,#fff);border-radius:26%;box-shadow:inset 0 0 0 0.5px rgba(0,0,0,.1);display:inline-flex;flex:none;justify-content:center;overflow:hidden}
|
|
29074
30178
|
.dsh-hub-brand-tile>svg{display:block}
|
|
@@ -29116,7 +30220,7 @@ window.__ModuleLoader__.load({
|
|
|
29116
30220
|
.dsh-hub-skeleton span{background:var(--dsw-alias-bg-layer-2,#f2f1ea);border-radius:5px;display:block;height:11px}
|
|
29117
30221
|
.dsh-hub-skeleton .dsh-hub-skel-name{margin-bottom:6px;width:120px}
|
|
29118
30222
|
.dsh-hub-skeleton .dsh-hub-skel-note{height:9px;width:170px}
|
|
29119
|
-
@media(max-width:640px){.dsh-hub-row{gap:
|
|
30223
|
+
@media(max-width:640px){.dsh-hub-row{gap:7px;padding:10px}.dsh-hub-tail{gap:7px}.dsh-hub-status{display:none}.dsh-hub-proxy-select{font-size:11.5px;max-width:96px;padding:0 7px;width:96px}.dsh-hub-search{flex:1;max-width:none;width:auto}.dsh-hub-chevron{display:none}}
|
|
29120
30224
|
.dsh-hub-head{align-items:center;display:flex;flex-wrap:wrap;gap:8px;min-width:0}
|
|
29121
30225
|
.dsh-hub-head .dsh-hub-head-title{flex:0 1 auto;margin:0 auto 0 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
29122
30226
|
.dsh-hub-update{align-items:flex-end;display:flex;flex:0 1 auto;flex-direction:column;gap:4px;min-width:0}
|
|
@@ -29260,7 +30364,7 @@ window.__ModuleLoader__.load({
|
|
|
29260
30364
|
}
|
|
29261
30365
|
//#endregion
|
|
29262
30366
|
//#region src/client/providers/claude/ClaudeComposerQuota.tsx
|
|
29263
|
-
const api$
|
|
30367
|
+
const api$5 = createLineApi("/claude/api", "Claude");
|
|
29264
30368
|
/**
|
|
29265
30369
|
* Pick the most meaningful number for the badge.
|
|
29266
30370
|
*
|
|
@@ -29309,14 +30413,14 @@ window.__ModuleLoader__.load({
|
|
|
29309
30413
|
directory,
|
|
29310
30414
|
loadModelDirectory,
|
|
29311
30415
|
providerId: "claude-subscription",
|
|
29312
|
-
readStatus: (refresh) => refresh ? api$
|
|
30416
|
+
readStatus: (refresh) => refresh ? api$5.post("/quota") : api$5.get("/status"),
|
|
29313
30417
|
selectFacts: selectBadgeFacts$7,
|
|
29314
30418
|
label: t("composerLabel")
|
|
29315
30419
|
});
|
|
29316
30420
|
}
|
|
29317
30421
|
//#endregion
|
|
29318
30422
|
//#region src/client/providers/claude/styles.ts
|
|
29319
|
-
const STYLE_ID$
|
|
30423
|
+
const STYLE_ID$12 = "dsh-claude-settings-style";
|
|
29320
30424
|
/**
|
|
29321
30425
|
* Claude-only additions to the shared settings design system.
|
|
29322
30426
|
*
|
|
@@ -29340,11 +30444,11 @@ window.__ModuleLoader__.load({
|
|
|
29340
30444
|
.dshcl-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;overflow-wrap:anywhere}
|
|
29341
30445
|
.dshcl-model-meta{color:var(--dsw-alias-label-tertiary);font-size:11px;margin-left:5px}
|
|
29342
30446
|
.dshcl-empty-inline{color:var(--dsw-alias-label-tertiary);font-size:12px}
|
|
29343
|
-
`, STYLE_ID$
|
|
30447
|
+
`, STYLE_ID$12);
|
|
29344
30448
|
}
|
|
29345
30449
|
//#endregion
|
|
29346
30450
|
//#region src/client/providers/command-code/CommandCodeComposerQuota.tsx
|
|
29347
|
-
const api$
|
|
30451
|
+
const api$4 = createLineApi("/command-code/api", "Command Code");
|
|
29348
30452
|
/**
|
|
29349
30453
|
* Pick the most meaningful number for the badge.
|
|
29350
30454
|
*
|
|
@@ -29398,14 +30502,14 @@ window.__ModuleLoader__.load({
|
|
|
29398
30502
|
directory,
|
|
29399
30503
|
loadModelDirectory,
|
|
29400
30504
|
providerId: "command-code",
|
|
29401
|
-
readStatus: (refresh) => refresh ? api$
|
|
30505
|
+
readStatus: (refresh) => refresh ? api$4.post("/quota") : api$4.get("/status"),
|
|
29402
30506
|
selectFacts: selectBadgeFacts$6,
|
|
29403
30507
|
label: t("composerLabel")
|
|
29404
30508
|
});
|
|
29405
30509
|
}
|
|
29406
30510
|
//#endregion
|
|
29407
30511
|
//#region src/client/providers/kimi-code/KimiCodeComposerQuota.tsx
|
|
29408
|
-
const api$
|
|
30512
|
+
const api$3 = createLineApi("/kimi-code/api", "Kimi Code");
|
|
29409
30513
|
/**
|
|
29410
30514
|
* Pick the most meaningful number for the badge.
|
|
29411
30515
|
*
|
|
@@ -29450,14 +30554,14 @@ window.__ModuleLoader__.load({
|
|
|
29450
30554
|
directory,
|
|
29451
30555
|
loadModelDirectory,
|
|
29452
30556
|
providerId: "kimi-code",
|
|
29453
|
-
readStatus: (refresh) => refresh ? api$
|
|
30557
|
+
readStatus: (refresh) => refresh ? api$3.post("/quota") : api$3.get("/status"),
|
|
29454
30558
|
selectFacts: selectBadgeFacts$5,
|
|
29455
30559
|
label: t("composerLabel")
|
|
29456
30560
|
});
|
|
29457
30561
|
}
|
|
29458
30562
|
//#endregion
|
|
29459
30563
|
//#region src/client/providers/kimi-code/styles.ts
|
|
29460
|
-
const STYLE_ID$
|
|
30564
|
+
const STYLE_ID$11 = "dsh-kimi-code-settings-style";
|
|
29461
30565
|
/**
|
|
29462
30566
|
* Node the base control styles come from.
|
|
29463
30567
|
*
|
|
@@ -29624,11 +30728,11 @@ window.__ModuleLoader__.load({
|
|
|
29624
30728
|
`;
|
|
29625
30729
|
/** Kimi-specific rules layered on top of the shared control styles. */
|
|
29626
30730
|
function installKimiCodeStyles() {
|
|
29627
|
-
installPluginStyle("kimi-code", BASE, STYLE_ID$
|
|
30731
|
+
installPluginStyle("kimi-code", BASE, STYLE_ID$11);
|
|
29628
30732
|
}
|
|
29629
30733
|
//#endregion
|
|
29630
30734
|
//#region src/client/providers/minimax-code/MinimaxCodeComposerQuota.tsx
|
|
29631
|
-
const api$
|
|
30735
|
+
const api$2 = createLineApi("/minimax-code/api", "MiniMax Code");
|
|
29632
30736
|
/**
|
|
29633
30737
|
* Pick the badge facts for one status answer, or nothing at all.
|
|
29634
30738
|
*
|
|
@@ -29660,7 +30764,7 @@ window.__ModuleLoader__.load({
|
|
|
29660
30764
|
directory,
|
|
29661
30765
|
loadModelDirectory,
|
|
29662
30766
|
providerId: "minimax-code",
|
|
29663
|
-
readStatus: () => api$
|
|
30767
|
+
readStatus: () => api$2.get("/quota"),
|
|
29664
30768
|
selectFacts: selectBadgeFacts$4,
|
|
29665
30769
|
label: t("composerLabel")
|
|
29666
30770
|
});
|
|
@@ -29760,7 +30864,7 @@ window.__ModuleLoader__.load({
|
|
|
29760
30864
|
//#region src/client/providers/minimax-code/MinimaxVideoDocumentBody.tsx
|
|
29761
30865
|
/** 兜底翻译:只在没有 locale 座位时用到。 */
|
|
29762
30866
|
function translate$1(key) {
|
|
29763
|
-
return zh$
|
|
30867
|
+
return zh$19[key] ?? key;
|
|
29764
30868
|
}
|
|
29765
30869
|
/**
|
|
29766
30870
|
* 一个文件地址里的会话与路径。
|
|
@@ -29896,7 +31000,7 @@ window.__ModuleLoader__.load({
|
|
|
29896
31000
|
*/
|
|
29897
31001
|
/** 兜底翻译:只在没有 locale 座位时用到,走同一份 zh 字典。 */
|
|
29898
31002
|
function translate(key) {
|
|
29899
|
-
return zh$
|
|
31003
|
+
return zh$19[key] ?? key;
|
|
29900
31004
|
}
|
|
29901
31005
|
/**
|
|
29902
31006
|
* 一张视频工具卡片。
|
|
@@ -30166,7 +31270,7 @@ window.__ModuleLoader__.load({
|
|
|
30166
31270
|
}
|
|
30167
31271
|
//#endregion
|
|
30168
31272
|
//#region src/client/providers/minimax-code/styles.ts
|
|
30169
|
-
const STYLE_ID$
|
|
31273
|
+
const STYLE_ID$10 = "dsh-minimax-code-settings-style";
|
|
30170
31274
|
/**
|
|
30171
31275
|
* MiniMax Code-only additions to the shared settings design system.
|
|
30172
31276
|
*
|
|
@@ -30335,7 +31439,7 @@ window.__ModuleLoader__.load({
|
|
|
30335
31439
|
.dshm-video-history-meta{color:var(--dsw-alias-label-tertiary);flex:none;font-size:11px;font-variant-numeric:tabular-nums}
|
|
30336
31440
|
@media(max-width:560px){.dshm-video-modal-root{padding:12px 8px}.dshm-video-modal{max-height:calc(100vh - 24px)}.dshm-video-field-row{flex-direction:column;gap:8px}.dshm-video-foot-hint{display:none}}
|
|
30337
31441
|
@media(prefers-reduced-motion:reduce){.dshm-video-skeleton span{animation:none;opacity:.6}}
|
|
30338
|
-
`, STYLE_ID$
|
|
31442
|
+
`, STYLE_ID$10);
|
|
30339
31443
|
}
|
|
30340
31444
|
//#endregion
|
|
30341
31445
|
//#region src/client/providers/glm-coding-plan/GlmCodingPlanComposerQuota.tsx
|
|
@@ -30352,7 +31456,7 @@ window.__ModuleLoader__.load({
|
|
|
30352
31456
|
* 没有快照、没有窗口、或全部窗口都没有百分比时返回 null,即**不渲染胶囊**:
|
|
30353
31457
|
* 契约允许 quota 为 null,装一个占位数字比不显示更像坏了。
|
|
30354
31458
|
*/
|
|
30355
|
-
function selectBadgeFacts$3(status, lookup = (key) => zh$
|
|
31459
|
+
function selectBadgeFacts$3(status, lookup = (key) => zh$18[key]) {
|
|
30356
31460
|
const measured = (status?.quota?.windows ?? []).filter((window) => typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent));
|
|
30357
31461
|
if (measured.length === 0) return null;
|
|
30358
31462
|
const tightest = measured.reduce((best, window) => {
|
|
@@ -30390,7 +31494,7 @@ window.__ModuleLoader__.load({
|
|
|
30390
31494
|
}
|
|
30391
31495
|
//#endregion
|
|
30392
31496
|
//#region src/client/providers/glm-coding-plan/styles.ts
|
|
30393
|
-
const STYLE_ID$
|
|
31497
|
+
const STYLE_ID$9 = "dsh-glm-coding-plan-settings-style";
|
|
30394
31498
|
/**
|
|
30395
31499
|
* GLM(ZCode 账号)卡片独有的样式。
|
|
30396
31500
|
*
|
|
@@ -30430,7 +31534,7 @@ window.__ModuleLoader__.load({
|
|
|
30430
31534
|
:not(.dsha-btn-primary));通用 hover 修好后它只剩副作用:把 .dsha-btn 的次要
|
|
30431
31535
|
按钮也画成主按钮,故删除。 */
|
|
30432
31536
|
.dsha-account-add-actions{display:flex;flex-wrap:wrap;gap:8px}
|
|
30433
|
-
`, STYLE_ID$
|
|
31537
|
+
`, STYLE_ID$9);
|
|
30434
31538
|
}
|
|
30435
31539
|
//#endregion
|
|
30436
31540
|
//#region src/client/providers/antigravity-acp/route.ts
|
|
@@ -30448,7 +31552,7 @@ window.__ModuleLoader__.load({
|
|
|
30448
31552
|
* single most misleading pixel on the page.
|
|
30449
31553
|
*/
|
|
30450
31554
|
function AntigravityAcpComposerBadge(props) {
|
|
30451
|
-
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$
|
|
31555
|
+
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$15);
|
|
30452
31556
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComposerQuotaBadge, {
|
|
30453
31557
|
directory: props.directory,
|
|
30454
31558
|
loadModelDirectory: props.loadModelDirectory,
|
|
@@ -30490,7 +31594,7 @@ window.__ModuleLoader__.load({
|
|
|
30490
31594
|
}
|
|
30491
31595
|
//#endregion
|
|
30492
31596
|
//#region src/client/providers/antigravity-acp/styles.ts
|
|
30493
|
-
const STYLE_ID$
|
|
31597
|
+
const STYLE_ID$8 = "dsh-antigravity-acp-settings-style";
|
|
30494
31598
|
/**
|
|
30495
31599
|
* The Antigravity (ACP) card's own styles.
|
|
30496
31600
|
*
|
|
@@ -30516,7 +31620,7 @@ window.__ModuleLoader__.load({
|
|
|
30516
31620
|
.dshagy-details[open]>summary{color:var(--dsw-alias-label-primary)}
|
|
30517
31621
|
.dshagy-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
|
|
30518
31622
|
.dshagy-boundary{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0;padding-left:18px}
|
|
30519
|
-
`, STYLE_ID$
|
|
31623
|
+
`, STYLE_ID$8);
|
|
30520
31624
|
}
|
|
30521
31625
|
//#endregion
|
|
30522
31626
|
//#region src/client/providers/step-code/StepCodeComposerQuota.tsx
|
|
@@ -30580,7 +31684,7 @@ window.__ModuleLoader__.load({
|
|
|
30580
31684
|
}
|
|
30581
31685
|
//#endregion
|
|
30582
31686
|
//#region src/client/providers/step-code/styles.ts
|
|
30583
|
-
const STYLE_ID$
|
|
31687
|
+
const STYLE_ID$7 = "dsh-step-code-settings-style";
|
|
30584
31688
|
/**
|
|
30585
31689
|
* Step Code(Step Plan 订阅)卡片独有的样式。
|
|
30586
31690
|
*
|
|
@@ -30658,7 +31762,7 @@ window.__ModuleLoader__.load({
|
|
|
30658
31762
|
@media(max-width:560px){.dshsc-cred-grid,.dshsc-cred-grid-narrow{grid-template-columns:minmax(0,1fr)}}
|
|
30659
31763
|
|
|
30660
31764
|
.dsha-badge.dshsc-adopted{background:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 16%,var(--dsw-alias-bg-layer-1));border-color:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 45%,var(--dsw-alias-border-l2));color:var(--dsw-alias-label-primary)}
|
|
30661
|
-
`, STYLE_ID$
|
|
31765
|
+
`, STYLE_ID$7);
|
|
30662
31766
|
}
|
|
30663
31767
|
//#endregion
|
|
30664
31768
|
//#region src/client/providers/cline-pass/ClinePassComposerQuota.tsx
|
|
@@ -30807,7 +31911,7 @@ window.__ModuleLoader__.load({
|
|
|
30807
31911
|
}
|
|
30808
31912
|
//#endregion
|
|
30809
31913
|
//#region src/client/providers/qoder/styles.ts
|
|
30810
|
-
const STYLE_ID$
|
|
31914
|
+
const STYLE_ID$6 = "dsh-qoder-settings-style";
|
|
30811
31915
|
/**
|
|
30812
31916
|
* Qoder(订阅)卡片独有的样式。
|
|
30813
31917
|
*
|
|
@@ -30862,7 +31966,7 @@ window.__ModuleLoader__.load({
|
|
|
30862
31966
|
.dshq-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
|
|
30863
31967
|
|
|
30864
31968
|
.dsha-badge.dshq-adopted{background:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 16%,var(--dsw-alias-bg-layer-1));border-color:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 45%,var(--dsw-alias-border-l2));color:var(--dsw-alias-label-primary)}
|
|
30865
|
-
`, STYLE_ID$
|
|
31969
|
+
`, STYLE_ID$6);
|
|
30866
31970
|
}
|
|
30867
31971
|
//#endregion
|
|
30868
31972
|
//#region src/client/providers/opendesign/OpenDesignComposerQuota.tsx
|
|
@@ -32742,7 +33846,7 @@ window.__ModuleLoader__.load({
|
|
|
32742
33846
|
}
|
|
32743
33847
|
/** 兜底翻译:只在没有 locale 服务时用到(测试、以及菜单渲染早于字典注册)。 */
|
|
32744
33848
|
function fallbackTranslate$3(key, params) {
|
|
32745
|
-
const template = zh$
|
|
33849
|
+
const template = zh$19[key] ?? key;
|
|
32746
33850
|
if (params === void 0) return template;
|
|
32747
33851
|
return template.replace(/\{(\w+)\}/g, (_match, name) => String(params[name] ?? ""));
|
|
32748
33852
|
}
|
|
@@ -61918,7 +63022,7 @@ window.__ModuleLoader__.load({
|
|
|
61918
63022
|
}
|
|
61919
63023
|
//#endregion
|
|
61920
63024
|
//#region src/client/providers/workbuddy/WorkBuddyComposerQuota.tsx
|
|
61921
|
-
const api = createLineApi("/workbuddy/api", "WorkBuddy");
|
|
63025
|
+
const api$1 = createLineApi("/workbuddy/api", "WorkBuddy");
|
|
61922
63026
|
/**
|
|
61923
63027
|
* Pick the most meaningful number for the badge.
|
|
61924
63028
|
*
|
|
@@ -61978,14 +63082,14 @@ window.__ModuleLoader__.load({
|
|
|
61978
63082
|
directory,
|
|
61979
63083
|
loadModelDirectory,
|
|
61980
63084
|
providerId: "workbuddy-subscription",
|
|
61981
|
-
readStatus: (refresh) => refresh ? api.post("/quota") : api.get("/status"),
|
|
63085
|
+
readStatus: (refresh) => refresh ? api$1.post("/quota") : api$1.get("/status"),
|
|
61982
63086
|
selectFacts: selectBadgeFacts,
|
|
61983
63087
|
label: useLineDict(NS_WORKBUDDY, zh$8).composerLabel
|
|
61984
63088
|
});
|
|
61985
63089
|
}
|
|
61986
63090
|
//#endregion
|
|
61987
63091
|
//#region src/client/providers/workbuddy/styles.ts
|
|
61988
|
-
const STYLE_ID$
|
|
63092
|
+
const STYLE_ID$5 = "dsh-workbuddy-settings-style";
|
|
61989
63093
|
/**
|
|
61990
63094
|
* WorkBuddy-only additions to the shared settings design system.
|
|
61991
63095
|
*
|
|
@@ -62039,7 +63143,7 @@ window.__ModuleLoader__.load({
|
|
|
62039
63143
|
.dsh-wb-inputrow>input{background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-border-l2);border-radius:7px;color:var(--dsw-alias-label-primary);font:inherit;font-size:12px;padding:7px 9px;flex:1 1 260px;min-width:220px;max-width:420px;box-sizing:border-box}
|
|
62040
63144
|
.dsh-wb-inputrow>input:disabled{opacity:.5}
|
|
62041
63145
|
|
|
62042
|
-
`, STYLE_ID$
|
|
63146
|
+
`, STYLE_ID$5);
|
|
62043
63147
|
}
|
|
62044
63148
|
//#endregion
|
|
62045
63149
|
//#region src/client/providers/qianwen-token-plan/QianwenComposerQuota.tsx
|
|
@@ -62067,7 +63171,7 @@ window.__ModuleLoader__.load({
|
|
|
62067
63171
|
}
|
|
62068
63172
|
//#endregion
|
|
62069
63173
|
//#region src/client/providers/qianwen-token-plan/styles.ts
|
|
62070
|
-
const STYLE_ID$
|
|
63174
|
+
const STYLE_ID$4 = "dsh-qianwen-token-plan-settings-style";
|
|
62071
63175
|
function installQianwenStyles() {
|
|
62072
63176
|
installPluginStyle("qianwen-token-plan", `
|
|
62073
63177
|
/* 输入行与上方 .dsha-row / .dsha-pref-row 的底部分界线保持间距,避免框线重合 */
|
|
@@ -62083,7 +63187,7 @@ window.__ModuleLoader__.load({
|
|
|
62083
63187
|
.dshqw-details>summary{color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:12px;list-style:none}
|
|
62084
63188
|
.dshqw-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
|
|
62085
63189
|
.dshqw-model-meta{color:var(--dsw-alias-label-tertiary);font-size:11px;margin-left:5px}
|
|
62086
|
-
`, STYLE_ID$
|
|
63190
|
+
`, STYLE_ID$4);
|
|
62087
63191
|
}
|
|
62088
63192
|
//#endregion
|
|
62089
63193
|
//#region src/client/providers/relayone/RelayOneComposerQuota.tsx
|
|
@@ -62117,7 +63221,7 @@ window.__ModuleLoader__.load({
|
|
|
62117
63221
|
}
|
|
62118
63222
|
//#endregion
|
|
62119
63223
|
//#region src/client/providers/relayone/styles.ts
|
|
62120
|
-
const STYLE_ID$
|
|
63224
|
+
const STYLE_ID$3 = "dsh-relayone-settings-style";
|
|
62121
63225
|
function installRelayOneStyles() {
|
|
62122
63226
|
installPluginStyle("relayone", `
|
|
62123
63227
|
.dshro-page{display:flex;flex-direction:column;gap:12px}
|
|
@@ -62136,7 +63240,7 @@ window.__ModuleLoader__.load({
|
|
|
62136
63240
|
.dshro-media-row{align-items:stretch;flex-direction:column}
|
|
62137
63241
|
.dshro-media-row .dsha-select{max-width:none;min-width:0;width:100%}
|
|
62138
63242
|
}
|
|
62139
|
-
`, STYLE_ID$
|
|
63243
|
+
`, STYLE_ID$3);
|
|
62140
63244
|
}
|
|
62141
63245
|
//#endregion
|
|
62142
63246
|
//#region src/shared/compact-after-turn.ts
|
|
@@ -62349,7 +63453,7 @@ window.__ModuleLoader__.load({
|
|
|
62349
63453
|
}
|
|
62350
63454
|
//#endregion
|
|
62351
63455
|
//#region src/client/features/compact-after-turn/styles.ts
|
|
62352
|
-
const STYLE_ID$
|
|
63456
|
+
const STYLE_ID$2 = "dsh-compact-after-turn-style";
|
|
62353
63457
|
const CSS$2 = `
|
|
62354
63458
|
.dshcat-row{align-items:center;border-radius:var(--dsw-radius-md,6px);box-sizing:border-box;color:var(--dsw-alias-label-primary);display:flex;font-size:13px;gap:8px;line-height:20px;min-height:34px;padding:0 8px;position:relative;width:100%}
|
|
62355
63459
|
.dshcat-label{align-items:center;display:inline-flex;flex:1;gap:4px;min-width:0}
|
|
@@ -62373,11 +63477,11 @@ window.__ModuleLoader__.load({
|
|
|
62373
63477
|
@media (prefers-reduced-motion:reduce){.dshcat-switch,.dshcat-switch::before{transition:none}.dshcat-tip{animation:none}}
|
|
62374
63478
|
`;
|
|
62375
63479
|
function installCompactAfterTurnStyles() {
|
|
62376
|
-
return installPluginStyle("compact-after-turn", CSS$2, STYLE_ID$
|
|
63480
|
+
return installPluginStyle("compact-after-turn", CSS$2, STYLE_ID$2);
|
|
62377
63481
|
}
|
|
62378
63482
|
//#endregion
|
|
62379
63483
|
//#region src/client/providers/claude-api/styles.ts
|
|
62380
|
-
const STYLE_ID = "dsh-claude-api-settings-style";
|
|
63484
|
+
const STYLE_ID$1 = "dsh-claude-api-settings-style";
|
|
62381
63485
|
/** Only what the shared .dsha-* primitives do not cover; no shared class is declared here. */
|
|
62382
63486
|
function installClaudeApiStyles() {
|
|
62383
63487
|
installPluginStyle("claude-api", `
|
|
@@ -62398,7 +63502,7 @@ window.__ModuleLoader__.load({
|
|
|
62398
63502
|
.dshca-endpoint-control{flex-wrap:wrap;justify-content:flex-start}
|
|
62399
63503
|
.dshca-endpoint-control input{flex-basis:100%;max-width:none}
|
|
62400
63504
|
}
|
|
62401
|
-
`, STYLE_ID);
|
|
63505
|
+
`, STYLE_ID$1);
|
|
62402
63506
|
}
|
|
62403
63507
|
//#endregion
|
|
62404
63508
|
//#region src/client/providers/aws-quick/styles.ts
|
|
@@ -62408,6 +63512,62 @@ window.__ModuleLoader__.load({
|
|
|
62408
63512
|
.dshaq-details>summary{color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:12px;line-height:1.5}
|
|
62409
63513
|
.dshaq-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
|
|
62410
63514
|
`, "dsh-aws-quick-settings-style");
|
|
63515
|
+
}
|
|
63516
|
+
//#endregion
|
|
63517
|
+
//#region src/client/providers/opencode-go/OpenCodeGoComposerQuota.tsx
|
|
63518
|
+
const api = createLineApi("/opencode-go/api", "OpenCode Go");
|
|
63519
|
+
function selectOpenCodeGoBadgeFacts(status) {
|
|
63520
|
+
const quota = (status?.accounts.find((entry) => entry.id === status.activeAccountId) ?? status?.accounts.find((entry) => entry.isPrimary) ?? status?.accounts[0])?.quota;
|
|
63521
|
+
if (quota === void 0) return {
|
|
63522
|
+
text: "—",
|
|
63523
|
+
tooltip: "[OpenCode Go] quota unavailable — click to refresh",
|
|
63524
|
+
level: "normal"
|
|
63525
|
+
};
|
|
63526
|
+
const window = [...quota.windows].sort((a, b) => (a.windowDurationMins ?? Infinity) - (b.windowDurationMins ?? Infinity))[0];
|
|
63527
|
+
if (window === void 0) return {
|
|
63528
|
+
text: "—",
|
|
63529
|
+
tooltip: "[OpenCode Go] quota unavailable — click to refresh",
|
|
63530
|
+
level: "normal"
|
|
63531
|
+
};
|
|
63532
|
+
const remaining = Math.max(0, 100 - window.usedPercent);
|
|
63533
|
+
const remainingText = formatPercent$1(remaining);
|
|
63534
|
+
const windowLabel = window.label || (window.windowDurationMins === 300 ? "5-hour" : window.windowDurationMins === 10080 ? "weekly" : "monthly");
|
|
63535
|
+
return {
|
|
63536
|
+
text: remainingText + "%",
|
|
63537
|
+
tooltip: "[OpenCode Go] " + windowLabel + ": " + remainingText + "% left",
|
|
63538
|
+
level: quotaLevel(remaining)
|
|
63539
|
+
};
|
|
63540
|
+
}
|
|
63541
|
+
function OpenCodeGoComposerQuota({ directory, loadModelDirectory, t }) {
|
|
63542
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComposerQuotaBadge, {
|
|
63543
|
+
directory,
|
|
63544
|
+
loadModelDirectory,
|
|
63545
|
+
providerId: "opencode-go",
|
|
63546
|
+
readStatus: (refresh) => refresh ? api.post("/quota/refresh") : api.get("/status"),
|
|
63547
|
+
selectFacts: selectOpenCodeGoBadgeFacts,
|
|
63548
|
+
label: t("composerLabel")
|
|
63549
|
+
});
|
|
63550
|
+
}
|
|
63551
|
+
//#endregion
|
|
63552
|
+
//#region src/client/providers/opencode-go/styles.ts
|
|
63553
|
+
const STYLE_ID = "dsh-opencode-go-settings-style";
|
|
63554
|
+
/** Only OpenCode-specific rules; shared controls and the Kimi quota shell are installed from their owner. */
|
|
63555
|
+
function installOpenCodeGoStyles() {
|
|
63556
|
+
installKimiCodeStyles();
|
|
63557
|
+
installPluginStyle("opencode-go", `
|
|
63558
|
+
.dshoc-page .dsha-btn{border-radius:14px}
|
|
63559
|
+
.dshoc-quota .dsha-kq-seg--cyan{background:#06b6d4}
|
|
63560
|
+
.dshoc-quota .dsha-kq-window-meta{align-items:baseline;color:var(--kq-fg-3);display:flex;flex-wrap:wrap;font-size:11px;gap:4px 12px;justify-content:space-between;line-height:1.4;margin-top:6px}
|
|
63561
|
+
.dshoc-quota .dsha-kq-window-meta>span:last-child{font-variant-numeric:tabular-nums}
|
|
63562
|
+
.dshoc-art{color:var(--dsw-alias-label-primary);height:64px;overflow:visible;pointer-events:none;position:absolute;right:6px;top:50%;transform:translateY(-50%);width:140px}
|
|
63563
|
+
.dshoc-art text{fill:currentColor;opacity:0;transform:scale(.8) translateY(16px);transform-box:fill-box;transform-origin:bottom;transition:opacity .2s ease-in-out,transform .2s ease-in-out}
|
|
63564
|
+
.dshoc-account:hover .dshoc-art text,.dshoc-quota:focus-within .dshoc-art text{opacity:1;transform:scale(1) translateY(0);transition:opacity .6s ease-in-out,transform .6s ease-in-out;transition-delay:calc(var(--i,0) * 80ms)}
|
|
63565
|
+
.dshoc-quota-empty{margin:12px 0 0}
|
|
63566
|
+
.dshoc-apikey{display:flex;flex-direction:column;gap:8px;margin-top:12px}
|
|
63567
|
+
.dshoc-apikey-row{align-items:center;display:flex;gap:8px}
|
|
63568
|
+
.dshoc-apikey-row input.dsha-select{flex:1 1 auto;font-size:13px;max-width:none;min-width:0;padding:8px 12px;width:auto}
|
|
63569
|
+
@media(prefers-reduced-motion:reduce){.dshoc-art text{opacity:1;transform:none;transition:none}}
|
|
63570
|
+
`, STYLE_ID);
|
|
62411
63571
|
}
|
|
62412
63572
|
//#endregion
|
|
62413
63573
|
//#region src/client/features/subagent/subagent-card-controller.ts
|
|
@@ -65671,7 +66831,7 @@ window.__ModuleLoader__.load({
|
|
|
65671
66831
|
* @module @eddyskywalker/dsh-chatgpt-subscription/client/codemode/CodeRunToolView
|
|
65672
66832
|
*/
|
|
65673
66833
|
function fallbackTranslate(key) {
|
|
65674
|
-
return zh$
|
|
66834
|
+
return zh$23[key] ?? key;
|
|
65675
66835
|
}
|
|
65676
66836
|
function firstLine(text) {
|
|
65677
66837
|
const nl = text.indexOf("\n");
|
|
@@ -66467,6 +67627,7 @@ window.__ModuleLoader__.load({
|
|
|
66467
67627
|
const clinePassApi = new ClinePassApi();
|
|
66468
67628
|
const openDesignApi = new OpenDesignApi();
|
|
66469
67629
|
const antigravityApi = new AntigravityAcpApi();
|
|
67630
|
+
const openCodeGoApi = createLineApi(OPENCODE_GO_ROUTE_PREFIX, "OpenCode Go");
|
|
66470
67631
|
function compactTokens(value) {
|
|
66471
67632
|
if (!Number.isFinite(value) || value < 0) return "—";
|
|
66472
67633
|
if (value < 1e3) return String(Math.floor(value));
|
|
@@ -66988,6 +68149,40 @@ window.__ModuleLoader__.load({
|
|
|
66988
68149
|
facts
|
|
66989
68150
|
};
|
|
66990
68151
|
}
|
|
68152
|
+
function activeOpenCodeGoAccount(status) {
|
|
68153
|
+
return status.accounts.find((account) => account.id === status.activeAccountId) ?? status.accounts.find((account) => account.isPrimary) ?? status.accounts[0];
|
|
68154
|
+
}
|
|
68155
|
+
async function readOpenCodeGoQuota(refresh) {
|
|
68156
|
+
if (!refresh) {
|
|
68157
|
+
const status = await openCodeGoApi.get("/status");
|
|
68158
|
+
if (!status.authenticated || activeOpenCodeGoAccount(status)?.quota?.windows.length) return status;
|
|
68159
|
+
}
|
|
68160
|
+
return openCodeGoApi.post("/quota/refresh");
|
|
68161
|
+
}
|
|
68162
|
+
function openCodeGoToSnapshot(status, _modelId, dict, nowMs) {
|
|
68163
|
+
if (!status.authenticated) return null;
|
|
68164
|
+
const account = activeOpenCodeGoAccount(status);
|
|
68165
|
+
const windows = account?.quota?.windows;
|
|
68166
|
+
if (!windows?.length) return null;
|
|
68167
|
+
const bars = windows.map((window, index) => {
|
|
68168
|
+
const remaining = clampPercent(100 - window.usedPercent);
|
|
68169
|
+
return {
|
|
68170
|
+
key: `opencode-go-${index}`,
|
|
68171
|
+
label: formatWindowDurationLabel(window.windowDurationMins, window.label || `#${index + 1}`, dict),
|
|
68172
|
+
remainingPercent: remaining,
|
|
68173
|
+
resetText: formatResetCountdown(window.resetsAt, dict, nowMs),
|
|
68174
|
+
level: quotaLevel(remaining)
|
|
68175
|
+
};
|
|
68176
|
+
});
|
|
68177
|
+
return {
|
|
68178
|
+
providerId: OPENCODE_GO_PROVIDER_ID,
|
|
68179
|
+
providerName: "OpenCode Go",
|
|
68180
|
+
planBadge: account?.planName,
|
|
68181
|
+
...summarizeBars(bars),
|
|
68182
|
+
bars,
|
|
68183
|
+
facts: []
|
|
68184
|
+
};
|
|
68185
|
+
}
|
|
66991
68186
|
const SESSION_QUOTA_ADAPTERS = /* @__PURE__ */ new Map([
|
|
66992
68187
|
[CODEX_CHATGPT_PROVIDER_ID, {
|
|
66993
68188
|
providerId: CODEX_CHATGPT_PROVIDER_ID,
|
|
@@ -67058,6 +68253,15 @@ window.__ModuleLoader__.load({
|
|
|
67058
68253
|
providerId: RELAYONE_PROVIDER_ID,
|
|
67059
68254
|
readStatus: (refresh) => refresh ? post$1("/catalog/refresh", {}) : get$1("/status"),
|
|
67060
68255
|
toSnapshot: relayOneToSnapshot
|
|
68256
|
+
}],
|
|
68257
|
+
[OPENCODE_GO_PROVIDER_ID, {
|
|
68258
|
+
providerId: OPENCODE_GO_PROVIDER_ID,
|
|
68259
|
+
readStatus: readOpenCodeGoQuota,
|
|
68260
|
+
toSnapshot: openCodeGoToSnapshot,
|
|
68261
|
+
poll: {
|
|
68262
|
+
intervalMs: 3e4,
|
|
68263
|
+
shouldRefresh: (status) => status.authenticated
|
|
68264
|
+
}
|
|
67061
68265
|
}]
|
|
67062
68266
|
]);
|
|
67063
68267
|
function formatRemainingPercent(value) {
|
|
@@ -67128,8 +68332,10 @@ window.__ModuleLoader__.load({
|
|
|
67128
68332
|
if (wasIdle) {
|
|
67129
68333
|
fetchProvider(adapter, entry, false);
|
|
67130
68334
|
entry.timer = window.setInterval(() => {
|
|
67131
|
-
if (document.visibilityState
|
|
67132
|
-
|
|
68335
|
+
if (document.visibilityState !== "visible" || entry.inFlight !== null) return;
|
|
68336
|
+
const refresh = entry.view.hasData && (adapter.poll?.shouldRefresh(entry.view.raw) ?? false);
|
|
68337
|
+
fetchProvider(adapter, entry, refresh);
|
|
68338
|
+
}, adapter.poll?.intervalMs ?? POLL_INTERVAL_MS);
|
|
67133
68339
|
}
|
|
67134
68340
|
return () => {
|
|
67135
68341
|
entry.subscribers.delete(listener);
|
|
@@ -67435,36 +68641,37 @@ window.__ModuleLoader__.load({
|
|
|
67435
68641
|
installLineLocale(ctx.locale);
|
|
67436
68642
|
ctx.effect(() => installHostLocaleMirror(ctx.locale), "dsh-chatgpt-subscription: host locale mirror");
|
|
67437
68643
|
installRussianLocale(ctx);
|
|
67438
|
-
ctx.effect(() => ctx.locale.register(NS, dictionaries$
|
|
68644
|
+
ctx.effect(() => ctx.locale.register(NS, dictionaries$23), "dsh-chatgpt-subscription: dictionaries");
|
|
67439
68645
|
ctx.effect(() => installStyles(), "dsh-chatgpt-subscription: styles");
|
|
67440
68646
|
ctx.effect(() => {
|
|
67441
68647
|
installHubStyles();
|
|
67442
68648
|
installModelChecklistStyles();
|
|
67443
68649
|
return () => {};
|
|
67444
68650
|
}, "dsh-chatgpt-subscription: hub styles");
|
|
67445
|
-
ctx.effect(() => ctx.locale.register(
|
|
68651
|
+
ctx.effect(() => ctx.locale.register(NS_MODEL_CHECKLIST, dictionaries$22), "dsh-model-checklist: dictionaries");
|
|
68652
|
+
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$17), "dsh-claude: dictionaries");
|
|
67446
68653
|
ctx.effect(() => {
|
|
67447
68654
|
installClaudeStyles();
|
|
67448
68655
|
return () => {};
|
|
67449
68656
|
}, "dsh-claude: styles");
|
|
67450
|
-
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$
|
|
67451
|
-
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$
|
|
68657
|
+
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$21), "dsh-command-code: dictionaries");
|
|
68658
|
+
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$20), "dsh-kimi-code: dictionaries");
|
|
67452
68659
|
ctx.effect(() => {
|
|
67453
68660
|
installKimiCodeStyles();
|
|
67454
68661
|
return () => {};
|
|
67455
68662
|
}, "dsh-kimi-code: styles");
|
|
67456
|
-
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$
|
|
68663
|
+
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$19), "dsh-minimax-code: dictionaries");
|
|
67457
68664
|
ctx.effect(() => {
|
|
67458
68665
|
installMinimaxCodeStyles();
|
|
67459
68666
|
return () => {};
|
|
67460
68667
|
}, "dsh-minimax-code: styles");
|
|
67461
|
-
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$
|
|
68668
|
+
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$18), "dsh-glm-coding-plan: dictionaries");
|
|
67462
68669
|
ctx.effect(() => {
|
|
67463
68670
|
installGlmCodingPlanStyles();
|
|
67464
68671
|
return () => {};
|
|
67465
68672
|
}, "dsh-glm-coding-plan: styles");
|
|
67466
|
-
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$
|
|
67467
|
-
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$
|
|
68673
|
+
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$16), "dsh-ollama: dictionaries");
|
|
68674
|
+
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$15), "dsh-antigravity-acp: dictionaries");
|
|
67468
68675
|
ctx.effect(() => {
|
|
67469
68676
|
installAntigravityAcpStyles();
|
|
67470
68677
|
return () => {};
|
|
@@ -67518,11 +68725,16 @@ window.__ModuleLoader__.load({
|
|
|
67518
68725
|
installClaudeApiStyles();
|
|
67519
68726
|
return () => {};
|
|
67520
68727
|
}, "dsh-claude-api: styles");
|
|
67521
|
-
ctx.effect(() => ctx.locale.register(NS_AWS_QUICK, dictionaries$
|
|
68728
|
+
ctx.effect(() => ctx.locale.register(NS_AWS_QUICK, dictionaries$14), "dsh-aws-quick: dictionaries");
|
|
67522
68729
|
ctx.effect(() => {
|
|
67523
68730
|
installAwsQuickStyles();
|
|
67524
68731
|
return () => {};
|
|
67525
68732
|
}, "dsh-aws-quick: styles");
|
|
68733
|
+
ctx.effect(() => ctx.locale.register(NS_OPENCODE_GO, dictionaries$13), "dsh-opencode-go: dictionaries");
|
|
68734
|
+
ctx.effect(() => {
|
|
68735
|
+
installOpenCodeGoStyles();
|
|
68736
|
+
return () => {};
|
|
68737
|
+
}, "dsh-opencode-go: styles");
|
|
67526
68738
|
ctx.effect(() => ctx.locale.register(NS_SUBAGENT, dictionaries), "dsh-subagent-settings: dictionaries");
|
|
67527
68739
|
ctx.effect(() => ctx.locale.register(NS_DISPATCH_LEDGER, dictionaries$4), "dsh-dispatch-ledger: dictionaries");
|
|
67528
68740
|
ctx.effect(() => {
|
|
@@ -67655,6 +68867,13 @@ window.__ModuleLoader__.load({
|
|
|
67655
68867
|
locale: NS_RELAYONE,
|
|
67656
68868
|
inject: (sessionId) => composerBadgeInject(ctx, sessionId)
|
|
67657
68869
|
}, RelayOneComposerQuota));
|
|
68870
|
+
ctx.slots.inject("conversation.input.right", () => ctx.slots.register({
|
|
68871
|
+
name: "conversation.input.right",
|
|
68872
|
+
id: "opencode-go-quota",
|
|
68873
|
+
order: 51,
|
|
68874
|
+
locale: NS_OPENCODE_GO,
|
|
68875
|
+
inject: (sessionId) => composerBadgeInject(ctx, sessionId)
|
|
68876
|
+
}, OpenCodeGoComposerQuota));
|
|
67658
68877
|
ctx.slots.inject("conversation.input.model.options", () => {
|
|
67659
68878
|
try {
|
|
67660
68879
|
return ctx.slots.register({
|