diff --git a/packages/web/src/components/share/content-code.tsx b/packages/web/src/components/share/content-code.tsx index b8c4f2ccd..72352d1e9 100644 --- a/packages/web/src/components/share/content-code.tsx +++ b/packages/web/src/components/share/content-code.tsx @@ -1,7 +1,7 @@ -import { type JSX, splitProps, createResource, Suspense } from "solid-js" import { codeToHtml } from "shiki" -import style from "./content-code.module.css" +import { createResource, Suspense } from "solid-js" import { transformerNotationDiff } from "@shikijs/transformers" +import style from "./content-code.module.css" interface Props { code: string diff --git a/packages/web/src/components/share/part.tsx b/packages/web/src/components/share/part.tsx index 6f76660a1..4d95fa528 100644 --- a/packages/web/src/components/share/part.tsx +++ b/packages/web/src/components/share/part.tsx @@ -28,7 +28,6 @@ import { IconDocumentMagnifyingGlass, } from "../icons" import { IconMeta, IconOpenAI, IconGemini, IconAnthropic } from "../icons/custom" -import CodeBlock from "../CodeBlock" import { ContentCode } from "./content-code" import { ContentDiff } from "./content-diff" import { ContentText } from "./content-text" @@ -133,7 +132,8 @@ export function Part(props: PartProps) {
{props.message.role === "user" && props.part.type === "text" && ( <> - + + )} {props.message.role === "assistant" && props.part.type === "text" && ( @@ -165,6 +165,14 @@ export function Part(props: PartProps) {
{props.message.modelID}
)} + {props.part.type === "tool" && + props.part.state.status === "error" && ( +
+ + {formatErrorString(props.part.state.error)} + +
+ )} {props.part.type === "tool" && props.part.state.status === "completed" && props.message.role === "assistant" && ( @@ -453,7 +461,7 @@ export function WebFetchTool(props: ToolProps) { - +