@@ -4,7 +4,7 @@ import MarkdownComponent from "../../../markdown";
44import { useState } from "react" ;
55import { XtraMcpToolCardProps , parseXtraMcpToolResult , CollapseArrowButton , CollapseWrapper } from "./utils/common" ;
66
7- // Helper function to format array to comma-separated string
7+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
88const formatArray = ( arr : any ) : string => {
99 if ( Array . isArray ( arr ) ) {
1010 return arr . join ( ", " ) ;
@@ -46,11 +46,17 @@ export const ReviewPaperCard = ({ functionName, message, preparing, animated }:
4646 return (
4747 < div className = { cn ( "tool-card noselect narrow" , { animated : animated } ) } >
4848 { /* Header with Error label and arrow button */ }
49- < div className = "flex items-center justify-between cursor-pointer" onClick = { ( ) => setIsMetadataCollapsed ( ! isMetadataCollapsed ) } >
49+ < div
50+ className = "flex items-center justify-between cursor-pointer"
51+ onClick = { ( ) => setIsMetadataCollapsed ( ! isMetadataCollapsed ) }
52+ >
5053 < h3 className = "tool-card-title" > { functionName } </ h3 >
5154 < div className = "flex items-center gap-2" >
5255 < span className = "text-red-500 text-sm font-medium" > Error</ span >
53- < CollapseArrowButton isCollapsed = { isMetadataCollapsed } ariaLabel = { isMetadataCollapsed ? "Expand error" : "Collapse error" } />
56+ < CollapseArrowButton
57+ isCollapsed = { isMetadataCollapsed }
58+ ariaLabel = { isMetadataCollapsed ? "Expand error" : "Collapse error" }
59+ />
5460 </ div >
5561 </ div >
5662
@@ -72,9 +78,15 @@ export const ReviewPaperCard = ({ functionName, message, preparing, animated }:
7278 { /* COMPACT TOOL CARD - Just title + metadata dropdown */ }
7379 < div className = { cn ( "tool-card noselect narrow" , { animated : animated } ) } >
7480 { /* Header with arrow button */ }
75- < div className = "flex items-center justify-between cursor-pointer" onClick = { ( ) => setIsMetadataCollapsed ( ! isMetadataCollapsed ) } >
81+ < div
82+ className = "flex items-center justify-between cursor-pointer"
83+ onClick = { ( ) => setIsMetadataCollapsed ( ! isMetadataCollapsed ) }
84+ >
7685 < h3 className = "tool-card-title" > { functionName } </ h3 >
77- < CollapseArrowButton isCollapsed = { isMetadataCollapsed } ariaLabel = { isMetadataCollapsed ? "Expand metadata" : "Collapse metadata" } />
86+ < CollapseArrowButton
87+ isCollapsed = { isMetadataCollapsed }
88+ ariaLabel = { isMetadataCollapsed ? "Expand metadata" : "Collapse metadata" }
89+ />
7890 </ div >
7991
8092 { /* Metadata dropdown - INSIDE the tool card */ }
@@ -92,7 +104,8 @@ export const ReviewPaperCard = ({ functionName, message, preparing, animated }:
92104 { /* Custom metadata rendering */ }
93105 { result . metadata . target_venue !== undefined && (
94106 < div className = "mb-2" >
95- < span className = "font-medium" > Checked for:</ span > "{ result . metadata . target_venue || "General review" } "
107+ < span className = "font-medium" > Checked for:</ span > "
108+ { result . metadata . target_venue || "General review" } "
96109 </ div >
97110 ) }
98111 { result . metadata . severity_threshold && (
@@ -102,7 +115,8 @@ export const ReviewPaperCard = ({ functionName, message, preparing, animated }:
102115 ) }
103116 { result . metadata . sections_to_review && (
104117 < div >
105- < span className = "font-medium" > Sections reviewed:</ span > { formatArray ( result . metadata . sections_to_review ) }
118+ < span className = "font-medium" > Sections reviewed:</ span > { " " }
119+ { formatArray ( result . metadata . sections_to_review ) }
106120 </ div >
107121 ) }
108122 </ div >
@@ -112,9 +126,7 @@ export const ReviewPaperCard = ({ functionName, message, preparing, animated }:
112126
113127 { /* CONTENT - OUTSIDE/BELOW the tool card, always visible */ }
114128 < div className = "canselect text-sm mt-2" >
115- < MarkdownComponent animated = { animated } >
116- { result . content }
117- </ MarkdownComponent >
129+ < MarkdownComponent animated = { animated } > { result . content } </ MarkdownComponent >
118130 </ div >
119131 </ >
120132 ) ;
0 commit comments