Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(browser): shorten inline comments

Steven Enamakel8c749388a42d
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser.rs b/crates/openhuman-core/src/tools/impl/browser/browser.rs
index 790f6686e8..6e6e91f21b 100644
--- a/crates/openhuman-core/src/tools/impl/browser/browser.rs
+++ b/crates/openhuman-core/src/tools/impl/browser/browser.rs
@@ -135,9 +135,7 @@ async fn approve_browser_action(
&digest_hex[..12]
);
let summary = format!("Browser {display_target}");
- // A digest binds the prompt to the complete action and URL without
- // persisting form values or sensitive URL query parameters. The bounded
- // selector/locator preview lets the host review which element is targeted.
+ // Bind action and URL with a digest, and show a bounded selector preview.
let args = json!({"action": kind, "origin": origin, "target": display_target,
"target_ref": target_ref, "exact_action_sha256": digest_hex});
match gate.intercept_forced("browser", &summary, args).await {
@@ -214,9 +212,7 @@ impl BrowserTool {
*held = None;
*bound = None;
*self.pending.lock().await = None;
- // The previous module session retains its original allowed
- // origins. Keep its entry until close succeeds so a failed
- // close is retried before any replacement can open.
+ // Keep its entry until close succeeds; retry before replacement.
stale.client.close_session(&stale.id).await?;
sessions.remove(&key);
}
@@ -683,10 +679,8 @@ impl Tool for BrowserTool {
},"required":["action"]})
}
fn external_effect_with_args(&self, args: &Value) -> bool {
- // Direct mutating actions use the forced gate immediately before
- // perform, and a task's irreversible step pauses as needs_approval for
- // confirm_pending. Declaring an outer effect would park the same call
- // twice and cannot cover the steps chosen inside `task`.
+ // Gate direct mutations before perform; task steps pause for approval.
+ // An outer effect would gate twice without covering task-selected steps.
let _ = args;
false
}