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

Method runChannelRun

cli/channel_command.go:252–266  ·  view source on GitHub ↗

runChannelRun manually triggers the agent on a stored channel message. The user picks the seq from the /channel list output.

(ctx context.Context, args []string)

Source from the content-addressed store, hash-verified

250// runChannelRun manually triggers the agent on a stored channel
251// message. The user picks the seq from the /channel list output.
252func (cli *ChatCLI) runChannelRun(ctx context.Context, args []string) {
253 if len(args) < 3 {
254 fmt.Println(colorize(" "+i18n.T("chan.cmd.run_usage"), ColorYellow))
255 return
256 }
257 seq, err := strconv.ParseUint(args[2], 10, 64)
258 if err != nil {
259 fmt.Println(colorize(" "+i18n.T("chan.cmd.run_bad_seq"), ColorYellow))
260 return
261 }
262 if err := cli.channelTriggerRun(ctx, seq); err != nil {
263 fmt.Println(colorize(" ✗ "+err.Error(), ColorYellow))
264 return
265 }
266}
267
268// defaultIfEmpty mirrors the JS-style fallback so columns stay
269// dense in the rules table.

Callers 1

handleChannelCommandMethod · 0.95

Calls 4

channelTriggerRunMethod · 0.95
TFunction · 0.92
colorizeFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected