running and cancel all commands

This commit is contained in:
ari committed 2026-11-01 20:29:39 -05:00
1 parent 917a361370
commit af249326e8
7 files changed
+145 -6

No files matched your search

+7 -1
View File
@@ -37,10 +37,12 @@ const helpText = "I pass your messages to an agent running in its own container.
"and anyone here can use it by @mentioning me.\n" +
"• Every new message starts a new session. Reply in its thread to keep going.\n" +
"• In a channel thread I only read replies that @mention me, unless the thread or channel is switched with `listen` (see below).\n" +
"• React with :x: to stop a reply part-way.\n" +
"• React with :x: to stop a reply part-way, or send `cancel all` to stop every reply here.\n" +
"*Commands* (send as a new message, not in a thread. `move` and `listen` work in threads too):\n" +
"• `status`: state, size and idle limit, with buttons\n" +
"• `sessions`: past sessions, with links\n" +
"• `running`: the replies I'm working on here right now\n" +
"• `cancel all`: cancel every reply I'm working on here (sessions are kept)\n" +
"• `stop`: shut the container down (files are kept)\n" +
"• `scale up` / `scale down`: double or halve RAM and CPU\n" +
"• `scale 8G 4cpu`: set an exact size. `scale +2G` or `scale -1cpu`: change by that much\n" +
@@ -434,6 +436,10 @@ func (b *Bot) runCommand(ctx context.Context, m incoming, verb, args string, age
}
case verb == "sessions" && args == "":
reply = b.sessionList(ctx, ownerID)
case verb == "running" && args == "":
reply = b.runningList(ctx, m.channel)
case isCancelAll(verb, args):
reply = b.cancelAll(m, agent)
case verb == "status" && args == "":
if agent {
return b.statusText(ctx, ownerID, kind), true