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
});
console.log(selectedFile);
return (
<IndividualChatContext.Provider value={useChatContextValue}>
{children}

View File

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