diff --git a/components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx b/components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx index 1776504c9..d41c041b6 100644 --- a/components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx +++ b/components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx @@ -1242,20 +1242,6 @@ export default function ProjectSessionDetailPage({ // LEGACY: Old handleInterrupt removed - now using aguiInterrupt from useAGUIStream // which calls the proper AG-UI interrupt endpoint that signals Claude SDK - const handleEndSession = () => { - // Use stop API to end the session - stopMutation.mutate( - { projectName, sessionName, data: { reason: "end_session" } }, - { - onSuccess: () => successToast("Session ended successfully"), - onError: (err) => - errorToast( - err instanceof Error ? err.message : "Failed to end session", - ), - }, - ); - }; - // Duration calculation removed - startTime/completionTime no longer in status const durationMs = undefined; @@ -1904,7 +1890,6 @@ export default function ProjectSessionDetailPage({ setChatInput={setChatInput} onSendChat={() => Promise.resolve(sendChat())} onInterrupt={aguiInterrupt} - onEndSession={() => Promise.resolve(handleEndSession())} onGoToResults={() => {}} onContinue={handleContinue} workflowMetadata={workflowMetadata} diff --git a/components/frontend/src/components/session/MessagesTab.tsx b/components/frontend/src/components/session/MessagesTab.tsx index 3e45d60b6..8c58c3a43 100644 --- a/components/frontend/src/components/session/MessagesTab.tsx +++ b/components/frontend/src/components/session/MessagesTab.tsx @@ -24,7 +24,6 @@ export type MessagesTabProps = { setChatInput: (v: string) => void; onSendChat: () => Promise; onInterrupt: () => Promise; - onEndSession: () => Promise; onGoToResults?: () => void; onContinue: () => void; workflowMetadata?: WorkflowMetadata; @@ -39,9 +38,8 @@ export type MessagesTabProps = { }; -const MessagesTab: React.FC = ({ session, streamMessages, chatInput, setChatInput, onSendChat, onInterrupt, onEndSession, onGoToResults, onContinue, workflowMetadata, onCommandClick, isRunActive = false, showWelcomeExperience, welcomeExperienceComponent, activeWorkflow, userHasInteracted = false, queuedMessages = [], hasRealMessages = false }) => { +const MessagesTab: React.FC = ({ session, streamMessages, chatInput, setChatInput, onSendChat, onInterrupt, onGoToResults, onContinue, workflowMetadata, onCommandClick, isRunActive = false, showWelcomeExperience, welcomeExperienceComponent, activeWorkflow, userHasInteracted = false, queuedMessages = [], hasRealMessages = false }) => { const [interrupting, setInterrupting] = useState(false); - const [ending, setEnding] = useState(false); const [sendingChat, setSendingChat] = useState(false); const [showSystemMessages, setShowSystemMessages] = useState(false); const [agentsPopoverOpen, setAgentsPopoverOpen] = useState(false); @@ -169,15 +167,6 @@ const MessagesTab: React.FC = ({ session, streamMessages, chat } }; - const handleEndSession = async () => { - setEnding(true); - try { - await onEndSession(); - } finally { - setEnding(false); - } - }; - // Get filtered autocomplete items const getFilteredItems = () => { if (!autocompleteType) return []; @@ -689,24 +678,15 @@ const MessagesTab: React.FC = ({ session, streamMessages, chat Stop ) : ( - )} -