cc-claw 0.4.1 → 0.4.3
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 +19 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -48,7 +48,7 @@ var VERSION;
|
|
|
48
48
|
var init_version = __esm({
|
|
49
49
|
"src/version.ts"() {
|
|
50
50
|
"use strict";
|
|
51
|
-
VERSION = true ? "0.4.
|
|
51
|
+
VERSION = true ? "0.4.3" : (() => {
|
|
52
52
|
try {
|
|
53
53
|
return JSON.parse(readFileSync(join2(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
|
|
54
54
|
} catch {
|
|
@@ -9505,7 +9505,7 @@ async function handleCommand(msg, channel) {
|
|
|
9505
9505
|
case "help":
|
|
9506
9506
|
await channel.sendText(
|
|
9507
9507
|
chatId,
|
|
9508
|
-
"Hey! I'm CC-Claw \u2014 your personal AI assistant on Telegram.\n\nI use AI coding CLIs (Claude, Gemini, Codex) as my brain. Just send me a message to get started.\n\nCommands:\n/backend [name] - Switch AI backend (or /claude /gemini /codex)\n/model - Switch model for active backend\n/summarizer - Configure session summarization model\n/status - Show session, model, backend, and usage\n/cost - Show estimated API cost (use /cost all for all-time)\n/usage - Show usage per backend with limits\n/limits - Configure usage limits per backend\n/newchat - Start a fresh conversation\n/summarize - Save session to memory (without resetting)\n/summarize all - Summarize all pending sessions (pre-restart)\n/cwd <path> - Set working directory\n/cwd - Show current working directory\n/memory - List stored memories\n/forget <keyword> - Remove a memory\n/voice - Toggle voice responses\n/imagine <prompt> - Generate an image (or /image)\n/cron <description> - Schedule a task (or /schedule)\n/cron - List scheduled jobs (or /jobs)\n/cron cancel <id> - Cancel a job\n/cron pause <id> - Pause a job\n/cron resume <id> - Resume a job\n/cron run <id> - Trigger a job now\n/cron runs [id] - View run history\n/cron edit <id> - Edit a job\n/cron health - Scheduler health\n/skills - List skills from all backends\n/skill-install <url> - Install a skill from GitHub\n/setup-profile - Set up your user profile\n/chats - List authorized chats and aliases\n/heartbeat - Proactive awareness (on/off/interval/hours)\n/history - List recent session summaries\n/stop - Cancel the current running task\n/tools - Configure which tools the agent can use\n/permissions - Switch permission mode (yolo/safe/plan)\n/verbose - Tool visibility (off/normal/verbose)\n/agents - List active sub-agents\n/tasks - Show task board for current orchestration\n/stopagent <id> - Cancel a specific sub-agent\n/stopall - Cancel all sub-agents in this chat\n/runners - List registered CLI runners\n/mcps - List registered MCP servers\n/help - Show this message",
|
|
9508
|
+
"Hey! I'm CC-Claw \u2014 your personal AI assistant on Telegram.\n\nI use AI coding CLIs (Claude, Gemini, Codex) as my brain. Just send me a message to get started.\n\nCommands:\n/backend [name] - Switch AI backend (or /claude /gemini /codex)\n/model - Switch model for active backend\n/summarizer - Configure session summarization model\n/status - Show session, model, backend, and usage\n/cost - Show estimated API cost (use /cost all for all-time)\n/usage - Show usage per backend with limits\n/limits - Configure usage limits per backend\n/newchat - Start a fresh conversation\n/summarize - Save session to memory (without resetting)\n/summarize all - Summarize all pending sessions (pre-restart)\n/cwd <path> - Set working directory\n/cwd - Show current working directory\n/memory - List stored memories\n/remember <text> - Save a memory\n/forget <keyword> - Remove a memory\n/voice - Toggle voice responses\n/imagine <prompt> - Generate an image (or /image)\n/cron <description> - Schedule a task (or /schedule)\n/cron - List scheduled jobs (or /jobs)\n/cron cancel <id> - Cancel a job\n/cron pause <id> - Pause a job\n/cron resume <id> - Resume a job\n/cron run <id> - Trigger a job now\n/cron runs [id] - View run history\n/cron edit <id> - Edit a job\n/cron health - Scheduler health\n/skills - List skills from all backends\n/skill-install <url> - Install a skill from GitHub\n/setup-profile - Set up your user profile\n/chats - List authorized chats and aliases\n/heartbeat - Proactive awareness (on/off/interval/hours)\n/history - List recent session summaries\n/stop - Cancel the current running task\n/tools - Configure which tools the agent can use\n/permissions - Switch permission mode (yolo/safe/plan)\n/verbose - Tool visibility (off/normal/verbose)\n/agents - List active sub-agents\n/tasks - Show task board for current orchestration\n/stopagent <id> - Cancel a specific sub-agent\n/stopall - Cancel all sub-agents in this chat\n/runners - List registered CLI runners\n/mcps - List registered MCP servers\n/help - Show this message",
|
|
9509
9509
|
"plain"
|
|
9510
9510
|
);
|
|
9511
9511
|
break;
|
|
@@ -9974,6 +9974,17 @@ ${lines.join("\n")}`, "plain");
|
|
|
9974
9974
|
await channel.sendText(chatId, lines.join("\n"), "plain");
|
|
9975
9975
|
break;
|
|
9976
9976
|
}
|
|
9977
|
+
case "remember": {
|
|
9978
|
+
if (!commandArgs) {
|
|
9979
|
+
await channel.sendText(chatId, "Usage: /remember <text>", "plain");
|
|
9980
|
+
return;
|
|
9981
|
+
}
|
|
9982
|
+
const content = commandArgs.replace(/^that\s+/i, "");
|
|
9983
|
+
const trigger = content.split(/\s+/).slice(0, 3).join(" ");
|
|
9984
|
+
saveMemoryWithEmbedding(trigger, content, "semantic");
|
|
9985
|
+
await channel.sendText(chatId, "Got it, I'll remember that.", "plain");
|
|
9986
|
+
break;
|
|
9987
|
+
}
|
|
9977
9988
|
case "forget": {
|
|
9978
9989
|
if (!commandArgs) {
|
|
9979
9990
|
await channel.sendText(chatId, "Usage: /forget <keyword>", "plain");
|
|
@@ -11096,14 +11107,17 @@ Your conversation history is preserved. ${targetAdapter.displayName} will receiv
|
|
|
11096
11107
|
}
|
|
11097
11108
|
async function doBackendSwitch(chatId, backendId, channel) {
|
|
11098
11109
|
const targetAdapter = getAdapter(backendId);
|
|
11110
|
+
const pairCount = getMessagePairCount(chatId);
|
|
11099
11111
|
const summarized = await summarizeWithFallbackChain(chatId, backendId);
|
|
11100
|
-
if (summarized) {
|
|
11101
|
-
await channel.sendText(chatId, `\u{1F4BE} Context saved \u2014 ${targetAdapter.displayName} summarized your session.`, "plain");
|
|
11102
|
-
}
|
|
11103
11112
|
const bridge = buildContextBridge(chatId);
|
|
11104
11113
|
if (bridge) {
|
|
11105
11114
|
setPendingContextBridge(chatId, bridge);
|
|
11106
11115
|
}
|
|
11116
|
+
if (summarized) {
|
|
11117
|
+
await channel.sendText(chatId, "\u{1F4BE} Context saved \u2014 session summarized to memory.", "plain");
|
|
11118
|
+
} else if (pairCount > 0 && bridge) {
|
|
11119
|
+
await channel.sendText(chatId, "\u{1F4AC} Context preserved.", "plain");
|
|
11120
|
+
}
|
|
11107
11121
|
clearSession(chatId);
|
|
11108
11122
|
clearModel(chatId);
|
|
11109
11123
|
clearThinkingLevel(chatId);
|
package/package.json
CHANGED