mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
docs: add comprehensive JSDoc comments to TUI components
Improves documentation across all TUI files: - App.tsx: Main component with keyboard shortcuts reference - index.tsx: Entry point with usage examples - useSessionManager.ts: Hook with detailed API documentation - All components: Props, returns, and behavior descriptions - Helper functions: Parameter and return type documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
/**
|
||||
* @fileoverview TerminalView component
|
||||
*
|
||||
* Displays PTY output from the active session.
|
||||
* Features:
|
||||
* - Scrollable viewport showing last N lines
|
||||
* - ANSI color support (handled by Ink)
|
||||
* - Visual border indicating focus
|
||||
* Primary terminal output display for Claude session monitoring.
|
||||
*
|
||||
* @description
|
||||
* Renders the terminal output from a GNU screen session:
|
||||
* - Viewport shows last N lines based on available height
|
||||
* - Line splitting is memoized for performance
|
||||
* - Visual border color indicates session state (green=active, gray=none)
|
||||
* - Long lines are truncated to prevent wrapping issues
|
||||
*
|
||||
* Output is obtained via screen hardcopy polling in useSessionManager.
|
||||
*/
|
||||
|
||||
import React, { useMemo } from 'react';
|
||||
@@ -19,7 +24,17 @@ interface TerminalViewProps {
|
||||
}
|
||||
|
||||
/**
|
||||
* TerminalView component for PTY output display
|
||||
* Terminal view component for displaying session output.
|
||||
*
|
||||
* @description
|
||||
* Shows the last N lines of terminal output that fit within the given height.
|
||||
* When no session is selected, displays a placeholder message.
|
||||
*
|
||||
* @param props - Component props
|
||||
* @param props.output - Raw terminal output string from screen hardcopy
|
||||
* @param props.height - Available height in terminal rows (includes border)
|
||||
* @param props.session - The active session or null
|
||||
* @returns The terminal view element
|
||||
*/
|
||||
export function TerminalView({
|
||||
output,
|
||||
|
||||
Reference in New Issue
Block a user