ccjk 9.5.6 → 9.7.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/dist/chunks/agent.mjs +1 -1
- package/dist/chunks/api-providers.mjs +1 -1
- package/dist/chunks/api.mjs +3 -3
- package/dist/chunks/auto-bootstrap.mjs +1 -1
- package/dist/chunks/auto-updater.mjs +1 -1
- package/dist/chunks/boost.mjs +160 -0
- package/dist/chunks/ccjk-agents.mjs +1 -1
- package/dist/chunks/ccjk-all.mjs +1 -1
- package/dist/chunks/ccjk-config.mjs +1 -1
- package/dist/chunks/ccjk-hooks.mjs +1 -1
- package/dist/chunks/ccjk-mcp.mjs +2 -2
- package/dist/chunks/ccjk-setup.mjs +1 -1
- package/dist/chunks/ccjk-skills.mjs +1 -1
- package/dist/chunks/ccr.mjs +25 -30
- package/dist/chunks/ccu.mjs +1 -1
- package/dist/chunks/check-updates.mjs +3 -4
- package/dist/chunks/claude-code-config-manager.mjs +7 -7
- package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
- package/dist/chunks/claude-config.mjs +4 -4
- package/dist/chunks/claude-wrapper.mjs +2 -2
- package/dist/chunks/codex-config-switch.mjs +4 -5
- package/dist/chunks/codex-provider-manager.mjs +2 -3
- package/dist/chunks/codex-uninstaller.mjs +2 -2
- package/dist/chunks/codex.mjs +207 -6
- package/dist/chunks/commands.mjs +391 -88
- package/dist/chunks/commands2.mjs +88 -391
- package/dist/chunks/completion.mjs +1 -1
- package/dist/chunks/config-consolidator.mjs +2 -2
- package/dist/chunks/config-switch.mjs +3 -4
- package/dist/chunks/config.mjs +78 -7
- package/dist/chunks/config2.mjs +400 -410
- package/dist/chunks/config3.mjs +410 -400
- package/dist/chunks/constants.mjs +1 -1
- package/dist/chunks/doctor.mjs +4 -4
- package/dist/chunks/features.mjs +24 -17
- package/dist/chunks/index.mjs +178 -7
- package/dist/chunks/index2.mjs +1162 -169
- package/dist/chunks/index3.mjs +910 -1076
- package/dist/chunks/index4.mjs +137 -947
- package/dist/chunks/index5.mjs +635 -167
- package/dist/chunks/init.mjs +141 -99
- package/dist/chunks/installer.mjs +147 -649
- package/dist/chunks/installer2.mjs +649 -147
- package/dist/chunks/interview.mjs +2 -2
- package/dist/chunks/marketplace.mjs +1 -1
- package/dist/chunks/mcp.mjs +1058 -17
- package/dist/chunks/menu.mjs +147 -56
- package/dist/chunks/monitor.mjs +2 -2
- package/dist/chunks/notification.mjs +1 -1
- package/dist/chunks/onboarding.mjs +2 -2
- package/dist/chunks/package.mjs +2 -210
- package/dist/chunks/permission-manager.mjs +2 -2
- package/dist/chunks/permissions.mjs +1 -1
- package/dist/chunks/platform.mjs +1 -1
- package/dist/chunks/plugin.mjs +1 -1
- package/dist/chunks/prompts.mjs +1 -1
- package/dist/chunks/providers.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +16 -20
- package/dist/chunks/silent-updater.mjs +1 -1
- package/dist/chunks/simple-config.mjs +2 -2
- package/dist/chunks/skill.mjs +1 -1
- package/dist/chunks/skills-sync.mjs +1 -1
- package/dist/chunks/skills.mjs +1 -1
- package/dist/chunks/startup.mjs +1 -1
- package/dist/chunks/stats.mjs +1 -1
- package/dist/chunks/status.mjs +159 -0
- package/dist/chunks/team.mjs +1 -1
- package/dist/chunks/thinking.mjs +2 -2
- package/dist/chunks/uninstall.mjs +6 -6
- package/dist/chunks/update.mjs +6 -9
- package/dist/chunks/upgrade-manager.mjs +2 -2
- package/dist/chunks/version-checker.mjs +3 -3
- package/dist/chunks/vim.mjs +1 -1
- package/dist/chunks/workflows.mjs +616 -215
- package/dist/cli.mjs +70 -121
- package/dist/index.d.mts +17 -1482
- package/dist/index.d.ts +17 -1482
- package/dist/index.mjs +950 -4740
- package/dist/shared/{ccjk.zCqdxT2Y.mjs → ccjk.Br91zBIG.mjs} +2 -2
- package/dist/shared/ccjk.CSkyCZIM.mjs +638 -0
- package/dist/shared/{ccjk.BKoi8-Hy.mjs → ccjk.DE91nClQ.mjs} +1 -1
- package/dist/shared/{ccjk.f40us0yY.mjs → ccjk.DvIrK0wz.mjs} +2 -2
- package/dist/shared/ccjk.LsPZ2PYo.mjs +1048 -0
- package/dist/shared/{ccjk.DRweXU5F.mjs → ccjk.q1koQxEE.mjs} +2 -2
- package/package.json +1 -1
- package/templates/claude-code/common/settings.json +15 -111
- package/dist/chunks/api-adapter.mjs +0 -180
- package/dist/chunks/cli.mjs +0 -2227
- package/dist/chunks/context-menu.mjs +0 -913
- package/dist/chunks/hooks-sync.mjs +0 -1627
- package/dist/chunks/index6.mjs +0 -663
- package/dist/chunks/mcp-market.mjs +0 -1077
- package/dist/chunks/mcp-server.mjs +0 -776
- package/dist/chunks/project-detector.mjs +0 -131
- package/dist/chunks/provider-registry.mjs +0 -92
- package/dist/chunks/setup-wizard.mjs +0 -362
- package/dist/chunks/tools.mjs +0 -143
- package/dist/chunks/workflows2.mjs +0 -633
- package/dist/shared/ccjk.BM_HZogn.mjs +0 -347
- package/dist/shared/ccjk.BaEp4UHQ.mjs +0 -75
- package/dist/shared/ccjk.CS0ybJCf.mjs +0 -490
- package/dist/shared/ccjk.CZgIwikC.mjs +0 -209
- package/dist/shared/ccjk.tO8zeFh1.mjs +0 -397
|
@@ -2,9 +2,9 @@ import { execSync } from 'node:child_process';
|
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { join } from 'pathe';
|
|
5
|
-
import {
|
|
5
|
+
import { b as getPlatform } from '../chunks/platform.mjs';
|
|
6
6
|
import { DEFAULT_CODE_TOOL_TYPE } from '../chunks/constants.mjs';
|
|
7
|
-
import { i18n } from '../chunks/
|
|
7
|
+
import { i18n } from '../chunks/index.mjs';
|
|
8
8
|
import { readZcfConfigAsync, saveZcfConfig } from '../chunks/ccjk-config.mjs';
|
|
9
9
|
|
|
10
10
|
class SmartDefaultsDetector {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.7.0",
|
|
5
5
|
"packageManager": "pnpm@10.17.1",
|
|
6
6
|
"description": "CCJK v9.0.0 - Revolutionary AI Development Platform with Enterprise Security, Streaming Cloud Sync, CRDT Conflict Resolution, and Unified V3 Architecture",
|
|
7
7
|
"author": {
|
|
@@ -57,127 +57,31 @@
|
|
|
57
57
|
},
|
|
58
58
|
"permissions": {
|
|
59
59
|
"allow": [
|
|
60
|
-
"AllowEdit",
|
|
61
|
-
"AllowWrite",
|
|
62
|
-
"AllowRead",
|
|
63
|
-
"AllowExec",
|
|
64
|
-
"AllowCreateProcess",
|
|
65
|
-
"AllowKillProcess",
|
|
66
|
-
"AllowNetworkAccess",
|
|
67
|
-
"AllowFileSystemAccess",
|
|
68
|
-
"AllowShellAccess",
|
|
69
|
-
"AllowHttpAccess",
|
|
70
60
|
"Bash(pnpm *)",
|
|
71
61
|
"Bash(npm *)",
|
|
62
|
+
"Bash(npx *)",
|
|
72
63
|
"Bash(NODE_ENV=* pnpm *)",
|
|
73
64
|
"Bash(yarn *)",
|
|
65
|
+
"Bash(bun *)",
|
|
74
66
|
"Bash(git *)",
|
|
75
|
-
"Bash(
|
|
76
|
-
"Bash(
|
|
77
|
-
"Bash(
|
|
78
|
-
"Bash(
|
|
79
|
-
"Bash(rm *)",
|
|
67
|
+
"Bash(make *)",
|
|
68
|
+
"Bash(docker *)",
|
|
69
|
+
"Bash(docker-compose *)",
|
|
70
|
+
"Bash(which *)",
|
|
80
71
|
"Bash(cat *)",
|
|
72
|
+
"Bash(ls *)",
|
|
81
73
|
"Bash(echo *)",
|
|
82
|
-
"Bash(
|
|
83
|
-
"Bash(cp *)",
|
|
84
|
-
"Bash(mv *)",
|
|
85
|
-
"Bash(chmod *)",
|
|
86
|
-
"Bash(chown *)",
|
|
74
|
+
"Bash(grep *)",
|
|
87
75
|
"Bash(find *)",
|
|
88
|
-
"Bash(sed *)",
|
|
89
|
-
"Bash(awk *)",
|
|
90
|
-
"Bash(tr *)",
|
|
91
|
-
"Bash(sort *)",
|
|
92
|
-
"Bash(uniq *)",
|
|
93
|
-
"Bash(wc *)",
|
|
94
76
|
"Bash(head *)",
|
|
95
77
|
"Bash(tail *)",
|
|
96
|
-
"Bash(
|
|
97
|
-
"Bash(
|
|
98
|
-
"Bash(
|
|
99
|
-
"Bash(
|
|
100
|
-
"Bash(
|
|
101
|
-
"Bash(
|
|
102
|
-
"Bash(
|
|
103
|
-
"Bash(gzip *)",
|
|
104
|
-
"Bash(gunzip *)",
|
|
105
|
-
"Bash(docker *)",
|
|
106
|
-
"Bash(docker-compose *)",
|
|
107
|
-
"Bash(kubectl *)",
|
|
108
|
-
"Bash(helm *)",
|
|
109
|
-
"Bash(make *)",
|
|
110
|
-
"Bash(passwd *)",
|
|
111
|
-
"Bash(export *)",
|
|
112
|
-
"Bash(source *)",
|
|
113
|
-
"Bash(which *)",
|
|
114
|
-
"Bash(whereis *)",
|
|
115
|
-
"Bash(ps *)",
|
|
116
|
-
"Bash(top *)",
|
|
117
|
-
"Bash(kill *)",
|
|
118
|
-
"Bash(pkill *)",
|
|
119
|
-
"Bash(killall *)",
|
|
120
|
-
"Bash(df *)",
|
|
121
|
-
"Bash(du *)",
|
|
122
|
-
"Bash(free *)",
|
|
123
|
-
"Bash(vmstat *)",
|
|
124
|
-
"Bash(iostat *)",
|
|
125
|
-
"Bash(netstat *)",
|
|
126
|
-
"Bash(ss *)",
|
|
127
|
-
"Bash(ping *)",
|
|
128
|
-
"Bash(traceroute *)",
|
|
129
|
-
"Bash(nslookup *)",
|
|
130
|
-
"Bash(dig *)",
|
|
131
|
-
"Bash(host *)",
|
|
132
|
-
"Bash(ifconfig *)",
|
|
133
|
-
"Bash(ip *)",
|
|
134
|
-
"Bash(route *)",
|
|
135
|
-
"Bash(iwconfig *)",
|
|
136
|
-
"Bash(iwlist *)",
|
|
137
|
-
"Bash(wpa_cli *)",
|
|
138
|
-
"Bash(systemctl *)",
|
|
139
|
-
"Bash(service *)",
|
|
140
|
-
"Bash(chkconfig *)",
|
|
141
|
-
"Bash(crontab *)",
|
|
142
|
-
"Bash(at *)",
|
|
143
|
-
"Bash(systemd-analyze *)",
|
|
144
|
-
"Bash(journalctl *)",
|
|
145
|
-
"Bash(dmesg *)",
|
|
146
|
-
"Bash(loginctl *)",
|
|
147
|
-
"Bash(logout *)",
|
|
148
|
-
"Bash(poweroff *)",
|
|
149
|
-
"Bash(reboot *)",
|
|
150
|
-
"Bash(shutdown *)",
|
|
151
|
-
"Bash(halt *)",
|
|
152
|
-
"Bash(runlevel *)",
|
|
153
|
-
"Bash(telinit *)",
|
|
154
|
-
"Bash(init *)",
|
|
155
|
-
"Bash(udevadm *)",
|
|
156
|
-
"Bash(modprobe *)",
|
|
157
|
-
"Bash(insmod *)",
|
|
158
|
-
"Bash(rmmod *)",
|
|
159
|
-
"Bash(lsmod *)",
|
|
160
|
-
"Bash(depmod *)",
|
|
161
|
-
"Bash(useradd *)",
|
|
162
|
-
"Bash(userdel *)",
|
|
163
|
-
"Bash(usermod *)",
|
|
164
|
-
"Bash(groupadd *)",
|
|
165
|
-
"Bash(groupdel *)",
|
|
166
|
-
"Bash(groupmod *)",
|
|
167
|
-
"Bash(id *)",
|
|
168
|
-
"Bash(groups *)",
|
|
169
|
-
"Bash(whoami *)",
|
|
170
|
-
"Bash(su *)",
|
|
171
|
-
"Bash(sudo *)",
|
|
172
|
-
"Bash(visudo *)",
|
|
173
|
-
"Bash(chsh *)",
|
|
174
|
-
"Bash(chfn *)",
|
|
175
|
-
"Bash(finger *)",
|
|
176
|
-
"Bash(last *)",
|
|
177
|
-
"Bash(lastlog *)",
|
|
178
|
-
"Bash(faillog *)",
|
|
179
|
-
"Bash(pam *)",
|
|
180
|
-
"Bash(pam-auth-update *)"
|
|
78
|
+
"Bash(wc *)",
|
|
79
|
+
"Bash(sort *)",
|
|
80
|
+
"Bash(mkdir *)",
|
|
81
|
+
"Bash(touch *)",
|
|
82
|
+
"Bash(cp *)",
|
|
83
|
+
"Bash(mv *)",
|
|
84
|
+
"Bash(chmod *)"
|
|
181
85
|
]
|
|
182
86
|
},
|
|
183
87
|
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { join } from 'pathe';
|
|
3
|
-
|
|
4
|
-
async function detectApiStatus() {
|
|
5
|
-
if (process.env.ANTHROPIC_API_KEY) {
|
|
6
|
-
return {
|
|
7
|
-
configured: true,
|
|
8
|
-
mode: "custom",
|
|
9
|
-
provider: "Anthropic"
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
13
|
-
const claudeConfigPath = join(homeDir, ".claude", "config.json");
|
|
14
|
-
if (existsSync(claudeConfigPath)) {
|
|
15
|
-
try {
|
|
16
|
-
const content = readFileSync(claudeConfigPath, "utf-8");
|
|
17
|
-
const config = JSON.parse(content);
|
|
18
|
-
if (config.apiKey || config.api_key) {
|
|
19
|
-
return {
|
|
20
|
-
configured: true,
|
|
21
|
-
mode: "custom",
|
|
22
|
-
provider: config.provider || "Custom",
|
|
23
|
-
baseUrl: config.baseUrl || config.base_url
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
if (config.oauth || config.session) {
|
|
27
|
-
return {
|
|
28
|
-
configured: true,
|
|
29
|
-
mode: "official",
|
|
30
|
-
provider: "Anthropic"
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
} catch {
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const ccjkConfigPath = join(homeDir, ".ccjk", "config.json");
|
|
37
|
-
if (existsSync(ccjkConfigPath)) {
|
|
38
|
-
try {
|
|
39
|
-
const content = readFileSync(ccjkConfigPath, "utf-8");
|
|
40
|
-
const config = JSON.parse(content);
|
|
41
|
-
if (config.apiProvider) {
|
|
42
|
-
return {
|
|
43
|
-
configured: true,
|
|
44
|
-
mode: config.apiProvider === "ccr" ? "ccr" : "custom",
|
|
45
|
-
provider: config.apiProvider,
|
|
46
|
-
baseUrl: config.apiBaseUrl
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
} catch {
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
configured: false,
|
|
54
|
-
mode: "none"
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function getApiStatusSummary(status, locale = "zh-CN") {
|
|
58
|
-
const isZh = locale === "zh-CN";
|
|
59
|
-
if (!status.configured) {
|
|
60
|
-
return isZh ? "\u26A0\uFE0F \u672A\u914D\u7F6E API" : "\u26A0\uFE0F API not configured";
|
|
61
|
-
}
|
|
62
|
-
switch (status.mode) {
|
|
63
|
-
case "official":
|
|
64
|
-
return isZh ? "\u2713 \u5B98\u65B9\u767B\u5F55" : "\u2713 Official login";
|
|
65
|
-
case "ccr":
|
|
66
|
-
return isZh ? "\u2713 CCR \u4EE3\u7406" : "\u2713 CCR Proxy";
|
|
67
|
-
case "custom":
|
|
68
|
-
return isZh ? `\u2713 ${status.provider || "\u81EA\u5B9A\u4E49"}` : `\u2713 ${status.provider || "Custom"}`;
|
|
69
|
-
default:
|
|
70
|
-
return isZh ? "\u2713 \u5DF2\u914D\u7F6E" : "\u2713 Configured";
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
async function quickApiSetup(locale = "zh-CN") {
|
|
74
|
-
const inquirer = (await import('inquirer')).default;
|
|
75
|
-
const ansis = (await import('ansis')).default;
|
|
76
|
-
const isZh = locale === "zh-CN";
|
|
77
|
-
console.log("");
|
|
78
|
-
console.log(ansis.bold(isZh ? "\u26A1 \u5FEB\u901F\u914D\u7F6E API" : "\u26A1 Quick API Setup"));
|
|
79
|
-
console.log(ansis.dim(isZh ? "\u53EA\u9700 2 \u6B65\uFF0C\u5373\u53EF\u5F00\u59CB\u4F7F\u7528 Claude" : "Just 2 steps to start using Claude"));
|
|
80
|
-
console.log("");
|
|
81
|
-
try {
|
|
82
|
-
const { createWizard } = await import('./setup-wizard.mjs');
|
|
83
|
-
const wizard = createWizard();
|
|
84
|
-
const step1 = wizard.getStep1();
|
|
85
|
-
console.log(ansis.cyan(`Step 1: ${step1.title}`));
|
|
86
|
-
console.log(ansis.dim(step1.description));
|
|
87
|
-
console.log("");
|
|
88
|
-
const providerField = step1.fields[0];
|
|
89
|
-
const providerChoices = providerField.options?.filter((opt) => opt.value !== "---").map((opt) => ({
|
|
90
|
-
name: `${opt.label}
|
|
91
|
-
${ansis.dim(opt.description || "")}`,
|
|
92
|
-
value: opt.value,
|
|
93
|
-
short: opt.label
|
|
94
|
-
})) || [];
|
|
95
|
-
const { provider } = await inquirer.prompt([
|
|
96
|
-
{
|
|
97
|
-
type: "list",
|
|
98
|
-
name: "provider",
|
|
99
|
-
message: isZh ? "\u9009\u62E9 AI \u63D0\u4F9B\u5546:" : "Select AI Provider:",
|
|
100
|
-
choices: providerChoices,
|
|
101
|
-
pageSize: 10
|
|
102
|
-
}
|
|
103
|
-
]);
|
|
104
|
-
wizard.setProvider(provider);
|
|
105
|
-
const step2 = wizard.getStep2(provider);
|
|
106
|
-
console.log("");
|
|
107
|
-
console.log(ansis.cyan(`Step 2: ${step2.title}`));
|
|
108
|
-
console.log(ansis.dim(step2.description));
|
|
109
|
-
console.log("");
|
|
110
|
-
const credentials = {};
|
|
111
|
-
for (const field of step2.fields) {
|
|
112
|
-
if (field.type === "password") {
|
|
113
|
-
const { value } = await inquirer.prompt([
|
|
114
|
-
{
|
|
115
|
-
type: "password",
|
|
116
|
-
name: "value",
|
|
117
|
-
message: `${field.label}:`,
|
|
118
|
-
mask: "*"
|
|
119
|
-
}
|
|
120
|
-
]);
|
|
121
|
-
credentials[field.name] = value;
|
|
122
|
-
} else if (field.type === "select" && field.options) {
|
|
123
|
-
const { value } = await inquirer.prompt([
|
|
124
|
-
{
|
|
125
|
-
type: "list",
|
|
126
|
-
name: "value",
|
|
127
|
-
message: `${field.label}:`,
|
|
128
|
-
choices: field.options.map((opt) => ({
|
|
129
|
-
name: opt.label,
|
|
130
|
-
value: opt.value
|
|
131
|
-
})),
|
|
132
|
-
default: field.defaultValue
|
|
133
|
-
}
|
|
134
|
-
]);
|
|
135
|
-
credentials[field.name] = value;
|
|
136
|
-
} else {
|
|
137
|
-
const { value } = await inquirer.prompt([
|
|
138
|
-
{
|
|
139
|
-
type: "input",
|
|
140
|
-
name: "value",
|
|
141
|
-
message: `${field.label}:`,
|
|
142
|
-
default: field.defaultValue
|
|
143
|
-
}
|
|
144
|
-
]);
|
|
145
|
-
credentials[field.name] = value;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
await wizard.setCredentials(credentials);
|
|
149
|
-
console.log("");
|
|
150
|
-
console.log(ansis.dim(isZh ? "\u6B63\u5728\u6D4B\u8BD5\u8FDE\u63A5..." : "Testing connection..."));
|
|
151
|
-
const testResult = await wizard.testConnection();
|
|
152
|
-
if (testResult.success) {
|
|
153
|
-
console.log(ansis.green(`\u2713 ${testResult.message}`));
|
|
154
|
-
const setup = await wizard.complete();
|
|
155
|
-
console.log("");
|
|
156
|
-
console.log(ansis.green.bold(isZh ? "\u{1F389} \u914D\u7F6E\u5B8C\u6210\uFF01" : "\u{1F389} Configuration complete!"));
|
|
157
|
-
console.log(ansis.dim(isZh ? `\u63D0\u4F9B\u5546: ${setup.provider}` : `Provider: ${setup.provider}`));
|
|
158
|
-
console.log(ansis.dim(isZh ? `\u6A21\u578B: ${setup.model}` : `Model: ${setup.model}`));
|
|
159
|
-
return true;
|
|
160
|
-
} else {
|
|
161
|
-
console.log(ansis.red(`\u2717 ${testResult.message}`));
|
|
162
|
-
if (testResult.suggestions) {
|
|
163
|
-
console.log(ansis.yellow(isZh ? "\u5EFA\u8BAE:" : "Suggestions:"));
|
|
164
|
-
testResult.suggestions.forEach((s) => console.log(` - ${s}`));
|
|
165
|
-
}
|
|
166
|
-
return false;
|
|
167
|
-
}
|
|
168
|
-
} catch (error) {
|
|
169
|
-
const ansis2 = (await import('ansis')).default;
|
|
170
|
-
console.log(ansis2.red(isZh ? "\u914D\u7F6E\u5931\u8D25" : "Configuration failed"));
|
|
171
|
-
console.log(ansis2.dim(String(error)));
|
|
172
|
-
return false;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
async function needsApiSetup() {
|
|
176
|
-
const status = await detectApiStatus();
|
|
177
|
-
return !status.configured;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export { detectApiStatus, getApiStatusSummary, needsApiSetup, quickApiSetup };
|