Skip to content

Commit 3318812

Browse files
committed
fix: style
1 parent 07321c9 commit 3318812

3 files changed

Lines changed: 30 additions & 15 deletions

File tree

webapp/_webapp/src/components/message-entry-container/tools/general.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const GeneralToolCard = ({ functionName, message, animated, isCollapsed:
9090
<div className={cn("tool-card noselect compact", { animated: animated })}>
9191
<div className="flex items-center gap-1 cursor-pointer" onClick={toggleCollapse}>
9292
<button
93-
className="text-gray-400 hover:text-gray-600 transition-colors duration-200 rounded"
93+
className="text-gray-400 hover:text-gray-600 transition-colors duration-200 rounded flex"
9494
aria-label={isCollapsed ? "Expand" : "Collapse"}
9595
>
9696
<svg

webapp/_webapp/src/components/message-entry-container/tools/xtramcp/generate-citations.tsx

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { cn } from "@heroui/react";
22
import { LoadingIndicator } from "../../../loading-indicator";
33
import MarkdownComponent from "../../../markdown";
44
import { useState } from "react";
5-
import { XtraMcpToolCardProps, parseXtraMcpToolResult, CollapseArrowButton, CollapseWrapper } from "./utils/common";
5+
import { XtraMcpToolCardProps, parseXtraMcpToolResult, CollapseWrapper } from "./utils/common";
66

77
export 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}

webapp/_webapp/src/index.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ video, canvas, audio, iframe, embed, object {
118118
}
119119

120120
.tool-card.narrow {
121-
@apply px-2 py-1 my-1 bg-transparent;
121+
@apply !px-0 py-1 my-1 bg-transparent;
122122
}
123123

124124
.tool-card.animated {
@@ -128,7 +128,7 @@ video, canvas, audio, iframe, embed, object {
128128
}
129129

130130
.tool-card-title {
131-
@apply text-xs font-semibold font-sans text-primary-700 tracking-wider noselect;
131+
@apply text-[10px] font-semibold font-sans text-primary-700 tracking-wider noselect;
132132
}
133133

134134
.tool-card-title {
@@ -737,3 +737,7 @@ video, canvas, audio, iframe, embed, object {
737737
[data-streamdown="mermaid-block"] {
738738
@apply !border-default-200 dark:!border-default-200;
739739
}
740+
741+
[data-streamdown="horizontal-rule"] {
742+
@apply !border-default-200 dark:!border-default-200;
743+
}

0 commit comments

Comments
 (0)