aihezu 2.8.7 → 2.8.8
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/commands/config.js
CHANGED
|
@@ -66,8 +66,9 @@ async function configCommand(service, args = []) {
|
|
|
66
66
|
const urlObj = new URL(apiUrl);
|
|
67
67
|
const hostname = urlObj.hostname;
|
|
68
68
|
|
|
69
|
-
// Only add suffix for aihezu.dev and
|
|
70
|
-
if (hostname === 'aihezu.dev' || hostname.endsWith('.aihezu.dev')
|
|
69
|
+
// Only add suffix for aihezu.dev/aihezu.top and their subdomains
|
|
70
|
+
if (hostname === 'aihezu.dev' || hostname.endsWith('.aihezu.dev') ||
|
|
71
|
+
hostname === 'aihezu.top' || hostname.endsWith('.aihezu.top')) {
|
|
71
72
|
const normalizedSuffix = suffix.startsWith('/') ? suffix : `/${suffix}`;
|
|
72
73
|
const trimmedUrl = apiUrl.replace(/\/+$/, '');
|
|
73
74
|
if (!trimmedUrl.endsWith(normalizedSuffix)) {
|
package/commands/install.js
CHANGED
|
@@ -67,8 +67,9 @@ async function installCommand(service, args = []) {
|
|
|
67
67
|
const urlObj = new URL(apiUrl);
|
|
68
68
|
const hostname = urlObj.hostname;
|
|
69
69
|
|
|
70
|
-
// Only add suffix for aihezu.dev and
|
|
71
|
-
if (hostname === 'aihezu.dev' || hostname.endsWith('.aihezu.dev')
|
|
70
|
+
// Only add suffix for aihezu.dev/aihezu.top and their subdomains
|
|
71
|
+
if (hostname === 'aihezu.dev' || hostname.endsWith('.aihezu.dev') ||
|
|
72
|
+
hostname === 'aihezu.top' || hostname.endsWith('.aihezu.top')) {
|
|
72
73
|
const normalizedSuffix = suffix.startsWith('/') ? suffix : `/${suffix}`;
|
|
73
74
|
const trimmedUrl = apiUrl.replace(/\/+$/, '');
|
|
74
75
|
if (!trimmedUrl.endsWith(normalizedSuffix)) {
|
|
@@ -243,7 +243,7 @@ function getTroubleshootingGuide(errorType)
|
|
|
243
243
|
|
|
244
244
|
2. 永久设置(需要重启终端):
|
|
245
245
|
setx ANTHROPIC_AUTH_TOKEN "sk-xxx"
|
|
246
|
-
setx ANTHROPIC_BASE_URL "https://
|
|
246
|
+
setx ANTHROPIC_BASE_URL "https://code.aihezu.top/api"
|
|
247
247
|
|
|
248
248
|
3. 推荐:使用配置文件而非环境变量
|
|
249
249
|
npx aihezu config claude
|
|
@@ -629,7 +629,7 @@ function getEnvVarGuide(varName) {
|
|
|
629
629
|
'',
|
|
630
630
|
'方式 2: 永久设置(需要重启终端)',
|
|
631
631
|
` setx ${varName} "your-value"`,
|
|
632
|
-
` setx ANTHROPIC_BASE_URL "https://
|
|
632
|
+
` setx ANTHROPIC_BASE_URL "https://code.aihezu.top/api"`,
|
|
633
633
|
'',
|
|
634
634
|
'⚠️ 注意: setx 后必须重启 PowerShell/CMD 才能生效',
|
|
635
635
|
'',
|
package/package.json
CHANGED
package/services/claude.js
CHANGED
|
@@ -10,7 +10,7 @@ const settingsPath = path.join(configDir, 'settings.json');
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
name: 'claude',
|
|
12
12
|
displayName: 'Claude Code',
|
|
13
|
-
defaultApiUrl: 'https://
|
|
13
|
+
defaultApiUrl: 'https://code.aihezu.top/api',
|
|
14
14
|
apiSuffix: '/api',
|
|
15
15
|
|
|
16
16
|
// Cache cleaning configuration
|