[PR #2107] [MERGED] feat: insert below and replace in smart-edit highlights text #5096

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2107
Author: @squidrye
Created: 3/25/2023
Status: Merged
Merged: 5/3/2023
Merged by: @LucasXu0

Base: mainHead: highlight-summary-2059


📝 Commits (10+)

  • 3731a25 feat: insert below and replace in smart-edit highlights text
  • 46729cf Merge branch 'AppFlowy-IO:main' into highlight-summary-2059
  • e4afc64 test: added integration tests to validate insert below and replace in smart-edit highlights text
  • 994b2ca refactor: using get_it to inject OpenAiRepository to inject mock repo in test
  • 7c9ed9e Merge branch 'AppFlowy-IO:main' into highlight-summary-2059
  • 0fdfac4 Merge branch 'AppFlowy-IO:main' into highlight-summary-2059
  • eeacd87 fix: delete node does not propagate non null selection
  • 69c6b2b refactor: suggested changes and fixed bugs causing warning in github-ci
  • 1fa5562 fix: integration tests causing error in github-ci
  • 790ac32 chore: merge conflicts

📊 Changes

10 files changed (+283 additions, -57 deletions)

View changed files

frontend/appflowy_flutter/assets/test/workspaces/ai_workspace.zip (+0 -0)
frontend/appflowy_flutter/integration_test/open_ai_smart_menu_test.dart (+108 -0)
📝 frontend/appflowy_flutter/integration_test/runner.dart (+2 -0)
📝 frontend/appflowy_flutter/integration_test/util/data.dart (+1 -0)
frontend/appflowy_flutter/integration_test/util/mock/mock_openai_repository.dart (+76 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/service/openai_client.dart (+1 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_node_widget.dart (+71 -53)
📝 frontend/appflowy_flutter/lib/startup/deps_resolver.dart (+21 -2)
📝 frontend/appflowy_flutter/pubspec.lock (+1 -1)
📝 frontend/appflowy_flutter/pubspec.yaml (+2 -1)

📄 Description

Using open-ai to replace or insert a summary or spelling-fix from selected text was not highlighted due to which user had a hard time locating it in between large paragraphs. This PR adds this feature to highlight replacement text.

https://user-images.githubusercontent.com/84044317/227710029-6802041d-1b0b-45ac-859f-148fb0e2fd22.mp4

fixes #2059
requires #2100 to avoid inconsistencies


🔄 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/2107 **Author:** [@squidrye](https://github.com/squidrye) **Created:** 3/25/2023 **Status:** ✅ Merged **Merged:** 5/3/2023 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `highlight-summary-2059` --- ### 📝 Commits (10+) - [`3731a25`](https://github.com/AppFlowy-IO/AppFlowy/commit/3731a25d9acd8111cc2d4bfe67926d8245f2a19c) feat: insert below and replace in smart-edit highlights text - [`46729cf`](https://github.com/AppFlowy-IO/AppFlowy/commit/46729cfb0eb59e0424a1e4e56dc7819641bfe9b1) Merge branch 'AppFlowy-IO:main' into highlight-summary-2059 - [`e4afc64`](https://github.com/AppFlowy-IO/AppFlowy/commit/e4afc6473a6fee6701719b0100c00ccf24c6f6a4) test: added integration tests to validate insert below and replace in smart-edit highlights text - [`994b2ca`](https://github.com/AppFlowy-IO/AppFlowy/commit/994b2ca37146feba13e002d8b9fcf83446aa713a) refactor: using get_it to inject OpenAiRepository to inject mock repo in test - [`7c9ed9e`](https://github.com/AppFlowy-IO/AppFlowy/commit/7c9ed9e689ecd6b58a22c76993880e8cd43f2f91) Merge branch 'AppFlowy-IO:main' into highlight-summary-2059 - [`0fdfac4`](https://github.com/AppFlowy-IO/AppFlowy/commit/0fdfac4101adfd6202ea68d1121e7c8b59f99be8) Merge branch 'AppFlowy-IO:main' into highlight-summary-2059 - [`eeacd87`](https://github.com/AppFlowy-IO/AppFlowy/commit/eeacd872bb3e4f89d60c3775c2aebdff370cc502) fix: delete node does not propagate non null selection - [`69c6b2b`](https://github.com/AppFlowy-IO/AppFlowy/commit/69c6b2b07e114c0acbb3cd5d6da8d76b46d22aaa) refactor: suggested changes and fixed bugs causing warning in github-ci - [`1fa5562`](https://github.com/AppFlowy-IO/AppFlowy/commit/1fa55620db9854c423cf7ad7ac1587d4d9cda80b) fix: integration tests causing error in github-ci - [`790ac32`](https://github.com/AppFlowy-IO/AppFlowy/commit/790ac320a8e1ddc6dab2d5648e88362a51417472) chore: merge conflicts ### 📊 Changes **10 files changed** (+283 additions, -57 deletions) <details> <summary>View changed files</summary> ➕ `frontend/appflowy_flutter/assets/test/workspaces/ai_workspace.zip` (+0 -0) ➕ `frontend/appflowy_flutter/integration_test/open_ai_smart_menu_test.dart` (+108 -0) 📝 `frontend/appflowy_flutter/integration_test/runner.dart` (+2 -0) 📝 `frontend/appflowy_flutter/integration_test/util/data.dart` (+1 -0) ➕ `frontend/appflowy_flutter/integration_test/util/mock/mock_openai_repository.dart` (+76 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/service/openai_client.dart` (+1 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_node_widget.dart` (+71 -53) 📝 `frontend/appflowy_flutter/lib/startup/deps_resolver.dart` (+21 -2) 📝 `frontend/appflowy_flutter/pubspec.lock` (+1 -1) 📝 `frontend/appflowy_flutter/pubspec.yaml` (+2 -1) </details> ### 📄 Description Using open-ai to replace or insert a summary or spelling-fix from selected text was not highlighted due to which user had a hard time locating it in between large paragraphs. This PR adds this feature to highlight replacement text. https://user-images.githubusercontent.com/84044317/227710029-6802041d-1b0b-45ac-859f-148fb0e2fd22.mp4 fixes #2059 requires #2100 to avoid inconsistencies --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:17:12 +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#5096
No description provided.