@opengeni/react 7.4.0-canary.36798990292001 → 7.4.0-canary.36799533139001
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/{chunk-MFKOGFXF.js → chunk-QOC35DAN.js} +3 -3
- package/dist/{chunk-OQVBTOBJ.js → chunk-USXVQACU.js} +3 -3
- package/dist/{chunk-ASCSKOWU.js → chunk-V2ABIVYJ.js} +3 -50
- package/dist/chunk-V2ABIVYJ.js.map +1 -0
- package/dist/hooks/latest-question.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/{latest-question-3HGQUI2E.js → latest-question-QB4EUCW5.js} +2 -2
- package/dist/session-ui.js +3 -3
- package/dist/session.js +2 -2
- package/package.json +3 -3
- package/src/timeline/projection.ts +4 -54
- package/dist/chunk-ASCSKOWU.js.map +0 -1
- /package/dist/{chunk-MFKOGFXF.js.map → chunk-QOC35DAN.js.map} +0 -0
- /package/dist/{chunk-OQVBTOBJ.js.map → chunk-USXVQACU.js.map} +0 -0
- /package/dist/{latest-question-3HGQUI2E.js.map → latest-question-QB4EUCW5.js.map} +0 -0
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
useSessionControl,
|
|
34
34
|
useSessionEvents,
|
|
35
35
|
useTurnQueue
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-USXVQACU.js";
|
|
37
37
|
import {
|
|
38
38
|
buildTimeline,
|
|
39
39
|
groupTimeline
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-V2ABIVYJ.js";
|
|
41
41
|
import {
|
|
42
42
|
mcpToolLeaf,
|
|
43
43
|
toolDisplayName
|
|
@@ -12124,4 +12124,4 @@ export {
|
|
|
12124
12124
|
SessionCommands,
|
|
12125
12125
|
StartupTimings
|
|
12126
12126
|
};
|
|
12127
|
-
//# sourceMappingURL=chunk-
|
|
12127
|
+
//# sourceMappingURL=chunk-QOC35DAN.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
buildTimeline,
|
|
3
3
|
groupTimeline,
|
|
4
4
|
sessionStatusFromEvents
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-V2ABIVYJ.js";
|
|
6
6
|
import {
|
|
7
7
|
useDebouncedCallback,
|
|
8
8
|
useMutationRunner,
|
|
@@ -830,7 +830,7 @@ function useSessionEvents(sessionId, options = {}) {
|
|
|
830
830
|
let generation = navigationGenerationRef.current;
|
|
831
831
|
const current = () => ownsNavigation() && generation === navigationGenerationRef.current;
|
|
832
832
|
try {
|
|
833
|
-
const { resolveLatestQuestion } = await import("./latest-question-
|
|
833
|
+
const { resolveLatestQuestion } = await import("./latest-question-QB4EUCW5.js");
|
|
834
834
|
if (!current()) return null;
|
|
835
835
|
const destination = await resolveLatestQuestion({
|
|
836
836
|
client,
|
|
@@ -2308,4 +2308,4 @@ export {
|
|
|
2308
2308
|
projectPendingApprovals,
|
|
2309
2309
|
conversationTimeline
|
|
2310
2310
|
};
|
|
2311
|
-
//# sourceMappingURL=chunk-
|
|
2311
|
+
//# sourceMappingURL=chunk-USXVQACU.js.map
|
|
@@ -255,10 +255,6 @@ function asRecord(value) {
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
// src/timeline/projection.ts
|
|
258
|
-
import {
|
|
259
|
-
allowanceExhaustedMessage,
|
|
260
|
-
parseAllowanceExhaustedRefusal
|
|
261
|
-
} from "@opengeni/sdk/allowance-refusal";
|
|
262
258
|
function isTimelineUserQuestion(event) {
|
|
263
259
|
return event.type === "user.message" && workerCompletionPayload(asRecord2(event.payload).childCompletion) === null;
|
|
264
260
|
}
|
|
@@ -305,31 +301,6 @@ function timelineAnnotationToolOutputText(output) {
|
|
|
305
301
|
}
|
|
306
302
|
function buildTimeline(events, options = {}) {
|
|
307
303
|
const items = [];
|
|
308
|
-
const allowanceNotices = /* @__PURE__ */ new Set();
|
|
309
|
-
const allowanceNotice = (event, turnId) => {
|
|
310
|
-
const refusal = parseAllowanceExhaustedRefusal(event.payload);
|
|
311
|
-
if (!refusal) return null;
|
|
312
|
-
const text = allowanceExhaustedMessage(refusal);
|
|
313
|
-
const key = JSON.stringify([
|
|
314
|
-
turnId,
|
|
315
|
-
event.turnAttemptId,
|
|
316
|
-
startupRecoveryRevisionByTurn.get(turnId ?? "") ?? 0,
|
|
317
|
-
refusal.scope,
|
|
318
|
-
refusal.subjectId,
|
|
319
|
-
refusal.resetsAt
|
|
320
|
-
]);
|
|
321
|
-
if (!allowanceNotices.has(key)) {
|
|
322
|
-
allowanceNotices.add(key);
|
|
323
|
-
items.push({
|
|
324
|
-
kind: "notice",
|
|
325
|
-
id: `${event.id}-allowance`,
|
|
326
|
-
tone: "failed",
|
|
327
|
-
text,
|
|
328
|
-
occurredAt: event.occurredAt
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
return text;
|
|
332
|
-
};
|
|
333
304
|
const prescan = prescanTurnAnchors(events);
|
|
334
305
|
const ordered = orderTimelineEvents(events, prescan);
|
|
335
306
|
let completeHistoryPrefix = options.partialStart !== true;
|
|
@@ -1078,10 +1049,6 @@ ${message}` : message;
|
|
|
1078
1049
|
});
|
|
1079
1050
|
break;
|
|
1080
1051
|
}
|
|
1081
|
-
case "usage.exhausted": {
|
|
1082
|
-
allowanceNotice(event, turnId);
|
|
1083
|
-
break;
|
|
1084
|
-
}
|
|
1085
1052
|
case "turn.completed": {
|
|
1086
1053
|
if (payload.maintenance === "context_compaction") {
|
|
1087
1054
|
finalizeOpen(turnId, "complete", event.occurredAt);
|
|
@@ -1089,16 +1056,6 @@ ${message}` : message;
|
|
|
1089
1056
|
takePendingWaitOutcome(turnId);
|
|
1090
1057
|
break;
|
|
1091
1058
|
}
|
|
1092
|
-
const allowance = parseAllowanceExhaustedRefusal(payload);
|
|
1093
|
-
if (allowance) {
|
|
1094
|
-
finalizeOpen(turnId, "complete", event.occurredAt);
|
|
1095
|
-
takeAgentResponse(turnId);
|
|
1096
|
-
takePendingWaitOutcome(turnId);
|
|
1097
|
-
const text = allowanceExhaustedMessage(allowance);
|
|
1098
|
-
items.push(turnEndItem(event, "failed", text));
|
|
1099
|
-
allowanceNotice(event, turnId);
|
|
1100
|
-
break;
|
|
1101
|
-
}
|
|
1102
1059
|
if (isCreditExhaustionPayload(payload)) {
|
|
1103
1060
|
finalizeOpen(turnId, "complete", event.occurredAt);
|
|
1104
1061
|
takeAgentResponse(turnId);
|
|
@@ -1172,13 +1129,10 @@ ${message}` : message;
|
|
|
1172
1129
|
takeAgentResponse(turnId);
|
|
1173
1130
|
takePendingWaitOutcome(turnId);
|
|
1174
1131
|
const hadActivity = hasTurnActivity(items, turnId);
|
|
1175
|
-
const
|
|
1176
|
-
const failureText = allowance ? allowanceExhaustedMessage(allowance) : isCreditExhaustionPayload(payload) ? CREDIT_EXHAUSTION_MESSAGE : failureMessage(payload);
|
|
1132
|
+
const failureText = isCreditExhaustionPayload(payload) ? CREDIT_EXHAUSTION_MESSAGE : failureMessage(payload);
|
|
1177
1133
|
finalizeOpen(turnId, "cancelled", event.occurredAt);
|
|
1178
1134
|
items.push(turnEndItem(event, "failed", failureText));
|
|
1179
|
-
if (
|
|
1180
|
-
allowanceNotice(event, turnId);
|
|
1181
|
-
} else if (!hadActivity) {
|
|
1135
|
+
if (!hadActivity) {
|
|
1182
1136
|
items.push({
|
|
1183
1137
|
kind: "notice",
|
|
1184
1138
|
id: event.id,
|
|
@@ -1446,7 +1400,6 @@ function stripOpaqueCitationTokens(text) {
|
|
|
1446
1400
|
return text.replace(/\s*cite(?:[^]+)+/gu, "");
|
|
1447
1401
|
}
|
|
1448
1402
|
function isCreditExhaustionPayload(payload) {
|
|
1449
|
-
if (payload.code === "allowance_exhausted") return false;
|
|
1450
1403
|
return isCreditExhaustion({
|
|
1451
1404
|
error: typeof payload.error === "string" ? payload.error : null,
|
|
1452
1405
|
detail: typeof payload.detail === "string" ? payload.detail : null,
|
|
@@ -2555,4 +2508,4 @@ export {
|
|
|
2555
2508
|
isTurnExecutionEvidence,
|
|
2556
2509
|
extractSessionRef
|
|
2557
2510
|
};
|
|
2558
|
-
//# sourceMappingURL=chunk-
|
|
2511
|
+
//# sourceMappingURL=chunk-V2ABIVYJ.js.map
|