diff --git a/bun.lock b/bun.lock index b04be5864..b5ea65077 100644 --- a/bun.lock +++ b/bun.lock @@ -22,7 +22,7 @@ }, "packages/agent": { "name": "@oh-my-pi/pi-agent-core", - "version": "8.12.5", + "version": "8.12.6", "dependencies": { "@oh-my-pi/pi-ai": "workspace:*", "@oh-my-pi/pi-tui": "workspace:*", @@ -35,7 +35,7 @@ }, "packages/ai": { "name": "@oh-my-pi/pi-ai", - "version": "8.12.5", + "version": "8.12.6", "bin": { "pi-ai": "./src/cli.ts", }, @@ -65,7 +65,7 @@ }, "packages/coding-agent": { "name": "@oh-my-pi/pi-coding-agent", - "version": "8.12.5", + "version": "8.12.6", "bin": { "omp": "src/cli.ts", }, @@ -102,7 +102,7 @@ }, "packages/natives": { "name": "@oh-my-pi/pi-natives", - "version": "8.12.5", + "version": "8.12.6", "dependencies": { "@oh-my-pi/pi-utils": "workspace:*", }, @@ -112,7 +112,7 @@ }, "packages/pi-utils": { "name": "@oh-my-pi/pi-utils", - "version": "8.12.5", + "version": "8.12.6", "dependencies": { "strip-ansi": "^7.1.2", "winston": "^3.19.0", @@ -142,7 +142,7 @@ }, "packages/stats": { "name": "@oh-my-pi/omp-stats", - "version": "8.12.5", + "version": "8.12.6", "bin": { "omp-stats": "./src/index.ts", }, @@ -162,8 +162,9 @@ }, "packages/tui": { "name": "@oh-my-pi/pi-tui", - "version": "8.12.5", + "version": "8.12.6", "dependencies": { + "@oh-my-pi/pi-natives": "workspace:*", "@types/mime-types": "^3.0.1", "chalk": "^5.6.2", "marked": "^17.0.1", diff --git a/crates/pi-natives/src/text.rs b/crates/pi-natives/src/text.rs index bfa18daed..b0864cfa4 100644 --- a/crates/pi-natives/src/text.rs +++ b/crates/pi-natives/src/text.rs @@ -39,16 +39,16 @@ struct AnsiCodeTracker { impl AnsiCodeTracker { const fn new() -> Self { Self { - bold: false, - dim: false, - italic: false, - underline: false, - blink: false, - inverse: false, - hidden: false, + bold: false, + dim: false, + italic: false, + underline: false, + blink: false, + inverse: false, + hidden: false, strikethrough: false, - fg_color: None, - bg_color: None, + fg_color: None, + bg_color: None, } } @@ -74,7 +74,9 @@ impl AnsiCodeTracker { return; } - let params = ansi_code.strip_prefix("\x1b[").and_then(|code| code.strip_suffix('m')); + let params = ansi_code + .strip_prefix("\x1b[") + .and_then(|code| code.strip_suffix('m')); let Some(params) = params else { return; }; @@ -260,9 +262,7 @@ pub fn visible_width(text: &str) -> usize { return 0; } - let is_pure_ascii = text - .bytes() - .all(|byte| (0x20..=0x7e).contains(&byte)); + let is_pure_ascii = text.bytes().all(|byte| (0x20..=0x7e).contains(&byte)); if is_pure_ascii { return text.len(); } @@ -353,10 +353,7 @@ pub fn truncate_to_width(text: &str, max_width: usize, ellipsis: &str, pad: bool fn slice_with_width_impl(line: &str, start_col: usize, length: usize, strict: bool) -> SliceResult { if length == 0 { - return SliceResult { - text: String::new(), - width: 0, - }; + return SliceResult { text: String::new(), width: 0 }; } let end_col = start_col + length; @@ -405,10 +402,7 @@ fn slice_with_width_impl(line: &str, start_col: usize, length: usize, strict: bo } } - SliceResult { - text: result, - width: result_width, - } + SliceResult { text: result, width: result_width } } /// Slice a range of visible columns from a line. @@ -496,12 +490,7 @@ fn extract_segments_impl( } } - ExtractSegmentsResult { - before, - before_width, - after, - after_width, - } + ExtractSegmentsResult { before, before_width, after, after_width } } /// Extract the before/after slices around an overlay region. diff --git a/packages/agent/package.json b/packages/agent/package.json index 37dd425a4..022daa8fc 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-agent-core", - "version": "8.12.5", + "version": "8.12.6", "description": "General-purpose agent with transport abstraction, state management, and attachment support", "type": "module", "main": "./src/index.ts", diff --git a/packages/ai/package.json b/packages/ai/package.json index 12b280917..7ed059dba 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-ai", - "version": "8.12.5", + "version": "8.12.6", "description": "Unified LLM API with automatic model discovery and provider configuration", "type": "module", "main": "./src/index.ts", diff --git a/packages/coding-agent/package.json b/packages/coding-agent/package.json index 1b955502e..5c5be5f7e 100644 --- a/packages/coding-agent/package.json +++ b/packages/coding-agent/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-coding-agent", - "version": "8.12.5", + "version": "8.12.6", "description": "Coding agent CLI with read, bash, edit, write tools and session management", "type": "module", "ompConfig": { diff --git a/packages/natives/package.json b/packages/natives/package.json index 53b5bb416..d0e13f5fc 100644 --- a/packages/natives/package.json +++ b/packages/natives/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-natives", - "version": "8.12.5", + "version": "8.12.6", "description": "Native Rust functionality compiled to WebAssembly via wasm-bindgen", "type": "module", "main": "./src/index.ts", diff --git a/packages/pi-utils/package.json b/packages/pi-utils/package.json index 1cd1d6591..516840a4e 100644 --- a/packages/pi-utils/package.json +++ b/packages/pi-utils/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-utils", - "version": "8.12.5", + "version": "8.12.6", "description": "Shared utilities for pi packages", "type": "module", "main": "./src/index.ts", diff --git a/packages/stats/package.json b/packages/stats/package.json index e88eb2577..bdae23231 100644 --- a/packages/stats/package.json +++ b/packages/stats/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/omp-stats", - "version": "8.12.5", + "version": "8.12.6", "description": "Local observability dashboard for pi AI usage statistics", "type": "module", "main": "./src/index.ts", diff --git a/packages/tui/package.json b/packages/tui/package.json index 74b7fe96d..5099f36c1 100644 --- a/packages/tui/package.json +++ b/packages/tui/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-tui", - "version": "8.12.5", + "version": "8.12.6", "description": "Terminal User Interface library with differential rendering for efficient text-based applications", "type": "module", "main": "./src/index.ts",