refactor(site/src/pages/AgentsPage): derive workspace skills in ChatPageInput (#29071)

ChatPageInput now derives workspace skills from chat instead of taking a
sliced list from AgentChatPage and the view. The page still computes
that list for slash-command send.

Depends on #29070

- Drop workspaceSkills from AgentChatPage and AgentChatPageView
- ChatPageInput calls workspaceSkillsFromChat(chat)
This commit is contained in:
Jake Howell authored and GitHub committed 2026-09-09 00:38:18 +10:00
1 parent 486d2faa81
commit 5bc6553fc7
3 files changed
+1 -10

No files matched your search

@@ -1196,7 +1196,6 @@ const AgentChatPage: FC = () => {
selectedMCPServerIds={effectiveMCPServerIds}
onMCPSelectionChange={handleMCPSelectionChange}
onMCPAuthComplete={handleMCPAuthComplete}
workspaceSkills={chatWorkspaceSkills}
/>
)}
</>
@@ -42,7 +42,6 @@ import {
import { QueuedForCapacityCallout } from "./components/ChatConversation/QueuedForCapacityCallout";
import { DesktopPanelContext } from "./components/ChatElements/tools/DesktopPanelContext";
import type { SkillMetadata } from "./components/ChatMessageInput/SkillsTriggerMenu";
import type { PendingAttachment } from "./components/ChatPageContent";
import { ChatPageInput, ChatPageTimeline } from "./components/ChatPageContent";
import { ChatSharingPopoverContent } from "./components/ChatSharingPopover";
@@ -190,8 +189,6 @@ interface AgentChatPageViewProps {
// Desktop chat ID (optional).
desktopChatId?: string;
workspaceSkills?: readonly SkillMetadata[];
}
const UnavailableTabMessage: FC<{ message: string }> = ({ message }) => (
@@ -335,7 +332,6 @@ export const AgentChatPageView: FC<AgentChatPageViewProps> = ({
onMCPSelectionChange,
onMCPAuthComplete,
desktopChatId,
workspaceSkills,
}) => {
const queryClient = useQueryClient();
const { proxy } = useProxy();
@@ -962,7 +958,6 @@ export const AgentChatPageView: FC<AgentChatPageViewProps> = ({
selectedMCPServerIds={selectedMCPServerIds}
onMCPSelectionChange={onMCPSelectionChange}
onMCPAuthComplete={onMCPAuthComplete}
workspaceSkills={workspaceSkills}
workspace={workspace}
workspaceAgent={workspaceAgent}
sshCommand={sshCommand}
@@ -293,9 +293,6 @@ interface ChatPageInputProps {
selectedMCPServerIds?: readonly string[];
onMCPSelectionChange?: (ids: string[]) => void;
onMCPAuthComplete?: (serverId: string) => void;
// Workspace skill menu data derived from the resolved chat detail;
// undefined while the chat is still loading.
workspaceSkills?: readonly SkillMetadata[];
workspaceOptions: readonly TypesGen.Workspace[];
onWorkspaceChange?: (workspaceId: string | null) => void;
isWorkspaceLoading: boolean;
@@ -344,7 +341,6 @@ export const ChatPageInput: FC<ChatPageInputProps> = ({
selectedMCPServerIds,
onMCPSelectionChange,
onMCPAuthComplete,
workspaceSkills,
workspaceOptions,
onWorkspaceChange,
isWorkspaceLoading,
@@ -359,6 +355,7 @@ export const ChatPageInput: FC<ChatPageInputProps> = ({
const chatContext = chat.context;
const planModeEnabled = chat.plan_mode === "plan";
const selectedWorkspaceId = chat.workspace_id ?? null;
const workspaceSkills = workspaceSkillsFromChat(chat);
const thresholdsQuery = useQuery(userCompactionThresholds());
const compressionThreshold = resolveCompactionThreshold(
chat.last_model_config_id,