fix(session-ui): show tool errors inline (#44632)

This commit is contained in:
Brendan Allan
2026-08-24 15:59:12 +08:00
committed by GitHub
parent 5cd40ad66f
commit 0a410e404b
2 changed files with 6 additions and 23 deletions
@@ -36,8 +36,7 @@
color: var(--v2-text-text-muted);
}
[data-slot="tool-error-card-summary"],
[data-slot="tool-error-card-message"] {
[data-slot="tool-error-card-summary"] {
font-family: var(--v2-font-family-sans);
font-size: 13px;
font-weight: 440;
@@ -54,11 +53,6 @@
min-width: 0;
}
[data-slot="tool-error-card-message"] {
/* Text column indent: 16px icon + 8px gap. */
padding-inline-start: 24px;
}
[data-slot="basic-tool-tool-info-main"] {
align-items: center;
gap: 6px;
@@ -83,8 +77,7 @@
}
> [data-component="collapsible"].tool-collapsible {
/* Figma's 4px gap minus the 1.5px the compact line box adds above the summary em. */
gap: 2.5px;
gap: 0px;
> [data-slot="collapsible-trigger"] {
height: 24px;
@@ -102,11 +95,6 @@
}
}
> [data-component="collapsible"].tool-collapsible[data-open="true"] {
/* The compact line box alone yields Figma's spacing under the header. */
gap: 0px;
}
[data-component="tool-error-card-icon"] [data-slot="icon-svg"] {
color: var(--card-accent);
}
@@ -122,12 +122,10 @@ export function ToolErrorCard(props: ToolErrorCardProps) {
</a>
</Show>
</Show>
<Show when={open()}>
<span data-slot="tool-error-card-dot" aria-hidden="true">
·
</span>
<span data-slot="tool-error-card-summary">{summary()}</span>
</Show>
<span data-slot="tool-error-card-dot" aria-hidden="true">
·
</span>
<span data-slot="tool-error-card-summary">{summary()}</span>
</div>
</div>
</div>
@@ -135,9 +133,6 @@ export function ToolErrorCard(props: ToolErrorCardProps) {
<Collapsible.Arrow />
</div>
</Collapsible.Trigger>
<Show when={!open()}>
<div data-slot="tool-error-card-message">{summary()}</div>
</Show>
<Show when={detail()}>
<Collapsible.Content>
<div data-slot="tool-error-card-content">