[PR #1880] [MERGED] Feature/smart edit v2 #4994

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1880
Author: @LucasXu0
Created: 2/22/2023
Status: Merged
Merged: 2/28/2023
Merged by: @LucasXu0

Base: mainHead: feature/smart_edit_v2


📝 Commits (10+)

  • ec0f87e feat: add edit api to openai client
  • 1a9d174 feat: add translation
  • 7de37ef chore: format code
  • c599ad9 feat: add smart edit plugin
  • 9697e18 fix: close http.client when dispose
  • a54984e fix: insert openai result to wrong position
  • 8576de1 feat: optimize the replace text logic
  • 0ef0234 test: add test for normalize and getTextInSelection function
  • d91b27e Merge branch 'main' into feature/smart_edit_v2
  • ada950b chore: update error message

📊 Changes

22 files changed (+701 additions, -44 deletions)

View changed files

📝 frontend/appflowy_flutter/assets/translations/en.json (+8 -2)
📝 frontend/appflowy_flutter/lib/plugins/document/application/doc_bloc.dart (+3 -2)
📝 frontend/appflowy_flutter/lib/plugins/document/document_page.dart (+8 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/service/openai_client.dart (+41 -1)
frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/service/text_edit.dart (+24 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/auto_completion_node_widget.dart (+2 -3)
frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_action.dart (+36 -0)
frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_node_widget.dart (+277 -0)
frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_toolbar_item.dart (+93 -0)
📝 frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart (+0 -1)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/appflowy_editor.dart (+1 -0)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/commands/command_extension.dart (+19 -0)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/commands/text/text_commands.dart (+0 -1)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/core/transform/transaction.dart (+51 -0)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/extensions/node_extensions.dart (+14 -0)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart (+18 -7)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item_widget.dart (+20 -17)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_widget.dart (+13 -8)
📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/toolbar_service.dart (+1 -1)
frontend/appflowy_flutter/packages/appflowy_editor/test/command/command_extension_test.dart (+36 -0)

...and 2 more files

📄 Description

Closes #1866


🔄 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/1880 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 2/22/2023 **Status:** ✅ Merged **Merged:** 2/28/2023 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `feature/smart_edit_v2` --- ### 📝 Commits (10+) - [`ec0f87e`](https://github.com/AppFlowy-IO/AppFlowy/commit/ec0f87e179547499371f7467ec56a5f104c37d4a) feat: add edit api to openai client - [`1a9d174`](https://github.com/AppFlowy-IO/AppFlowy/commit/1a9d1741cf4f604f9d0e747f78a01bdf20547f59) feat: add translation - [`7de37ef`](https://github.com/AppFlowy-IO/AppFlowy/commit/7de37ef4bc878f4b86b7c1f7943508fbd72f3d54) chore: format code - [`c599ad9`](https://github.com/AppFlowy-IO/AppFlowy/commit/c599ad94d41bceefd4dc7007bf1fea3759dc4f36) feat: add smart edit plugin - [`9697e18`](https://github.com/AppFlowy-IO/AppFlowy/commit/9697e181766581e09f41a12372a16819575fc56e) fix: close http.client when dispose - [`a54984e`](https://github.com/AppFlowy-IO/AppFlowy/commit/a54984eeaed5e5053a07f7e7452b57bd52a74dd3) fix: insert openai result to wrong position - [`8576de1`](https://github.com/AppFlowy-IO/AppFlowy/commit/8576de1b21b71b51e0cdd353fcaa6a9e1b457b90) feat: optimize the replace text logic - [`0ef0234`](https://github.com/AppFlowy-IO/AppFlowy/commit/0ef0234e2557195d84b45953efb0e387a0a04df4) test: add test for normalize and getTextInSelection function - [`d91b27e`](https://github.com/AppFlowy-IO/AppFlowy/commit/d91b27eb9fe30a6a20d15a75f8e42f6e2a604171) Merge branch 'main' into feature/smart_edit_v2 - [`ada950b`](https://github.com/AppFlowy-IO/AppFlowy/commit/ada950bcf636b1b0868f2dc598d525b1d02dbe84) chore: update error message ### 📊 Changes **22 files changed** (+701 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/assets/translations/en.json` (+8 -2) 📝 `frontend/appflowy_flutter/lib/plugins/document/application/doc_bloc.dart` (+3 -2) 📝 `frontend/appflowy_flutter/lib/plugins/document/document_page.dart` (+8 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/service/openai_client.dart` (+41 -1) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/service/text_edit.dart` (+24 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/auto_completion_node_widget.dart` (+2 -3) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_action.dart` (+36 -0) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_node_widget.dart` (+277 -0) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_toolbar_item.dart` (+93 -0) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart` (+0 -1) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/appflowy_editor.dart` (+1 -0) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/commands/command_extension.dart` (+19 -0) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/commands/text/text_commands.dart` (+0 -1) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/core/transform/transaction.dart` (+51 -0) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/extensions/node_extensions.dart` (+14 -0) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart` (+18 -7) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item_widget.dart` (+20 -17) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/render/toolbar/toolbar_widget.dart` (+13 -8) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/toolbar_service.dart` (+1 -1) ➕ `frontend/appflowy_flutter/packages/appflowy_editor/test/command/command_extension_test.dart` (+36 -0) _...and 2 more files_ </details> ### 📄 Description Closes #1866 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:16:44 +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#4994
No description provided.