From 2322f309c6fc35d3c712a87142c065f778ae751b Mon Sep 17 00:00:00 2001 From: liuxiaopai-ai Date: Sat, 7 Feb 2026 18:52:29 +0800 Subject: [PATCH] fix: allow first/last as modifiers after role/text locators in find command --- cli/src/commands.rs | 222 ++++++++++++++++++++++++++++++++++++++++---- cli/src/output.rs | 10 +- src/actions.ts | 38 ++++++-- src/types.ts | 10 +- 4 files changed, 252 insertions(+), 28 deletions(-) diff --git a/cli/src/commands.rs b/cli/src/commands.rs index 8c52752f..972ef145 100644 --- a/cli/src/commands.rs +++ b/cli/src/commands.rs @@ -1029,21 +1029,48 @@ fn parse_find(rest: &[&str], id: &str) -> Result { let value = rest.get(1).ok_or_else(|| ParseError::MissingArguments { context: format!("find {}", locator), usage: match *locator { - "role" => "find role [action] [--name ] [--exact]", - "text" => "find text [action] [--exact]", - "label" => "find label