From 30d6a26e3e9a606550bf5757129c5a0009e15aa7 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Wed, 26 Nov 2025 06:03:13 -0600
Subject: fix: useData

---
 packages/ui/src/components/message-progress.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'packages/ui/src/components/message-progress.tsx')

diff --git a/packages/ui/src/components/message-progress.tsx b/packages/ui/src/components/message-progress.tsx
index adb245ab4..efe4dfd8f 100644
--- a/packages/ui/src/components/message-progress.tsx
+++ b/packages/ui/src/components/message-progress.tsx
@@ -7,7 +7,7 @@ import type { AssistantMessage as AssistantMessageType, ToolPart } from "@openco
 export function MessageProgress(props: { assistantMessages: () => AssistantMessageType[]; done?: boolean }) {
   const data = useData()
   const sanitizer = createMemo(() => (data.directory ? new RegExp(`${data.directory}/`, "g") : undefined))
-  const parts = createMemo(() => props.assistantMessages().flatMap((m) => data.part[m.id]))
+  const parts = createMemo(() => props.assistantMessages().flatMap((m) => data.store.part[m.id]))
   const done = createMemo(() => props.done ?? false)
   const currentTask = createMemo(
     () =>
@@ -27,8 +27,10 @@ export function MessageProgress(props: { assistantMessages: () => AssistantMessa
     let resolved = parts()
     const task = currentTask()
     if (task && task.state && "metadata" in task.state && task.state.metadata?.sessionId) {
-      const messages = data.message[task.state.metadata.sessionId as string]?.filter((m) => m.role === "assistant")
-      resolved = messages?.flatMap((m) => data.part[m.id]) ?? parts()
+      const messages = data.store.message[task.state.metadata.sessionId as string]?.filter(
+        (m) => m.role === "assistant",
+      )
+      resolved = messages?.flatMap((m) => data.store.part[m.id]) ?? parts()
     }
     return resolved
   })
@@ -149,7 +151,7 @@ export function MessageProgress(props: { assistantMessages: () => AssistantMessa
                     {(p) => {
                       const part = p() as ToolPart
                       const message = createMemo(() =>
-                        data.message[part.sessionID].find((m) => m.id === part.messageID),
+                        data.store.message[part.sessionID].find((m) => m.id === part.messageID),
                       )
                       return (
                         <div data-slot="message-progress-item">
-- 
cgit v1.2.3

