aihezu 2.0.1 → 2.1.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.
@@ -56,7 +56,23 @@ async function installCommand(service, args = []) {
56
56
  const apiUrlInput = await askQuestion(rl, '请输入 API 地址 (直接回车使用默认地址): ');
57
57
  let apiUrl = apiUrlInput || defaultUrl;
58
58
 
59
+ // Determine service-specific suffix
60
+ let suffix = '';
61
+ if (service.name === 'claude') {
62
+ suffix = '/api';
63
+ } else if (service.name === 'codex') {
64
+ suffix = '/openai';
65
+ } else if (service.name === 'gemini') {
66
+ suffix = '/gemini';
67
+ }
68
+
69
+ // Append suffix if apiUrl does not already end with it
70
+ if (suffix && !apiUrl.endsWith(suffix)) {
71
+ apiUrl = apiUrl.replace(/\/+$/, '') + suffix; // Remove any trailing slash and add suffix
72
+ }
73
+
59
74
  // Basic URL validation/normalization
75
+ // This part should handle http/https prefixing.
60
76
  if (!/^https?:\/\//i.test(apiUrl)) {
61
77
  apiUrl = 'https://' + apiUrl;
62
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aihezu",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "AI 开发环境配置工具 - 支持 Claude Code, Codex, Google Gemini 的本地化配置、代理设置与缓存清理",
5
5
  "main": "bin/aihezu.js",
6
6
  "bin": {