diff --git a/electron/main.js b/electron/main.js index 0edeabc..f09c4e5 100644 --- a/electron/main.js +++ b/electron/main.js @@ -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 }); } diff --git a/renderer/src/App.js b/renderer/src/App.js index c4a776a..cbf75c4 100644 --- a/renderer/src/App.js +++ b/renderer/src/App.js @@ -119,7 +119,7 @@ function App() { setNewBot({ botId: '', secret: '', name: '', enabled: true }); setShowAddBot(false); await saveConfig(); - addLog('success', `添加机器人:${newBot.name || newBot.botId}`); + addLog('success', `✅ 机器人已保存:${newBot.name || newBot.botId}`); }; const handleDeleteBot = async (botId) => { @@ -127,7 +127,7 @@ function App() { const updatedBots = config.bots.filter(b => b.id !== botId); setConfig({ ...config, bots: updatedBots }); await saveConfig(); - addLog('info', `删除机器人:${botId}`); + addLog('success', `✅ 配置已保存,机器人已删除`); }; const handleConnectWeCom = async (bot) => { @@ -356,6 +356,9 @@ function App() {

企业微信机器人配置

+