codetether-agent 4.7.0-a-002.4

A2A-native AI coding agent for the CodeTether ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Native mouse click via Win32 SendInput.

use crate::platform::windows::computer_use::send_click;
use crate::tool::computer_use::input::ComputerUseInput;

/// Move cursor and click using native Win32 API.
pub async fn handle_click(input: &ComputerUseInput) -> anyhow::Result<crate::tool::ToolResult> {
    let (x, y) = super::validate::coords(input)?;
    super::modifiers::with_modifiers(&input.modifiers, || send_click(x, y))?;
    Ok(super::report::mouse_result(serde_json::json!({
        "clicked": true, "x": x, "y": y,
        "modifiers": input.modifiers,
        "coordinate_mode": super::validate::coordinate_mode(input)
    })))
}