Skip to content

Commit

Permalink
Fix linting error
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
  • Loading branch information
JonasHelming committed Oct 3, 2024
1 parent c09b896 commit e3b6742
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/ai-terminal/src/browser/ai-terminal-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,27 +196,27 @@ recent-terminal-contents:
// model returned structured output
const parsedResult = Commands.safeParse(result.parsed);
if (parsedResult.success) {
const responseText = JSON.stringify(parsedResult.data.commands);
const responseTextfromParsed = JSON.stringify(parsedResult.data.commands);
this.recordingService.recordResponse({
agentId: this.id,
sessionId,
timestamp: Date.now(),
requestId,
response: responseText,
response: responseTextfromParsed,
});
return parsedResult.data.commands;
}
}

// fall back to agent-based parsing of result
const jsonResult = await getJsonOfResponse(result);
const responseText = JSON.stringify(jsonResult);
const responseTextFromJSON = JSON.stringify(jsonResult);
this.recordingService.recordResponse({
agentId: this.id,
sessionId,
timestamp: Date.now(),
requestId,
response: responseText
response: responseTextFromJSON
});
const parsedJsonResult = Commands.safeParse(jsonResult);
if (parsedJsonResult.success) {
Expand Down

0 comments on commit e3b6742

Please sign in to comment.