mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
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:
@@ -82,6 +82,10 @@ export type RequestOptions<Q extends GraphQLQuery> = QueryVariablesOption<Q> & {
|
||||
* @default 15000
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* Abort signal
|
||||
*/
|
||||
signal?: AbortSignal;
|
||||
};
|
||||
|
||||
export type QueryOptions<Q extends GraphQLQuery> = RequestOptions<Q> & {
|
||||
@@ -207,6 +211,7 @@ export const gqlFetcherFactory = (
|
||||
headers,
|
||||
body: isFormData ? body : JSON.stringify(body),
|
||||
timeout: options.timeout,
|
||||
signal: options.signal,
|
||||
})
|
||||
).then(async res => {
|
||||
if (res.headers.get('content-type')?.startsWith('application/json')) {
|
||||
|
||||
Reference in New Issue
Block a user