[PR #6851] [MERGED] chore: improve ai chat errors #7604

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6851
Author: @richardshiue
Created: 11/24/2024
Status: Merged
Merged: 11/25/2024
Merged by: @richardshiue

Base: mainHead: chore/improve-ai-chat-errors


📝 Commits (5)

  • befc514 chore: move margins to layout define
  • 6cb1b18 chore: related question alignment
  • 7f539f4 chore: adjust vertical spacing around sources
  • 5a90483 chore: scroll to bottom animation improvement
  • 6406c52 chore: improve ai chat error handling

📊 Changes

13 files changed (+266 additions, -369 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_ai_message_bloc.dart (+36 -32)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_bloc.dart (+42 -35)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_entity.dart (+3 -36)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_message_stream.dart (+9 -18)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/chat_page.dart (+6 -17)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/animated_chat_list.dart (+16 -13)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/chat_related_question.dart (+18 -11)
frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/chat_user_invalid_message.dart (+0 -52)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/layout_define.dart (+4 -0)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_metadata.dart (+2 -2)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_text_message.dart (+22 -149)
frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/error_text_message.dart (+107 -0)
📝 frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/user_message_bubble.dart (+1 -4)

📄 Description

  • adjust suggested follow up question style
  • code clean up
  • in one time shot messages, store the type in the metadata map as OnetimeShotType directly instead of converting into string first. Then we don't have to call fromString later.

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/6851 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 11/24/2024 **Status:** ✅ Merged **Merged:** 11/25/2024 **Merged by:** [@richardshiue](https://github.com/richardshiue) **Base:** `main` ← **Head:** `chore/improve-ai-chat-errors` --- ### 📝 Commits (5) - [`befc514`](https://github.com/AppFlowy-IO/AppFlowy/commit/befc514369cbf388528ee550d5613cad249e7887) chore: move margins to layout define - [`6cb1b18`](https://github.com/AppFlowy-IO/AppFlowy/commit/6cb1b18e8e469a15e7d9d9965da78b3d272068da) chore: related question alignment - [`7f539f4`](https://github.com/AppFlowy-IO/AppFlowy/commit/7f539f4963664301d521b019460c5778ffc9ef0f) chore: adjust vertical spacing around sources - [`5a90483`](https://github.com/AppFlowy-IO/AppFlowy/commit/5a90483bcf92b622f84e147f463f4d1a637ed57f) chore: scroll to bottom animation improvement - [`6406c52`](https://github.com/AppFlowy-IO/AppFlowy/commit/6406c52af9d6333cab1e919232427797b06e6769) chore: improve ai chat error handling ### 📊 Changes **13 files changed** (+266 additions, -369 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_ai_message_bloc.dart` (+36 -32) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_bloc.dart` (+42 -35) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_entity.dart` (+3 -36) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/application/chat_message_stream.dart` (+9 -18) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/chat_page.dart` (+6 -17) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/animated_chat_list.dart` (+16 -13) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/chat_related_question.dart` (+18 -11) ➖ `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/chat_user_invalid_message.dart` (+0 -52) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/layout_define.dart` (+4 -0) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_metadata.dart` (+2 -2) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_text_message.dart` (+22 -149) ➕ `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/error_text_message.dart` (+107 -0) 📝 `frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/user_message_bubble.dart` (+1 -4) </details> ### 📄 Description - adjust suggested follow up question style - code clean up - in one time shot messages, store the type in the metadata map as `OnetimeShotType` directly instead of converting into string first. Then we don't have to call `fromString` later. ### 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 - [x] 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:20:23 +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#7604
No description provided.