From 0cb942aab20c85237338596ac70ac8fa60ad5136 Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Thu, 2 Apr 2026 22:17:27 +0100 Subject: [PATCH] fix(site): pass workspace and workspaceAgent props to AgentChatPageView (#23988) --- site/src/pages/AgentsPage/AgentChatPage.tsx | 2 +- site/src/pages/AgentsPage/AgentChatPageView.stories.tsx | 1 - site/src/pages/AgentsPage/AgentChatPageView.tsx | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/site/src/pages/AgentsPage/AgentChatPage.tsx b/site/src/pages/AgentsPage/AgentChatPage.tsx index 34e9296f59..ddf2702c00 100644 --- a/site/src/pages/AgentsPage/AgentChatPage.tsx +++ b/site/src/pages/AgentsPage/AgentChatPage.tsx @@ -1118,8 +1118,8 @@ const AgentChatPage: FC = () => { parentChat={parentChat} persistedError={persistedError} isArchived={isArchived} - hasWorkspace={Boolean(workspaceId)} workspace={workspace} + workspaceAgent={workspaceAgent} store={store} editing={editing} pendingEditMessageId={pendingEditMessageId} diff --git a/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx b/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx index 8084831ab6..dee306b92e 100644 --- a/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx @@ -112,7 +112,6 @@ const StoryAgentChatPageView: FC = ({ editing, ...overrides }) => { persistedError: undefined as ChatDetailError | undefined, parentChat: undefined as TypesGen.Chat | undefined, isArchived: false, - hasWorkspace: true, store: createChatStore(), pendingEditMessageId: null as number | null, effectiveSelectedModel: defaultModelConfigID, diff --git a/site/src/pages/AgentsPage/AgentChatPageView.tsx b/site/src/pages/AgentsPage/AgentChatPageView.tsx index 93e480f7c1..06f401b374 100644 --- a/site/src/pages/AgentsPage/AgentChatPageView.tsx +++ b/site/src/pages/AgentsPage/AgentChatPageView.tsx @@ -84,7 +84,6 @@ interface AgentChatPageViewProps { parentChat: TypesGen.Chat | undefined; persistedError: ChatDetailError | undefined; isArchived: boolean; - hasWorkspace: boolean; workspaceAgent?: TypesGen.WorkspaceAgent; workspace?: TypesGen.Workspace; @@ -176,7 +175,6 @@ export const AgentChatPageView: FC = ({ parentChat, persistedError, isArchived, - hasWorkspace, workspaceAgent, workspace, store, @@ -351,7 +349,7 @@ export const AgentChatPageView: FC = ({ : {})} isRegeneratingTitle={isRegeneratingTitle} isRegenerateTitleDisabled={isRegenerateTitleDisabled} - hasWorkspace={hasWorkspace} + hasWorkspace={Boolean(workspace)} isArchived={isArchived} diffStatusData={diffStatusData} isSidebarCollapsed={isSidebarCollapsed} @@ -466,7 +464,7 @@ export const AgentChatPageView: FC = ({ /> ), }, - ...(hasWorkspace && workspaceAgent + ...(workspace && workspaceAgent ? [ { id: "terminal",