Handle compose box clearing in copilot

This commit is contained in:
akhisud3195 2025-04-03 23:25:41 +05:30
parent 2e9a81dfba
commit 2a5176119a

View file

@ -68,9 +68,12 @@ const App = forwardRef(function App({
function handleUserMessage(prompt: string) {
setMessages([...messages, {
role: 'user',
content: prompt,
content: prompt
}]);
setResponseError(null);
// Set loading immediately after adding user message
// This ensures ComposeBox clears and disables right away
setLoadingResponse(true);
}
const handleApplyChange = useCallback((