mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-09 22:08:38 +03:00
Adds two opt-in agent tools for controlling a computer: - computer_use: pixel-based (screenshot + mouse/keyboard) via a desktop (pyautogui) or browser (playwright) backend. - browser: DOM/accessibility-based web automation (act by element ref), reliable across ANY tool-calling model, not just vision/CU-trained ones. Core enabler in the runner: a tool may return image content blocks, which are split out and delivered to the model as a follow-up user message (_split_tool_result_media), so screenshots reach any vision provider (e.g. via OpenRouter/openai-compat) without provider-specific code. Both tools are OFF by default (tools.computerUse.enable / tools.browser.enable), are not exposed to subagents, and the browser tool supports an allowed_domains allowlist. Heavy deps (pyautogui/pillow/playwright) are an optional [computer-use] extra. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
25 lines
663 B
HTML
25 lines
663 B
HTML
<!doctype html>
|
|
<html><head><meta charset="utf-8"><title>Long list</title></head>
|
|
<body>
|
|
<h1>Pick a row</h1>
|
|
<div id="picked">none</div>
|
|
<ul id="list"></ul>
|
|
<script>
|
|
var ul = document.getElementById('list');
|
|
for (var i = 1; i <= 60; i++) {
|
|
(function(n){
|
|
var li = document.createElement('li');
|
|
li.textContent = 'Row ' + n + ' ';
|
|
var b = document.createElement('button');
|
|
b.textContent = 'Pick';
|
|
b.setAttribute('aria-label', 'Pick Row ' + n);
|
|
b.addEventListener('click', function(){
|
|
document.getElementById('picked').textContent = String(n);
|
|
});
|
|
li.appendChild(b);
|
|
ul.appendChild(li);
|
|
})(i);
|
|
}
|
|
</script>
|
|
</body></html>
|