summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-02 11:12:04 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-02 11:12:04 +0300
commit9ba46b40cc7fb058ff506ff554ba19e7337448d9 (patch)
treee8309f574c9a3082e7d0bb009d67f6142cfccaa5
parent5bb456272ed2cbce289f0e60b13d458bf4e42aac (diff)
Feat: screencapture for completion
-rw-r--r--tools.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools.go b/tools.go
index 0f2ac4a..494711e 100644
--- a/tools.go
+++ b/tools.go
@@ -175,6 +175,27 @@ After that you are free to respond to the user.
webAgentsOnce sync.Once
)
+var windowToolSysMsg = `
+Additional window tools (available only if xdotool and maim are installed):
+[
+{
+"name":"list_windows",
+"args": [],
+"when_to_use": "when asked to list visible windows; returns map of window ID to window name"
+},
+{
+"name":"capture_window",
+"args": ["window"],
+"when_to_use": "when asked to take a screenshot of a specific window; saves to /tmp; window can be ID or name substring; returns file path"
+},
+{
+"name":"capture_window_and_view",
+"args": ["window"],
+"when_to_use": "when asked to take a screenshot of a specific window and show it; saves to /tmp and returns image for viewing; window can be ID or name substring"
+}
+]
+`
+
var WebSearcher searcher.WebSurfer
var (
@@ -1372,6 +1393,7 @@ func registerWindowTools() {
},
},
)
+ toolSysMsg += windowToolSysMsg
}
}