From dce287a42d5b4bb965ee74707bf7b0b0709d61f1 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Thu, 30 Oct 2025 10:33:45 -0500 Subject: wip: desktop work --- packages/desktop/src/components/message.tsx | 63 ++++++++++++++++------------- packages/desktop/src/pages/index.tsx | 2 +- 2 files changed, 35 insertions(+), 30 deletions(-) (limited to 'packages/desktop/src') diff --git a/packages/desktop/src/components/message.tsx b/packages/desktop/src/components/message.tsx index 78be29d75..70d03591a 100644 --- a/packages/desktop/src/components/message.tsx +++ b/packages/desktop/src/components/message.tsx @@ -15,7 +15,7 @@ registerPartComponent("text", function TextPartDisplay(props) { const part = props.part as TextPart return ( - + ) }) @@ -36,36 +36,41 @@ registerPartComponent("tool", function ToolPartDisplay(props) { const metadata = part.state.status === "pending" ? {} : (part.state.metadata ?? {}) const input = part.state.status === "completed" ? part.state.input : {} - if (part.state.status === "error") { - const error = part.state.error.replace("Error: ", "") - const [title, ...rest] = error.split(": ") - return ( - - - - - + return ( + + + {(error) => { + const cleaned = error().replace("Error: ", "") + const [title, ...rest] = cleaned.split(": ") + return ( + - {title} - {rest.join(": ")} + + + + + {title} + {rest.join(": ")} + + + {cleaned} + - - {error} - - - - ) - } - - return ( - + + ) + }} + + + + + ) }) diff --git a/packages/desktop/src/pages/index.tsx b/packages/desktop/src/pages/index.tsx index 1ae39a6b3..0ff4423ad 100644 --- a/packages/desktop/src/pages/index.tsx +++ b/packages/desktop/src/pages/index.tsx @@ -832,7 +832,7 @@ export default function Page() { - + {(assistantMessage) => { const parts = createMemo( -- cgit v1.2.3