aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2024-11-08 10:44:51 -0500
committerA.J. Shulman <Shulman.aj@gmail.com>2024-11-08 10:44:51 -0500
commitb4a51bce3bb05738ec9cd0efd1b795ba19cbc640 (patch)
tree4554bddcd046a389f32e464bf4702de1332f0c7b /src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
parent0f5cf4b732d955151600fe9d2ef57d5742ca01bb (diff)
looks better still some things to work out
Diffstat (limited to 'src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx')
-rw-r--r--src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx b/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
index c5ffb2c74..a61705250 100644
--- a/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
+++ b/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
@@ -756,9 +756,10 @@ export class ChatBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
<MessageComponentBox key={this.history.length} message={this.current_message} onFollowUpClick={this.handleFollowUpClick} onCitationClick={this.handleCitationClick} updateMessageCitations={this.updateMessageCitations} />
)}
</div>
+
<form onSubmit={this.askGPT} className="chat-input">
- <input type="text" name="messageInput" autoComplete="off" placeholder="Type your message here..." value={this.inputValue} onChange={e => (this.inputValue = e.target.value)} />
- <button className="submit-button" type="submit" disabled={this.isLoading}>
+ <input type="text" name="messageInput" autoComplete="off" placeholder="Type your message here..." value={this.inputValue} onChange={e => (this.inputValue = e.target.value)} disabled={this.isLoading} />
+ <button className="submit-button" type="submit" disabled={this.isLoading || !this.inputValue.trim()}>
{this.isLoading ? (
<div className="spinner"></div>
) : (