From 47b3d37a9714e3e68e56f009ea1faee5223edeb4 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sun, 15 Mar 2026 16:04:03 +0300 Subject: Enha: remove browser agent from completion --- tools/tools.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/tools.go b/tools/tools.go index 9baafd3..697683a 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -61,11 +61,6 @@ Your current tools: "name":"read_url_raw", "args": ["url"], "when_to_use": "get raw content from a webpage" -}, -{ -"name":"browser_agent", -"args": ["task"], -"when_to_use": "autonomous browser automation for complex multi-step tasks like login, form filling, scraping" } ] -- cgit v1.2.3 From 3e4213b5c39a18424e6d117d7967b1e9919e3402 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Tue, 17 Mar 2026 10:51:53 +0300 Subject: Fix: streaming to tui --- bot.go | 28 ++++++---------------------- tui.go | 2 +- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/bot.go b/bot.go index 4f5e6cf..384563e 100644 --- a/bot.go +++ b/bot.go @@ -48,10 +48,9 @@ var ( chunkParser ChunkParser lastToolCall *models.FuncCall lastRespStats *models.ResponseStats - - outputHandler OutputHandler - cliPrevOutput string - cliRespDone chan bool + outputHandler OutputHandler + cliPrevOutput string + cliRespDone chan bool ) type OutputHandler interface { @@ -65,30 +64,15 @@ type TUIOutputHandler struct { } func (h *TUIOutputHandler) Write(p string) { - if h.tv != nil { - fmt.Fprint(h.tv, p) - } - if cfg != nil && cfg.CLIMode { - fmt.Print(p) - cliPrevOutput = p - } + fmt.Fprint(h.tv, p) } func (h *TUIOutputHandler) Writef(format string, args ...interface{}) { - s := fmt.Sprintf(format, args...) - if h.tv != nil { - fmt.Fprint(h.tv, s) - } - if cfg != nil && cfg.CLIMode { - fmt.Print(s) - cliPrevOutput = s - } + fmt.Fprintf(h.tv, format, args...) } func (h *TUIOutputHandler) ScrollToEnd() { - if h.tv != nil { - h.tv.ScrollToEnd() - } + h.tv.ScrollToEnd() } type CLIOutputHandler struct{} diff --git a/tui.go b/tui.go index 9f85a15..7f897e4 100644 --- a/tui.go +++ b/tui.go @@ -230,7 +230,6 @@ func initTUI() { tview.Styles = colorschemes["default"] app = tview.NewApplication() pages = tview.NewPages() - outputHandler = &TUIOutputHandler{tv: textView} shellInput = tview.NewInputField(). SetLabel(fmt.Sprintf("[%s]$ ", cfg.FilePickerDir)). // dynamic prompt SetFieldWidth(0). @@ -349,6 +348,7 @@ func initTUI() { // calling it explicitly makes text streaming to look more smooth app.Draw() }) + outputHandler = &TUIOutputHandler{tv: textView} notificationWidget = tview.NewTextView(). SetTextAlign(tview.AlignCenter). SetDynamicColors(true). -- cgit v1.2.3