cc-claw 0.20.9 → 0.20.10
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 +42 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ var VERSION;
|
|
|
33
33
|
var init_version = __esm({
|
|
34
34
|
"src/version.ts"() {
|
|
35
35
|
"use strict";
|
|
36
|
-
VERSION = true ? "0.20.
|
|
36
|
+
VERSION = true ? "0.20.10" : (() => {
|
|
37
37
|
try {
|
|
38
38
|
return JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
|
|
39
39
|
} catch {
|
|
@@ -19134,7 +19134,10 @@ async function sendHeartbeatKeyboard(chatId, channel, messageId) {
|
|
|
19134
19134
|
}
|
|
19135
19135
|
if (fallbacks.length > 0) {
|
|
19136
19136
|
buttons.push([
|
|
19137
|
-
{ label: fallbacks.map((f) =>
|
|
19137
|
+
{ label: fallbacks.map((f) => {
|
|
19138
|
+
const name = capitalize(f.backend);
|
|
19139
|
+
return f.model ? `${name} (${shortModelName(f.model)})` : name;
|
|
19140
|
+
}).join(" \u2192 "), data: "hb:noop" },
|
|
19138
19141
|
{ label: "Clear All", data: "hb:fb:clear", style: "danger" }
|
|
19139
19142
|
]);
|
|
19140
19143
|
}
|
|
@@ -24327,13 +24330,49 @@ Salience: ${memory2.salience.toFixed(2)} | Created: ${memory2.created_at.slice(0
|
|
|
24327
24330
|
await channel.sendText(chatId, "Use /watch to manage awareness tasks.\n\nExamples:\n /watch add Check my email for urgent messages\n /watch add Check if Ollama is running\n /watch list\n /watch remove 1", { parseMode: "plain" });
|
|
24328
24331
|
} else if (rest.startsWith("fb:add:")) {
|
|
24329
24332
|
const bid = rest.slice(7);
|
|
24333
|
+
try {
|
|
24334
|
+
const adapter = getAdapter(bid);
|
|
24335
|
+
const models = Object.entries(adapter.availableModels);
|
|
24336
|
+
const rows = [
|
|
24337
|
+
[{ label: `Select model for ${capitalize(bid)} fallback:`, data: "hb:noop" }],
|
|
24338
|
+
[{ label: "Default", data: `hb:fb:pick:${bid}:default`, style: "primary" }]
|
|
24339
|
+
];
|
|
24340
|
+
if (models.length > 0) {
|
|
24341
|
+
rows.push(models.slice(0, 4).map(([key]) => ({
|
|
24342
|
+
label: shortModelName(key),
|
|
24343
|
+
data: `hb:fb:pick:${bid}:${key}`
|
|
24344
|
+
})));
|
|
24345
|
+
}
|
|
24346
|
+
rows.push([{ label: "\u2190 Back", data: "hb:fb:back" }]);
|
|
24347
|
+
await sendOrEditKeyboard(
|
|
24348
|
+
chatId,
|
|
24349
|
+
channel,
|
|
24350
|
+
messageId,
|
|
24351
|
+
`Pick a model for the ${capitalize(bid)} fallback:`,
|
|
24352
|
+
rows
|
|
24353
|
+
);
|
|
24354
|
+
} catch {
|
|
24355
|
+
const config2 = getHeartbeatConfig(chatId);
|
|
24356
|
+
const current = parseHeartbeatFallbacks(config2?.fallbacks ?? null);
|
|
24357
|
+
if (!current.some((f) => f.backend === bid)) {
|
|
24358
|
+
current.push({ backend: bid });
|
|
24359
|
+
updateHeartbeatField(chatId, "fallbacks", JSON.stringify(current));
|
|
24360
|
+
}
|
|
24361
|
+
await sendHeartbeatKeyboard(chatId, channel, messageId);
|
|
24362
|
+
}
|
|
24363
|
+
} else if (rest.startsWith("fb:pick:")) {
|
|
24364
|
+
const parts = rest.slice(8).split(":");
|
|
24365
|
+
const bid = parts[0];
|
|
24366
|
+
const model2 = parts.slice(1).join(":");
|
|
24330
24367
|
const config2 = getHeartbeatConfig(chatId);
|
|
24331
24368
|
const current = parseHeartbeatFallbacks(config2?.fallbacks ?? null);
|
|
24332
24369
|
if (!current.some((f) => f.backend === bid)) {
|
|
24333
|
-
current.push({ backend: bid });
|
|
24370
|
+
current.push(model2 === "default" ? { backend: bid } : { backend: bid, model: model2 });
|
|
24334
24371
|
updateHeartbeatField(chatId, "fallbacks", JSON.stringify(current));
|
|
24335
24372
|
}
|
|
24336
24373
|
await sendHeartbeatKeyboard(chatId, channel, messageId);
|
|
24374
|
+
} else if (rest === "fb:back") {
|
|
24375
|
+
await sendHeartbeatKeyboard(chatId, channel, messageId);
|
|
24337
24376
|
} else if (rest === "fb:clear") {
|
|
24338
24377
|
updateHeartbeatField(chatId, "fallbacks", null);
|
|
24339
24378
|
await sendHeartbeatKeyboard(chatId, channel, messageId);
|
package/package.json
CHANGED