perstack 0.0.64 → 0.0.65

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 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.64",
23
+ version: "0.0.65",
24
24
  description: "PerStack CLI"};
25
25
  function getEnv(envPath) {
26
26
  const env = Object.fromEntries(
@@ -6926,6 +6926,7 @@ var startCommand = new Command().command("start").description("Start Perstack wi
6926
6926
  }
6927
6927
  let currentQuery = selection.query;
6928
6928
  let currentJobId = currentCheckpoint?.jobId ?? input.options.jobId;
6929
+ let isNextQueryInteractiveToolResult = input.options.interactiveToolCallResult ?? false;
6929
6930
  let accumulatedEvents = currentCheckpoint ? getAllEventContentsForJob(currentCheckpoint.jobId, currentCheckpoint.stepNumber) : void 0;
6930
6931
  while (currentQuery !== null) {
6931
6932
  const historicalEvents = accumulatedEvents;
@@ -6948,7 +6949,7 @@ var startCommand = new Command().command("start").description("Start Perstack wi
6948
6949
  setting: {
6949
6950
  jobId: currentJobId,
6950
6951
  expertKey: selection.expertKey,
6951
- input: input.options.interactiveToolCallResult && currentCheckpoint ? parseInteractiveToolCallResult(currentQuery, currentCheckpoint) : { text: currentQuery },
6952
+ input: isNextQueryInteractiveToolResult && currentCheckpoint ? parseInteractiveToolCallResult(currentQuery, currentCheckpoint) : { text: currentQuery },
6952
6953
  experts,
6953
6954
  model,
6954
6955
  providerConfig,
@@ -6970,10 +6971,12 @@ var startCommand = new Command().command("start").description("Start Perstack wi
6970
6971
  additionalEnvKeys: input.options.env
6971
6972
  });
6972
6973
  const result = await executionResult;
6973
- if (result.nextQuery && (runResult.status === "completed" || runResult.status === "stoppedByExceededMaxSteps" || runResult.status === "stoppedByError")) {
6974
+ const canContinue = runResult.status === "completed" || runResult.status === "stoppedByExceededMaxSteps" || runResult.status === "stoppedByError" || runResult.status === "stoppedByInteractiveTool";
6975
+ if (result.nextQuery && canContinue) {
6974
6976
  currentQuery = result.nextQuery;
6975
6977
  currentCheckpoint = runResult;
6976
6978
  currentJobId = runResult.jobId;
6979
+ isNextQueryInteractiveToolResult = runResult.status === "stoppedByInteractiveTool";
6977
6980
  const newRunEvents = getEventContents2(runResult.jobId, runResult.runId);
6978
6981
  if (accumulatedEvents) {
6979
6982
  accumulatedEvents = [...accumulatedEvents, ...newRunEvents];