Fix: linter complaints

This commit is contained in:
Grail Finder
2026-03-02 11:39:55 +03:00
parent 4f6000a43a
commit 3389b1d83b
3 changed files with 9 additions and 10 deletions

12
bot.go
View File

@@ -1213,19 +1213,19 @@ func findCall(msg, toolCall string) bool {
// Create RoleMsg with ContentParts
var contentParts []any
for _, part := range multimodalResp.Parts {
partType, ok := part["type"]
if !ok {
continue
}
if partType == "text" {
partType := part["type"]
switch partType {
case "text":
contentParts = append(contentParts, models.TextContentPart{Type: "text", Text: part["text"]})
} else if partType == "image_url" {
case "image_url":
contentParts = append(contentParts, models.ImageContentPart{
Type: "image_url",
ImageURL: struct {
URL string `json:"url"`
}{URL: part["url"]},
})
default:
continue
}
}
toolResponseMsg = models.RoleMsg{

View File

@@ -250,8 +250,8 @@ func UpdateToolCapabilities() {
logger.Info("model has vision support", "model", cfg.CurrentModel, "api", cfg.CurrentAPI)
} else {
logger.Info("model does not have vision support", "model", cfg.CurrentModel, "api", cfg.CurrentAPI)
if windowToolsAvailable && !prevHasVision && modelHasVision == false {
notifyUser("window tools", "Window capture-and-view unavailable: model lacks vision support")
if windowToolsAvailable && !prevHasVision && !modelHasVision {
_ = notifyUser("window tools", "Window capture-and-view unavailable: model lacks vision support")
}
}
registerWindowTools()

3
tui.go
View File

@@ -213,8 +213,7 @@ func init() {
pages.SwitchToPage("main") // or whatever your main page is named
})
confirmModal.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
switch event.Key() {
case tcell.KeyRune:
if event.Key() == tcell.KeyRune {
switch event.Rune() {
case 'y', 'Y':
persona := cfg.UserRole