Skip to content

Commit 7656df9

Browse files
committed
ProblemWithoutSnippet
1 parent 290e181 commit 7656df9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/components/chat/DyadProblemSummary.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ import {
77
} from "lucide-react";
88
import type { Problem } from "@/ipc/ipc_types";
99

10+
type ProblemWithoutSnippet = Omit<Problem, "snippet">;
11+
1012
interface DyadProblemSummaryProps {
1113
summary?: string;
1214
children?: React.ReactNode;
1315
}
1416

1517
interface ProblemItemProps {
16-
problem: Problem;
18+
problem: ProblemWithoutSnippet;
1719
index: number;
1820
}
1921

@@ -54,13 +56,13 @@ export const DyadProblemSummary: React.FC<DyadProblemSummaryProps> = ({
5456
const [isContentVisible, setIsContentVisible] = useState(false);
5557

5658
// Parse problems from children content if available
57-
const problems: Problem[] = React.useMemo(() => {
59+
const problems: ProblemWithoutSnippet[] = React.useMemo(() => {
5860
if (!children || typeof children !== "string") return [];
5961

6062
// Parse structured format with <problem> tags
6163
const problemTagRegex =
6264
/<problem\s+file="([^"]+)"\s+line="(\d+)"\s+column="(\d+)"\s+code="(\d+)">([^<]+)<\/problem>/g;
63-
const problems: Problem[] = [];
65+
const problems: ProblemWithoutSnippet[] = [];
6466
let match;
6567

6668
while ((match = problemTagRegex.exec(children)) !== null) {

0 commit comments

Comments
 (0)