refactor(deps): restructured codebase to use centralized pi-utils package

- Created new @oh-my-pi/pi-utils workspace package with shared utilities for logging, process management, stream handling, and temporary directory management.
- Migrated all packages to use centralized logger from @oh-my-pi/pi-utils instead of local winston implementations.
- Replaced custom process spawning and stream reading implementations with standardized cspawn and readLines utilities across all modules.
- Converted synchronous file operations and process spawning to async patterns using Bun shell syntax and fs/promises.
- Added streaming edit abort functionality with configurable setting to abort on patch preview failures.
- Updated test framework from vitest to bun:test across all test suites.
This commit is contained in:
can1357
2026-01-20 04:34:29 +01:00
parent 030b812624
commit b2c94bef1a
166 changed files with 3821 additions and 3215 deletions
@@ -8,6 +8,7 @@ import { readFileSync } from "node:fs";
import { join } from "node:path";
import type { AssistantMessage } from "@oh-my-pi/pi-ai";
import { ProcessTerminal, TUI } from "@oh-my-pi/pi-tui";
import { sleep } from "bun";
import { AssistantMessageComponent } from "../src/modes/interactive/components/assistant-message";
import { initTheme } from "../src/modes/interactive/theme/theme";
@@ -32,10 +33,6 @@ if (!thinkingContent || thinkingContent.type !== "thinking") {
const fullThinkingText = thinkingContent.thinking;
const fullTextContent = textContent && textContent.type === "text" ? textContent.text : "";
async function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function main() {
const terminal = new ProcessTerminal();
const tui = new TUI(terminal);