mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +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:
@@ -75,12 +75,12 @@
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/block-std": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/blocks": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/global": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/block-std": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/blocks": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/global": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/icons": "2.1.52",
|
||||
"@blocksuite/presets": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/store": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/presets": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/store": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@storybook/addon-actions": "^7.6.17",
|
||||
"@storybook/addon-essentials": "^7.6.17",
|
||||
"@storybook/addon-interactions": "^7.6.17",
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
"@affine/graphql": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/block-std": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/blocks": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/global": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/block-std": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/blocks": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/global": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/icons": "2.1.52",
|
||||
"@blocksuite/inline": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/presets": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/store": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/inline": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/presets": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/store": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/native": "workspace:*",
|
||||
"@blocksuite/block-std": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/blocks": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/presets": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/store": "0.15.0-canary-202405310218-5d27a81",
|
||||
"@blocksuite/block-std": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/blocks": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/presets": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@blocksuite/store": "0.15.0-canary-202405310802-eab4a2a",
|
||||
"@electron-forge/cli": "^7.3.0",
|
||||
"@electron-forge/core": "^7.3.0",
|
||||
"@electron-forge/core-utils": "^7.3.0",
|
||||
|
||||
Reference in New Issue
Block a user