mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 15:16:28 +08:00
a1d150a748
#### 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. [](https://app.coderabbit.ai/change-stack/toeverything/AFFiNE/pull/14952) <!-- end of auto-generated comment: release notes by coderabbit.ai -->
69 lines
1.8 KiB
TypeScript
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 {}
|