[PR #7615] [MERGED] fix: ai text insertion #7996

Closed
opened 2026-03-23 23:22:08 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7615
Author: @richardshiue
Created: 3/25/2025
Status: Merged
Merged: 3/25/2025
Merged by: @richardshiue

Base: mainHead: fix/ai-text-insertion


📝 Commits (5)

  • 368ce95 fix: dont scroll to ai writer node if path not found
  • a29204c chore: rename text robot clear method and add reset
  • ca9a1a8 fix: insert position is off if using ai writer multiple times
  • ce5c9c8 chore: reorganize code
  • 1340e73 fix: undo not working after accept

📊 Changes

4 files changed (+65 additions, -98 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_block_operations.dart (+24 -6)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_cubit.dart (+30 -87)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/widgets/ai_writer_scroll_wrapper.dart (+5 -3)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/markdown_text_robot.dart (+6 -2)

📄 Description

  • exceptions thrown right and left during generation
  • inserted ai result isn't placed correctly in the document
  • insert position is off if ai writer is run multiple times
  • undo not working after using accept

Feature Preview


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/7615 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 3/25/2025 **Status:** ✅ Merged **Merged:** 3/25/2025 **Merged by:** [@richardshiue](https://github.com/richardshiue) **Base:** `main` ← **Head:** `fix/ai-text-insertion` --- ### 📝 Commits (5) - [`368ce95`](https://github.com/AppFlowy-IO/AppFlowy/commit/368ce951bf58085479a079d000cb55248cc11857) fix: dont scroll to ai writer node if path not found - [`a29204c`](https://github.com/AppFlowy-IO/AppFlowy/commit/a29204c0acf9fd8dda90649677619ef9a2c07b56) chore: rename text robot clear method and add reset - [`ca9a1a8`](https://github.com/AppFlowy-IO/AppFlowy/commit/ca9a1a8216bd51ecad52b998ff9915d52d1e42c3) fix: insert position is off if using ai writer multiple times - [`ce5c9c8`](https://github.com/AppFlowy-IO/AppFlowy/commit/ce5c9c8d7d58fdd0d8cd18b21899c36e966c4f06) chore: reorganize code - [`1340e73`](https://github.com/AppFlowy-IO/AppFlowy/commit/1340e737814cbfab29d7d04c5e1f80e4759e4f2c) fix: undo not working after accept ### 📊 Changes **4 files changed** (+65 additions, -98 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_block_operations.dart` (+24 -6) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_cubit.dart` (+30 -87) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/widgets/ai_writer_scroll_wrapper.dart` (+5 -3) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/markdown_text_robot.dart` (+6 -2) </details> ### 📄 Description - [x] exceptions thrown right and left during generation - [x] inserted ai result isn't placed correctly in the document - [x] insert position is off if ai writer is run multiple times - [x] undo not working after using accept ### Feature Preview <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:22:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#7996
No description provided.