@gonzih/cc-tg 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/bot.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ Message [@userinfobot](https://t.me/userinfobot) on Telegram — it replies with
|
|
|
36
36
|
|---|---|
|
|
37
37
|
| `/start` | Reset session |
|
|
38
38
|
| `/reset` | Reset session |
|
|
39
|
+
| `/stop` | Interrupt current Claude task |
|
|
39
40
|
| `/status` | Check if session is active |
|
|
40
41
|
| Any text | Sent directly to Claude Code |
|
|
41
42
|
|
package/dist/bot.js
CHANGED
|
@@ -38,6 +38,13 @@ export class CcTgBot {
|
|
|
38
38
|
await this.bot.sendMessage(chatId, "Session reset. Send a message to start.");
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
+
// /stop — kill active session (interrupt running Claude task)
|
|
42
|
+
if (text === "/stop") {
|
|
43
|
+
const has = this.sessions.has(chatId);
|
|
44
|
+
this.killSession(chatId);
|
|
45
|
+
await this.bot.sendMessage(chatId, has ? "Stopped." : "No active session.");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
41
48
|
// /status
|
|
42
49
|
if (text === "/status") {
|
|
43
50
|
const has = this.sessions.has(chatId);
|