@wu529778790/open-im 1.11.8 → 1.11.9-beta.1
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/config/file-io.js +9 -7
- package/dist/config-web-page-i18n.d.ts +230 -459
- package/dist/config-web-page-i18n.js +231 -461
- package/dist/config-web.js +93 -0
- package/dist/shared/ai-task.js +1 -1
- package/package.json +1 -1
- package/web/dist/assets/index-BZjPofZt.js +61 -0
- package/web/dist/index.html +1 -1
- package/web/dist/assets/index-DZiLymq8.js +0 -57
package/dist/config/file-io.js
CHANGED
|
@@ -58,7 +58,8 @@ export function processEnvForNonClaudeCliChild() {
|
|
|
58
58
|
// Config cache with mtime tracking
|
|
59
59
|
let cachedConfig = null;
|
|
60
60
|
let cachedClaudeEnv = null;
|
|
61
|
-
// 保存进程启动时 shell 环境中的 Claude 相关 key
|
|
61
|
+
// 保存进程启动时 shell 环境中的 Claude 相关 key 原始值
|
|
62
|
+
// 作为兜底(当 ~/.claude/settings.json 未配置该 key 时使用)
|
|
62
63
|
const originalShellEnv = {};
|
|
63
64
|
for (const key of CLAUDE_AUTH_ENV_KEYS) {
|
|
64
65
|
if (process.env[key] !== undefined) {
|
|
@@ -358,20 +359,21 @@ export function refreshClaudeEnvToProcess() {
|
|
|
358
359
|
const claudeToolEnv = (file.tools?.claude?.env ?? {});
|
|
359
360
|
const claudeSettingsEnv = loadClaudeSettingsEnv();
|
|
360
361
|
for (const key of CLAUDE_AUTH_ENV_KEYS) {
|
|
361
|
-
|
|
362
|
-
process.env[key] = originalShellEnv[key];
|
|
363
|
-
continue;
|
|
364
|
-
}
|
|
365
|
-
// 优先读取 ~/.claude/settings.json(与 Claude Code CLI 共用同一配置)
|
|
362
|
+
// 优先读 ~/.claude/settings.json(与 Claude Code CLI / CC switch 实时同步)
|
|
366
363
|
if (key in claudeSettingsEnv) {
|
|
367
364
|
process.env[key] = claudeSettingsEnv[key];
|
|
368
365
|
continue;
|
|
369
366
|
}
|
|
370
|
-
//
|
|
367
|
+
// 其次:config.json tools.claude.env(仅在没有本地 Claude 安装时需要)
|
|
371
368
|
if (key in claudeToolEnv) {
|
|
372
369
|
process.env[key] = claudeToolEnv[key];
|
|
373
370
|
continue;
|
|
374
371
|
}
|
|
372
|
+
// 兜底:进程启动时 shell 里的原始值
|
|
373
|
+
if (key in originalShellEnv) {
|
|
374
|
+
process.env[key] = originalShellEnv[key];
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
375
377
|
delete process.env[key];
|
|
376
378
|
}
|
|
377
379
|
}
|