mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
feat(frontend): Allow sending a message with the enter key (#6378)
This has not yet been tested due to an issue with compiling on WSL. This was the fix suggested by Pwuts.
This commit is contained in:
@@ -116,6 +116,12 @@ class _ChatInputFieldState extends State<ChatInputField> {
|
||||
child: TextField(
|
||||
controller: _controller,
|
||||
focusNode: _focusNode,
|
||||
// Enable enter key stroke to send the message
|
||||
// Untested but submitted at Pwuts recommendation
|
||||
onSubmitted: () {
|
||||
widget.onSendPressed(_controller.text);
|
||||
_controller.clear();
|
||||
},
|
||||
// Allowing the TextField to expand vertically and accommodate multiple lines
|
||||
maxLines: null,
|
||||
decoration: InputDecoration(
|
||||
|
||||
Reference in New Issue
Block a user