From 64ee19c70a451e78a90d230fe645a158c1e5060b Mon Sep 17 00:00:00 2001 From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:34:37 +0530 Subject: [PATCH] feat(messageHandler): switch to webSearch mode if files --- src/websocket/messageHandler.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/websocket/messageHandler.ts b/src/websocket/messageHandler.ts index d2a2518..06ea3da 100644 --- a/src/websocket/messageHandler.ts +++ b/src/websocket/messageHandler.ts @@ -108,6 +108,11 @@ export const handleMessage = async ( const parsedWSMessage = JSON.parse(message) as WSMessage; const parsedMessage = parsedWSMessage.message; + if (parsedWSMessage.files.length > 0) { + /* TODO: Implement uploads in other classes/single meta class system*/ + parsedWSMessage.focusMode = 'webSearch'; + } + const humanMessageId = parsedMessage.messageId ?? crypto.randomBytes(7).toString('hex'); const aiMessageId = crypto.randomBytes(7).toString('hex');