From 6a1552f65c041d45be3eb561bebf0faab759ec30 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Thu, 27 Nov 2025 20:15:31 -0600 Subject: [PATCH] fix: unwrap solid store part --- packages/ui/src/components/message-part.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/components/message-part.tsx b/packages/ui/src/components/message-part.tsx index 74aa3d98a..1c2ba97f3 100644 --- a/packages/ui/src/components/message-part.tsx +++ b/packages/ui/src/components/message-part.tsx @@ -18,6 +18,7 @@ import { DiffChanges } from "./diff-changes" import { Markdown } from "./markdown" import { getDirectory, getFilename } from "@opencode-ai/util/path" import { sanitizePart } from "@opencode-ai/util/sanitize" +import { unwrap } from "solid-js/store" export interface MessageProps { message: MessageType @@ -83,7 +84,7 @@ export function UserMessageDisplay(props: { message: UserMessage; parts: PartTyp export function Part(props: MessagePartProps) { const component = createMemo(() => PART_MAPPING[props.part.type]) - const part = createMemo(() => sanitizePart(props.part, props.sanitize)) + const part = createMemo(() => sanitizePart(unwrap(props.part), props.sanitize)) return ( @@ -175,7 +176,7 @@ PART_MAPPING["tool"] = function ToolPartDisplay(props) { PART_MAPPING["text"] = function TextPartDisplay(props) { const part = props.part as TextPart - const sanitized = createMemo(() => (props.sanitize ? (sanitizePart(part, props.sanitize) as TextPart) : part)) + const sanitized = createMemo(() => (props.sanitize ? (sanitizePart(unwrap(part), props.sanitize) as TextPart) : part)) return (