[PR #7590] [MERGED] chore: support switch ai model in chat/ AI writer #7984

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7590
Author: @appflowy
Created: 3/23/2025
Status: Merged
Merged: 3/24/2025
Merged by: @appflowy

Base: mainHead: support_switch_model


📝 Commits (4)

  • 05949d2 chore: support switch ai model in chat or ai writer
  • 949556e chore: remove tauri feature
  • 2cbcb32 chore: add timeout
  • 3708504 chore: clippy

📊 Changes

53 files changed (+1000 additions, -398 deletions)

View changed files

frontend/appflowy_flutter/lib/ai/service/ai_input_control.dart (+138 -0)
📝 frontend/appflowy_flutter/lib/ai/service/ai_prompt_input_bloc.dart (+24 -50)
frontend/appflowy_flutter/lib/ai/service/select_model_bloc.dart (+82 -0)
📝 frontend/appflowy_flutter/lib/ai/widgets/prompt_input/desktop_prompt_text_field.dart (+164 -6)
frontend/appflowy_flutter/lib/plugins/ai_chat/application/ai_model_switch_listener.dart (+53 -0)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/chat_page.dart (+1 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/ai_writer_block_component.dart (+4 -0)
📝 frontend/appflowy_flutter/lib/workspace/application/settings/ai/settings_ai_bloc.dart (+1 -1)
📝 frontend/resources/translations/en.json (+3 -1)
📝 frontend/rust-lib/Cargo.lock (+13 -12)
📝 frontend/rust-lib/Cargo.toml (+2 -2)
📝 frontend/rust-lib/build-tool/flowy-codegen/src/protobuf_file/mod.rs (+1 -1)
📝 frontend/rust-lib/build-tool/flowy-codegen/src/ts_event/mod.rs (+2 -2)
📝 frontend/rust-lib/event-integration-test/src/chat_event.rs (+2 -25)
frontend/rust-lib/event-integration-test/tests/chat/ai_tool_test.rs (+0 -19)
📝 frontend/rust-lib/event-integration-test/tests/chat/mod.rs (+0 -1)
📝 frontend/rust-lib/flowy-ai-pub/Cargo.toml (+1 -0)
📝 frontend/rust-lib/flowy-ai-pub/src/cloud.rs (+20 -0)
📝 frontend/rust-lib/flowy-ai/Cargo.toml (+0 -2)
📝 frontend/rust-lib/flowy-ai/build.rs (+0 -16)

...and 33 more files

📄 Description

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/7590 **Author:** [@appflowy](https://github.com/appflowy) **Created:** 3/23/2025 **Status:** ✅ Merged **Merged:** 3/24/2025 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `support_switch_model` --- ### 📝 Commits (4) - [`05949d2`](https://github.com/AppFlowy-IO/AppFlowy/commit/05949d2f87f129b5a77014f1b9b167fc15f7502f) chore: support switch ai model in chat or ai writer - [`949556e`](https://github.com/AppFlowy-IO/AppFlowy/commit/949556e2fa3be43df6263f373fdbdb2babaa1105) chore: remove tauri feature - [`2cbcb32`](https://github.com/AppFlowy-IO/AppFlowy/commit/2cbcb320fe706aca1d45a399cf3428f82dd7cdeb) chore: add timeout - [`3708504`](https://github.com/AppFlowy-IO/AppFlowy/commit/37085042f8a818575657fc96a6ea67f9fc652eb0) chore: clippy ### 📊 Changes **53 files changed** (+1000 additions, -398 deletions) <details> <summary>View changed files</summary> ➕ `frontend/appflowy_flutter/lib/ai/service/ai_input_control.dart` (+138 -0) 📝 `frontend/appflowy_flutter/lib/ai/service/ai_prompt_input_bloc.dart` (+24 -50) ➕ `frontend/appflowy_flutter/lib/ai/service/select_model_bloc.dart` (+82 -0) 📝 `frontend/appflowy_flutter/lib/ai/widgets/prompt_input/desktop_prompt_text_field.dart` (+164 -6) ➕ `frontend/appflowy_flutter/lib/plugins/ai_chat/application/ai_model_switch_listener.dart` (+53 -0) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/chat_page.dart` (+1 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/ai_writer_block_component.dart` (+4 -0) 📝 `frontend/appflowy_flutter/lib/workspace/application/settings/ai/settings_ai_bloc.dart` (+1 -1) 📝 `frontend/resources/translations/en.json` (+3 -1) 📝 `frontend/rust-lib/Cargo.lock` (+13 -12) 📝 `frontend/rust-lib/Cargo.toml` (+2 -2) 📝 `frontend/rust-lib/build-tool/flowy-codegen/src/protobuf_file/mod.rs` (+1 -1) 📝 `frontend/rust-lib/build-tool/flowy-codegen/src/ts_event/mod.rs` (+2 -2) 📝 `frontend/rust-lib/event-integration-test/src/chat_event.rs` (+2 -25) ➖ `frontend/rust-lib/event-integration-test/tests/chat/ai_tool_test.rs` (+0 -19) 📝 `frontend/rust-lib/event-integration-test/tests/chat/mod.rs` (+0 -1) 📝 `frontend/rust-lib/flowy-ai-pub/Cargo.toml` (+1 -0) 📝 `frontend/rust-lib/flowy-ai-pub/src/cloud.rs` (+20 -0) 📝 `frontend/rust-lib/flowy-ai/Cargo.toml` (+0 -2) 📝 `frontend/rust-lib/flowy-ai/build.rs` (+0 -16) _...and 33 more files_ </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### 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 - [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/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. --- <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:04 +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#7984
No description provided.