[PR #1858] [MERGED] feat: add openai service #4983

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1858
Author: @LucasXu0
Created: 2/14/2023
Status: Merged
Merged: 2/16/2023
Merged by: @LucasXu0

Base: mainHead: feature/auto_completion


📝 Commits (10+)

  • c9f0778 feat: add openai service
  • 401704a feat: add openai auto completion plugin
  • 40784b0 feat: add visible icon for open ai input field
  • 319d639 chore: optimize user experience
  • 7556c47 feat: add auto completion node plugin
  • 6c44fc4 feat: support keep and discard the auto generated text
  • 46c683a fix: can't delete the auto completion node
  • e7ccde4 feat: disable ai plugins if open ai key is null
  • 3de4e86 fix: wrong auto completion node card color
  • fabc940 fix: make sure the previous text node is pure when using auto generator

📊 Changes

23 files changed (+777 additions, -18 deletions)

View changed files

📝 frontend/app_flowy/assets/translations/en.json (+14 -2)
📝 frontend/app_flowy/lib/plugins/document/application/doc_bloc.dart (+16 -0)
📝 frontend/app_flowy/lib/plugins/document/document_page.dart (+14 -1)
frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/service/error.dart (+14 -0)
frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/service/openai_client.dart (+85 -0)
frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/service/text_completion.dart (+26 -0)
frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/util/editor_extension.dart (+44 -0)
frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/widgets/auto_completion_node_widget.dart (+344 -0)
frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/widgets/auto_completion_plugins.dart (+20 -0)
frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/widgets/loading.dart (+34 -0)
📝 frontend/app_flowy/lib/user/application/user_service.dart (+4 -3)
frontend/app_flowy/lib/util/either_extension.dart (+6 -0)
📝 frontend/app_flowy/lib/workspace/application/user/settings_user_bloc.dart (+2 -2)
📝 frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart (+24 -4)
📝 frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart (+1 -0)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/location/position.dart (+9 -0)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/location/selection.dart (+7 -0)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart (+0 -1)
📝 frontend/app_flowy/packages/appflowy_editor/test/core/document/node_iterator_test.dart (+0 -1)
📝 frontend/app_flowy/packages/flowy_infra_ui/lib/style_widget/button.dart (+90 -0)

...and 3 more files

📄 Description

No description provided


🔄 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/1858 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 2/14/2023 **Status:** ✅ Merged **Merged:** 2/16/2023 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `feature/auto_completion` --- ### 📝 Commits (10+) - [`c9f0778`](https://github.com/AppFlowy-IO/AppFlowy/commit/c9f0778f5704093b7cd2c093668947a18303b071) feat: add openai service - [`401704a`](https://github.com/AppFlowy-IO/AppFlowy/commit/401704af381d9df34de8305b0e53307db1c66a1b) feat: add openai auto completion plugin - [`40784b0`](https://github.com/AppFlowy-IO/AppFlowy/commit/40784b0cbecd7e17f61780c3f3a7d546b3acadd9) feat: add visible icon for open ai input field - [`319d639`](https://github.com/AppFlowy-IO/AppFlowy/commit/319d63942c5459a54e5f6e9c128cab29d182c98e) chore: optimize user experience - [`7556c47`](https://github.com/AppFlowy-IO/AppFlowy/commit/7556c4728587f00cc35cacef1bdc1ee52039a6f6) feat: add auto completion node plugin - [`6c44fc4`](https://github.com/AppFlowy-IO/AppFlowy/commit/6c44fc49a8a60de17748f88e98d71f082b2685d9) feat: support keep and discard the auto generated text - [`46c683a`](https://github.com/AppFlowy-IO/AppFlowy/commit/46c683a05361b8f1081896bb384b4422ad2e1eef) fix: can't delete the auto completion node - [`e7ccde4`](https://github.com/AppFlowy-IO/AppFlowy/commit/e7ccde46054369a8f917f25043e5f4a7035e9047) feat: disable ai plugins if open ai key is null - [`3de4e86`](https://github.com/AppFlowy-IO/AppFlowy/commit/3de4e86d6e2aa1c73b855eb0e08e05a74b1aadfc) fix: wrong auto completion node card color - [`fabc940`](https://github.com/AppFlowy-IO/AppFlowy/commit/fabc940e3bd934824cde22b3d41188ef6b09ca97) fix: make sure the previous text node is pure when using auto generator ### 📊 Changes **23 files changed** (+777 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `frontend/app_flowy/assets/translations/en.json` (+14 -2) 📝 `frontend/app_flowy/lib/plugins/document/application/doc_bloc.dart` (+16 -0) 📝 `frontend/app_flowy/lib/plugins/document/document_page.dart` (+14 -1) ➕ `frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/service/error.dart` (+14 -0) ➕ `frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/service/openai_client.dart` (+85 -0) ➕ `frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/service/text_completion.dart` (+26 -0) ➕ `frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/util/editor_extension.dart` (+44 -0) ➕ `frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/widgets/auto_completion_node_widget.dart` (+344 -0) ➕ `frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/widgets/auto_completion_plugins.dart` (+20 -0) ➕ `frontend/app_flowy/lib/plugins/document/presentation/plugins/openai/widgets/loading.dart` (+34 -0) 📝 `frontend/app_flowy/lib/user/application/user_service.dart` (+4 -3) ➕ `frontend/app_flowy/lib/util/either_extension.dart` (+6 -0) 📝 `frontend/app_flowy/lib/workspace/application/user/settings_user_bloc.dart` (+2 -2) 📝 `frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart` (+24 -4) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart` (+1 -0) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/location/position.dart` (+9 -0) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/location/selection.dart` (+7 -0) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart` (+0 -1) 📝 `frontend/app_flowy/packages/appflowy_editor/test/core/document/node_iterator_test.dart` (+0 -1) 📝 `frontend/app_flowy/packages/flowy_infra_ui/lib/style_widget/button.dart` (+90 -0) _...and 3 more files_ </details> ### 📄 Description _No description provided_ --- <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:41 +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#4983
No description provided.