runChannelInject preserves the legacy /channel inject behavior.
(ch interface {
FormatForPrompt(int) string
})
| 72 | |
| 73 | // runChannelInject preserves the legacy /channel inject behavior. |
| 74 | func (cli *ChatCLI) runChannelInject(ch interface { |
| 75 | FormatForPrompt(int) string |
| 76 | }) { |
| 77 | promptText := ch.FormatForPrompt(10) |
| 78 | if promptText == "" { |
| 79 | fmt.Println(colorize(" "+i18n.T("chan.cmd.inject_empty"), ColorGray)) |
| 80 | return |
| 81 | } |
| 82 | cli.history = append(cli.history, models.Message{ |
| 83 | Role: "system", |
| 84 | Content: promptText, |
| 85 | }) |
| 86 | fmt.Println(colorize(" ✓ "+i18n.T("chan.cmd.inject_success"), ColorGreen)) |
| 87 | } |
| 88 | |
| 89 | // runChannelAck clears unread + pending notify banner state. |
| 90 | func (cli *ChatCLI) runChannelAck() { |
no test coverage detected