)
}
+
+export function CardTitle(props: CardTitleProps) {
+ const [split, rest] = splitProps(props, ["variant", "icon", "class", "classList", "children"])
+ const show = () => split.icon !== false && split.icon !== null
+ const name = () => {
+ if (split.icon === false || split.icon === null) return
+ if (typeof split.icon === "string") return split.icon
+ return pick(split.variant ?? "normal")
+ }
+ const placeholder = () => !name()
+ return (
+
+ {show() ? (
+
+
+
+ ) : null}
+ {split.children}
+
+ )
+}
+
+export function CardDescription(props: ComponentProps<"div">) {
+ const [split, rest] = splitProps(props, ["class", "classList", "children"])
+ return (
+
+ {split.children}
+
+ )
+}
+
+export function CardActions(props: ComponentProps<"div">) {
+ const [split, rest] = splitProps(props, ["class", "classList", "children"])
+ return (
+
+ {split.children}
+
+ )
+}
diff --git a/packages/ui/src/components/markdown.css b/packages/ui/src/components/markdown.css
index 1fe11a7de..f82723807 100644
--- a/packages/ui/src/components/markdown.css
+++ b/packages/ui/src/components/markdown.css
@@ -60,6 +60,7 @@
ol {
margin-top: 0.5rem;
margin-bottom: 1rem;
+ margin-left: 0;
padding-left: 1.5rem;
list-style-position: outside;
}
@@ -70,6 +71,7 @@
ol {
list-style-type: decimal;
+ padding-left: 2.25rem;
}
li {
@@ -98,6 +100,10 @@
padding-left: 1rem; /* Minimal indent for nesting only */
}
+ li > ol {
+ padding-left: 1.75rem;
+ }
+
/* Blockquotes */
blockquote {
border-left: 2px solid var(--border-weak-base);
diff --git a/packages/ui/src/components/message-part.css b/packages/ui/src/components/message-part.css
index 704a57e5b..7ee537884 100644
--- a/packages/ui/src/components/message-part.css
+++ b/packages/ui/src/components/message-part.css
@@ -309,41 +309,6 @@
}
}
-[data-component="tool-error"] {
- display: flex;
- align-items: start;
- gap: 8px;
-
- [data-slot="icon-svg"] {
- color: var(--icon-critical-base);
- margin-top: 4px;
- }
-
- [data-slot="message-part-tool-error-content"] {
- display: flex;
- align-items: start;
- gap: 8px;
- }
-
- [data-slot="message-part-tool-error-title"] {
- font-family: var(--font-family-sans);
- font-size: var(--font-size-base);
- font-style: normal;
- font-weight: var(--font-weight-medium);
- line-height: var(--line-height-large);
- letter-spacing: var(--letter-spacing-normal);
- color: var(--text-on-critical-base);
- white-space: nowrap;
- }
-
- [data-slot="message-part-tool-error-message"] {
- color: var(--text-on-critical-weak);
- max-height: 240px;
- overflow-y: auto;
- word-break: break-word;
- }
-}
-
[data-component="tool-output"] {
white-space: pre;
padding: 0;
@@ -717,7 +682,6 @@
[data-component="user-message"] [data-slot="user-message-text"],
[data-component="text-part"],
[data-component="reasoning-part"],
-[data-component="tool-error"],
[data-component="tool-output"],
[data-component="bash-output"],
[data-component="edit-content"],
diff --git a/packages/ui/src/components/message-part.tsx b/packages/ui/src/components/message-part.tsx
index 45b174e2b..0815c3333 100644
--- a/packages/ui/src/components/message-part.tsx
+++ b/packages/ui/src/components/message-part.tsx
@@ -39,6 +39,7 @@ import { Card } from "./card"
import { Collapsible } from "./collapsible"
import { FileIcon } from "./file-icon"
import { Icon } from "./icon"
+import { ToolErrorCard } from "./tool-error-card"
import { Checkbox } from "./checkbox"
import { DiffChanges } from "./diff-changes"
import { Markdown } from "./markdown"
@@ -1189,25 +1190,7 @@ PART_MAPPING["tool"] = function ToolPartDisplay(props) {
)
}
- const [title, ...rest] = cleaned.split(": ")
- return (
-