diff --git a/frontend/src/app/components/DynamicIsland.tsx b/frontend/src/app/components/DynamicIsland.tsx index a0aa8344..8edab024 100644 --- a/frontend/src/app/components/DynamicIsland.tsx +++ b/frontend/src/app/components/DynamicIsland.tsx @@ -30,7 +30,7 @@ import { import { API_BASE, getAuthToken } from '@/shared/config'; import { store } from '@/shared/state/store'; import { setPendingFocusAgentId } from '@/shared/state/tempStateSlice'; -import ApprovalBar, { BatchApprovalBar, parseMcpToolName, useMcpToolMeta, getToolIcon } from '@/app/pages/AgentChat/ApprovalBar'; +import ApprovalBar, { BatchApprovalBar, parseMcpToolName, useMcpToolMeta, getToolIcon } from '@/app/pages/AgentChat/shell/ApprovalBar'; import GlobalSearchPalette from '@/app/components/GlobalSearchPalette'; import { useClaudeTokens } from '@/shared/styles/ThemeContext'; diff --git a/frontend/src/app/pages/AgentChat/AgentChat.tsx b/frontend/src/app/pages/AgentChat/AgentChat.tsx index 06682b7f..c146d815 100644 --- a/frontend/src/app/pages/AgentChat/AgentChat.tsx +++ b/frontend/src/app/pages/AgentChat/AgentChat.tsx @@ -41,15 +41,15 @@ import { } from '@/shared/state/agentsSlice'; import { fetchModes } from '@/shared/state/modesSlice'; import { createSessionWs } from '@/shared/ws/WebSocketManager'; -import StreamingBubble from './StreamingBubble'; -import MessageBubble from './MessageBubble'; -import CompactionMarker from './CompactionMarker'; -import MessageActionBar from './MessageActionBar'; -import ToolCallBubble, { ToolPair } from './ToolCallBubble'; -import ToolGroupBubble, { RenderItem, ToolGroup, isToolGroup, isToolPair } from './ToolGroupBubble'; -import ApprovalBar, { BatchApprovalBar } from './ApprovalBar'; +import StreamingBubble from './bubbles/StreamingBubble'; +import MessageBubble from './bubbles/MessageBubble'; +import CompactionMarker from './bubbles/CompactionMarker'; +import MessageActionBar from './shell/MessageActionBar'; +import ToolCallBubble, { ToolPair } from './tool-bubbles/ToolCallBubble'; +import ToolGroupBubble, { RenderItem, ToolGroup, isToolGroup, isToolPair } from './tool-bubbles/ToolGroupBubble'; +import ApprovalBar, { BatchApprovalBar } from './shell/ApprovalBar'; import ChatInput, { ChatInputHandle } from './ChatInput'; -import ContextDrawer from './ContextDrawer'; +import ContextDrawer from './shell/ContextDrawer'; import { ErrorSlime } from '@/app/components/ErrorSlime'; import { ContextPath } from '@/app/components/DirectoryBrowser'; import { setGlowingBrowserCards, fadeGlowingBrowserCards, clearGlowingBrowserCards } from '@/shared/state/dashboardLayoutSlice'; diff --git a/frontend/src/app/pages/AgentChat/CompactionMarker.tsx b/frontend/src/app/pages/AgentChat/bubbles/CompactionMarker.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/CompactionMarker.tsx rename to frontend/src/app/pages/AgentChat/bubbles/CompactionMarker.tsx diff --git a/frontend/src/app/pages/AgentChat/MessageBubble.tsx b/frontend/src/app/pages/AgentChat/bubbles/MessageBubble.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/MessageBubble.tsx rename to frontend/src/app/pages/AgentChat/bubbles/MessageBubble.tsx diff --git a/frontend/src/app/pages/AgentChat/StreamingBubble.tsx b/frontend/src/app/pages/AgentChat/bubbles/StreamingBubble.tsx similarity index 97% rename from frontend/src/app/pages/AgentChat/StreamingBubble.tsx rename to frontend/src/app/pages/AgentChat/bubbles/StreamingBubble.tsx index 5c5d4253..f4b4c0c5 100644 --- a/frontend/src/app/pages/AgentChat/StreamingBubble.tsx +++ b/frontend/src/app/pages/AgentChat/bubbles/StreamingBubble.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef } from 'react'; import { useStreamingMessage } from '@/shared/state/streamingSlice'; import MessageBubble from './MessageBubble'; -import ToolCallBubble from './ToolCallBubble'; +import ToolCallBubble from '../tool-bubbles/ToolCallBubble'; interface Props { sessionId: string; diff --git a/frontend/src/app/pages/AgentChat/CalendarCard.tsx b/frontend/src/app/pages/AgentChat/mcp-cards/CalendarCard.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/CalendarCard.tsx rename to frontend/src/app/pages/AgentChat/mcp-cards/CalendarCard.tsx diff --git a/frontend/src/app/pages/AgentChat/DriveCard.tsx b/frontend/src/app/pages/AgentChat/mcp-cards/DriveCard.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/DriveCard.tsx rename to frontend/src/app/pages/AgentChat/mcp-cards/DriveCard.tsx diff --git a/frontend/src/app/pages/AgentChat/GenericMcpCard.tsx b/frontend/src/app/pages/AgentChat/mcp-cards/GenericMcpCard.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/GenericMcpCard.tsx rename to frontend/src/app/pages/AgentChat/mcp-cards/GenericMcpCard.tsx diff --git a/frontend/src/app/pages/AgentChat/GmailCard.tsx b/frontend/src/app/pages/AgentChat/mcp-cards/GmailCard.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/GmailCard.tsx rename to frontend/src/app/pages/AgentChat/mcp-cards/GmailCard.tsx diff --git a/frontend/src/app/pages/AgentChat/GoogleServiceIcon.tsx b/frontend/src/app/pages/AgentChat/mcp-cards/GoogleServiceIcon.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/GoogleServiceIcon.tsx rename to frontend/src/app/pages/AgentChat/mcp-cards/GoogleServiceIcon.tsx diff --git a/frontend/src/app/pages/AgentChat/McpResultCard.tsx b/frontend/src/app/pages/AgentChat/mcp-cards/McpResultCard.tsx similarity index 94% rename from frontend/src/app/pages/AgentChat/McpResultCard.tsx rename to frontend/src/app/pages/AgentChat/mcp-cards/McpResultCard.tsx index 0fcd4071..ca2af76f 100644 --- a/frontend/src/app/pages/AgentChat/McpResultCard.tsx +++ b/frontend/src/app/pages/AgentChat/mcp-cards/McpResultCard.tsx @@ -1,8 +1,8 @@ import React from 'react'; import Box from '@mui/material/Box'; import { useClaudeTokens } from '@/shared/styles/ThemeContext'; -import { ParsedMcpResult } from './toolResultParsing'; -import { useTermColors } from './toolColorize'; +import { ParsedMcpResult } from '../parsing/toolResultParsing'; +import { useTermColors } from '../parsing/toolColorize'; import { useCardColors } from './cardColors'; import { GmailCard } from './GmailCard'; import { CalendarCard } from './CalendarCard'; diff --git a/frontend/src/app/pages/AgentChat/cardColors.ts b/frontend/src/app/pages/AgentChat/mcp-cards/cardColors.ts similarity index 100% rename from frontend/src/app/pages/AgentChat/cardColors.ts rename to frontend/src/app/pages/AgentChat/mcp-cards/cardColors.ts diff --git a/frontend/src/app/pages/AgentChat/mcpCardHelpers.ts b/frontend/src/app/pages/AgentChat/mcp-cards/mcpCardHelpers.ts similarity index 100% rename from frontend/src/app/pages/AgentChat/mcpCardHelpers.ts rename to frontend/src/app/pages/AgentChat/mcp-cards/mcpCardHelpers.ts diff --git a/frontend/src/app/pages/AgentChat/agentToolParsing.ts b/frontend/src/app/pages/AgentChat/parsing/agentToolParsing.ts similarity index 100% rename from frontend/src/app/pages/AgentChat/agentToolParsing.ts rename to frontend/src/app/pages/AgentChat/parsing/agentToolParsing.ts diff --git a/frontend/src/app/pages/AgentChat/toolBubbleChrome.tsx b/frontend/src/app/pages/AgentChat/parsing/toolBubbleChrome.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/toolBubbleChrome.tsx rename to frontend/src/app/pages/AgentChat/parsing/toolBubbleChrome.tsx diff --git a/frontend/src/app/pages/AgentChat/toolColorize.tsx b/frontend/src/app/pages/AgentChat/parsing/toolColorize.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/toolColorize.tsx rename to frontend/src/app/pages/AgentChat/parsing/toolColorize.tsx diff --git a/frontend/src/app/pages/AgentChat/toolLabels.ts b/frontend/src/app/pages/AgentChat/parsing/toolLabels.ts similarity index 100% rename from frontend/src/app/pages/AgentChat/toolLabels.ts rename to frontend/src/app/pages/AgentChat/parsing/toolLabels.ts diff --git a/frontend/src/app/pages/AgentChat/toolResultParsing.ts b/frontend/src/app/pages/AgentChat/parsing/toolResultParsing.ts similarity index 100% rename from frontend/src/app/pages/AgentChat/toolResultParsing.ts rename to frontend/src/app/pages/AgentChat/parsing/toolResultParsing.ts diff --git a/frontend/src/app/pages/AgentChat/ApprovalBar.tsx b/frontend/src/app/pages/AgentChat/shell/ApprovalBar.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/ApprovalBar.tsx rename to frontend/src/app/pages/AgentChat/shell/ApprovalBar.tsx diff --git a/frontend/src/app/pages/AgentChat/BranchNavigator.tsx b/frontend/src/app/pages/AgentChat/shell/BranchNavigator.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/BranchNavigator.tsx rename to frontend/src/app/pages/AgentChat/shell/BranchNavigator.tsx diff --git a/frontend/src/app/pages/AgentChat/BrowserAgentInlineFeed.tsx b/frontend/src/app/pages/AgentChat/shell/BrowserAgentInlineFeed.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/BrowserAgentInlineFeed.tsx rename to frontend/src/app/pages/AgentChat/shell/BrowserAgentInlineFeed.tsx diff --git a/frontend/src/app/pages/AgentChat/ContextDrawer.tsx b/frontend/src/app/pages/AgentChat/shell/ContextDrawer.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/ContextDrawer.tsx rename to frontend/src/app/pages/AgentChat/shell/ContextDrawer.tsx diff --git a/frontend/src/app/pages/AgentChat/MessageActionBar.tsx b/frontend/src/app/pages/AgentChat/shell/MessageActionBar.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/MessageActionBar.tsx rename to frontend/src/app/pages/AgentChat/shell/MessageActionBar.tsx diff --git a/frontend/src/app/pages/AgentChat/AgentResponseBody.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/AgentResponseBody.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/AgentResponseBody.tsx rename to frontend/src/app/pages/AgentChat/tool-bubbles/AgentResponseBody.tsx diff --git a/frontend/src/app/pages/AgentChat/CompactMcpBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx similarity index 92% rename from frontend/src/app/pages/AgentChat/CompactMcpBubble.tsx rename to frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx index a3433ee3..fb1c6bb5 100644 --- a/frontend/src/app/pages/AgentChat/CompactMcpBubble.tsx +++ b/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx @@ -9,14 +9,14 @@ import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'; import BlockIcon from '@mui/icons-material/Block'; import { AgentMessage } from '@/shared/state/agentsSlice'; import { useClaudeTokens } from '@/shared/styles/ThemeContext'; -import { getToolLabel } from './toolLabels'; -import BrowserAgentInlineFeed from './BrowserAgentInlineFeed'; -import { GoogleServiceIcon } from './GoogleServiceIcon'; -import { ElapsedTimer, formatElapsed } from './toolBubbleChrome'; -import { useTermColors } from './toolColorize'; -import { ParsedResult } from './toolResultParsing'; +import { getToolLabel } from '../parsing/toolLabels'; +import BrowserAgentInlineFeed from '../shell/BrowserAgentInlineFeed'; +import { GoogleServiceIcon } from '../mcp-cards/GoogleServiceIcon'; +import { ElapsedTimer, formatElapsed } from '../parsing/toolBubbleChrome'; +import { useTermColors } from '../parsing/toolColorize'; +import { ParsedResult } from '../parsing/toolResultParsing'; import { McpToolInfo, getMcpShortAction } from '@/shared/mcpToolMeta'; -import { McpResultCard } from './McpResultCard'; +import { McpResultCard } from '../mcp-cards/McpResultCard'; interface CompactMcpBubbleProps { call: AgentMessage; diff --git a/frontend/src/app/pages/AgentChat/CreateAgentBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/CreateAgentBubble.tsx similarity index 98% rename from frontend/src/app/pages/AgentChat/CreateAgentBubble.tsx rename to frontend/src/app/pages/AgentChat/tool-bubbles/CreateAgentBubble.tsx index a8a2d06b..fe823dbf 100644 --- a/frontend/src/app/pages/AgentChat/CreateAgentBubble.tsx +++ b/frontend/src/app/pages/AgentChat/tool-bubbles/CreateAgentBubble.tsx @@ -10,7 +10,7 @@ import BlockIcon from '@mui/icons-material/Block'; import CallSplitIcon from '@mui/icons-material/CallSplit'; import { AgentMessage } from '@/shared/state/agentsSlice'; import { useClaudeTokens } from '@/shared/styles/ThemeContext'; -import { ElapsedTimer, formatElapsed } from './toolBubbleChrome'; +import { ElapsedTimer, formatElapsed } from '../parsing/toolBubbleChrome'; import { AgentResponseBody } from './AgentResponseBody'; interface CreateAgentBubbleProps { diff --git a/frontend/src/app/pages/AgentChat/DefaultToolBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/DefaultToolBubble.tsx similarity index 95% rename from frontend/src/app/pages/AgentChat/DefaultToolBubble.tsx rename to frontend/src/app/pages/AgentChat/tool-bubbles/DefaultToolBubble.tsx index ea925909..4ef70036 100644 --- a/frontend/src/app/pages/AgentChat/DefaultToolBubble.tsx +++ b/frontend/src/app/pages/AgentChat/tool-bubbles/DefaultToolBubble.tsx @@ -11,14 +11,14 @@ import BlockIcon from '@mui/icons-material/Block'; import SearchIcon from '@mui/icons-material/Search'; import { AgentMessage } from '@/shared/state/agentsSlice'; import { useClaudeTokens } from '@/shared/styles/ThemeContext'; -import { getToolLabelWithInput } from './toolLabels'; -import BrowserAgentInlineFeed from './BrowserAgentInlineFeed'; -import { GoogleServiceIcon } from './GoogleServiceIcon'; -import { ElapsedTimer, formatElapsed } from './toolBubbleChrome'; -import { useTermColors, colorizeInput, colorizeOutput } from './toolColorize'; -import { ParsedResult } from './toolResultParsing'; +import { getToolLabelWithInput } from '../parsing/toolLabels'; +import BrowserAgentInlineFeed from '../shell/BrowserAgentInlineFeed'; +import { GoogleServiceIcon } from '../mcp-cards/GoogleServiceIcon'; +import { ElapsedTimer, formatElapsed } from '../parsing/toolBubbleChrome'; +import { useTermColors, colorizeInput, colorizeOutput } from '../parsing/toolColorize'; +import { ParsedResult } from '../parsing/toolResultParsing'; import { McpToolInfo } from '@/shared/mcpToolMeta'; -import { McpResultCard } from './McpResultCard'; +import { McpResultCard } from '../mcp-cards/McpResultCard'; interface DefaultToolBubbleProps { call: AgentMessage; diff --git a/frontend/src/app/pages/AgentChat/InvokeAgentBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/InvokeAgentBubble.tsx similarity index 97% rename from frontend/src/app/pages/AgentChat/InvokeAgentBubble.tsx rename to frontend/src/app/pages/AgentChat/tool-bubbles/InvokeAgentBubble.tsx index 3094d5a3..396a3490 100644 --- a/frontend/src/app/pages/AgentChat/InvokeAgentBubble.tsx +++ b/frontend/src/app/pages/AgentChat/tool-bubbles/InvokeAgentBubble.tsx @@ -10,9 +10,9 @@ import BlockIcon from '@mui/icons-material/Block'; import CallSplitIcon from '@mui/icons-material/CallSplit'; import { AgentMessage } from '@/shared/state/agentsSlice'; import { useClaudeTokens } from '@/shared/styles/ThemeContext'; -import { ElapsedTimer, formatElapsed } from './toolBubbleChrome'; +import { ElapsedTimer, formatElapsed } from '../parsing/toolBubbleChrome'; import { AgentResponseBody } from './AgentResponseBody'; -import { InvokeAgentParsed } from './agentToolParsing'; +import { InvokeAgentParsed } from '../parsing/agentToolParsing'; interface InvokeAgentBubbleProps { call: AgentMessage; diff --git a/frontend/src/app/pages/AgentChat/ToolCallBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/ToolCallBubble.tsx similarity index 98% rename from frontend/src/app/pages/AgentChat/ToolCallBubble.tsx rename to frontend/src/app/pages/AgentChat/tool-bubbles/ToolCallBubble.tsx index c1b947ae..8c15077f 100644 --- a/frontend/src/app/pages/AgentChat/ToolCallBubble.tsx +++ b/frontend/src/app/pages/AgentChat/tool-bubbles/ToolCallBubble.tsx @@ -3,7 +3,7 @@ import { AgentMessage, expandSession, collapseSession, fetchSession } from '@/sh import { useAppDispatch, useAppSelector } from '@/shared/hooks'; import { placeCard, removeCard, setGlowingAgentCard, clearGlowingAgentCard, DEFAULT_CARD_W, DEFAULT_CARD_H, EXPANDED_CARD_MIN_H, GRID_GAP } from '@/shared/state/dashboardLayoutSlice'; import { useClaudeTokens } from '@/shared/styles/ThemeContext'; -import { ensureToolCallKeyframes } from './toolBubbleChrome'; +import { ensureToolCallKeyframes } from '../parsing/toolBubbleChrome'; import { getToolData, getInputSummary, @@ -11,7 +11,7 @@ import { parseToolResult, getResultSummary, getPromptPrefix, -} from './toolResultParsing'; +} from '../parsing/toolResultParsing'; import { parseMcpToolName } from '@/shared/mcpToolMeta'; import { isBrowserAgentTool, @@ -20,7 +20,7 @@ import { parseInvokedSessionId, parseCreateAgentResult, parseInvokeAgentResult, -} from './agentToolParsing'; +} from '../parsing/agentToolParsing'; import { InvokeAgentBubble } from './InvokeAgentBubble'; import { CreateAgentBubble } from './CreateAgentBubble'; import { CompactMcpBubble } from './CompactMcpBubble'; diff --git a/frontend/src/app/pages/AgentChat/ToolGroupBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/ToolGroupBubble.tsx similarity index 100% rename from frontend/src/app/pages/AgentChat/ToolGroupBubble.tsx rename to frontend/src/app/pages/AgentChat/tool-bubbles/ToolGroupBubble.tsx diff --git a/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx b/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx index a4c0b7dd..fccebf8c 100644 --- a/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx +++ b/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx @@ -26,7 +26,7 @@ import { removeCard, } from '@/shared/state/dashboardLayoutSlice'; import { useAppDispatch, useAppSelector } from '@/shared/hooks'; -import { QuestionForm } from '@/app/pages/AgentChat/ApprovalBar'; +import { QuestionForm } from '@/app/pages/AgentChat/shell/ApprovalBar'; import AgentChat from '@/app/pages/AgentChat/AgentChat'; import { parseMcpToolName, getMcpShortAction } from '@/shared/mcpToolMeta'; import { useClaudeTokens } from '@/shared/styles/ThemeContext';