cc-claw 0.5.3 → 0.5.5
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/dist/cli.js +40 -9
- 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.
|
|
52
|
+
VERSION = true ? "0.5.5" : (() => {
|
|
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;
|
|
@@ -11602,29 +11605,54 @@ After installing, restart the service: cc-claw service restart`;
|
|
|
11602
11605
|
}
|
|
11603
11606
|
function formatToolStart(toolName, input, level) {
|
|
11604
11607
|
if (level === "normal") {
|
|
11608
|
+
const path = input.file_path ?? input.path ?? input.file ?? "";
|
|
11609
|
+
const cmd = String(input.command ?? input.cmd ?? "").slice(0, 100);
|
|
11610
|
+
const query = String(input.query ?? input.search_query ?? "").slice(0, 100);
|
|
11611
|
+
const pattern = String(input.pattern ?? "").slice(0, 80);
|
|
11605
11612
|
switch (toolName) {
|
|
11613
|
+
// Claude tools
|
|
11606
11614
|
case "Read":
|
|
11607
|
-
|
|
11615
|
+
case "read_file":
|
|
11616
|
+
case "ReadFile":
|
|
11617
|
+
return `\u{1F4D6} Reading: ${path}`;
|
|
11608
11618
|
case "Write":
|
|
11609
|
-
|
|
11619
|
+
case "write_file":
|
|
11620
|
+
case "WriteFile":
|
|
11621
|
+
return `\u270F\uFE0F Writing: ${path}`;
|
|
11610
11622
|
case "Edit":
|
|
11611
|
-
|
|
11623
|
+
case "edit_file":
|
|
11624
|
+
case "EditFile":
|
|
11625
|
+
case "StrReplace":
|
|
11626
|
+
return `\u270F\uFE0F Editing: ${path}`;
|
|
11612
11627
|
case "Bash":
|
|
11613
|
-
|
|
11628
|
+
case "run_shell_command":
|
|
11629
|
+
case "Shell":
|
|
11630
|
+
case "shell":
|
|
11631
|
+
return `\u{1F527} Shell: ${cmd}`;
|
|
11614
11632
|
case "Glob":
|
|
11615
|
-
|
|
11633
|
+
case "list_directory":
|
|
11634
|
+
case "ListDir":
|
|
11635
|
+
return `\u{1F50D} Listing: ${path || pattern}`;
|
|
11616
11636
|
case "Grep":
|
|
11617
|
-
|
|
11637
|
+
case "search_files":
|
|
11638
|
+
case "SearchFiles":
|
|
11639
|
+
return `\u{1F50D} Grep: ${pattern}${path ? ` in ${path}` : ""}`;
|
|
11618
11640
|
case "WebFetch":
|
|
11641
|
+
case "web_fetch":
|
|
11642
|
+
case "fetch_url":
|
|
11619
11643
|
return `\u{1F310} Fetching: ${String(input.url ?? "").slice(0, 100)}`;
|
|
11620
11644
|
case "WebSearch":
|
|
11621
|
-
|
|
11645
|
+
case "google_web_search":
|
|
11646
|
+
case "web_search":
|
|
11647
|
+
return `\u{1F50D} Searching: ${query}`;
|
|
11622
11648
|
case "Agent":
|
|
11649
|
+
case "spawn_agent":
|
|
11623
11650
|
return `\u{1F916} Sub-agent task...`;
|
|
11624
11651
|
case "AskUserQuestion":
|
|
11652
|
+
case "ask_user":
|
|
11625
11653
|
return `\u2753 ${String(input.question ?? "").slice(0, 120)}`;
|
|
11626
11654
|
default:
|
|
11627
|
-
return `\u{1F527} ${toolName}`;
|
|
11655
|
+
return `\u{1F527} ${toolName}${cmd ? `: ${cmd}` : path ? `: ${path}` : query ? `: ${query}` : ""}`;
|
|
11628
11656
|
}
|
|
11629
11657
|
}
|
|
11630
11658
|
const inputStr = JSON.stringify(input, null, 2).slice(0, 600);
|
|
@@ -12086,6 +12114,9 @@ ${PERM_MODES[chosen]}`,
|
|
|
12086
12114
|
await channel.sendText(chatId, "\u{1F4E5} Message queued \u2014 will process after current task.", "plain");
|
|
12087
12115
|
handleMessage(pending.msg, pending.channel).catch(() => {
|
|
12088
12116
|
});
|
|
12117
|
+
} else if (action === "discard") {
|
|
12118
|
+
pendingInterrupts.delete(targetChatId);
|
|
12119
|
+
await channel.sendText(chatId, "\u{1F5D1} Message discarded.", "plain");
|
|
12089
12120
|
} else {
|
|
12090
12121
|
await channel.sendText(chatId, "Message already processed or expired.", "plain");
|
|
12091
12122
|
}
|
package/package.json
CHANGED