mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-19 19:11:35 +08:00
fix(server): realtime loading (#14959)
#### PR Dependency Tree * **PR #14959** 👈 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** * Rewired realtime and copilot services to require their runtime dependencies, improving reliability and removing nullable/optional runtime paths. * **Tests** * Centralized service creation in tests with helper factories and added checks ensuring realtime dependency injection is configured as expected. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/toeverything/AFFiNE/pull/14959) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { Injectable, OnModuleInit, Optional } from '@nestjs/common';
|
||||
import { Injectable, OnModuleInit } from '@nestjs/common';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { CopilotTranscriptionJobNotFound } from '../../../base';
|
||||
import { AccessController } from '../../../core/permission';
|
||||
import {
|
||||
type RealtimeRegistry,
|
||||
RealtimeRegistry,
|
||||
realtimeTranscriptTaskRoom,
|
||||
registerRealtimeLiveQuery,
|
||||
} from '../../../core/realtime';
|
||||
@@ -15,7 +15,7 @@ export class CopilotTranscriptRealtimeProvider implements OnModuleInit {
|
||||
constructor(
|
||||
private readonly ac: AccessController,
|
||||
private readonly transcript: CopilotTranscriptionReader,
|
||||
@Optional() private readonly registry?: RealtimeRegistry
|
||||
private readonly registry: RealtimeRegistry
|
||||
) {}
|
||||
|
||||
onModuleInit() {
|
||||
|
||||
Reference in New Issue
Block a user