diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-02-10 08:54:47 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-02-10 08:54:47 +0300 |
| commit | 2cd3956f6a0f1806a13ae6d9e05d86b82fcb4f1c (patch) | |
| tree | 2217ed6eab8f5a85deb5d2dab996755cda373185 /models | |
| parent | 0afb98246b0a46e2a599edb6e9074c7325d37de0 (diff) | |
Chore: make debug; icon fix
Diffstat (limited to 'models')
| -rw-r--r-- | models/models.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/models/models.go b/models/models.go index 36ec88f..30ec5f5 100644 --- a/models/models.go +++ b/models/models.go @@ -189,9 +189,12 @@ func (m *RoleMsg) ToText(i int) string { contentStr = strings.Join(textParts, " ") + " " } // check if already has role annotation (/completion makes them) - if !strings.HasPrefix(contentStr, m.Role+":") { - icon = fmt.Sprintf("(%d) <%s>: ", i, m.Role) - } + // in that case remove it, and then add to icon + // since icon and content are separated by \n + contentStr, _ = strings.CutPrefix(contentStr, m.Role+":") + // if !strings.HasPrefix(contentStr, m.Role+":") { + icon = fmt.Sprintf("(%d) <%s>: ", i, m.Role) + // } textMsg := fmt.Sprintf("[-:-:b]%s[-:-:-]\n%s\n", icon, contentStr) return strings.ReplaceAll(textMsg, "\n\n", "\n") } |
