Skip to content

Commit

Permalink
chore: bump blocksuite (#7120)
Browse files Browse the repository at this point in the history
  • Loading branch information
regischen committed Jun 3, 2024
1 parent 235882f commit 798af4e
Show file tree
Hide file tree
Showing 10 changed files with 126 additions and 94 deletions.
4 changes: 2 additions & 2 deletions packages/common/env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"private": true,
"type": "module",
"devDependencies": {
"@blocksuite/global": "0.15.0-canary-202405310218-5d27a81",
"@blocksuite/store": "0.15.0-canary-202405310218-5d27a81",
"@blocksuite/global": "0.15.0-canary-202405310802-eab4a2a",
"@blocksuite/store": "0.15.0-canary-202405310802-eab4a2a",
"react": "18.3.1",
"react-dom": "18.3.1",
"vitest": "1.6.0"
Expand Down
10 changes: 5 additions & 5 deletions packages/common/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"@affine/debug": "workspace:*",
"@affine/env": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/blocks": "0.15.0-canary-202405310218-5d27a81",
"@blocksuite/global": "0.15.0-canary-202405310218-5d27a81",
"@blocksuite/store": "0.15.0-canary-202405310218-5d27a81",
"@blocksuite/blocks": "0.15.0-canary-202405310802-eab4a2a",
"@blocksuite/global": "0.15.0-canary-202405310802-eab4a2a",
"@blocksuite/store": "0.15.0-canary-202405310802-eab4a2a",
"@datastructures-js/binary-search-tree": "^5.3.2",
"foxact": "^0.2.33",
"jotai": "^2.8.0",
Expand All @@ -30,8 +30,8 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/block-std": "0.15.0-canary-202405310218-5d27a81",
"@blocksuite/presets": "0.15.0-canary-202405310218-5d27a81",
"@blocksuite/block-std": "0.15.0-canary-202405310802-eab4a2a",
"@blocksuite/presets": "0.15.0-canary-202405310802-eab4a2a",
"@testing-library/react": "^15.0.0",
"async-call-rpc": "^6.4.0",
"react": "^18.2.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions packages/frontend/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { showAILoginRequiredAtom } from '@affine/core/components/affine/auth/ai-login-required';
import {
cleanupCopilotSessionMutation,
createCopilotMessageMutation,
createCopilotSessionMutation,
fetcher as defaultFetcher,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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', {
Expand All @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tools/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@affine/env": "workspace:*",
"@affine/templates": "workspace:*",
"@aws-sdk/client-s3": "3.583.0",
"@blocksuite/presets": "0.15.0-canary-202405310218-5d27a81",
"@blocksuite/presets": "0.15.0-canary-202405310802-eab4a2a",
"@clack/core": "^0.3.4",
"@clack/prompts": "^0.7.0",
"@magic-works/i18n-codegen": "^0.6.0",
Expand Down
Loading

0 comments on commit 798af4e

Please sign in to comment.