perstack 0.0.67 → 0.0.69
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/bin/cli.js +5 -12
- package/dist/bin/cli.js.map +1 -1
- package/package.json +6 -6
package/dist/bin/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ import { useRun } from '@perstack/react';
|
|
|
20
20
|
// package.json
|
|
21
21
|
var package_default = {
|
|
22
22
|
name: "perstack",
|
|
23
|
-
version: "0.0.
|
|
23
|
+
version: "0.0.69",
|
|
24
24
|
description: "PerStack CLI"};
|
|
25
25
|
function getEnv(envPath) {
|
|
26
26
|
const env = Object.fromEntries(
|
|
@@ -1493,9 +1493,6 @@ function getCheckpointsWithDetails(jobId) {
|
|
|
1493
1493
|
contextWindowUsage: cp.contextWindowUsage ?? 0
|
|
1494
1494
|
})).sort((a, b) => b.stepNumber - a.stepNumber);
|
|
1495
1495
|
}
|
|
1496
|
-
function getEventContents2(jobId, runId, maxStepNumber) {
|
|
1497
|
-
return getEventContents(jobId, runId, maxStepNumber);
|
|
1498
|
-
}
|
|
1499
1496
|
function getAllEventContentsForJob(jobId, maxStepNumber) {
|
|
1500
1497
|
const runIds = getRunIdsByJobId(jobId);
|
|
1501
1498
|
const allEvents = [];
|
|
@@ -6931,9 +6928,10 @@ var startCommand = new Command().command("start").description("Start Perstack wi
|
|
|
6931
6928
|
let currentQuery = selection.query;
|
|
6932
6929
|
let currentJobId = currentCheckpoint?.jobId ?? input.options.jobId;
|
|
6933
6930
|
let isNextQueryInteractiveToolResult = input.options.interactiveToolCallResult ?? false;
|
|
6934
|
-
let
|
|
6931
|
+
let isFirstIteration = true;
|
|
6932
|
+
const initialHistoricalEvents = currentCheckpoint ? getAllEventContentsForJob(currentCheckpoint.jobId, currentCheckpoint.stepNumber) : void 0;
|
|
6935
6933
|
while (currentQuery !== null) {
|
|
6936
|
-
const historicalEvents =
|
|
6934
|
+
const historicalEvents = isFirstIteration ? initialHistoricalEvents : void 0;
|
|
6937
6935
|
const { result: executionResult, eventListener } = renderExecution({
|
|
6938
6936
|
expertKey: selection.expertKey,
|
|
6939
6937
|
query: currentQuery,
|
|
@@ -6981,12 +6979,7 @@ var startCommand = new Command().command("start").description("Start Perstack wi
|
|
|
6981
6979
|
currentCheckpoint = runResult;
|
|
6982
6980
|
currentJobId = runResult.jobId;
|
|
6983
6981
|
isNextQueryInteractiveToolResult = runResult.status === "stoppedByInteractiveTool";
|
|
6984
|
-
|
|
6985
|
-
if (accumulatedEvents) {
|
|
6986
|
-
accumulatedEvents = [...accumulatedEvents, ...newRunEvents];
|
|
6987
|
-
} else {
|
|
6988
|
-
accumulatedEvents = newRunEvents;
|
|
6989
|
-
}
|
|
6982
|
+
isFirstIteration = false;
|
|
6990
6983
|
} else {
|
|
6991
6984
|
currentQuery = null;
|
|
6992
6985
|
}
|