mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
feat(core): docs search service (#7213)
This commit is contained in:
@@ -3,6 +3,7 @@ import type { Doc as YDoc } from 'yjs';
|
||||
import { Entity } from '../../../framework';
|
||||
import { AwarenessEngine, BlobEngine, DocEngine } from '../../../sync';
|
||||
import { throwIfAborted } from '../../../utils';
|
||||
import { WorkspaceEngineBeforeStart } from '../events';
|
||||
import type { WorkspaceEngineProvider } from '../providers/flavour';
|
||||
import type { WorkspaceService } from '../services/workspace';
|
||||
|
||||
@@ -33,6 +34,7 @@ export class WorkspaceEngine extends Entity<{
|
||||
}
|
||||
|
||||
start() {
|
||||
this.eventBus.emit(WorkspaceEngineBeforeStart, this);
|
||||
this.doc.start();
|
||||
this.awareness.connect(this.workspaceService.workspace.awareness);
|
||||
this.blob.start();
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import { createEvent } from '../../../framework';
|
||||
import type { WorkspaceEngine } from '../entities/engine';
|
||||
|
||||
export const WorkspaceEngineBeforeStart = createEvent<WorkspaceEngine>(
|
||||
'WorkspaceEngineBeforeStart'
|
||||
);
|
||||
@@ -1,5 +1,6 @@
|
||||
export type { WorkspaceProfileInfo } from './entities/profile';
|
||||
export { Workspace } from './entities/workspace';
|
||||
export { WorkspaceEngineBeforeStart } from './events';
|
||||
export { globalBlockSuiteSchema } from './global-schema';
|
||||
export type { WorkspaceMetadata } from './metadata';
|
||||
export type { WorkspaceOpenOptions } from './open-options';
|
||||
|
||||
Reference in New Issue
Block a user