Fix: linter complaints
This commit is contained in:
12
bot.go
12
bot.go
@@ -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{
|
||||
|
||||
4
tools.go
4
tools.go
@@ -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
3
tui.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user