feat: initialize AgentService in ApiServer and improve ID generation logic

This commit is contained in:
Vaayne
2025-09-12 16:04:04 +08:00
parent 5eaa90a7a2
commit 9c956a30ea
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -1,5 +1,6 @@
import { createServer } from 'node:http'
import { agentService } from '../services/agents/AgentService'
import { loggerService } from '../services/LoggerService'
import { app } from './app'
import { config } from './config'
@@ -18,6 +19,11 @@ export class ApiServer {
// Load config
const { port, host, apiKey } = await config.load()
// Initialize AgentService
logger.info('Initializing AgentService...')
await agentService.initialize()
logger.info('AgentService initialized successfully')
// Create server with Express app
this.server = createServer(app)