Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions frontend/src/apiDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/logdetective/LogDetectiveResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,25 +265,25 @@ export const LogDetectiveResult = () => {
{data.status === "complete" && data.log_detective_response ? (
<CardBody>
<DescriptionList>
{data.log_detective_response.explanation?.text ? (
{data.log_detective_response.explanation ? (
<DescriptionListGroup>
<DescriptionListTerm>Explanation</DescriptionListTerm>
<DescriptionListDescription>
<CodeBlock>
<CodeBlockCode>
{data.log_detective_response.explanation.text}
{data.log_detective_response.explanation}
</CodeBlockCode>
</CodeBlock>
</DescriptionListDescription>
</DescriptionListGroup>
) : null}
{data.log_detective_response.solution?.text ? (
{data.log_detective_response.solution ? (
<DescriptionListGroup>
<DescriptionListTerm>Solution</DescriptionListTerm>
<DescriptionListDescription>
<CodeBlock>
<CodeBlockCode>
{data.log_detective_response.solution.text}
{data.log_detective_response.solution}
</CodeBlockCode>
</CodeBlock>
</DescriptionListDescription>
Expand Down
Loading