fix bug in chat input

This commit is contained in:
Nate Kelley 2025-03-14 10:42:48 -06:00
parent 3b2ca0062a
commit e2cfc73916
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 4 additions and 2 deletions

View File

@ -43,6 +43,7 @@ export const ChatInput: React.FC<{}> = React.memo(({}) => {
onChange={onChange}
onStop={onStopChat}
loading={loading}
value={inputValue}
disabledSubmit={disableSubmit}
autoFocus
ref={textAreaRef}

View File

@ -113,7 +113,7 @@ const ShareMetricButtonLocal = React.memo(({ metricId }: { metricId: string }) =
ShareMetricButtonLocal.displayName = 'ShareMetricButtonLocal';
const ThreeDotMenuButton = React.memo(({ metricId }: { metricId: string }) => {
const { mutateAsync: deleteMetric } = useDeleteMetric();
const { mutateAsync: deleteMetric, isPending: isDeletingMetric } = useDeleteMetric();
const { openSuccessMessage } = useBusterNotifications();
const onSetSelectedFile = useChatLayoutContextSelector((x) => x.onSetSelectedFile);
@ -123,6 +123,7 @@ const ThreeDotMenuButton = React.memo(({ metricId }: { metricId: string }) => {
label: 'Delete',
value: 'delete',
icon: <Trash />,
loading: isDeletingMetric,
onClick: async () => {
await deleteMetric({ ids: [metricId] });
openSuccessMessage('Metric deleted');
@ -130,7 +131,7 @@ const ThreeDotMenuButton = React.memo(({ metricId }: { metricId: string }) => {
}
}
],
[deleteMetric, metricId, openSuccessMessage, onSetSelectedFile]
[deleteMetric, isDeletingMetric, metricId, openSuccessMessage, onSetSelectedFile]
);
return (