From 2bcfb04010709bdec9b617b9b20b2316690ab932 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Fri, 9 Oct 2026 10:26:14 +0200 Subject: [PATCH] Change expected response format to match new LD API Signed-off-by: Jiri Podivin --- frontend/src/apiDefinitions.ts | 12 ++---------- .../components/logdetective/LogDetectiveResult.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/frontend/src/apiDefinitions.ts b/frontend/src/apiDefinitions.ts index 6ea0c5c8..60896b65 100644 --- a/frontend/src/apiDefinitions.ts +++ b/frontend/src/apiDefinitions.ts @@ -523,14 +523,6 @@ export interface LogDetectiveGroup { repo_namespace: string; } -export interface LogDetectiveExplanation { - text: string; -} - -export interface LogDetectiveSolution { - text: string; -} - export interface LogDetectiveSnippet { text: string; line_number: number; @@ -539,9 +531,9 @@ export interface LogDetectiveSnippet { } export interface LogDetectiveResponse { - explanation: LogDetectiveExplanation; + explanation: string; no_issue_found: boolean; - solution: LogDetectiveSolution | null; + solution: string | null; snippets: LogDetectiveSnippet[] | null; } diff --git a/frontend/src/components/logdetective/LogDetectiveResult.tsx b/frontend/src/components/logdetective/LogDetectiveResult.tsx index 7c4cad50..dce37ca6 100644 --- a/frontend/src/components/logdetective/LogDetectiveResult.tsx +++ b/frontend/src/components/logdetective/LogDetectiveResult.tsx @@ -265,25 +265,25 @@ export const LogDetectiveResult = () => { {data.status === "complete" && data.log_detective_response ? ( - {data.log_detective_response.explanation?.text ? ( + {data.log_detective_response.explanation ? ( Explanation - {data.log_detective_response.explanation.text} + {data.log_detective_response.explanation} ) : null} - {data.log_detective_response.solution?.text ? ( + {data.log_detective_response.solution ? ( Solution - {data.log_detective_response.solution.text} + {data.log_detective_response.solution}