mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
chore: bump blocksuite (#7120)
## Features - https://github.com/toeverything/BlockSuite/pull/7176 @regischen ## Bugfix - https://github.com/toeverything/BlockSuite/pull/7186 @golok727 - https://github.com/toeverything/BlockSuite/pull/7185 @shvixxl
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { showAILoginRequiredAtom } from '@affine/core/components/affine/auth/ai-login-required';
|
||||
import {
|
||||
cleanupCopilotSessionMutation,
|
||||
createCopilotMessageMutation,
|
||||
createCopilotSessionMutation,
|
||||
fetcher as defaultFetcher,
|
||||
@@ -127,6 +128,20 @@ export class CopilotClient {
|
||||
return res.currentUser?.copilot?.histories;
|
||||
}
|
||||
|
||||
async cleanupSessions(input: {
|
||||
workspaceId: string;
|
||||
docId: string;
|
||||
sessionIds: string[];
|
||||
}) {
|
||||
const res = await fetcher({
|
||||
query: cleanupCopilotSessionMutation,
|
||||
variables: {
|
||||
input,
|
||||
},
|
||||
});
|
||||
return res.cleanupCopilotSession;
|
||||
}
|
||||
|
||||
async chatText({
|
||||
sessionId,
|
||||
messageId,
|
||||
|
||||
@@ -255,3 +255,15 @@ export function toImage({
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function cleanupSessions({
|
||||
workspaceId,
|
||||
docId,
|
||||
sessionIds,
|
||||
}: {
|
||||
workspaceId: string;
|
||||
docId: string;
|
||||
sessionIds: string[];
|
||||
}) {
|
||||
return client.cleanupSessions({ workspaceId, docId, sessionIds });
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ import { assertExists } from '@blocksuite/global/utils';
|
||||
import { AIProvider } from '@blocksuite/presets';
|
||||
import { getCurrentStore } from '@toeverything/infra';
|
||||
|
||||
import { toggleGeneralAIOnboarding } from '../../../affine/ai-onboarding/apis';
|
||||
import type { PromptKey } from './prompt';
|
||||
import {
|
||||
cleanupSessions,
|
||||
createChatSession,
|
||||
listHistories,
|
||||
textToText,
|
||||
@@ -366,6 +366,13 @@ Could you make a new website based on these notes and send back just the html fi
|
||||
// @ts-expect-error - 'action' is missing in server impl
|
||||
return (await listHistories(workspaceId, docId)) ?? [];
|
||||
},
|
||||
cleanup: async (
|
||||
workspaceId: string,
|
||||
docId: string,
|
||||
sessionIds: string[]
|
||||
) => {
|
||||
await cleanupSessions({ workspaceId, docId, sessionIds });
|
||||
},
|
||||
});
|
||||
|
||||
AIProvider.provide('photoEngine', {
|
||||
@@ -391,8 +398,6 @@ Could you make a new website based on these notes and send back just the html fi
|
||||
},
|
||||
});
|
||||
|
||||
AIProvider.provide('onboarding', toggleGeneralAIOnboarding);
|
||||
|
||||
AIProvider.slots.requestUpgradePlan.on(() => {
|
||||
getCurrentStore().set(openSettingModalAtom, {
|
||||
activeTab: 'billing',
|
||||
|
||||
Reference in New Issue
Block a user