Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ui/desktop/src/components/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ export default function ChatInput({
total: tokenLimit,
},
showCompactButton: true,
compactButtonDisabled: !totalTokens,
compactButtonDisabled: !totalTokens || isLoading,
onCompact: () => {
window.dispatchEvent(new CustomEvent(AppEvents.HIDE_ALERT_POPOVER));
handleSubmit({ msg: MANUAL_COMPACT_TRIGGER, images: [] });
Expand All @@ -664,9 +664,8 @@ export default function ChatInput({
});
}

// Keep alert recalculation scoped to token state changes.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [totalTokens, tokenLimit, isTokenLimitLoaded, addAlert, clearAlerts]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [totalTokens, tokenLimit, isTokenLimitLoaded, isLoading, addAlert, clearAlerts]);
Comment thread
thepetk marked this conversation as resolved.

// Cleanup effect for component unmount - prevent memory leaks
useEffect(() => {
Expand Down
Loading