import { Controller, Post, Get, Body, Param } from '@nestjs/common'
import { PromptAnalystService } from './prompt-analyst.service'

@Controller('agent')
export class AgentController {
  constructor(private readonly analyst: PromptAnalystService) {}

  @Post('chat')
  chat(@Body() body: { message: string; sessionId?: string }) {
    return this.analyst.chat(body.sessionId, body.message)
  }

  @Get('sessions/:sessionId')
  getSession(@Param('sessionId') sessionId: string) {
    return this.analyst.getSession(sessionId)
  }
}
