cc-claw 0.5.2 → 0.5.4

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.
Files changed (2) hide show
  1. package/dist/cli.js +11 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -49,7 +49,7 @@ var VERSION;
49
49
  var init_version = __esm({
50
50
  "src/version.ts"() {
51
51
  "use strict";
52
- VERSION = true ? "0.5.2" : (() => {
52
+ VERSION = true ? "0.5.4" : (() => {
53
53
  try {
54
54
  return JSON.parse(readFileSync(join2(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
55
55
  } catch {
@@ -11493,6 +11493,9 @@ async function handleText(msg, channel) {
11493
11493
  [
11494
11494
  { label: "\u{1F4E5} Queue message", data: `interrupt:queue:${chatId}` },
11495
11495
  { label: "\u26A1 Send now", data: `interrupt:now:${chatId}` }
11496
+ ],
11497
+ [
11498
+ { label: "\u{1F5D1} Don't send", data: `interrupt:discard:${chatId}` }
11496
11499
  ]
11497
11500
  ]);
11498
11501
  return;
@@ -11514,6 +11517,7 @@ async function handleText(msg, channel) {
11514
11517
  const tMode = getMode(chatId);
11515
11518
  const tVerbose = getVerboseLevel(chatId);
11516
11519
  const tToolCb = tVerbose !== "off" ? makeToolActionCallback(chatId, channel, tVerbose) : void 0;
11520
+ const sigT0 = Date.now();
11517
11521
  const response = await askAgent(chatId, cleanText || text, {
11518
11522
  cwd: getCwd(chatId),
11519
11523
  model: model2,
@@ -11526,6 +11530,7 @@ async function handleText(msg, channel) {
11526
11530
  });
11527
11531
  }
11528
11532
  });
11533
+ const elapsedSec = ((Date.now() - sigT0) / 1e3).toFixed(1);
11529
11534
  if (response.usage) addUsage(chatId, response.usage.input, response.usage.output, response.usage.cacheRead, model2);
11530
11535
  let responseText = response.text;
11531
11536
  const sigEnabled = getModelSignature(chatId);
@@ -11536,7 +11541,7 @@ async function handleText(msg, channel) {
11536
11541
  const shortModel = formatModelShort(modelId);
11537
11542
  responseText += `
11538
11543
 
11539
- \u{1F9E0} [${shortModel} | ${capitalize(thinking2)}]`;
11544
+ \u{1F9E0} [${shortModel} | ${capitalize(thinking2)}] \u23F1\uFE0F ${elapsedSec}s`;
11540
11545
  }
11541
11546
  if (responseText.includes("[NEED_PERMISSION]") && tMode !== "yolo") {
11542
11547
  const cleanText2 = responseText.replace(/\[NEED_PERMISSION\]/g, "").trim();
@@ -12084,6 +12089,9 @@ ${PERM_MODES[chosen]}`,
12084
12089
  await channel.sendText(chatId, "\u{1F4E5} Message queued \u2014 will process after current task.", "plain");
12085
12090
  handleMessage(pending.msg, pending.channel).catch(() => {
12086
12091
  });
12092
+ } else if (action === "discard") {
12093
+ pendingInterrupts.delete(targetChatId);
12094
+ await channel.sendText(chatId, "\u{1F5D1} Message discarded.", "plain");
12087
12095
  } else {
12088
12096
  await channel.sendText(chatId, "Message already processed or expired.", "plain");
12089
12097
  }
@@ -13525,10 +13533,7 @@ function generatePlist() {
13525
13533
  <true/>
13526
13534
 
13527
13535
  <key>KeepAlive</key>
13528
- <dict>
13529
- <key>SuccessfulExit</key>
13530
- <false/>
13531
- </dict>
13536
+ <true/>
13532
13537
 
13533
13538
  <key>StandardOutPath</key>
13534
13539
  <string>${LOG_PATH}</string>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-claw",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "CC-Claw: Personal AI assistant on Telegram — multi-backend (Claude, Gemini, Codex), sub-agent orchestration, MCP management",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",