refine InlineError, ServerCard, HistoryEntry, and LoggingScreen
- InlineError: show more/less toggle on same line as message, collapsible details, doc link as button - ServerCard: use ContentViewer with CopyButton for command, remove onCopyCommand prop, combine action rows, add responsive Card variant - HistoryEntry: use ContentViewer with CopyButton for JSON blocks, swap duration and status badge positions - LoggingScreen: stretch log stream panel to full height, center empty message vertically Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1da76c53ef
commit
3c25bdfbd5
1 changed files with 136 additions and 105 deletions
|
|
@ -2,12 +2,12 @@ import {
|
|||
Badge,
|
||||
Button,
|
||||
Card,
|
||||
Code,
|
||||
Collapse,
|
||||
Group,
|
||||
Stack,
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
import { ContentViewer } from "../../atoms/ContentViewer/ContentViewer";
|
||||
|
||||
export interface HistoryChildEntry {
|
||||
timestamp: string;
|
||||
|
|
@ -66,12 +66,12 @@ export function HistoryEntry({
|
|||
)}
|
||||
</Group>
|
||||
<Group gap="sm">
|
||||
<Badge color={status === "success" ? "green" : "red"}>
|
||||
{status === "success" ? "OK" : "Error"}
|
||||
</Badge>
|
||||
<Text size="sm" c="dimmed">
|
||||
{durationMs}ms
|
||||
</Text>
|
||||
<Badge color={status === "success" ? "green" : "red"}>
|
||||
{status === "success" ? "OK" : "Error"}
|
||||
</Badge>
|
||||
</Group>
|
||||
</Group>
|
||||
|
||||
|
|
@ -93,13 +93,21 @@ export function HistoryEntry({
|
|||
{parameters && (
|
||||
<Stack gap="xs">
|
||||
<Text size="sm">Parameters:</Text>
|
||||
<Code block>{JSON.stringify(parameters, null, 2)}</Code>
|
||||
<ContentViewer
|
||||
type="json"
|
||||
content={JSON.stringify(parameters)}
|
||||
copyable
|
||||
/>
|
||||
</Stack>
|
||||
)}
|
||||
{response && (
|
||||
<Stack gap="xs">
|
||||
<Text size="sm">Response:</Text>
|
||||
<Code block>{JSON.stringify(response, null, 2)}</Code>
|
||||
<ContentViewer
|
||||
type="json"
|
||||
content={JSON.stringify(response)}
|
||||
copyable
|
||||
/>
|
||||
</Stack>
|
||||
)}
|
||||
{childEntries && childEntries.length > 0 && (
|
||||
|
|
|
|||
Loading…
Reference in a new issue