From 4f05f6dd9badaeb534b8b88733027230c423b5b6 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Mon, 22 Dec 2025 14:25:03 -0500 Subject: [PATCH] chore: prevent running IGC on empty message --- lib/pangea/choreographer/choreographer.dart | 4 ++-- lib/pangea/choreographer/choreographer_state_extension.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pangea/choreographer/choreographer.dart b/lib/pangea/choreographer/choreographer.dart index aa9b19782..f1963af06 100644 --- a/lib/pangea/choreographer/choreographer.dart +++ b/lib/pangea/choreographer/choreographer.dart @@ -183,8 +183,8 @@ class Choreographer extends ChangeNotifier { } // update assistance state from no message => not fetched and vice versa if (_lastChecked == null || - _lastChecked!.isEmpty || - textController.text.isEmpty) { + _lastChecked!.trim().isEmpty || + textController.text.trim().isEmpty) { notifyListeners(); } diff --git a/lib/pangea/choreographer/choreographer_state_extension.dart b/lib/pangea/choreographer/choreographer_state_extension.dart index e8bb94213..e02801089 100644 --- a/lib/pangea/choreographer/choreographer_state_extension.dart +++ b/lib/pangea/choreographer/choreographer_state_extension.dart @@ -8,7 +8,7 @@ extension ChoregrapherStateExtension on Choreographer { final isSubscribed = MatrixState.pangeaController.subscriptionController.isSubscribed; if (isSubscribed == false) return AssistanceStateEnum.noSub; - if (currentText.isEmpty && itController.sourceText.value == null) { + if (currentText.trim().isEmpty && itController.sourceText.value == null) { return AssistanceStateEnum.noMessage; }