feat: enhance snapshot usability by reducing AI cognitive load of semantic noise and -C flag (#968)
* fix: add ref for cursor-interactive content roles * fix: format * feat: always include cursor-interactive elements in snapshot, -C is deprecated * feat: process StaticText aggregation and deduplication * update test * clean up * fix: escape text of elements in snapshot * fix: redundant slicing * fix: cargo fmt * feat: deduplicate redundant StaticText --------- Co-authored-by: 羲洋 <lipengyang.lpy@alibaba-inc.com>
This commit is contained in:
@@ -1734,7 +1734,6 @@ async fn handle_snapshot(cmd: &Value, state: &mut DaemonState) -> Result<Value,
|
||||
.get("maxDepth")
|
||||
.and_then(|v| v.as_u64())
|
||||
.map(|d| d as usize),
|
||||
cursor: cmd.get("cursor").and_then(|v| v.as_bool()).unwrap_or(false),
|
||||
};
|
||||
|
||||
state.ref_map.clear();
|
||||
@@ -1846,7 +1845,6 @@ async fn handle_screenshot(cmd: &Value, state: &mut DaemonState) -> Result<Value
|
||||
&session_id,
|
||||
&SnapshotOptions {
|
||||
interactive: true,
|
||||
cursor: true,
|
||||
..SnapshotOptions::default()
|
||||
},
|
||||
&mut state.ref_map,
|
||||
|
||||
Reference in New Issue
Block a user