kimi-code / packages /agent-core-v2 /src /session /subagent /subagentModelsValidationService.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
68d7816 verified
Raw
History Blame Contribute Delete
907 Bytes
import { LifecycleScope } from '#/app/scopes';
import { ScopeActivation, registerScopedService } from '#/_base/di/scope';
import { IConfigService } from '#/app/config/config';
import { IModelCatalog } from '#/llm-adapter/model/catalog';
import { assertValidSubagentModelConfig } from './configSection';
import { ISessionSubagentModelsValidationService } from './subagentModelsValidation';
export class SessionSubagentModelsValidationService
implements ISessionSubagentModelsValidationService
{
declare readonly _serviceBrand: undefined;
constructor(
@IConfigService config: IConfigService,
@IModelCatalog modelCatalog: IModelCatalog,
) {
assertValidSubagentModelConfig(config, modelCatalog);
}
}
registerScopedService(
LifecycleScope.Session,
ISessionSubagentModelsValidationService,
SessionSubagentModelsValidationService,
ScopeActivation.OnScopeCreated,
'subagent',
);