@pasko70/pibo 3.2.0 → 3.2.2
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/agent-runtime/routed-session.js +8 -3
- package/dist/apps/chat-ui/assets/{dist-NsHPx2KS.js → dist-BL4oTUrk.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CiwafO2k.js → dist-CQF9jyQW.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BAXv9edD.js → dist-DI39iyXK.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-jgYATWSF.js → dist-Drv_xdGh.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-DD2HRAgt.js → dist-f-76_fmW.js} +1 -1
- package/dist/apps/chat-ui/assets/{index-C-s68zrN.js → index-CgFDCgyv.js} +8 -8
- package/dist/apps/chat-ui/index.html +1 -1
- package/dist/apps/chat-vscode-web/assets/{index-nHYofa-e.js → index-B-TiIWb7.js} +4 -4
- package/dist/apps/chat-vscode-web/index.html +1 -1
- package/dist/session-ui/terminalRows.js +80 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta name="theme-color" content="#101d22" />
|
|
7
7
|
<title>Pibo</title>
|
|
8
|
-
<script type="module" crossorigin src="/apps/chat-vscode/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/apps/chat-vscode/assets/index-B-TiIWb7.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/apps/chat-vscode/assets/index-b18ZkEo0.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -4,6 +4,7 @@ import { terminalTextValue } from "./terminalValue.js";
|
|
|
4
4
|
export const MAX_COMPACT_TERMINAL_IMAGE_PREVIEWS = 20;
|
|
5
5
|
export const COMPACT_TERMINAL_OUTPUT_PREVIEW_LINES = 5;
|
|
6
6
|
export const COMPACT_TERMINAL_EXPLORING_PREVIEW_LINES = 6;
|
|
7
|
+
const NATIVE_HISTORY_ASSISTANT_ECHO_MAX_SKEW_MS = 1_000;
|
|
7
8
|
const CODEX_COMPATIBLE_TOOL_LABELS = {
|
|
8
9
|
browser_use_open_tabs: "browser_use.open_tabs",
|
|
9
10
|
browser_use_take_screenshot: "browser_use.take_screenshot",
|
|
@@ -227,7 +228,85 @@ function reconcileConceptualRowCandidates(candidates) {
|
|
|
227
228
|
},
|
|
228
229
|
};
|
|
229
230
|
}
|
|
230
|
-
return reconciled;
|
|
231
|
+
return reconcileNativeHistoryAssistantEchoes(reconciled);
|
|
232
|
+
}
|
|
233
|
+
// Large native histories intentionally keep fail-closed fallback identities. Collapse only
|
|
234
|
+
// an unambiguous, near-simultaneous event-log echo without changing the trace identity model.
|
|
235
|
+
function reconcileNativeHistoryAssistantEchoes(candidates) {
|
|
236
|
+
const groups = new Map();
|
|
237
|
+
for (let index = 0; index < candidates.length; index += 1) {
|
|
238
|
+
const row = candidates[index].row;
|
|
239
|
+
const source = isCanonicalEventAssistant(row)
|
|
240
|
+
? "canonical"
|
|
241
|
+
: isNativeHistoryAssistantFallback(row)
|
|
242
|
+
? "fallback"
|
|
243
|
+
: undefined;
|
|
244
|
+
const partIndex = assistantPartIndex(row.id);
|
|
245
|
+
if (!source || partIndex === undefined || typeof row.output !== "string")
|
|
246
|
+
continue;
|
|
247
|
+
const key = `${partIndex}\0${row.output}`;
|
|
248
|
+
const group = groups.get(key) ?? { canonical: [], fallback: [] };
|
|
249
|
+
group[source].push(index);
|
|
250
|
+
groups.set(key, group);
|
|
251
|
+
}
|
|
252
|
+
const next = [...candidates];
|
|
253
|
+
const removed = new Set();
|
|
254
|
+
for (const group of groups.values()) {
|
|
255
|
+
if (group.canonical.length !== 1 || group.fallback.length !== 1)
|
|
256
|
+
continue;
|
|
257
|
+
const canonicalIndex = group.canonical[0];
|
|
258
|
+
const fallbackIndex = group.fallback[0];
|
|
259
|
+
const canonical = next[canonicalIndex];
|
|
260
|
+
const fallback = next[fallbackIndex];
|
|
261
|
+
if (!nativeHistoryAssistantEchoTimestampsMatch(canonical.row, fallback.row))
|
|
262
|
+
continue;
|
|
263
|
+
next[canonicalIndex] = mergeNativeHistoryAssistantEcho(canonical, fallback);
|
|
264
|
+
removed.add(fallbackIndex);
|
|
265
|
+
}
|
|
266
|
+
return next.filter((_, index) => !removed.has(index));
|
|
267
|
+
}
|
|
268
|
+
function mergeNativeHistoryAssistantEcho(canonical, fallback) {
|
|
269
|
+
return {
|
|
270
|
+
...fallback,
|
|
271
|
+
...canonical,
|
|
272
|
+
turnId: canonical.turnId ?? fallback.turnId,
|
|
273
|
+
row: {
|
|
274
|
+
...fallback.row,
|
|
275
|
+
...canonical.row,
|
|
276
|
+
sourceNodeIds: [...new Set([...canonical.row.sourceNodeIds, ...fallback.row.sourceNodeIds])],
|
|
277
|
+
completedAt: canonical.row.completedAt ?? fallback.row.completedAt,
|
|
278
|
+
durationMs: canonical.row.durationMs ?? fallback.row.durationMs,
|
|
279
|
+
payloadRefs: { ...fallback.row.payloadRefs, ...canonical.row.payloadRefs },
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function isCanonicalEventAssistant(row) {
|
|
284
|
+
const eventId = row.eventId;
|
|
285
|
+
return row.kind === "message.assistant"
|
|
286
|
+
&& row.status === "done"
|
|
287
|
+
&& row.orderSource === "event-log"
|
|
288
|
+
&& eventId !== undefined
|
|
289
|
+
&& !eventId.startsWith("native-history-group:");
|
|
290
|
+
}
|
|
291
|
+
function isNativeHistoryAssistantFallback(row) {
|
|
292
|
+
return row.kind === "message.assistant"
|
|
293
|
+
&& row.status === "done"
|
|
294
|
+
&& row.orderSource === "transcript"
|
|
295
|
+
&& row.eventId?.startsWith("native-history-group:") === true;
|
|
296
|
+
}
|
|
297
|
+
function nativeHistoryAssistantEchoTimestampsMatch(canonical, fallback) {
|
|
298
|
+
const canonicalAt = Date.parse(canonical.completedAt ?? canonical.startedAt ?? "");
|
|
299
|
+
const fallbackAt = Date.parse(fallback.completedAt ?? fallback.startedAt ?? "");
|
|
300
|
+
return Number.isFinite(canonicalAt)
|
|
301
|
+
&& Number.isFinite(fallbackAt)
|
|
302
|
+
&& Math.abs(canonicalAt - fallbackAt) <= NATIVE_HISTORY_ASSISTANT_ECHO_MAX_SKEW_MS;
|
|
303
|
+
}
|
|
304
|
+
function assistantPartIndex(rowId) {
|
|
305
|
+
const match = rowId.match(/:assistant:(\d+)$/);
|
|
306
|
+
if (!match)
|
|
307
|
+
return undefined;
|
|
308
|
+
const index = Number(match[1]);
|
|
309
|
+
return Number.isSafeInteger(index) ? index : undefined;
|
|
231
310
|
}
|
|
232
311
|
function mergeImagePreviews(existing, candidate) {
|
|
233
312
|
if (!existing?.length)
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pasko70/pibo",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pasko70/pibo",
|
|
9
|
-
"version": "3.2.
|
|
9
|
+
"version": "3.2.2",
|
|
10
10
|
"workspaces": [
|
|
11
11
|
"packages/workflows"
|
|
12
12
|
],
|