diff --git a/ui/src/components/agents/AgentThreadView.tsx b/ui/src/components/agents/AgentThreadView.tsx index acef4cbb..def167e4 100644 --- a/ui/src/components/agents/AgentThreadView.tsx +++ b/ui/src/components/agents/AgentThreadView.tsx @@ -1,13 +1,8 @@ -import { useEffect, useMemo, useRef, useState } from "react"; -import { ChevronDown } from "lucide-react"; +import { useEffect, useMemo, useState } from "react"; import { AgentPromptBar } from "@/components/agents/AgentPromptBar"; import { AgentsShell } from "@/components/agents/AgentsSidebar"; -import { - MessageView, - summarizeChangedFiles, - type MessageViewScrollControl, -} from "@/components/agents/ported"; +import { MessageView } from "@/components/agents/ported"; import type { SessionUser } from "@/lib/api"; import type { AgentThread, Message } from "@/lib/agents/types"; import { useSendAgentMessage } from "@/lib/agents/queries"; @@ -24,13 +19,9 @@ interface AgentThreadViewProps { thread: AgentThread; } -const PROMPT_OVERLAY_INSET = 128; - export function AgentThreadView({ user, thread }: AgentThreadViewProps) { const sendMessage = useSendAgentMessage(thread.id); useAgentThreadStream(thread.id, thread.status === "running"); - const scrollControlRef = useRef(null); - const [showScrollToBottom, setShowScrollToBottom] = useState(false); const [pendingPrompts, setPendingPrompts] = useState(() => getPendingPrompts(thread.id), ); @@ -92,12 +83,6 @@ export function AgentThreadView({ user, thread }: AgentThreadViewProps) { return result; }, [thread.messages, pendingPrompts]); - const changedFiles = useMemo(() => { - const agentMessages = thread.messages.filter((m) => m.author === "agent"); - const allChunks = agentMessages.flatMap((m) => m.chunks); - return summarizeChangedFiles(allChunks); - }, [thread.messages]); - const hasMessages = displayMessages.length > 0; const isStreaming = thread.status === "running" || pendingPrompts.length > 0; @@ -106,53 +91,14 @@ export function AgentThreadView({ user, thread }: AgentThreadViewProps) {
{hasMessages ? ( -
-
- - - {changedFiles.length > 0 && ( -
-
-
- {changedFiles.length} Files Changed -
-
- {changedFiles.map((file) => ( -
- {file.filePath} - +{file.additions} -
- ))} -
-
-
- )} -
- -
-
-
- {showScrollToBottom && ( - - )} +
+ +
+