first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+10 -11
View File
@@ -11,14 +11,13 @@ mod screenshot;
mod session;
use async_trait::async_trait;
use galaxyui::r#async::Timer;
use pathfinder_geometry::vector::Vector2I;
use crate::{Action, ActionResult, Options};
use keyboard::Keyboard;
use mouse::Mouse;
use pathfinder_geometry::vector::Vector2I;
use session::PortalSession;
use galaxyui_core::r#async::Timer;
use crate::{Action, ActionResult, Options, TargetedAction};
/// An actor that performs computer use actions on Wayland via XDG portals.
pub struct Actor {
@@ -58,7 +57,7 @@ impl crate::Actor for Actor {
async fn perform_actions(
&mut self,
actions: &[Action],
actions: &[TargetedAction],
options: Options,
) -> Result<ActionResult, String> {
// Ensure we have an active session before processing actions.
@@ -67,7 +66,10 @@ impl crate::Actor for Actor {
let mut last_mouse_position: Option<Vector2I> = None;
for action in actions {
for targeted in actions {
// Per-window targeting is not supported on Wayland; act on the screen / focused
// surface regardless of the requested target.
let action: &Action = &targeted.action;
// Re-acquire session reference each iteration (borrow checker workaround).
let session = self
.session
@@ -153,9 +155,6 @@ impl crate::Actor for Actor {
self.mouse.last_position()
};
Ok(ActionResult {
screenshot,
cursor_position,
})
Ok(ActionResult::legacy(screenshot, cursor_position))
}
}