feat(messageHandler): switch to webSearch mode if files

This commit is contained in:
ItzCrazyKns 2024-11-25 12:34:37 +05:30
parent be745501aa
commit 64ee19c70a
1 changed files with 5 additions and 0 deletions

View File

@ -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');