xiaozuoassistant 0.2.15 → 0.2.17
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/server/config/loader.js +15 -0
- package/package.json +1 -1
|
@@ -50,6 +50,21 @@ try {
|
|
|
50
50
|
// Log the loaded API key (masked)
|
|
51
51
|
console.log('[Config] API Key Status:', loadedConfig.llm.apiKey ? 'Configured' : 'Not configured (Empty)');
|
|
52
52
|
console.log('[Config] Base URL:', loadedConfig.llm.baseURL);
|
|
53
|
+
// Handle old feishu config format (object instead of array)
|
|
54
|
+
if (loadedConfig.channels && loadedConfig.channels.feishu) {
|
|
55
|
+
if (!Array.isArray(loadedConfig.channels.feishu)) {
|
|
56
|
+
// Convert old object format to new array format
|
|
57
|
+
const oldFeishuConfig = loadedConfig.channels.feishu;
|
|
58
|
+
loadedConfig.channels.feishu = [{
|
|
59
|
+
name: 'default',
|
|
60
|
+
appId: oldFeishuConfig.appId || '',
|
|
61
|
+
appSecret: oldFeishuConfig.appSecret || '',
|
|
62
|
+
encryptKey: oldFeishuConfig.encryptKey || '',
|
|
63
|
+
verificationToken: oldFeishuConfig.verificationToken || ''
|
|
64
|
+
}];
|
|
65
|
+
console.log('[Config] Converted old feishu config format to new array format');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
53
68
|
}
|
|
54
69
|
catch (error) {
|
|
55
70
|
console.warn('Failed to load config.json, creating a new one with defaults');
|