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
|
// Create RoleMsg with ContentParts
|
||||||
var contentParts []any
|
var contentParts []any
|
||||||
for _, part := range multimodalResp.Parts {
|
for _, part := range multimodalResp.Parts {
|
||||||
partType, ok := part["type"]
|
partType := part["type"]
|
||||||
if !ok {
|
switch partType {
|
||||||
continue
|
case "text":
|
||||||
}
|
|
||||||
if partType == "text" {
|
|
||||||
contentParts = append(contentParts, models.TextContentPart{Type: "text", Text: part["text"]})
|
contentParts = append(contentParts, models.TextContentPart{Type: "text", Text: part["text"]})
|
||||||
} else if partType == "image_url" {
|
case "image_url":
|
||||||
contentParts = append(contentParts, models.ImageContentPart{
|
contentParts = append(contentParts, models.ImageContentPart{
|
||||||
Type: "image_url",
|
Type: "image_url",
|
||||||
ImageURL: struct {
|
ImageURL: struct {
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
}{URL: part["url"]},
|
}{URL: part["url"]},
|
||||||
})
|
})
|
||||||
|
default:
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
toolResponseMsg = models.RoleMsg{
|
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)
|
logger.Info("model has vision support", "model", cfg.CurrentModel, "api", cfg.CurrentAPI)
|
||||||
} else {
|
} else {
|
||||||
logger.Info("model does not have vision support", "model", cfg.CurrentModel, "api", cfg.CurrentAPI)
|
logger.Info("model does not have vision support", "model", cfg.CurrentModel, "api", cfg.CurrentAPI)
|
||||||
if windowToolsAvailable && !prevHasVision && modelHasVision == false {
|
if windowToolsAvailable && !prevHasVision && !modelHasVision {
|
||||||
notifyUser("window tools", "Window capture-and-view unavailable: model lacks vision support")
|
_ = notifyUser("window tools", "Window capture-and-view unavailable: model lacks vision support")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
registerWindowTools()
|
registerWindowTools()
|
||||||
|
|||||||
3
tui.go
3
tui.go
@@ -213,8 +213,7 @@ func init() {
|
|||||||
pages.SwitchToPage("main") // or whatever your main page is named
|
pages.SwitchToPage("main") // or whatever your main page is named
|
||||||
})
|
})
|
||||||
confirmModal.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
|
confirmModal.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
|
||||||
switch event.Key() {
|
if event.Key() == tcell.KeyRune {
|
||||||
case tcell.KeyRune:
|
|
||||||
switch event.Rune() {
|
switch event.Rune() {
|
||||||
case 'y', 'Y':
|
case 'y', 'Y':
|
||||||
persona := cfg.UserRole
|
persona := cfg.UserRole
|
||||||
|
|||||||
Reference in New Issue
Block a user