replicas-cli 0.2.533 → 0.2.534
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.cjs +12 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24336,7 +24336,7 @@ var headlessFilesystemAgentResultSchema = external_exports.object({
|
|
|
24336
24336
|
});
|
|
24337
24337
|
|
|
24338
24338
|
// ../shared/src/cli-version.ts
|
|
24339
|
-
var CLI_VERSION = "0.2.
|
|
24339
|
+
var CLI_VERSION = "0.2.534";
|
|
24340
24340
|
|
|
24341
24341
|
// ../shared/src/version.ts
|
|
24342
24342
|
function compareVersions(v1, v2) {
|
|
@@ -24403,6 +24403,12 @@ function normalizeCodexAspTranscriptStatus(status, failed = false) {
|
|
|
24403
24403
|
if (status === "completed") return "completed";
|
|
24404
24404
|
return "in_progress";
|
|
24405
24405
|
}
|
|
24406
|
+
function getCodexAspTurnResponse(turn) {
|
|
24407
|
+
const finalAnswer = turn.items.find((item) => item.type === "agentMessage" && item.phase === "final_answer");
|
|
24408
|
+
if (finalAnswer) return finalAnswer;
|
|
24409
|
+
if (normalizeCodexAspTranscriptStatus(turn.status) === "in_progress") return null;
|
|
24410
|
+
return turn.items.findLast((item) => item.type === "agentMessage") ?? null;
|
|
24411
|
+
}
|
|
24406
24412
|
|
|
24407
24413
|
// ../shared/src/routes/user.ts
|
|
24408
24414
|
var PROFILE_AVATAR_MAX_SIZE_BYTES = 5 * 1024 * 1024;
|
|
@@ -26406,10 +26412,11 @@ function parseCodexAspTranscript(transcript) {
|
|
|
26406
26412
|
for (const turn of transcript.turns) {
|
|
26407
26413
|
const reasoningIndex = coalescedItems.findIndex(({ item, turn: itemTurn }) => itemTurn.id === turn.id && item.type === "reasoning");
|
|
26408
26414
|
if (reasoningIndex === -1) continue;
|
|
26409
|
-
|
|
26410
|
-
|
|
26411
|
-
|
|
26412
|
-
}
|
|
26415
|
+
const responseItem = getCodexAspTurnResponse({
|
|
26416
|
+
status: turn.status,
|
|
26417
|
+
items: coalescedItems.filter(({ turn: itemTurn }) => itemTurn.id === turn.id).map(({ item }) => item)
|
|
26418
|
+
});
|
|
26419
|
+
const finalAnswerIndex = responseItem ? coalescedItems.findIndex(({ item }) => item === responseItem) : -1;
|
|
26413
26420
|
if (finalAnswerIndex === -1 || reasoningIndex < finalAnswerIndex) continue;
|
|
26414
26421
|
const [reasoning] = coalescedItems.splice(reasoningIndex, 1);
|
|
26415
26422
|
coalescedItems.splice(finalAnswerIndex, 0, reasoning);
|