From aa70e42fdcf40019cf5cbc921501b2d463cb0d7a Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sun, 7 Jul 2024 22:40:22 -0400 Subject: [PATCH] change internal agent prefix --- app.js | 2 +- commands.js | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app.js b/app.js index 13b4f60..cd2ec92 100644 --- a/app.js +++ b/app.js @@ -1163,7 +1163,7 @@ async function sendMessage(e) { const timestamp = Date.now(); console.log("Sending message to current topic:", topic); // Add logging - if (message.startsWith('~')) { + if (message.startsWith('>')) { await handleCommand(message, { eventEmitter, currentTopic: topic, // Pass the current topic as a string diff --git a/commands.js b/commands.js index 912c9cc..2131078 100644 --- a/commands.js +++ b/commands.js @@ -23,33 +23,33 @@ export default async function handleCommand(command, context) { console.log("Current topic:", currentTopic); // Add logging to check the current topic switch (cmd) { - case '~clear': + case '>clear': clearMessages(currentTopic); break; - case '~ping': + case '>ping': addMessage('LinkUp', 'pong', agentAvatar, currentTopic); break; - case '~help': - addMessage('LinkUp', 'Available commands:\n- ~clear\n- ~ping\n- ~help\n- ~join [topic]\n- ~leave\n- ~create [alias]\n- ~list-files', agentAvatar, currentTopic); + case '>help': + addMessage('LinkUp', 'Available commands:\n- >clear\n- >ping\n- >help\n- >join [topic]\n- >leave\n- >create [alias]\n- >list-files', agentAvatar, currentTopic); break; - case '~join': + case '>join': if (restArgs) { await joinRoom(currentTopic, restArgs); } else { - addMessage('LinkUp', 'Usage: ~join [topic]', agentAvatar, currentTopic); + addMessage('LinkUp', 'Usage: >join [topic]', agentAvatar, currentTopic); } break; - case '~leave': + case '>leave': leaveRoom(currentTopic); break; - case '~create': + case '>create': if (restArgs) { await createRoom(currentTopic, restArgs); } else { - addMessage('LinkUp', 'Usage: ~create [alias]', agentAvatar, currentTopic); + addMessage('LinkUp', 'Usage: >create [alias]', agentAvatar, currentTopic); } break; - case '~list-files': + case '>list-files': const files = await listFiles(); const fileList = files.length > 0 ? files.map(file => `- ${file}`).join('\n') : 'No files available'; addMessage('LinkUp', `Available files:\n${fileList}`, agentAvatar, currentTopic);