refactor(natives): migrated native bindings to NAPI-RS with auto-generated types
- Migrated native bindings from TypeScript wrappers to NAPI-RS generated modules with auto-generated type definitions and runtime enums. - Replaced chunk tree API with stateful ChunkState class supporting render, edit, and resolve operations with improved error handling. - Converted callback signatures to error-first pattern (error, result) for shell, PTY, glob, and grep operations. - Introduced type-safe enums for MacOSAppearance, GrepOutputMode, KeyEventType, ImageFormat, and AstMatchStrictness replacing string literals. - Refactored chunk tree implementation with dedicated modules for edit, indent, resolve, and state management with comprehensive validation. - Moved clipboard utilities from native bindings to coding-agent package with improved OSC 52 and Termux compatibility.
This commit is contained in:
@@ -5,17 +5,16 @@
|
||||
* tool renderers to ensure a unified TUI experience.
|
||||
*/
|
||||
import * as os from "node:os";
|
||||
import { type Ellipsis, truncateToWidth } from "@oh-my-pi/pi-tui";
|
||||
import { getIndentation, pluralize } from "@oh-my-pi/pi-utils";
|
||||
import type { Ellipsis } from "@oh-my-pi/pi-natives";
|
||||
import { truncateToWidth } from "@oh-my-pi/pi-tui";
|
||||
import { pluralize } from "@oh-my-pi/pi-utils";
|
||||
import { settings } from "../config/settings";
|
||||
import type { Theme } from "../modes/theme/theme";
|
||||
import { formatDimensionNote, type ResizedImage } from "../utils/image-resize";
|
||||
|
||||
export { Ellipsis, truncateToWidth } from "@oh-my-pi/pi-tui";
|
||||
export { Ellipsis } from "@oh-my-pi/pi-natives";
|
||||
export { replaceTabs, truncateToWidth } from "@oh-my-pi/pi-tui";
|
||||
|
||||
export function replaceTabs(text: string, file?: string): string {
|
||||
return text.replaceAll("\t", getIndentation(file));
|
||||
}
|
||||
// =============================================================================
|
||||
// Standardized Display Constants
|
||||
// =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user