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
|
onSetSelectedFile
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(selectedFile);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IndividualChatContext.Provider value={useChatContextValue}>
|
<IndividualChatContext.Provider value={useChatContextValue}>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue