feat: 完善企业微信机器人配置持久化保存
新增功能: - 企业微信机器人配置支持持久化保存 - 添加/删除机器人时自动保存配置 - 新增手动保存按钮(💾 保存配置) - 保存成功后显示提示信息 改进: - 添加机器人:自动保存并提示 ✅ 机器人已保存 - 删除机器人:自动保存并提示 ✅ 配置已保存 - 手动保存:点击按钮保存所有配置变更 配置文件位置: - Windows: %APPDATA%\wecome-openclaw-client\config.json - 包含:机器人配置、Gateway 配置、启用状态 所有配置重启后自动加载,无需重新配置。
This commit is contained in:
@@ -377,7 +377,16 @@ class OpenClawConnection {
|
||||
|
||||
// 处理响应
|
||||
if (message.type === 'res') {
|
||||
const resLog = '[OpenClaw] 响应:' + (message.ok ? '✅ 成功' : '❌ 失败') + (message.error ? ' | ' + message.error : '');
|
||||
let errorDetail = '';
|
||||
if (!message.ok) {
|
||||
if (message.error) {
|
||||
errorDetail = typeof message.error === 'object' ? JSON.stringify(message.error) : String(message.error);
|
||||
}
|
||||
if (message.payload) {
|
||||
errorDetail += ' | payload: ' + JSON.stringify(message.payload);
|
||||
}
|
||||
}
|
||||
const resLog = '[OpenClaw] 响应:' + (message.ok ? '✅ 成功' : '❌ 失败') + (errorDetail ? ' | ' + errorDetail : '');
|
||||
console.log(resLog);
|
||||
mainWindow.webContents.send('openclaw-log', { type: message.ok ? 'success' : 'error', message: resLog });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user