diff --git a/coderd/database/migrations/000514_chat_goal_persistence.down.sql b/coderd/database/migrations/000515_chat_goal_persistence.down.sql similarity index 100% rename from coderd/database/migrations/000514_chat_goal_persistence.down.sql rename to coderd/database/migrations/000515_chat_goal_persistence.down.sql diff --git a/coderd/database/migrations/000514_chat_goal_persistence.up.sql b/coderd/database/migrations/000515_chat_goal_persistence.up.sql similarity index 100% rename from coderd/database/migrations/000514_chat_goal_persistence.up.sql rename to coderd/database/migrations/000515_chat_goal_persistence.up.sql diff --git a/coderd/database/migrations/testdata/fixtures/000514_chat_goal_persistence.up.sql b/coderd/database/migrations/testdata/fixtures/000515_chat_goal_persistence.up.sql similarity index 100% rename from coderd/database/migrations/testdata/fixtures/000514_chat_goal_persistence.up.sql rename to coderd/database/migrations/testdata/fixtures/000515_chat_goal_persistence.up.sql diff --git a/site/src/pages/AgentsPage/AgentChatPage.tsx b/site/src/pages/AgentsPage/AgentChatPage.tsx index 1361fb2afe..2feb62573a 100644 --- a/site/src/pages/AgentsPage/AgentChatPage.tsx +++ b/site/src/pages/AgentsPage/AgentChatPage.tsx @@ -1720,8 +1720,6 @@ const AgentChatPage: FC = () => { persistedError={persistedError} isArchived={isArchived} chatOwner={chatOwner} - canUpdateOtherUserChat={canUpdateOtherUserChat} - canUpdateOtherUserChatLoading={canUpdateOtherUserChatLoading} canShareChat={canShareChat} workspace={workspace} workspaceAgent={workspaceAgent} diff --git a/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx b/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx index 1f085e06eb..1d4a94ed9d 100644 --- a/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx +++ b/site/src/pages/AgentsPage/AgentChatPageView.stories.tsx @@ -187,8 +187,6 @@ const StoryAgentChatPageView: FC = ({ editing, ...overrides }) => { >["selectedMCPServerIds"], onMCPSelectionChange: fn(), onMCPAuthComplete: fn(), - canUpdateOtherUserChat: false, - canUpdateOtherUserChatLoading: false, canShareChat: false, ...overrides, store, diff --git a/site/src/pages/AgentsPage/AgentChatPageView.tsx b/site/src/pages/AgentsPage/AgentChatPageView.tsx index 1b02b54121..a473c9cd79 100644 --- a/site/src/pages/AgentsPage/AgentChatPageView.tsx +++ b/site/src/pages/AgentsPage/AgentChatPageView.tsx @@ -103,8 +103,6 @@ interface AgentChatPageViewProps { persistedError: ChatDetailError | undefined; isArchived: boolean; chatOwner: ChatOwnerInfo | undefined; - canUpdateOtherUserChat: boolean; - canUpdateOtherUserChatLoading: boolean; canShareChat: boolean; workspaceAgent?: TypesGen.WorkspaceAgent; workspace?: TypesGen.Workspace; @@ -217,8 +215,6 @@ export const AgentChatPageView: FC = ({ persistedError, isArchived, chatOwner, - canUpdateOtherUserChat, - canUpdateOtherUserChatLoading, canShareChat, workspaceAgent, workspace, @@ -447,16 +443,10 @@ export const AgentChatPageView: FC = ({ const chatOwnerLabel = chatOwner?.name?.trim() || (chatOwnerUsername ? `@${chatOwnerUsername}` : "another user"); - const isOtherUserReadOnly = - !isArchived && - chatOwner !== undefined && - (canUpdateOtherUserChatLoading || !canUpdateOtherUserChat); - const chatOwnerWarning = - !isArchived && chatOwner !== undefined && !canUpdateOtherUserChatLoading - ? canUpdateOtherUserChat - ? `This is not your chat. Prompting here will use ${chatOwnerLabel}'s identity.` - : `This chat is owned by ${chatOwnerLabel}. You have read-only access.` - : undefined; + const isOtherUserReadOnly = !isArchived && chatOwner !== undefined; + const chatOwnerWarning = isOtherUserReadOnly + ? `This chat is owned by ${chatOwnerLabel}. It is read-only.` + : undefined; const topGoal = currentChatGoal(goal); const titleElement = (