@bgicli/bgicli 2.7.0 → 2.7.1
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/bgi.js +21 -13
- package/dist/bio.js +21 -13
- package/dist/mbp.js +21 -13
- package/package.json +1 -1
package/dist/bgi.js
CHANGED
|
@@ -17200,7 +17200,7 @@ function clearCheckpoints(sessionId) {
|
|
|
17200
17200
|
|
|
17201
17201
|
// src/index.ts
|
|
17202
17202
|
var import_fs7 = require("fs");
|
|
17203
|
-
var VERSION2 = "2.7.
|
|
17203
|
+
var VERSION2 = "2.7.1";
|
|
17204
17204
|
var BRAND2 = "bgi".toLowerCase();
|
|
17205
17205
|
var SKILLHUB_HUBS = {
|
|
17206
17206
|
bgi: { label: "BGI\u5185\u7F51", apiBase: "https://clawhub.ai", backend: "clawhub" },
|
|
@@ -19371,20 +19371,29 @@ ${expanded}` : expanded;
|
|
|
19371
19371
|
try {
|
|
19372
19372
|
const currentCfg = loadConfig();
|
|
19373
19373
|
currentAbortController = new AbortController();
|
|
19374
|
-
const
|
|
19375
|
-
const
|
|
19374
|
+
const roundT0 = Date.now();
|
|
19375
|
+
const tokensBefore = { in: sessionStats.inputTokens, out: sessionStats.outputTokens };
|
|
19376
19376
|
const reply = await chat(history, currentCfg, systemPrompt, sessionStats, currentAbortController.signal);
|
|
19377
19377
|
currentAbortController = null;
|
|
19378
|
-
if (
|
|
19379
|
-
const elapsedMs = Date.now() -
|
|
19380
|
-
const dIn = sessionStats.inputTokens -
|
|
19381
|
-
const dOut = sessionStats.outputTokens -
|
|
19378
|
+
if (reply) {
|
|
19379
|
+
const elapsedMs = Date.now() - roundT0;
|
|
19380
|
+
const dIn = sessionStats.inputTokens - tokensBefore.in;
|
|
19381
|
+
const dOut = sessionStats.outputTokens - tokensBefore.out;
|
|
19382
|
+
const elapsed = (elapsedMs / 1e3).toFixed(2);
|
|
19383
|
+
console.log(
|
|
19384
|
+
source_default.dim(`
|
|
19385
|
+
\u23F1 ${elapsed}s`) + source_default.dim(" \xB7 ") + source_default.dim(`\u2191 ${dIn}`) + source_default.dim(" ") + source_default.dim(`\u2193 ${dOut} tokens`)
|
|
19386
|
+
);
|
|
19387
|
+
}
|
|
19388
|
+
if (debugMode && reply) {
|
|
19389
|
+
const elapsedMs = Date.now() - roundT0;
|
|
19390
|
+
const dIn = sessionStats.inputTokens - tokensBefore.in;
|
|
19391
|
+
const dOut = sessionStats.outputTokens - tokensBefore.out;
|
|
19382
19392
|
try {
|
|
19383
19393
|
appendDebugRound(systemPrompt, history, reply, elapsedMs, dIn, dOut);
|
|
19384
19394
|
} catch {
|
|
19385
19395
|
}
|
|
19386
|
-
console.log(source_default.bold.yellow(`
|
|
19387
|
-
[DEBUG] \u5DF2\u8BB0\u5F55 \u2192 ${debugFilePath}`));
|
|
19396
|
+
console.log(source_default.bold.yellow(` [DEBUG] \u5DF2\u8BB0\u5F55 \u2192 ${debugFilePath}`));
|
|
19388
19397
|
}
|
|
19389
19398
|
if (!reply && history[history.length - 1]?.role === "user") {
|
|
19390
19399
|
history.pop();
|
|
@@ -19399,10 +19408,9 @@ ${expanded}` : expanded;
|
|
|
19399
19408
|
saveCheckpoint(sessionId, label, history, Array.from(injectedSkills.keys()));
|
|
19400
19409
|
lastCheckpointMsgCount = history.length;
|
|
19401
19410
|
}
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
console.log(source_default.dim(`
|
|
19405
|
-
[\u6FC0\u6D3B Skill: ${ids}]`));
|
|
19411
|
+
const activeNonPerm = Array.from(injectedSkills.keys()).filter((id) => !permanentSkillIds.has(id));
|
|
19412
|
+
if (activeNonPerm.length > 0) {
|
|
19413
|
+
console.log(source_default.dim(` [\u6FC0\u6D3B Skill: ${activeNonPerm.join(" \xB7 ")}]`));
|
|
19406
19414
|
}
|
|
19407
19415
|
} catch (err) {
|
|
19408
19416
|
currentAbortController = null;
|
package/dist/bio.js
CHANGED
|
@@ -17200,7 +17200,7 @@ function clearCheckpoints(sessionId) {
|
|
|
17200
17200
|
|
|
17201
17201
|
// src/index.ts
|
|
17202
17202
|
var import_fs7 = require("fs");
|
|
17203
|
-
var VERSION2 = "2.7.
|
|
17203
|
+
var VERSION2 = "2.7.1";
|
|
17204
17204
|
var BRAND2 = "bio".toLowerCase();
|
|
17205
17205
|
var SKILLHUB_HUBS = {
|
|
17206
17206
|
bgi: { label: "BGI\u5185\u7F51", apiBase: "https://clawhub.ai", backend: "clawhub" },
|
|
@@ -19371,20 +19371,29 @@ ${expanded}` : expanded;
|
|
|
19371
19371
|
try {
|
|
19372
19372
|
const currentCfg = loadConfig();
|
|
19373
19373
|
currentAbortController = new AbortController();
|
|
19374
|
-
const
|
|
19375
|
-
const
|
|
19374
|
+
const roundT0 = Date.now();
|
|
19375
|
+
const tokensBefore = { in: sessionStats.inputTokens, out: sessionStats.outputTokens };
|
|
19376
19376
|
const reply = await chat(history, currentCfg, systemPrompt, sessionStats, currentAbortController.signal);
|
|
19377
19377
|
currentAbortController = null;
|
|
19378
|
-
if (
|
|
19379
|
-
const elapsedMs = Date.now() -
|
|
19380
|
-
const dIn = sessionStats.inputTokens -
|
|
19381
|
-
const dOut = sessionStats.outputTokens -
|
|
19378
|
+
if (reply) {
|
|
19379
|
+
const elapsedMs = Date.now() - roundT0;
|
|
19380
|
+
const dIn = sessionStats.inputTokens - tokensBefore.in;
|
|
19381
|
+
const dOut = sessionStats.outputTokens - tokensBefore.out;
|
|
19382
|
+
const elapsed = (elapsedMs / 1e3).toFixed(2);
|
|
19383
|
+
console.log(
|
|
19384
|
+
source_default.dim(`
|
|
19385
|
+
\u23F1 ${elapsed}s`) + source_default.dim(" \xB7 ") + source_default.dim(`\u2191 ${dIn}`) + source_default.dim(" ") + source_default.dim(`\u2193 ${dOut} tokens`)
|
|
19386
|
+
);
|
|
19387
|
+
}
|
|
19388
|
+
if (debugMode && reply) {
|
|
19389
|
+
const elapsedMs = Date.now() - roundT0;
|
|
19390
|
+
const dIn = sessionStats.inputTokens - tokensBefore.in;
|
|
19391
|
+
const dOut = sessionStats.outputTokens - tokensBefore.out;
|
|
19382
19392
|
try {
|
|
19383
19393
|
appendDebugRound(systemPrompt, history, reply, elapsedMs, dIn, dOut);
|
|
19384
19394
|
} catch {
|
|
19385
19395
|
}
|
|
19386
|
-
console.log(source_default.bold.yellow(`
|
|
19387
|
-
[DEBUG] \u5DF2\u8BB0\u5F55 \u2192 ${debugFilePath}`));
|
|
19396
|
+
console.log(source_default.bold.yellow(` [DEBUG] \u5DF2\u8BB0\u5F55 \u2192 ${debugFilePath}`));
|
|
19388
19397
|
}
|
|
19389
19398
|
if (!reply && history[history.length - 1]?.role === "user") {
|
|
19390
19399
|
history.pop();
|
|
@@ -19399,10 +19408,9 @@ ${expanded}` : expanded;
|
|
|
19399
19408
|
saveCheckpoint(sessionId, label, history, Array.from(injectedSkills.keys()));
|
|
19400
19409
|
lastCheckpointMsgCount = history.length;
|
|
19401
19410
|
}
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
console.log(source_default.dim(`
|
|
19405
|
-
[\u6FC0\u6D3B Skill: ${ids}]`));
|
|
19411
|
+
const activeNonPerm = Array.from(injectedSkills.keys()).filter((id) => !permanentSkillIds.has(id));
|
|
19412
|
+
if (activeNonPerm.length > 0) {
|
|
19413
|
+
console.log(source_default.dim(` [\u6FC0\u6D3B Skill: ${activeNonPerm.join(" \xB7 ")}]`));
|
|
19406
19414
|
}
|
|
19407
19415
|
} catch (err) {
|
|
19408
19416
|
currentAbortController = null;
|
package/dist/mbp.js
CHANGED
|
@@ -17200,7 +17200,7 @@ function clearCheckpoints(sessionId) {
|
|
|
17200
17200
|
|
|
17201
17201
|
// src/index.ts
|
|
17202
17202
|
var import_fs7 = require("fs");
|
|
17203
|
-
var VERSION2 = "2.7.
|
|
17203
|
+
var VERSION2 = "2.7.1";
|
|
17204
17204
|
var BRAND2 = "mbp".toLowerCase();
|
|
17205
17205
|
var SKILLHUB_HUBS = {
|
|
17206
17206
|
bgi: { label: "BGI\u5185\u7F51", apiBase: "https://clawhub.ai", backend: "clawhub" },
|
|
@@ -19371,20 +19371,29 @@ ${expanded}` : expanded;
|
|
|
19371
19371
|
try {
|
|
19372
19372
|
const currentCfg = loadConfig();
|
|
19373
19373
|
currentAbortController = new AbortController();
|
|
19374
|
-
const
|
|
19375
|
-
const
|
|
19374
|
+
const roundT0 = Date.now();
|
|
19375
|
+
const tokensBefore = { in: sessionStats.inputTokens, out: sessionStats.outputTokens };
|
|
19376
19376
|
const reply = await chat(history, currentCfg, systemPrompt, sessionStats, currentAbortController.signal);
|
|
19377
19377
|
currentAbortController = null;
|
|
19378
|
-
if (
|
|
19379
|
-
const elapsedMs = Date.now() -
|
|
19380
|
-
const dIn = sessionStats.inputTokens -
|
|
19381
|
-
const dOut = sessionStats.outputTokens -
|
|
19378
|
+
if (reply) {
|
|
19379
|
+
const elapsedMs = Date.now() - roundT0;
|
|
19380
|
+
const dIn = sessionStats.inputTokens - tokensBefore.in;
|
|
19381
|
+
const dOut = sessionStats.outputTokens - tokensBefore.out;
|
|
19382
|
+
const elapsed = (elapsedMs / 1e3).toFixed(2);
|
|
19383
|
+
console.log(
|
|
19384
|
+
source_default.dim(`
|
|
19385
|
+
\u23F1 ${elapsed}s`) + source_default.dim(" \xB7 ") + source_default.dim(`\u2191 ${dIn}`) + source_default.dim(" ") + source_default.dim(`\u2193 ${dOut} tokens`)
|
|
19386
|
+
);
|
|
19387
|
+
}
|
|
19388
|
+
if (debugMode && reply) {
|
|
19389
|
+
const elapsedMs = Date.now() - roundT0;
|
|
19390
|
+
const dIn = sessionStats.inputTokens - tokensBefore.in;
|
|
19391
|
+
const dOut = sessionStats.outputTokens - tokensBefore.out;
|
|
19382
19392
|
try {
|
|
19383
19393
|
appendDebugRound(systemPrompt, history, reply, elapsedMs, dIn, dOut);
|
|
19384
19394
|
} catch {
|
|
19385
19395
|
}
|
|
19386
|
-
console.log(source_default.bold.yellow(`
|
|
19387
|
-
[DEBUG] \u5DF2\u8BB0\u5F55 \u2192 ${debugFilePath}`));
|
|
19396
|
+
console.log(source_default.bold.yellow(` [DEBUG] \u5DF2\u8BB0\u5F55 \u2192 ${debugFilePath}`));
|
|
19388
19397
|
}
|
|
19389
19398
|
if (!reply && history[history.length - 1]?.role === "user") {
|
|
19390
19399
|
history.pop();
|
|
@@ -19399,10 +19408,9 @@ ${expanded}` : expanded;
|
|
|
19399
19408
|
saveCheckpoint(sessionId, label, history, Array.from(injectedSkills.keys()));
|
|
19400
19409
|
lastCheckpointMsgCount = history.length;
|
|
19401
19410
|
}
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
console.log(source_default.dim(`
|
|
19405
|
-
[\u6FC0\u6D3B Skill: ${ids}]`));
|
|
19411
|
+
const activeNonPerm = Array.from(injectedSkills.keys()).filter((id) => !permanentSkillIds.has(id));
|
|
19412
|
+
if (activeNonPerm.length > 0) {
|
|
19413
|
+
console.log(source_default.dim(` [\u6FC0\u6D3B Skill: ${activeNonPerm.join(" \xB7 ")}]`));
|
|
19406
19414
|
}
|
|
19407
19415
|
} catch (err) {
|
|
19408
19416
|
currentAbortController = null;
|