Skip to content

Commit

Permalink
feat(messageHandler): switch to webSearch mode if files
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzCrazyKns committed Nov 25, 2024
1 parent be74550 commit 64ee19c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/websocket/messageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 64ee19c

Please sign in to comment.