Agent cursor speed: a slider from 1× to 5× with Instant at the far right. Instant no longer breaks: the command runs at once (as with the cursor off) and the pointer jumps to where it acted, with a click ripple. ui.agent_cursor speed takes 1–5 or "instant"; saved "slow" and "normal" read as 1×. Scenario covers 1×, 3× and Instant against the cursor-off result

Fixes #79

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT
This commit is contained in:
bherbruckandClaude Opus 5.5 committed 2026-10-10 16:56:30 +00:00
1 parent 5ec6d3562e
commit c90070c497
7 files changed
+128 -34

No files matched your search

+4 -4
View File
@@ -27,7 +27,7 @@
//! - `ui.prefs {...}`: the preferences (default_units, nav, zoom_reverse, orbit_cursor, msaa,
//! length_decimals, angle_decimals); returns them all
//! - `ui.capture {action?: capture|revert|cancel}`: the Capture Position question
//! - `ui.agent_cursor {show?, speed?: instant|normal|slow, follow_camera?}`: the agent cursor
//! - `ui.agent_cursor {show?, speed?: 1–5 (times) | "instant", follow_camera?}`: the agent cursor
//! (#35); while it is shown, `engine.execute` first glides to the command's button and picks
//! and replies once the command has run (`"animate": false` skips that one call)
//! - `ui.resize {width, height}`, `app.quit`
@@ -107,9 +107,9 @@ pub fn handle(app: &mut SolveApp, ctx: &egui::Context, req: &ControlRequest) ->
s.follow_camera = v;
}
if let Some(v) = p.get("speed") {
match serde_json::from_value(v.clone()) {
Ok(sp) => s.speed = sp,
Err(_) => return err("speed must be instant, normal or slow"),
match crate::agent_cursor::Speed::from_value(v) {
Some(sp) => s.speed = sp,
None => return err("speed must be a number from 1 to 5, or \"instant\""),
}
}
ok(json!(app.ui.agent_cursor))