omnius 1.0.352 → 1.0.353
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/index.js +23 -10
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -573918,27 +573918,34 @@ ${blob}
|
|
|
573918
573918
|
}
|
|
573919
573919
|
if (toolResultIndices.length <= keepResults)
|
|
573920
573920
|
return;
|
|
573921
|
-
const
|
|
573921
|
+
const callMetaById = /* @__PURE__ */ new Map();
|
|
573922
573922
|
for (const m2 of messages2) {
|
|
573923
573923
|
const calls = m2.tool_calls;
|
|
573924
573924
|
if (m2.role === "assistant" && Array.isArray(calls)) {
|
|
573925
573925
|
for (const c8 of calls) {
|
|
573926
|
-
|
|
573926
|
+
const name10 = c8?.function?.name;
|
|
573927
|
+
if (!name10 || !c8.id)
|
|
573928
|
+
continue;
|
|
573929
|
+
const rawArgs = c8.function?.arguments || "{}";
|
|
573930
|
+
let path12;
|
|
573931
|
+
if (name10 === "file_read") {
|
|
573927
573932
|
try {
|
|
573928
|
-
const a2 = JSON.parse(
|
|
573933
|
+
const a2 = JSON.parse(rawArgs);
|
|
573929
573934
|
const p2 = a2.path ?? a2.file ?? a2.file_path;
|
|
573930
573935
|
if (p2)
|
|
573931
|
-
|
|
573936
|
+
path12 = String(p2);
|
|
573932
573937
|
} catch {
|
|
573933
573938
|
}
|
|
573934
573939
|
}
|
|
573940
|
+
callMetaById.set(c8.id, { name: name10, path: path12, argsPreview: rawArgs.slice(0, 120) });
|
|
573935
573941
|
}
|
|
573936
573942
|
}
|
|
573937
573943
|
}
|
|
573938
|
-
const
|
|
573944
|
+
const metaForResult = (idx) => {
|
|
573939
573945
|
const tcid = messages2[idx].tool_call_id;
|
|
573940
|
-
return tcid ?
|
|
573946
|
+
return tcid ? callMetaById.get(tcid) : void 0;
|
|
573941
573947
|
};
|
|
573948
|
+
const pathForResult = (idx) => metaForResult(idx)?.path;
|
|
573942
573949
|
const latestIdxForPath = /* @__PURE__ */ new Map();
|
|
573943
573950
|
for (const idx of toolResultIndices) {
|
|
573944
573951
|
const p2 = pathForResult(idx);
|
|
@@ -573968,10 +573975,16 @@ ${blob}
|
|
|
573968
573975
|
} catch {
|
|
573969
573976
|
}
|
|
573970
573977
|
}
|
|
573971
|
-
|
|
573972
|
-
|
|
573973
|
-
|
|
573974
|
-
|
|
573978
|
+
const meta = metaForResult(idx);
|
|
573979
|
+
let stub;
|
|
573980
|
+
if (p2) {
|
|
573981
|
+
stub = `[Earlier read of ${p2} cleared — its content is preserved in your ACTIVE CONTEXT FRAME (Evidence already gathered). Do NOT re-read it; use the frame.]`;
|
|
573982
|
+
} else {
|
|
573983
|
+
const firstLine = content.split("\n").find((l2) => l2.trim())?.trim().slice(0, 140) ?? "";
|
|
573984
|
+
const failed = /\berror\b|\bfail|✗|exit code [1-9]|traceback/i.test(content);
|
|
573985
|
+
stub = `[${meta?.name ?? "tool"}(${meta?.argsPreview ?? ""}) result compacted to save context — ${failed ? "FAILED" : "ok"}${firstLine ? `: ${firstLine}` : ""}. Re-run ONLY if the underlying state has since changed.]`;
|
|
573986
|
+
}
|
|
573987
|
+
messages2[idx] = { ...msg, content: stub };
|
|
573975
573988
|
cleared++;
|
|
573976
573989
|
}
|
|
573977
573990
|
if (idleGapMs > IDLE_THRESHOLD_MS && !this._thinkingClearLatched) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.353",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.353",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED