feat(core): support open doc in ai session history (#13035)

Close [AI-240
<img width="533" alt="截屏2025-07-04 18 04 39"
src="https://github.com/user-attachments/assets/726a54b6-3bdb-4e70-9cda-4671d83ae5bd"
/>
](https://linear.app/affine-design/issue/AI-240)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Enhanced chat toolbar and session history with the ability to open
specific documents directly from the chat interface.
* Added tooltips and improved click handling for clearer user
interactions in chat session and document lists.

* **Bug Fixes**
* Prevented redundant actions when attempting to open already active
sessions or documents.

* **Style**
* Improved tooltip formatting and visual styling for error messages and
tooltips.
* Refined hover effects and layout in chat session history for better
clarity.

* **Refactor**
* Updated tooltip configuration for more precise positioning and
behavior.

* **Chores**
* Minor updates to property defaults for tooltips and chat panel
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: fengmk2 <fengmk2@gmail.com>
This commit is contained in:
Wu Yue
2025-07-04 19:00:52 +08:00
committed by GitHub
parent c882a8c5da
commit 2f9a96f1c5
8 changed files with 145 additions and 32 deletions

View File

@@ -84,6 +84,8 @@ export const EditorChatPanel = forwardRef(function EditorChatPanel(
chatPanelRef.current.affineWorkspaceDialogService = framework.get(
WorkspaceDialogService
);
chatPanelRef.current.affineWorkbenchService =
framework.get(WorkbenchService);
containerRef.current?.append(chatPanelRef.current);
} else {