public async Task <ActionResult> Debug([FromBody] AgentDebugDto agentDebugDto, CancellationToken cancellationToken) { try { return(Ok(await this.agentService.DebugAsync(agentDebugDto.TerminalOutput, agentDebugDto.Script, cancellationToken))); } catch (Exception ex) { return(Ok(ex.Message)); } }
public async Task <ActionResult> Debug([FromBody] AgentDebugDto agentDebugDto, CancellationToken cancellationToken) { if (!ModelState.IsValid) { return(BadRequest()); } try { var scriptOutput = await this.agentService.DebugAsync(agentDebugDto.Script, agentDebugDto.TerminalOutput, cancellationToken); return(Ok(scriptOutput)); } catch (Exception ex) { return(Ok(ex.Message)); } }