mirror of https://github.com/buster-so/buster.git
auto select update for files
This commit is contained in:
parent
35f7a7c49d
commit
7c49aaadef
|
@ -94,6 +94,8 @@ export const ChatContextProvider = React.memo(({ children }: PropsWithChildren<{
|
|||
onSetSelectedFile
|
||||
});
|
||||
|
||||
console.log(selectedFile);
|
||||
|
||||
return (
|
||||
<IndividualChatContext.Provider value={useChatContextValue}>
|
||||
{children}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue