feat(core): restore pinned chat for independent chat (#13154)

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

## Summary by CodeRabbit

* **New Features**
* Improved chat session management by automatically restoring a pinned
chat session when opening the workspace chat.

* **Enhancements**
* Added support for cancelling certain requests, improving
responsiveness and user experience.

* **Style**
* Updated the label "AFFiNE Intelligence" to "Intelligence" in relevant
UI components for a more concise display.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Cats Juice
2025-07-11 12:45:59 +08:00
committed by GitHub
parent af9c455ee0
commit 2dacba9011
4 changed files with 42 additions and 3 deletions
@@ -165,7 +165,8 @@ export class CopilotClient {
docId?: string,
options?: RequestOptions<
typeof getCopilotSessionsQuery
>['variables']['options']
>['variables']['options'],
signal?: AbortSignal
) {
try {
const res = await this.gql({
@@ -176,6 +177,7 @@ export class CopilotClient {
docId,
options,
},
signal,
});
return res.currentUser?.copilot?.chats.edges.map(e => e.node);
} catch (err) {