@gonzih/cc-tg 0.1.4 → 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 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);
@@ -78,15 +85,6 @@ export class CcTgBot {
78
85
  if (toolName)
79
86
  logParts.push(`tool=${toolName}`);
80
87
  console.log(logParts.join(" "));
81
- // Surface tool activity to Telegram as a status line
82
- if (msg.type === "assistant" && toolName) {
83
- this.bot.sendMessage(chatId, `⚙️ ${toolName}...`).catch(() => { });
84
- }
85
- if (msg.type === "system" && subtype === "task_progress") {
86
- const desc = msg.payload.description ?? "";
87
- if (desc)
88
- this.bot.sendMessage(chatId, `🔍 ${desc}`).catch(() => { });
89
- }
90
88
  this.handleClaudeMessage(chatId, session, msg);
91
89
  });
92
90
  claude.on("stderr", (data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonzih/cc-tg",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Claude Code Telegram bot — chat with Claude Code via Telegram",
5
5
  "type": "module",
6
6
  "bin": {