auto select update for files

This commit is contained in:
Nate Kelley 2025-04-14 14:08:21 -06:00
parent 35f7a7c49d
commit 7c49aaadef
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 6 additions and 6 deletions

View File

@ -94,6 +94,8 @@ export const ChatContextProvider = React.memo(({ children }: PropsWithChildren<{
onSetSelectedFile onSetSelectedFile
}); });
console.log(selectedFile);
return ( return (
<IndividualChatContext.Provider value={useChatContextValue}> <IndividualChatContext.Provider value={useChatContextValue}>
{children} {children}

View File

@ -128,9 +128,8 @@ export const useAutoChangeLayout = ({
message.type === 'file' && message.type === 'file' &&
message.file_type === 'dashboard' && message.file_type === 'dashboard' &&
message.id === dashboardId; message.id === dashboardId;
if (isFile) { if (isFile) return message;
return message;
}
return acc; return acc;
}, undefined); }, undefined);
@ -158,9 +157,8 @@ export const useAutoChangeLayout = ({
const message = chatMessage?.response_messages[messageId]!; const message = chatMessage?.response_messages[messageId]!;
const isFile = const isFile =
message.type === 'file' && message.file_type === 'metric' && message.id === metricId; message.type === 'file' && message.file_type === 'metric' && message.id === metricId;
if (isFile) { if (isFile) return message;
return message;
}
return acc; return acc;
}, undefined); }, undefined);