import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AgentToolsModule } from '../agent-tools';
import { AiConfigModule } from '../ai-config/ai-config.module';
import { ImportsModule } from '../imports/imports.module';
import { AiChatController } from './ai-chat.controller';
import { AiAttachmentService } from './ai-attachment.service';
import { AiChartService } from './ai-chart.service';
import { AiExcelReaderService } from './ai-excel-reader.service';
import { AiFormService } from './ai-form.service';
import { AiReviewService } from './ai-review.service';
import { AiChatService } from './ai-chat.service';
import { AiModelStreamService } from './ai-model-stream.service';
import {
  AiAttachment,
  AiConversation,
  AiForm,
  AiMessage,
  AiReview,
  AiToolRun,
} from './entities';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      AiAttachment,
      AiConversation,
      AiForm,
      AiMessage,
      AiReview,
      AiToolRun,
    ]),
    AiConfigModule,
    AgentToolsModule,
    ImportsModule,
  ],
  controllers: [AiChatController],
  providers: [
    AiAttachmentService,
    AiChartService,
    AiExcelReaderService,
    AiFormService,
    AiReviewService,
    AiChatService,
    AiModelStreamService,
  ],
  exports: [AiChatService],
})
export class AiChatModule {}
