Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/commands/discord.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ensureProjectClaudeMd, run, runUserMessage, compactCurrentSession, compactCurrentThreadSession, agentDirKey } from "../runner";
import { ensureProjectClaudeMd, run, runUserMessage, killActive, compactCurrentSession, compactCurrentThreadSession, agentDirKey } from "../runner";
import { wrapUntrusted } from "../prompt-safety";
import { isAllowed } from "../allowlist";
import { extractErrorDetail } from "../messaging";
Expand Down Expand Up @@ -976,6 +976,12 @@ async function handleMessageCreate(token: string, message: DiscordMessage, skipC
// Skill routing: detect slash commands and resolve to SKILL.md prompts
const command = cleanContent.startsWith("/") ? cleanContent.trim().split(/\s+/, 1)[0].toLowerCase() : null;

if (command === "/kill" || command === "/stop") {
const killed = killActive();
await sendMessage(config.token, channelId, killed ? "Killed active agent." : "No active agent running.");
return;
}

let skillContext: string | null = null;
if (command) {
try {
Expand Down
Loading