You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_cubit.dart
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -57,8 +57,13 @@ class AiWriterCubit extends Cubit<AiWriterState> {
57
57
bool withDiscard =true,
58
58
bool withUnformat =true,
59
59
}) async {
60
+
if (aiWriterNode ==null) {
61
+
return;
62
+
}
60
63
if (withDiscard) {
61
-
await _textRobot.discard();
64
+
await _textRobot.discard(
65
+
afterSelection: aiWriterNode!.aiWriterSelection,
66
+
);
62
67
}
63
68
_textRobot.clear();
64
69
_textRobot.reset();
@@ -232,6 +237,12 @@ class AiWriterCubit extends Cubit<AiWriterState> {
Copy file name to clipboardExpand all lines: frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/widgets/ai_writer_scroll_wrapper.dart
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@ class _AiWriterScrollWrapperState extends State<AiWriterScrollWrapper> {
0 commit comments