mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-14 02:42:04 +08:00
feat: Implement terminal panel for command execution and monitoring
- Added TerminalPanel component with navigation and main area for terminal interactions. - Integrated terminal session management with CLI execution output display. - Enhanced SolutionDrawer to open terminal panel on command execution. - Updated localization files for terminal panel strings in English and Chinese. - Introduced hooks for terminal panel state management. - Created JSON schemas for plan overview and fix plan types.
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
// ========================================
|
||||
// TerminalPanel Component
|
||||
// ========================================
|
||||
// Right-side overlay panel for terminal monitoring.
|
||||
// Follows the IssueDrawer pattern: fixed overlay + translate-x slide animation.
|
||||
// Contains TerminalNavBar (left icon strip) and TerminalMainArea (main content).
|
||||
// All state is read from terminalPanelStore - no props needed.
|
||||
// Right-side sliding panel for terminal monitoring.
|
||||
// Follows IssueDrawer pattern: overlay + fixed panel + translate-x animation.
|
||||
|
||||
import { useEffect, useCallback } from 'react';
|
||||
import { cn } from '@/lib/utils';
|
||||
@@ -12,8 +10,6 @@ import { useTerminalPanelStore } from '@/stores/terminalPanelStore';
|
||||
import { TerminalNavBar } from './TerminalNavBar';
|
||||
import { TerminalMainArea } from './TerminalMainArea';
|
||||
|
||||
// ========== Component ==========
|
||||
|
||||
export function TerminalPanel() {
|
||||
const isPanelOpen = useTerminalPanelStore((s) => s.isPanelOpen);
|
||||
const closePanel = useTerminalPanelStore((s) => s.closePanel);
|
||||
@@ -32,10 +28,6 @@ export function TerminalPanel() {
|
||||
return () => window.removeEventListener('keydown', handleEsc);
|
||||
}, [isPanelOpen, handleClose]);
|
||||
|
||||
if (!isPanelOpen) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* Overlay */}
|
||||
@@ -51,19 +43,17 @@ export function TerminalPanel() {
|
||||
{/* Panel */}
|
||||
<div
|
||||
className={cn(
|
||||
'fixed top-0 right-0 h-full w-1/2 bg-background border-l border-border shadow-2xl z-50',
|
||||
'flex flex-row transition-transform duration-300 ease-in-out',
|
||||
'fixed top-0 right-0 h-full w-1/2 bg-background border-l border-border shadow-2xl z-50 flex flex-row transition-transform duration-300 ease-in-out',
|
||||
isPanelOpen ? 'translate-x-0' : 'translate-x-full'
|
||||
)}
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label="Terminal Panel"
|
||||
style={{ minWidth: '400px', maxWidth: '800px' }}
|
||||
>
|
||||
{/* Left navigation bar */}
|
||||
{/* Left: Icon Navigation */}
|
||||
<TerminalNavBar />
|
||||
|
||||
{/* Main display area */}
|
||||
{/* Right: Main Content */}
|
||||
<TerminalMainArea onClose={handleClose} />
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user