summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-02-18 08:42:05 +0300
committerGrail Finder <wohilas@gmail.com>2026-02-18 08:42:05 +0300
commitc12311da999be4cafba5d41075ee8108567511db (patch)
tree883165e21e654ab072adfaef27b95324fe8f92c6 /models
parent7d18a9d77eca3b286849ae0a134f9d7277249bef (diff)
Chore: linter complaints
Diffstat (limited to 'models')
-rw-r--r--models/models.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/models.go b/models/models.go
index 13c024e..8f42795 100644
--- a/models/models.go
+++ b/models/models.go
@@ -206,13 +206,14 @@ func (m *RoleMsg) ToText(i int) string {
imageIndicators = append(imageIndicators, fmt.Sprintf("[orange::i][image: %s][-:-:-]", displayPath))
case map[string]any:
if partType, exists := p["type"]; exists {
- if partType == "text" {
+ switch partType {
+ case "text":
if textVal, textExists := p["text"]; textExists {
if textStr, isStr := textVal.(string); isStr {
textParts = append(textParts, textStr)
}
}
- } else if partType == "image_url" {
+ case "image_url":
// Handle unmarshaled image content
var displayPath string
if pathVal, pathExists := p["path"]; pathExists {