From 4f0bce50c53267a9f53938ad1b264d5094a08ce4 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 7 Mar 2026 19:11:13 +0300 Subject: Chore: one init for clear call order --- tools.go | 55 +------------------------------------------------------ 1 file changed, 1 insertion(+), 54 deletions(-) (limited to 'tools.go') diff --git a/tools.go b/tools.go index 3e5d402..e66533a 100644 --- a/tools.go +++ b/tools.go @@ -207,7 +207,7 @@ var ( modelHasVision bool ) -func init() { +func initTools() { sysMap[basicCard.ID] = basicCard roleToID["assistant"] = basicCard.ID sa, err := searcher.NewWebSurfer(searcher.SearcherTypeScraper, "") @@ -2273,56 +2273,3 @@ var baseTools = []models.Tool{ }, }, } - -func init() { - if windowToolsAvailable { - baseTools = append(baseTools, - models.Tool{ - Type: "function", - Function: models.ToolFunc{ - Name: "list_windows", - Description: "List all visible windows with their IDs and names. Returns a map of window ID to window name.", - Parameters: models.ToolFuncParams{ - Type: "object", - Required: []string{}, - Properties: map[string]models.ToolArgProps{}, - }, - }, - }, - models.Tool{ - Type: "function", - Function: models.ToolFunc{ - Name: "capture_window", - Description: "Capture a screenshot of a specific window and save it to /tmp. Requires window parameter (window ID or name substring).", - Parameters: models.ToolFuncParams{ - Type: "object", - Required: []string{"window"}, - Properties: map[string]models.ToolArgProps{ - "window": models.ToolArgProps{ - Type: "string", - Description: "window ID or window name (partial match)", - }, - }, - }, - }, - }, - models.Tool{ - Type: "function", - Function: models.ToolFunc{ - Name: "capture_window_and_view", - Description: "Capture a screenshot of a specific window, save it to /tmp, and return the image for viewing. Requires window parameter (window ID or name substring).", - Parameters: models.ToolFuncParams{ - Type: "object", - Required: []string{"window"}, - Properties: map[string]models.ToolArgProps{ - "window": models.ToolArgProps{ - Type: "string", - Description: "window ID or window name (partial match)", - }, - }, - }, - }, - }, - ) - } -} -- cgit v1.2.3