ccjk 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
{
|
|
3
|
-
id: "302ai",
|
|
4
|
-
name: "302.AI",
|
|
5
|
-
supportedCodeTools: ["claude-code", "codex"],
|
|
6
|
-
claudeCode: {
|
|
7
|
-
baseUrl: "https://api.302.ai/cc",
|
|
8
|
-
authType: "api_key"
|
|
9
|
-
},
|
|
10
|
-
codex: {
|
|
11
|
-
baseUrl: "https://api.302.ai/v1",
|
|
12
|
-
wireApi: "responses"
|
|
13
|
-
},
|
|
14
|
-
description: "302.AI API Service"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: "packycode",
|
|
18
|
-
name: "PackyCode",
|
|
19
|
-
supportedCodeTools: ["claude-code", "codex"],
|
|
20
|
-
claudeCode: {
|
|
21
|
-
baseUrl: "https://www.packyapi.com",
|
|
22
|
-
authType: "auth_token"
|
|
23
|
-
},
|
|
24
|
-
codex: {
|
|
25
|
-
baseUrl: "https://www.packyapi.com/v1",
|
|
26
|
-
wireApi: "responses"
|
|
27
|
-
},
|
|
28
|
-
description: "PackyCode API Service"
|
|
29
|
-
},
|
|
1
|
+
const LOCAL_PROVIDER_PRESETS = [
|
|
30
2
|
{
|
|
31
3
|
id: "glm",
|
|
32
4
|
name: "GLM",
|
|
@@ -75,15 +47,13 @@ const API_PROVIDER_PRESETS = [
|
|
|
75
47
|
}
|
|
76
48
|
];
|
|
77
49
|
function getApiProviders(codeToolType) {
|
|
78
|
-
return
|
|
79
|
-
(provider) => provider.supportedCodeTools.includes(codeToolType)
|
|
80
|
-
);
|
|
50
|
+
return LOCAL_PROVIDER_PRESETS.filter((p) => p.supportedCodeTools.includes(codeToolType));
|
|
81
51
|
}
|
|
82
52
|
function getProviderPreset(providerId) {
|
|
83
|
-
return
|
|
53
|
+
return LOCAL_PROVIDER_PRESETS.find((p) => p.id === providerId);
|
|
84
54
|
}
|
|
85
55
|
function getValidProviderIds() {
|
|
86
|
-
return
|
|
56
|
+
return LOCAL_PROVIDER_PRESETS.map((p) => p.id);
|
|
87
57
|
}
|
|
88
58
|
|
|
89
|
-
export {
|
|
59
|
+
export { LOCAL_PROVIDER_PRESETS, getApiProviders, getProviderPreset, getValidProviderIds };
|
package/dist/chunks/package.mjs
CHANGED
package/package.json
CHANGED