fix: bulletproof command handler + auto-restart + README overhaul
- sendStreamingMessage: replaced broken simulated streaming with reliable HTML send + stripped plain text fallback (was silently failing) - Added global unhandledRejection guard (catches async errors that sequentialize middleware would swallow) - restart.sh: auto-restart loop on crash (3s delay) instead of bare node - README: comprehensive update with self-learning memory, curiosity engine, memory architecture diagram, updated command table, updated comparison
This commit is contained in:
@@ -727,6 +727,11 @@ export async function initBot(config, api, tools, skills, agents) {
|
||||
logger.error('Bot error:', err.message || err);
|
||||
});
|
||||
|
||||
// ── Global unhandled rejection guard ──
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
logger.error('Unhandled rejection:', reason?.message || reason);
|
||||
});
|
||||
|
||||
// ── Express + WebSocket server (keep for webhook compatibility) ──
|
||||
const app = express();
|
||||
app.use(express.json());
|
||||
|
||||
Reference in New Issue
Block a user