cc-claw 0.5.4 → 0.5.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/dist/cli.js +41 -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.6" : (() => {
|
|
53
53
|
try {
|
|
54
54
|
return JSON.parse(readFileSync(join2(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
|
|
55
55
|
} catch {
|
|
@@ -11587,6 +11587,13 @@ Switch to another backend?`,
|
|
|
11587
11587
|
await channel.sendText(chatId, userMsg, "plain");
|
|
11588
11588
|
} finally {
|
|
11589
11589
|
typingActive = false;
|
|
11590
|
+
const pending = pendingInterrupts.get(chatId);
|
|
11591
|
+
if (pending) {
|
|
11592
|
+
pendingInterrupts.delete(chatId);
|
|
11593
|
+
bypassBusyCheck.add(chatId);
|
|
11594
|
+
handleMessage(pending.msg, pending.channel).catch(() => {
|
|
11595
|
+
});
|
|
11596
|
+
}
|
|
11590
11597
|
}
|
|
11591
11598
|
}
|
|
11592
11599
|
function diagnoseAgentError(msg, chatId) {
|
|
@@ -11605,29 +11612,54 @@ After installing, restart the service: cc-claw service restart`;
|
|
|
11605
11612
|
}
|
|
11606
11613
|
function formatToolStart(toolName, input, level) {
|
|
11607
11614
|
if (level === "normal") {
|
|
11615
|
+
const path = input.file_path ?? input.path ?? input.file ?? "";
|
|
11616
|
+
const cmd = String(input.command ?? input.cmd ?? "").slice(0, 100);
|
|
11617
|
+
const query = String(input.query ?? input.search_query ?? "").slice(0, 100);
|
|
11618
|
+
const pattern = String(input.pattern ?? "").slice(0, 80);
|
|
11608
11619
|
switch (toolName) {
|
|
11620
|
+
// Claude tools
|
|
11609
11621
|
case "Read":
|
|
11610
|
-
|
|
11622
|
+
case "read_file":
|
|
11623
|
+
case "ReadFile":
|
|
11624
|
+
return `\u{1F4D6} Reading: ${path}`;
|
|
11611
11625
|
case "Write":
|
|
11612
|
-
|
|
11626
|
+
case "write_file":
|
|
11627
|
+
case "WriteFile":
|
|
11628
|
+
return `\u270F\uFE0F Writing: ${path}`;
|
|
11613
11629
|
case "Edit":
|
|
11614
|
-
|
|
11630
|
+
case "edit_file":
|
|
11631
|
+
case "EditFile":
|
|
11632
|
+
case "StrReplace":
|
|
11633
|
+
return `\u270F\uFE0F Editing: ${path}`;
|
|
11615
11634
|
case "Bash":
|
|
11616
|
-
|
|
11635
|
+
case "run_shell_command":
|
|
11636
|
+
case "Shell":
|
|
11637
|
+
case "shell":
|
|
11638
|
+
return `\u{1F527} Shell: ${cmd}`;
|
|
11617
11639
|
case "Glob":
|
|
11618
|
-
|
|
11640
|
+
case "list_directory":
|
|
11641
|
+
case "ListDir":
|
|
11642
|
+
return `\u{1F50D} Listing: ${path || pattern}`;
|
|
11619
11643
|
case "Grep":
|
|
11620
|
-
|
|
11644
|
+
case "search_files":
|
|
11645
|
+
case "SearchFiles":
|
|
11646
|
+
return `\u{1F50D} Grep: ${pattern}${path ? ` in ${path}` : ""}`;
|
|
11621
11647
|
case "WebFetch":
|
|
11648
|
+
case "web_fetch":
|
|
11649
|
+
case "fetch_url":
|
|
11622
11650
|
return `\u{1F310} Fetching: ${String(input.url ?? "").slice(0, 100)}`;
|
|
11623
11651
|
case "WebSearch":
|
|
11624
|
-
|
|
11652
|
+
case "google_web_search":
|
|
11653
|
+
case "web_search":
|
|
11654
|
+
return `\u{1F50D} Searching: ${query}`;
|
|
11625
11655
|
case "Agent":
|
|
11656
|
+
case "spawn_agent":
|
|
11626
11657
|
return `\u{1F916} Sub-agent task...`;
|
|
11627
11658
|
case "AskUserQuestion":
|
|
11659
|
+
case "ask_user":
|
|
11628
11660
|
return `\u2753 ${String(input.question ?? "").slice(0, 120)}`;
|
|
11629
11661
|
default:
|
|
11630
|
-
return `\u{1F527} ${toolName}`;
|
|
11662
|
+
return `\u{1F527} ${toolName}${cmd ? `: ${cmd}` : path ? `: ${path}` : query ? `: ${query}` : ""}`;
|
|
11631
11663
|
}
|
|
11632
11664
|
}
|
|
11633
11665
|
const inputStr = JSON.stringify(input, null, 2).slice(0, 600);
|
package/package.json
CHANGED