Files
AFFiNE-Mirror/packages/backend/server/src/plugins/copilot/index.ts
T
DarkSky a1d150a748 fix(server): realtime module not loaded (#14952)
#### PR Dependency Tree


* **PR #14952** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Refactor**
* Optimized workspace invite link fetching by separating it from general
workspace configuration queries for improved performance.
* Reorganized transcription-related backend modules to better separate
concerns and enable real-time functionality.

* **Chores**
* Updated generated GraphQL types and iOS query definitions to reflect
API changes.

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/toeverything/AFFiNE/pull/14952)

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-12 18:54:42 +08:00

69 lines
1.8 KiB
TypeScript

import './config';
import { Module } from '@nestjs/common';
import { ServerConfigModule } from '../../core';
import { DocStorageModule } from '../../core/doc';
import { FeatureModule } from '../../core/features';
import { PermissionModule } from '../../core/permission';
import { QuotaModule } from '../../core/quota';
import { StorageModule } from '../../core/storage';
import { WorkspaceModule } from '../../core/workspaces';
import { IndexerModule } from '../indexer';
import { CopilotController } from './controller';
import { WorkspaceMcpController } from './mcp/controller';
import {
COPILOT_API_PROVIDERS,
COPILOT_FEATURE_PROVIDERS,
COPILOT_KERNEL_PROVIDERS,
COPILOT_TRANSCRIPT_REALTIME_PROVIDERS,
} from './module-providers';
const COPILOT_SHARED_IMPORTS = [
DocStorageModule,
FeatureModule,
QuotaModule,
PermissionModule,
ServerConfigModule,
StorageModule,
WorkspaceModule,
IndexerModule,
];
@Module({
imports: [...COPILOT_SHARED_IMPORTS],
providers: [...COPILOT_KERNEL_PROVIDERS],
exports: [...COPILOT_KERNEL_PROVIDERS],
})
export class CopilotKernelModule {}
@Module({
imports: [PermissionModule],
providers: [...COPILOT_TRANSCRIPT_REALTIME_PROVIDERS],
})
export class CopilotRealtimeModule {}
@Module({
imports: [...COPILOT_SHARED_IMPORTS, CopilotKernelModule],
providers: [...COPILOT_FEATURE_PROVIDERS],
exports: [...COPILOT_FEATURE_PROVIDERS],
})
export class CopilotFeatureModule {}
@Module({
imports: [
...COPILOT_SHARED_IMPORTS,
CopilotKernelModule,
CopilotFeatureModule,
],
providers: [...COPILOT_API_PROVIDERS],
exports: [...COPILOT_API_PROVIDERS],
})
export class CopilotApiModule {}
@Module({
imports: [CopilotKernelModule, CopilotFeatureModule, CopilotApiModule],
controllers: [CopilotController, WorkspaceMcpController],
})
export class CopilotModule {}