mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 08:03:39 +00:00
- Create Terminal interface abstracting stdin/stdout operations for dependency injection - Implement ProcessTerminal for production use with process.stdin/stdout - Implement VirtualTerminal using @xterm/headless for accurate terminal emulation in tests - Fix TypeScript imports for @xterm/headless module - Move all component files to src/components/ directory for better organization - Add comprehensive test suite with async/await patterns for proper render timing - Fix critical TUI differential rendering bug when components grow in height - Issue: Old content wasn't properly cleared when component line count increased - Solution: Clear each old line individually before redrawing, ensure cursor at line start - Add test verifying terminal content preservation and text editor growth behavior - Update tsconfig.json to include test files in type checking - Add benchmark test comparing single vs double buffer performance The implementation successfully reduces flicker by only updating changed lines rather than clearing entire sections. Both TUI implementations maintain the same interface for backward compatibility.
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
// Core TUI interfaces and classes
|
|
|
|
// Autocomplete support
|
|
export {
|
|
type AutocompleteItem,
|
|
type AutocompleteProvider,
|
|
CombinedAutocompleteProvider,
|
|
type SlashCommand,
|
|
} from "./autocomplete.js";
|
|
// Loading animation component
|
|
export { LoadingAnimation } from "./components/loading-animation.js";
|
|
// Markdown component
|
|
export { MarkdownComponent } from "./components/markdown-component.js";
|
|
// Select list component
|
|
export { type SelectItem, SelectList } from "./components/select-list.js";
|
|
// Text component
|
|
export { TextComponent } from "./components/text-component.js";
|
|
// Text editor component
|
|
export { TextEditor, type TextEditorConfig } from "./components/text-editor.js";
|
|
// Whitespace component
|
|
export { WhitespaceComponent } from "./components/whitespace-component.js";
|
|
// Logger for debugging
|
|
export { type LoggerConfig, logger } from "./logger.js";
|
|
// Terminal interface and implementations
|
|
export { ProcessTerminal, type Terminal } from "./terminal.js";
|
|
export {
|
|
type Component,
|
|
type ComponentRenderResult,
|
|
Container,
|
|
getNextComponentId,
|
|
type Padding,
|
|
TUI,
|
|
} from "./tui.js";
|