MCPcopy Create free account
hub / github.com/diillson/chatcli / runChannelInject

Method runChannelInject

cli/channel_command.go:74–87  ·  view source on GitHub ↗

runChannelInject preserves the legacy /channel inject behavior.

(ch interface {
	FormatForPrompt(int) string
})

Source from the content-addressed store, hash-verified

72
73// runChannelInject preserves the legacy /channel inject behavior.
74func (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.
90func (cli *ChatCLI) runChannelAck() {

Callers 1

handleChannelCommandMethod · 0.95

Calls 3

TFunction · 0.92
colorizeFunction · 0.85
FormatForPromptMethod · 0.45

Tested by

no test coverage detected