Clear chat on agent change
Clear the conversation history when the selected agent changes in the "Testar Agente" screen.
This commit is contained in:
@@ -39,6 +39,11 @@ export default function TestPrompt() {
|
|||||||
}
|
}
|
||||||
}, [messages]);
|
}, [messages]);
|
||||||
|
|
||||||
|
// Limpa a conversa ao trocar de agente
|
||||||
|
useEffect(() => {
|
||||||
|
setMessages([]);
|
||||||
|
}, [selectedAgent]);
|
||||||
|
|
||||||
const handleSend = () => {
|
const handleSend = () => {
|
||||||
if (!input.trim() || !selectedAgent) return;
|
if (!input.trim() || !selectedAgent) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user