Skip to content

Commit 816ee4a

Browse files
committed
remove <code/> from error and move button to new line
1 parent e3708ca commit 816ee4a

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

gui/src/components/mainInput/Lump/sections/mcp/MCPSection.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
WrenchScrewdriverIcon,
88
} from "@heroicons/react/24/outline";
99
import { MCPServerStatus } from "core";
10-
import { useContext, useMemo } from "react";
10+
import { Fragment, useContext, useMemo } from "react";
1111
import { useAuth } from "../../../../../context/Auth";
1212
import { IdeMessengerContext } from "../../../../../context/IdeMessenger";
1313
import { useAppDispatch, useAppSelector } from "../../../../../redux/hooks";
@@ -78,25 +78,28 @@ function MCPServerPreview({ server, serverFromYaml }: MCPServerStatusProps) {
7878
className="flex flex-col gap-0.5"
7979
>
8080
{server.errors.map((error, idx) => (
81-
<span key={idx}>
82-
<code>
81+
<Fragment key={idx}>
82+
<div>
8383
{error.length > 150
8484
? error.substring(0, 150) + "..."
8585
: error}
86-
</code>
86+
</div>
8787
{error.length > 150 && (
8888
<Button
8989
className="my-0"
9090
size="sm"
9191
variant="ghost"
92-
onClick={() => {
93-
ideMessenger.ide.showVirtualFile(server.name, error);
94-
}}
92+
onClick={() =>
93+
void ideMessenger.ide.showVirtualFile(
94+
server.name,
95+
error,
96+
)
97+
}
9598
>
96-
Know More
99+
View full error
97100
</Button>
98101
)}
99-
</span>
102+
</Fragment>
100103
))}
101104
</ToolTip>
102105
</>

0 commit comments

Comments
 (0)