@@ -2,7 +2,7 @@ import { cn } from "@heroui/react";
22import { LoadingIndicator } from "../../../loading-indicator" ;
33import MarkdownComponent from "../../../markdown" ;
44import { useState } from "react" ;
5- import { XtraMcpToolCardProps , parseXtraMcpToolResult , CollapseArrowButton , CollapseWrapper } from "./utils/common" ;
5+ import { XtraMcpToolCardProps , parseXtraMcpToolResult , CollapseWrapper } from "./utils/common" ;
66
77export const GenerateCitationsCard = ( { functionName, message, preparing, animated } : XtraMcpToolCardProps ) => {
88 const [ isMetadataCollapsed , setIsMetadataCollapsed ] = useState ( false ) ;
@@ -45,10 +45,6 @@ export const GenerateCitationsCard = ({ functionName, message, preparing, animat
4545 < h3 className = "tool-card-title" > { functionName } </ h3 >
4646 < div className = "flex items-center gap-2" >
4747 < span className = "text-red-500 text-sm font-medium" > Error</ span >
48- < CollapseArrowButton
49- isCollapsed = { isMetadataCollapsed }
50- ariaLabel = { isMetadataCollapsed ? "Expand error" : "Collapse error" }
51- />
5248 </ div >
5349 </ div >
5450
@@ -71,22 +67,37 @@ export const GenerateCitationsCard = ({ functionName, message, preparing, animat
7167 < div className = { cn ( "tool-card noselect narrow" , { animated : animated } ) } >
7268 { /* Header with arrow button */ }
7369 < div
74- className = "flex items-center justify-between cursor-pointer"
70+ className = "flex items-center cursor-pointer gap-1 "
7571 onClick = { ( ) => setIsMetadataCollapsed ( ! isMetadataCollapsed ) }
7672 >
73+ < button
74+ className = "text-gray-400 hover:text-gray-600 transition-colors duration-200 rounded flex"
75+ aria-label = { isMetadataCollapsed ? "Expand" : "Collapse" }
76+ >
77+ < svg
78+ className = { cn ( "w-3 h-3 transition-transform duration-200 rotate-[-90deg]" , {
79+ "rotate-0" : ! isMetadataCollapsed ,
80+ } ) }
81+ fill = "none"
82+ stroke = "currentColor"
83+ viewBox = "0 0 24 24"
84+ >
85+ < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M19 9l-7 7-7-7" />
86+ </ svg >
87+ </ button >
7788 < h3 className = "tool-card-title" > { functionName } </ h3 >
78- < CollapseArrowButton
79- isCollapsed = { isMetadataCollapsed }
80- ariaLabel = { isMetadataCollapsed ? "Expand metadata" : "Collapse metadata" }
81- />
8289 </ div >
8390
8491 { /* Metadata dropdown - INSIDE the tool card */ }
8592 { result . metadata && Object . keys ( result . metadata ) . length > 0 && (
8693 < CollapseWrapper isCollapsed = { isMetadataCollapsed } >
87- < div className = "text-xs !text-gray-600 dark:!text-gray-400 mt-2 pt-2 border-t !border-gray -200" >
94+ < div className = "text-xs !text-gray-600 dark:!text-gray-400 mt-2 pt-2 border-t !border-default-200 dark:!border-default -200" >
8895 { /* Custom metadata rendering */ }
89- < div className = "mb-2 italic" > ⚠️ [Experimental Feature] Some BibTeX entries may not be able to be generated.< br /> Report if you encounter an unknown issue.</ div >
96+ < div className = "mb-2 italic" >
97+ ⚠️ [Experimental Feature] Some BibTeX entries may not be able to be generated.
98+ < br />
99+ Report if you encounter an unknown issue.
100+ </ div >
90101 { result . metadata . total_links !== undefined && (
91102 < div >
92103 < span className = "font-medium" > Total Links/IDs/Info:</ span > { result . metadata . total_links }
0 commit comments