wording and overseer tool embeds

This commit is contained in:
legop3
2026-05-19 16:51:02 -04:00
parent e432e3de79
commit f9e472c832
10 changed files with 133 additions and 19 deletions
+3 -1
View File
@@ -11,7 +11,8 @@ const { registerChatSocketHooks } = require('./socketHooks');
function sendSystemMessage(text, options = {}) {
const normalized = normalizeUserText(text);
const clean = normalized.trim();
if (!clean) return null;
const hasToolCalls = Array.isArray(options.toolCalls) && options.toolCalls.length > 0;
if (!clean && !hasToolCalls) return null;
const safe = clean;
const message = buildMessage(null, safe, {
nickname: String(options.nickname || 'The Overseer'),
@@ -19,6 +20,7 @@ function sendSystemMessage(text, options = {}) {
fromDiscord: false,
bot: options.bot !== false,
profileImage: options.profileImage || null,
toolCalls: hasToolCalls ? options.toolCalls : null,
});
broadcastMessage(message);
return message;