diff options
| author | adamdotdevin <[email protected]> | 2025-08-10 19:24:16 -0500 |
|---|---|---|
| committer | adamdotdevin <[email protected]> | 2025-08-10 19:25:03 -0500 |
| commit | b8d2aebf09313d451cec873b3d0807b818015b32 (patch) | |
| tree | 05f4edc9e4b15b6754e555a7b4eb03b46c997a58 /packages/web/src/components/Share.tsx | |
| parent | 20e818ad05b385b51a29d265f0731155562e88c2 (diff) | |
| download | opencode-b8d2aebf09313d451cec873b3d0807b818015b32.tar.gz opencode-b8d2aebf09313d451cec873b3d0807b818015b32.zip | |
feat: thinking blocks rendered in tui and share page
Diffstat (limited to 'packages/web/src/components/Share.tsx')
| -rw-r--r-- | packages/web/src/components/Share.tsx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx index 4a75f737a..47632492d 100644 --- a/packages/web/src/components/Share.tsx +++ b/packages/web/src/components/Share.tsx @@ -61,7 +61,7 @@ export default function Share(props: { const [store, setStore] = createStore<{ info?: Session.Info messages: Record<string, MessageWithParts> - }>({ info: props.info, messages: mapValues(props.messages, (x: any) => "metadata" in x ? fromV1(x) : x) }) + }>({ info: props.info, messages: mapValues(props.messages, (x: any) => ("metadata" in x ? fromV1(x) : x)) }) const messages = createMemo(() => Object.values(store.messages).toSorted((a, b) => a.id?.localeCompare(b.id))) const [connectionStatus, setConnectionStatus] = createSignal<[Status, string?]>(["disconnected", "Disconnected"]) createEffect(() => { @@ -128,12 +128,10 @@ export default function Share(props: { setStore("messages", messageID, reconcile(d.content)) } if (type === "part") { - setStore("messages", d.content.messageID, "parts", arr => { + setStore("messages", d.content.messageID, "parts", (arr) => { const index = arr.findIndex((x) => x.id === d.content.id) - if (index === -1) - arr.push(d.content) - if (index > -1) - arr[index] = d.content + if (index === -1) arr.push(d.content) + if (index > -1) arr[index] = d.content return [...arr] }) } @@ -350,7 +348,7 @@ export default function Share(props: { if (x.type === "tool" && (x.state.status === "pending" || x.state.status === "running")) return false return true - }) + }), ) return ( |
