defaultIfEmpty mirrors the JS-style fallback so columns stay dense in the rules table.
(s, fallback string)
| 268 | // defaultIfEmpty mirrors the JS-style fallback so columns stay |
| 269 | // dense in the rules table. |
| 270 | func defaultIfEmpty(s, fallback string) string { |
| 271 | if strings.TrimSpace(s) == "" { |
| 272 | return fallback |
| 273 | } |
| 274 | return s |
| 275 | } |
| 276 | |
| 277 | func (cli *ChatCLI) getChannelSuggestions(d prompt.Document) []prompt.Suggest { |
| 278 | suggestions := []prompt.Suggest{ |