diff --git a/crates/coldvox-text-injection/src/manager.rs b/crates/coldvox-text-injection/src/manager.rs index 5c44e023..cd796680 100644 --- a/crates/coldvox-text-injection/src/manager.rs +++ b/crates/coldvox-text-injection/src/manager.rs @@ -314,10 +314,12 @@ impl StrategyManager { .await { if let Some(obj_ref) = matches.pop() { - if !obj_ref.name.is_empty() { - return Ok(obj_ref.name.to_string()); + if let Some(name) = obj_ref.name_as_str() { + if !name.is_empty() { + return Ok(name.to_string()); + } } - if let Some(last) = obj_ref.path.rsplit('/').next() { + if let Some(last) = obj_ref.path_as_str().rsplit('/').next() { if !last.is_empty() { return Ok(last.to_string()); } diff --git a/crates/coldvox-text-injection/src/prewarm.rs b/crates/coldvox-text-injection/src/prewarm.rs index 7c635526..f8e93bbc 100644 --- a/crates/coldvox-text-injection/src/prewarm.rs +++ b/crates/coldvox-text-injection/src/prewarm.rs @@ -213,8 +213,8 @@ impl PrewarmController { // Store the focused node focused_node = Some("focused".to_string()); - target_app = Some(obj_ref.name.to_string()); - window_id = Some(obj_ref.path.to_string()); + target_app = obj_ref.name_as_str().map(|s| s.to_string()); + window_id = Some(obj_ref.path_as_str().to_string()); // Simplified editable text check - assume it's editable if we found a focused element has_editable_text = true;