Deprecate legacy core datasource token (#14096)

This commit is contained in:
Weiko
2025-08-27 20:09:54 +02:00
committed by GitHub
parent c6aa419c18
commit 533d7fe49a
321 changed files with 702 additions and 849 deletions
@@ -19,11 +19,11 @@ import { AgentTitleGenerationService } from './agent-title-generation.service';
@Injectable()
export class AgentChatService {
constructor(
@InjectRepository(AgentChatThreadEntity, 'core')
@InjectRepository(AgentChatThreadEntity)
private readonly threadRepository: Repository<AgentChatThreadEntity>,
@InjectRepository(AgentChatMessageEntity, 'core')
@InjectRepository(AgentChatMessageEntity)
private readonly messageRepository: Repository<AgentChatMessageEntity>,
@InjectRepository(FileEntity, 'core')
@InjectRepository(FileEntity)
private readonly fileRepository: Repository<FileEntity>,
private readonly titleGenerationService: AgentTitleGenerationService,
) {}
@@ -61,10 +61,9 @@ export class AgentExecutionService {
private readonly workspacePermissionsCacheService: WorkspacePermissionsCacheService,
private readonly aiModelRegistryService: AiModelRegistryService,
private readonly agentToolGeneratorService: AgentToolGeneratorService,
@InjectRepository(AgentEntity, 'core')
@InjectRepository(AgentEntity)
private readonly agentRepository: Repository<AgentEntity>,
@InjectRepository(FileEntity, 'core')
@InjectRepository(FileEntity)
private readonly fileRepository: Repository<FileEntity>,
) {}
@@ -23,7 +23,7 @@ export class AgentHandoffExecutorService {
private readonly logger = new Logger(AgentHandoffExecutorService.name);
constructor(
@InjectRepository(AgentEntity, 'core')
@InjectRepository(AgentEntity)
private readonly agentRepository: Repository<AgentEntity>,
private readonly agentHandoffService: AgentHandoffService,
private readonly aiModelRegistryService: AiModelRegistryService,
@@ -10,9 +10,9 @@ import { AgentException, AgentExceptionCode } from './agent.exception';
@Injectable()
export class AgentHandoffService {
constructor(
@InjectRepository(AgentEntity, 'core')
@InjectRepository(AgentEntity)
private readonly agentRepository: Repository<AgentEntity>,
@InjectRepository(AgentHandoffEntity, 'core')
@InjectRepository(AgentHandoffEntity)
private readonly agentHandoffRepository: Repository<AgentHandoffEntity>,
) {}
@@ -30,7 +30,7 @@ export class AgentStreamingService {
private readonly logger = new Logger(AgentStreamingService.name);
constructor(
@InjectRepository(AgentChatThreadEntity, 'core')
@InjectRepository(AgentChatThreadEntity)
private readonly threadRepository: Repository<AgentChatThreadEntity>,
private readonly agentChatService: AgentChatService,
private readonly agentExecutionService: AgentExecutionService,
@@ -17,7 +17,7 @@ export class AgentToolGeneratorService {
private readonly logger = new Logger(AgentToolGeneratorService.name);
constructor(
@InjectRepository(RoleEntity, 'core')
@InjectRepository(RoleEntity)
private readonly roleRepository: Repository<RoleEntity>,
private readonly toolAdapterService: ToolAdapterService,
private readonly toolService: ToolService,
@@ -39,19 +39,16 @@ import { AgentService } from './agent.service';
@Module({
imports: [
TypeOrmModule.forFeature(
[
AgentEntity,
AgentHandoffEntity,
RoleEntity,
RoleTargetsEntity,
AgentChatMessageEntity,
AgentChatThreadEntity,
FileEntity,
UserWorkspace,
],
'core',
),
TypeOrmModule.forFeature([
AgentEntity,
AgentHandoffEntity,
RoleEntity,
RoleTargetsEntity,
AgentChatMessageEntity,
AgentChatThreadEntity,
FileEntity,
UserWorkspace,
]),
AiModule,
AgentRoleModule,
ThrottlerModule,
@@ -89,10 +86,11 @@ import { AgentService } from './agent.service';
AgentChatService,
AgentStreamingService,
AgentTitleGenerationService,
TypeOrmModule.forFeature(
[AgentEntity, AgentChatMessageEntity, AgentChatThreadEntity],
'core',
),
TypeOrmModule.forFeature([
AgentEntity,
AgentChatMessageEntity,
AgentChatThreadEntity,
]),
AgentHandoffExecutorService,
AgentHandoffService,
],
@@ -29,7 +29,7 @@ import { UpdateAgentInput } from './dtos/update-agent.input';
@Resolver()
export class AgentResolver {
constructor(
@InjectRepository(AgentEntity, 'core')
@InjectRepository(AgentEntity)
private readonly agentRepository: Repository<AgentEntity>,
private readonly agentService: AgentService,
private readonly agentHandoffService: AgentHandoffService,
@@ -16,9 +16,9 @@ import { AgentException, AgentExceptionCode } from './agent.exception';
@Injectable()
export class AgentService {
constructor(
@InjectRepository(AgentEntity, 'core')
@InjectRepository(AgentEntity)
private readonly agentRepository: Repository<AgentEntity>,
@InjectRepository(RoleTargetsEntity, 'core')
@InjectRepository(RoleTargetsEntity)
private readonly roleTargetsRepository: Repository<RoleTargetsEntity>,
private readonly agentRoleService: AgentRoleService,
) {}