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} onChange={onChange}
onStop={onStopChat} onStop={onStopChat}
loading={loading} loading={loading}
value={inputValue}
disabledSubmit={disableSubmit} disabledSubmit={disableSubmit}
autoFocus autoFocus
ref={textAreaRef} ref={textAreaRef}

View File

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