Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

Merge branch 'main' into ai_writer_test

Nathan851869644bba
diff --cc frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_cubit.dart
index e5ec888244,4bc13321b8..a5dbb69f23
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_cubit.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_cubit.dart
@@@ -277,13 -303,15 +303,17 @@@ class AiWriterCubit extends Cubit<AiWri
AiWriterCommand command,
) async {
final node = aiWriterNode;
+
+ // check the node is registered
if (node == null) {
+ Log.warn('[AI writer] Node is null');
return (false, '');
}
+
+ // check the selection is valid
final selection = node.aiWriterSelection?.normalized;
if (selection == null) {
+ Log.warn('[AI writer]Selection is null');
return (false, '');
}