import React from 'react'; import { useClaudeTerminal } from '../context/ClaudeTerminalContext'; import { ClaudeTerminal } from './ClaudeTerminal'; import { Terminal } from 'lucide-react'; /** * GlobalClaudeTerminal - A floating terminal that persists across page navigation * * This component renders at the App level and maintains the Claude Code session * even when the user navigates between pages. It can be minimized to a floating * button or expanded to a side panel. */ export const GlobalClaudeTerminal: React.FC = () => { const { isOpen, setIsOpen, isExpanded, setIsExpanded, isConnected } = useClaudeTerminal(); // Floating button when terminal is closed if (!isOpen) { return ( ); } // Terminal panel - responsive sizing // On mobile portrait: full width with small margins // On tablet/desktop: fixed size panel return (
setIsExpanded(!isExpanded)} onClose={() => setIsOpen(false)} />
); };