[PR #7903] [MERGED] Vault workspace suggested question #8198

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7903
Author: @appflowy
Created: 5/9/2025
Status: Merged
Merged: 5/9/2025
Merged by: @appflowy

Base: mainHead: vault_workspace_suggested_question


📝 Commits (10+)

  • de63278 chore: return suggested question when ai say i don't know
  • eb1271e chore: new message type
  • 874c106 chore: implement uI
  • 8d94979 Merge branch 'main' into vault_workspace_suggested_question
  • 1426d6a chore: implement UI
  • 17b4579 fix: assertion in local ai chat
  • 187e931 chore: implement UI
  • a29a832 chore: update prompt
  • da80c41 chore: update logs
  • 0c8973c chore: add tests

📊 Changes

54 files changed (+1193 additions, -547 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/ai/service/ai_entities.dart (+6 -5)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_ai_message_bloc.dart (+16 -0)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_bloc.dart (+13 -2)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_message_stream.dart (+32 -3)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/animated_chat_list.dart (+3 -1)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/chat_page/text_message_widget.dart (+2 -0)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_text_message.dart (+92 -79)
📝 frontend/appflowy_flutter/macos/Podfile.lock (+22 -22)
📝 frontend/rust-lib/Cargo.lock (+15 -13)
📝 frontend/rust-lib/Cargo.toml (+3 -3)
📝 frontend/rust-lib/event-integration-test/src/chat_event.rs (+20 -3)
frontend/rust-lib/event-integration-test/tests/asset/japan_trip.md (+23 -0)
📝 frontend/rust-lib/event-integration-test/tests/chat/local_chat_test.rs (+42 -0)
📝 frontend/rust-lib/event-integration-test/tests/util.rs (+7 -0)
📝 frontend/rust-lib/flowy-ai-pub/Cargo.toml (+1 -0)
📝 frontend/rust-lib/flowy-ai-pub/src/entities.rs (+1 -0)
📝 frontend/rust-lib/flowy-ai-pub/src/user_service.rs (+4 -0)
📝 frontend/rust-lib/flowy-ai/Cargo.toml (+2 -2)
📝 frontend/rust-lib/flowy-ai/src/ai_manager.rs (+15 -16)
📝 frontend/rust-lib/flowy-ai/src/chat.rs (+15 -7)

...and 34 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.

Summary by Sourcery

Enhance the AI chat functionality by adding context-aware suggested questions and improving the conversational retrieval chain in the AppFlowy local AI system

New Features:

  • Add context-based suggested questions when no relevant documents are found
  • Implement a mechanism to generate related questions for AI chat
  • Enhance streaming response to support suggested questions

Enhancements:

  • Improve conversational retrieval chain to handle scenarios with limited context
  • Refactor AI chat message handling to support more dynamic interactions
  • Add more robust error handling and fallback mechanisms

Tests:

  • Add test cases for context-based question generation
  • Implement integration tests for AI chat suggested questions feature

🔄 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/7903 **Author:** [@appflowy](https://github.com/appflowy) **Created:** 5/9/2025 **Status:** ✅ Merged **Merged:** 5/9/2025 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `vault_workspace_suggested_question` --- ### 📝 Commits (10+) - [`de63278`](https://github.com/AppFlowy-IO/AppFlowy/commit/de632780574f4e52dd3e7fe0762e88076916074b) chore: return suggested question when ai say i don't know - [`eb1271e`](https://github.com/AppFlowy-IO/AppFlowy/commit/eb1271e0c8dbda04a4484c56287beaaae034351e) chore: new message type - [`874c106`](https://github.com/AppFlowy-IO/AppFlowy/commit/874c10607969e85e7a4a0f49061c63a38b7be851) chore: implement uI - [`8d94979`](https://github.com/AppFlowy-IO/AppFlowy/commit/8d949793a60de7e69d948418ce3077a3a66b34d3) Merge branch 'main' into vault_workspace_suggested_question - [`1426d6a`](https://github.com/AppFlowy-IO/AppFlowy/commit/1426d6a8be951d4c9c9865d6c2c9f26c52530a1d) chore: implement UI - [`17b4579`](https://github.com/AppFlowy-IO/AppFlowy/commit/17b4579a9f2bf633df8e7036eea982ef4c49ecc8) fix: assertion in local ai chat - [`187e931`](https://github.com/AppFlowy-IO/AppFlowy/commit/187e9315d36097e4901ffc68b6c0f5c2d0cc30d9) chore: implement UI - [`a29a832`](https://github.com/AppFlowy-IO/AppFlowy/commit/a29a83271478dfb25fe9b61b4e5d0a9ba8f49ea8) chore: update prompt - [`da80c41`](https://github.com/AppFlowy-IO/AppFlowy/commit/da80c4132a87a7225556e29d128db0d872cdea1c) chore: update logs - [`0c8973c`](https://github.com/AppFlowy-IO/AppFlowy/commit/0c8973c61ccd23c54c2da9c8deec6410cd4781c5) chore: add tests ### 📊 Changes **54 files changed** (+1193 additions, -547 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/ai/service/ai_entities.dart` (+6 -5) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_ai_message_bloc.dart` (+16 -0) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_bloc.dart` (+13 -2) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_message_stream.dart` (+32 -3) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/animated_chat_list.dart` (+3 -1) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/chat_page/text_message_widget.dart` (+2 -0) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_text_message.dart` (+92 -79) 📝 `frontend/appflowy_flutter/macos/Podfile.lock` (+22 -22) 📝 `frontend/rust-lib/Cargo.lock` (+15 -13) 📝 `frontend/rust-lib/Cargo.toml` (+3 -3) 📝 `frontend/rust-lib/event-integration-test/src/chat_event.rs` (+20 -3) ➕ `frontend/rust-lib/event-integration-test/tests/asset/japan_trip.md` (+23 -0) 📝 `frontend/rust-lib/event-integration-test/tests/chat/local_chat_test.rs` (+42 -0) 📝 `frontend/rust-lib/event-integration-test/tests/util.rs` (+7 -0) 📝 `frontend/rust-lib/flowy-ai-pub/Cargo.toml` (+1 -0) 📝 `frontend/rust-lib/flowy-ai-pub/src/entities.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-ai-pub/src/user_service.rs` (+4 -0) 📝 `frontend/rust-lib/flowy-ai/Cargo.toml` (+2 -2) 📝 `frontend/rust-lib/flowy-ai/src/ai_manager.rs` (+15 -16) 📝 `frontend/rust-lib/flowy-ai/src/chat.rs` (+15 -7) _...and 34 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. ## Summary by Sourcery Enhance the AI chat functionality by adding context-aware suggested questions and improving the conversational retrieval chain in the AppFlowy local AI system New Features: - Add context-based suggested questions when no relevant documents are found - Implement a mechanism to generate related questions for AI chat - Enhance streaming response to support suggested questions Enhancements: - Improve conversational retrieval chain to handle scenarios with limited context - Refactor AI chat message handling to support more dynamic interactions - Add more robust error handling and fallback mechanisms Tests: - Add test cases for context-based question generation - Implement integration tests for AI chat suggested questions feature --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:23: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#8198
No description provided.