Fix/compact disabled during approval (#10089)

Signed-off-by: Theofanis Petkos <tpetkos@redhat.com>
Signed-off-by: thepetk@gmail.com <thepetk@gmail.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
This commit is contained in:
Theofanis Petkos
2026-07-13 14:53:16 +01:00
committed by GitHub
parent fb6a43140e
commit bb769fcf61
+3 -4
View File
@@ -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: [] });
@@ -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]);
// Cleanup effect for component unmount - prevent memory leaks
useEffect(() => {