@alphacoder-v0/pi-loops 0.17.6 → 0.18.0

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/src/web.mjs CHANGED
@@ -1363,7 +1363,11 @@ const server = http.createServer(async (req, res) => {
1363
1363
  // Submitting while a turn runs queues instead of racing it, as the TUI does.
1364
1364
  const type = mode === "steer" ? "steer" : mode === "follow_up" ? "follow_up" : "prompt";
1365
1365
  const message = expandMentions(text ?? "", sessionCwd);
1366
- return void json(res, await rpc({ type, message, ...(images?.length ? { images } : {}) }));
1366
+ // pi answers a prompt command when the command has *finished*, and a slash command may
1367
+ // sit in a dialog for as long as a person takes to read what it shows (a setup script,
1368
+ // say). Sixty seconds reported that as "timed out" while the command went on to succeed.
1369
+ const patience = message.trimStart().startsWith("/") ? 15 * 60_000 : undefined;
1370
+ return void json(res, await rpc({ type, message, ...(images?.length ? { images } : {}) }, patience));
1367
1371
  }
1368
1372
  if (url.pathname === "/model" && req.method === "POST") {
1369
1373
  // Recorded below, once pi has accepted it.