summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-11-27 20:15:31 -0600
committerAdam <[email protected]>2025-11-27 20:15:49 -0600
commit6a1552f65c041d45be3eb561bebf0faab759ec30 (patch)
tree34d0ffe3850537ff31e201c4041c69297ff510a8
parent776091cc232a37656eb9087d76c64b2e67c401c1 (diff)
downloadopencode-6a1552f65c041d45be3eb561bebf0faab759ec30.tar.gz
opencode-6a1552f65c041d45be3eb561bebf0faab759ec30.zip
fix: unwrap solid store part
-rw-r--r--packages/ui/src/components/message-part.tsx5
1 files 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 (
<Show when={component()}>
<Dynamic component={component()} part={part()} message={props.message} hideDetails={props.hideDetails} />
@@ -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 (
<Show when={part.text.trim()}>
<div data-component="text-part">