+ {JSON.stringify(spec, null, 2)}
+
+ )
+ }
+}
+
export function MessageBody({ content, isToolResult, toolCalls }: MessageBodyProps) {
- const { prose, actionCount } = useMemo(() => {
+ const { prose, actionCount, cardBlocks } = useMemo(() => {
const blocks = extractActionBlocks(content)
- const cleaned = stripToolCallTags(content).replace(ACTION_BLOCK_RE, "").trim()
+ const cleaned = stripToolCallTags(content)
+ .replace(ACTION_BLOCK_RE, "")
+ .trim()
+ const { blocks: cardBlocks, stripped } = parseCardBlocks(cleaned)
return {
- prose: cleaned,
+ prose: stripped.trim(),
actionCount: blocks.length,
+ cardBlocks,
}
}, [content])
@@ -47,6 +136,7 @@ export function MessageBody({ content, isToolResult, toolCalls }: MessageBodyPro
{children}
, code: ({ children, className }) => { @@ -68,15 +158,53 @@ export function MessageBody({ content, isToolResult, toolCalls }: MessageBodyPro ol: ({ children }) =>| Tenant | +Slug | +Status | +Plan | +
|---|---|---|---|
| {t.name} | ++ {t.slug} + | +
+ |
+ {t.plan ?? "—"} | +
+ {t.slug}
+
+
+
+ {e.target}
+
+ )}
+