@clawos-dev/clawd 0.2.346 → 0.2.347
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.cjs
CHANGED
|
@@ -13935,42 +13935,6 @@ function isUserPlainTextLine(obj) {
|
|
|
13935
13935
|
const part = content[0];
|
|
13936
13936
|
return part?.type === "text";
|
|
13937
13937
|
}
|
|
13938
|
-
function injectTurnBoundaries(messages) {
|
|
13939
|
-
let lastBoundaryIdx = -1;
|
|
13940
|
-
for (let i = messages.length - 1; i >= 0; i--) {
|
|
13941
|
-
if (messages[i].kind === "turn-end") {
|
|
13942
|
-
lastBoundaryIdx = i;
|
|
13943
|
-
break;
|
|
13944
|
-
}
|
|
13945
|
-
}
|
|
13946
|
-
const out = [];
|
|
13947
|
-
let contentSeen = false;
|
|
13948
|
-
for (let i = 0; i < messages.length; i++) {
|
|
13949
|
-
const m2 = messages[i];
|
|
13950
|
-
if (i <= lastBoundaryIdx) {
|
|
13951
|
-
out.push(m2);
|
|
13952
|
-
continue;
|
|
13953
|
-
}
|
|
13954
|
-
if (m2.isSidechain) {
|
|
13955
|
-
out.push(m2);
|
|
13956
|
-
continue;
|
|
13957
|
-
}
|
|
13958
|
-
if (m2.kind === "turn-end") {
|
|
13959
|
-
contentSeen = false;
|
|
13960
|
-
out.push(m2);
|
|
13961
|
-
continue;
|
|
13962
|
-
}
|
|
13963
|
-
if (m2.kind === "user-text" && m2.meta === void 0 && contentSeen) {
|
|
13964
|
-
out.push({ kind: "turn-end" });
|
|
13965
|
-
contentSeen = false;
|
|
13966
|
-
}
|
|
13967
|
-
if (m2.kind === "assistant-text" || m2.kind === "tool_call" || m2.kind === "tool_result") {
|
|
13968
|
-
contentSeen = true;
|
|
13969
|
-
}
|
|
13970
|
-
out.push(m2);
|
|
13971
|
-
}
|
|
13972
|
-
return out;
|
|
13973
|
-
}
|
|
13974
13938
|
function appendTurnDurationRowToJsonl(args) {
|
|
13975
13939
|
const base = args.baseDir ?? import_node_path5.default.join(import_node_os3.default.homedir(), ".claude");
|
|
13976
13940
|
const file = import_node_path5.default.join(
|
|
@@ -14347,11 +14311,10 @@ var init_claude_history = __esm({
|
|
|
14347
14311
|
const msg = messageFromJsonl(line);
|
|
14348
14312
|
if (msg) messages.push(msg);
|
|
14349
14313
|
}
|
|
14350
|
-
const
|
|
14351
|
-
const total = withBoundaries.length;
|
|
14314
|
+
const total = messages.length;
|
|
14352
14315
|
const limit = args.limit ?? total;
|
|
14353
14316
|
const offset = args.offset !== void 0 ? Math.min(Math.max(0, args.offset), total) : Math.max(0, total - limit);
|
|
14354
|
-
return { messages:
|
|
14317
|
+
return { messages: messages.slice(offset, offset + limit), total, offset };
|
|
14355
14318
|
}
|
|
14356
14319
|
// CC 子 agent(Agent / Task tool 派发)的对话写在独立文件:
|
|
14357
14320
|
// <projectsRoot>/<cwdHash>/<toolSessionId>/subagents/agent-<agentId>.jsonl
|
|
@@ -60236,7 +60199,7 @@ function computeMethodAccess(args) {
|
|
|
60236
60199
|
}
|
|
60237
60200
|
|
|
60238
60201
|
// src/version.ts
|
|
60239
|
-
var version = "0.2.
|
|
60202
|
+
var version = "0.2.347".length > 0 ? "0.2.347" : "dev";
|
|
60240
60203
|
|
|
60241
60204
|
// src/cli-probe/probe.ts
|
|
60242
60205
|
var fs59 = __toESM(require("fs"), 1);
|