mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
fix(core): fix ai with multiple server (#11570)
This commit is contained in:
@@ -12,6 +12,7 @@ import { useRegisterFindInPageCommands } from '@affine/core/components/hooks/aff
|
||||
import { useRegisterWorkspaceCommands } from '@affine/core/components/hooks/use-register-workspace-commands';
|
||||
import { OverCapacityNotification } from '@affine/core/components/over-capacity';
|
||||
import {
|
||||
AuthService,
|
||||
EventSourceService,
|
||||
FetchService,
|
||||
GraphQLService,
|
||||
@@ -148,6 +149,7 @@ export const WorkspaceSideEffects = () => {
|
||||
const graphqlService = useService(GraphQLService);
|
||||
const eventSourceService = useService(EventSourceService);
|
||||
const fetchService = useService(FetchService);
|
||||
const authService = useService(AuthService);
|
||||
|
||||
useEffect(() => {
|
||||
const dispose = setupAIProvider(
|
||||
@@ -156,7 +158,8 @@ export const WorkspaceSideEffects = () => {
|
||||
fetchService.fetch,
|
||||
eventSourceService.eventSource
|
||||
),
|
||||
globalDialogService
|
||||
globalDialogService,
|
||||
authService
|
||||
);
|
||||
return () => {
|
||||
dispose();
|
||||
@@ -167,6 +170,7 @@ export const WorkspaceSideEffects = () => {
|
||||
workspaceDialogService,
|
||||
graphqlService,
|
||||
globalDialogService,
|
||||
authService,
|
||||
]);
|
||||
|
||||
useRegisterWorkspaceCommands();
|
||||
|
||||
Reference in New Issue
Block a user