feat(tui): removed cursor positioning and refactored TUI rendering with explicit env defaults
- Removed getCursorPosition() method from Component interface and implementations, eliminating hardware cursor positioning support. - Changed PI_HARDWARE_CURSOR environment variable default from implicit true to explicit '1' with fallback pattern. - Changed PI_CLEAR_ON_SHRINK environment variable default from implicit false to explicit '0' with fallback pattern. - Added screen clearing on TUI startup to prevent shell prompts from bleeding into first rendered frame. - Refactored full-render logic into reusable fullRender() helper function.
This commit is contained in:
@@ -8,7 +8,7 @@ import * as os from "node:os";
|
||||
import { type Ellipsis, truncateToWidth } from "@oh-my-pi/pi-tui";
|
||||
import type { Theme } from "../modes/theme/theme";
|
||||
|
||||
export { Ellipsis, truncateToWidth } from "@oh-my-pi/pi-tui";
|
||||
export { Ellipsis, replaceTabs, truncateToWidth } from "@oh-my-pi/pi-tui";
|
||||
|
||||
// =============================================================================
|
||||
// Standardized Display Constants
|
||||
@@ -672,10 +672,6 @@ export function wrapBrackets(text: string, theme: Theme): string {
|
||||
return `${theme.format.bracketLeft}${text}${theme.format.bracketRight}`;
|
||||
}
|
||||
|
||||
export function replaceTabs(text: string): string {
|
||||
return text.replace(/\t/g, " ");
|
||||
}
|
||||
|
||||
function pluralize(label: string, count: number): string {
|
||||
if (count === 1) return label;
|
||||
if (/(?:ch|sh|s|x|z)$/i.test(label)) return `${label}es`;
|
||||
|
||||
Reference in New Issue
Block a user