We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4c93ef2 + 432fbca commit f2e1a49Copy full SHA for f2e1a49
client/src/components/chat.tsx
@@ -61,10 +61,13 @@ export default function Page({ agentId }: { agentId: UUID }) {
61
62
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
63
if (e.key === "Enter" && !e.shiftKey) {
64
+ e.preventDefault();
65
+ if (e.nativeEvent.isComposing) return;
66
handleSendMessage(e as unknown as React.FormEvent<HTMLFormElement>);
67
}
68
};
69
70
+
71
const handleSendMessage = (e: React.FormEvent<HTMLFormElement>) => {
72
e.preventDefault();
73
if (!input) return;
0 commit comments