summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-03 09:15:18 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-03 09:15:18 +0300
commit0c9c590d8f9c49578515ccaf19bb11431cf4e721 (patch)
tree32429d115946a82dc9bec46a0d10572be2b0aeb7 /bot.go
parentd130254e888a7627c65e9bcdfa70acd1bc77de66 (diff)
Enha (playwright): conditionaly install and use tools
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/bot.go b/bot.go
index 5ae215f..56a5318 100644
--- a/bot.go
+++ b/bot.go
@@ -1416,7 +1416,7 @@ func updateModelLists() {
chatBody.Model = m
cachedModelColor = "green"
updateStatusLine()
- UpdateToolCapabilities()
+ updateToolCapabilities()
app.Draw()
return
}
@@ -1530,6 +1530,23 @@ func init() {
if cfg.STT_ENABLED {
asr = NewSTT(logger, cfg)
}
+ if !cfg.NoPlaywright {
+ if err := checkPlaywright(); err != nil {
+ // slow, need a faster check if playwright install
+ if err := installPW(); err != nil {
+ logger.Error("failed to install playwright", "error", err)
+ cancel()
+ os.Exit(1)
+ return
+ }
+ if err := checkPlaywright(); err != nil {
+ logger.Error("failed to run playwright", "error", err)
+ cancel()
+ os.Exit(1)
+ return
+ }
+ }
+ }
// Initialize scrollToEndEnabled based on config
scrollToEndEnabled = cfg.AutoScrollEnabled
go updateModelLists()