(models []string, current string)
| 3 | import "strings" |
| 4 | |
| 5 | func formatChatModelList(models []string, current string) string { |
| 6 | var b strings.Builder |
| 7 | for _, model := range models { |
| 8 | prefix := " " |
| 9 | if model == current { |
| 10 | prefix = "* " |
| 11 | } |
| 12 | b.WriteString(prefix) |
| 13 | b.WriteString(model) |
| 14 | b.WriteByte('\n') |
| 15 | } |
| 16 | return b.String() |
| 17 | } |
no test coverage detected