pub struct PlanningElement {
pub id: String,
pub element_type: String,
pub label: Option<String>,
pub value: Option<String>,
pub state: PlanningElementState,
pub clickable: bool,
pub settable: bool,
pub select_options: Option<String>,
}Expand description
Compressed element representation for the planner.
Strict subset of cel_context::ContextElement — drops bounds, parent_id,
full action vectors, source provenance, properties HashMap. Keeps what
the planner needs to identify and act on the element. Builders embed
only goal-relevant elements (and nearby anchors) to fit the budget.
Fields§
§id: StringStable element identifier the planner uses in PlannedAction.
element_type: StringElement kind: “button”, “input”, “link”, “checkbox”, “row”, etc.
label: Option<String>Human-readable label or visible text. Optional — labelless elements may still be selected when nearby labels clarify them.
value: Option<String>Current value for inputs / selects / cells.
state: PlanningElementStateState anchors the planner needs to reason about (focused, selected,
enabled, checked, expanded). Compact subset of ElementState.
clickable: boolWhether this element supports a click-equivalent action.
settable: boolWhether this element supports set_value (form fields).
select_options: Option<String>For <select> / combobox elements: enumerated option values
so the planner can set_value with a real value= attribute
instead of guessing slugs. Populated from
ContextElement.properties["select_options"] when the source
adapter provides it (browser CDP / DOM extractor). Empty / None
for everything else.
Format encoded by the browser adapter as
"value|Label, value2|Label 2, ..." — strings separated by
", ", each entry split on "|". The planner-side rendering
re-parses this; older clients that don’t know the format show
the raw string, which is still strictly more useful than the
pre-fix behaviour of showing nothing.
Trait Implementations§
Source§impl Clone for PlanningElement
impl Clone for PlanningElement
Source§fn clone(&self) -> PlanningElement
fn clone(&self) -> PlanningElement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more