File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ import {
7
7
} from "lucide-react" ;
8
8
import type { Problem } from "@/ipc/ipc_types" ;
9
9
10
+ type ProblemWithoutSnippet = Omit < Problem , "snippet" > ;
11
+
10
12
interface DyadProblemSummaryProps {
11
13
summary ?: string ;
12
14
children ?: React . ReactNode ;
13
15
}
14
16
15
17
interface ProblemItemProps {
16
- problem : Problem ;
18
+ problem : ProblemWithoutSnippet ;
17
19
index : number ;
18
20
}
19
21
@@ -54,13 +56,13 @@ export const DyadProblemSummary: React.FC<DyadProblemSummaryProps> = ({
54
56
const [ isContentVisible , setIsContentVisible ] = useState ( false ) ;
55
57
56
58
// Parse problems from children content if available
57
- const problems : Problem [ ] = React . useMemo ( ( ) => {
59
+ const problems : ProblemWithoutSnippet [ ] = React . useMemo ( ( ) => {
58
60
if ( ! children || typeof children !== "string" ) return [ ] ;
59
61
60
62
// Parse structured format with <problem> tags
61
63
const problemTagRegex =
62
64
/ < p r o b l e m \s + f i l e = " ( [ ^ " ] + ) " \s + l i n e = " ( \d + ) " \s + c o l u m n = " ( \d + ) " \s + c o d e = " ( \d + ) " > ( [ ^ < ] + ) < \/ p r o b l e m > / g;
63
- const problems : Problem [ ] = [ ] ;
65
+ const problems : ProblemWithoutSnippet [ ] = [ ] ;
64
66
let match ;
65
67
66
68
while ( ( match = problemTagRegex . exec ( children ) ) !== null ) {
You can’t perform that action at this time.
0 commit comments