From b8d2aebf09313d451cec873b3d0807b818015b32 Mon Sep 17 00:00:00 2001
From: adamdotdevin <2363879+adamdottv@users.noreply.github.com>
Date: Sun, 10 Aug 2025 19:24:16 -0500
Subject: feat: thinking blocks rendered in tui and share page

---
 packages/web/src/components/Share.tsx | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

(limited to 'packages/web/src/components/Share.tsx')

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 (
-- 
cgit v1.2.3

