Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
fix: block sending by Enter while a reply is in progress (#2529)
DavdGao26b936c9afa8
diff --git a/examples/web_ui/frontend/src/components/chat/TextInput.tsx b/examples/web_ui/frontend/src/components/chat/TextInput.tsxindex 37fcda415..4678892da 100644--- a/examples/web_ui/frontend/src/components/chat/TextInput.tsx+++ b/examples/web_ui/frontend/src/components/chat/TextInput.tsx@@ -218,7 +218,9 @@ export const TextInput = forwardRef<TextInputRef, TextInputProps>(};const handleSend = () => {- if (!value.trim() || disabled || hasProcessing) return;+ // ``phase`` is guarded here rather than only on the button, since Enter+ // calls this directly and would otherwise send during a running reply.+ if (phase !== 'idle' || !value.trim() || disabled || hasProcessing) return;const blocks: ContentBlock[] = [];