diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 04dddc338b..5c31324a86 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -91,8 +91,6 @@ import { deriveTimelineEntriesFromVisibleTurnItems, deriveRevertTurnCountByUserMessageId, deriveActiveWorkStartedAt, - deriveActivePlanState, - findSidebarProposedPlan, findLatestProposedPlan, hasActionableProposedPlan, isLatestRunSettled, @@ -474,11 +472,6 @@ type EnvironmentUnavailableState = { readonly connection: EnvironmentConnectionPresentation; }; -type ThreadPlanCatalogEntry = { - readonly id: ThreadId; - readonly projection: OrchestrationV2ThreadProjection; -}; - function eventPathContainsSelector(event: Event, selector: string): boolean { const path = event.composedPath(); if (path.length === 0 && event.target) { @@ -1740,29 +1733,6 @@ function ChatViewContent(props: ChatViewProps) { const existingThreadKeys = new Set([...serverThreadKeys, ...draftThreadKeys]); return openTerminalThreadKeys.filter((nextThreadKey) => existingThreadKeys.has(nextThreadKey)); }, [draftThreadKeys, openTerminalThreadKeys, serverThreadKeys]); - const sourcePlanThreadRef = useMemo(() => { - const sourceThreadId = activeLatestRun?.sourcePlanRef?.threadId; - if (!activeThread || !sourceThreadId || sourceThreadId === activeThread.id) { - return null; - } - return scopeThreadRef(activeThread.environmentId, sourceThreadId); - }, [activeLatestRun?.sourcePlanRef?.threadId, activeThread]); - const sourceThreadProjection = useThreadProjection(sourcePlanThreadRef); - const threadPlanCatalog = useMemo(() => { - if (!activeThread || serverProjection === null) { - return []; - } - const entries: ThreadPlanCatalogEntry[] = [ - { id: activeThread.id, projection: serverProjection }, - ]; - if (sourcePlanThreadRef && sourceThreadProjection !== null) { - entries.push({ - id: sourcePlanThreadRef.threadId, - projection: sourceThreadProjection.projection, - }); - } - return entries; - }, [activeThread, serverProjection, sourcePlanThreadRef, sourceThreadProjection]); useEffect(() => { setMountedTerminalThreadKeys((currentThreadIds) => { const nextThreadIds = reconcileMountedTerminalThreadIds({ @@ -2321,20 +2291,6 @@ function ChatViewContent(props: ChatViewProps) { } return findLatestProposedPlan(serverProjection, activeLatestRun?.runId ?? null); }, [activeLatestRun?.runId, latestRunSettled, serverProjection]); - const sidebarProposedPlan = useMemo( - () => - findSidebarProposedPlan({ - threads: threadPlanCatalog, - latestRun: activeLatestRun, - latestRunSettled, - threadId: activeThread?.id ?? null, - }), - [activeLatestRun, activeThread?.id, latestRunSettled, threadPlanCatalog], - ); - const activePlan = useMemo( - () => deriveActivePlanState(serverProjection, activeLatestRun?.runId ?? undefined), - [activeLatestRun?.runId, serverProjection], - ); const showPlanFollowUpPrompt = pendingUserInputs.length === 0 && interactionMode === "plan" && @@ -6410,8 +6366,6 @@ function ChatViewContent(props: ChatViewProps) { respondingRequestIds={respondingRequestIds} showPlanFollowUpPrompt={showPlanFollowUpPrompt} activeProposedPlan={activeProposedPlan} - activePlan={activePlan} - sidebarProposedPlan={sidebarProposedPlan} runtimeMode={runtimeMode} interactionMode={interactionMode} lockedProvider={modelPickerLockedProvider} diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index 0d0136b0f5..2798f1e6d8 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -10,7 +10,6 @@ import type { ScopedThreadRef, ServerProvider, ThreadId, - RunId, RuntimeRequestId, } from "@t3tools/contracts"; import { @@ -196,7 +195,6 @@ import { toastManager } from "../ui/toast"; import { BotIcon, CircleAlertIcon, - ListTodoIcon, LoaderCircleIcon, PencilRulerIcon, type LucideIcon, @@ -550,8 +548,6 @@ export interface ChatComposerProps { // Plan showPlanFollowUpPrompt: boolean; activeProposedPlan: LatestProposedPlanState | null; - activePlan: { runId?: RunId | null } | null; - sidebarProposedPlan: { runId?: RunId | null } | null; // Mode runtimeMode: RuntimeMode; @@ -650,8 +646,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) respondingRequestIds, showPlanFollowUpPrompt, activeProposedPlan, - activePlan, - sidebarProposedPlan, runtimeMode, interactionMode, lockedProvider,