Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Add _throwawayFocusNode to allow continuous mode to work after dialog

hunteraraujocbdb6ac0bf5f
diff --git a/frontend/lib/views/chat/chat_input_field.dart b/frontend/lib/views/chat/chat_input_field.dart
index a54543b1ab..c3dc4601ef 100644
--- a/frontend/lib/views/chat/chat_input_field.dart
+++ b/frontend/lib/views/chat/chat_input_field.dart
@@ -23,6 +23,7 @@ class _ChatInputFieldState extends State<ChatInputField> {
// Controller for the TextField to manage its content
final TextEditingController _controller = TextEditingController();
final FocusNode _focusNode = FocusNode();
+ final FocusNode _throwawayFocusNode = FocusNode();
@override
void initState() {
@@ -44,7 +45,7 @@ class _ChatInputFieldState extends State<ChatInputField> {
final prefs = await SharedPreferences.getInstance();
final showContinuousModeDialog =
prefs.getBool('showContinuousModeDialog') ?? true;
-
+ FocusScope.of(context).requestFocus(_throwawayFocusNode);
if (showContinuousModeDialog) {
showDialog(
context: context,