@threadbase-sh/streamer 1.69.1 → 1.69.2

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.js CHANGED
@@ -10442,6 +10442,21 @@ var SessionHandlers = class {
10442
10442
  json(res, 400, { error: "Missing input field" });
10443
10443
  return;
10444
10444
  }
10445
+ const openPrompt = this.pendingPermission.has(sessionId) ? "permission" : this.pendingQuestions.has(sessionId) ? "question" : null;
10446
+ if (openPrompt) {
10447
+ this.log.info(`[input.prompt_pending] ${sessionId.slice(0, 8)} kind=${openPrompt}`, {
10448
+ event: "input.prompt_pending",
10449
+ sessionId,
10450
+ promptKind: openPrompt
10451
+ });
10452
+ json(res, 409, {
10453
+ ok: false,
10454
+ reason: "prompt_pending",
10455
+ promptKind: openPrompt,
10456
+ error: "A prompt is waiting for an answer; answer or dismiss it before sending text"
10457
+ });
10458
+ return;
10459
+ }
10445
10460
  try {
10446
10461
  const promptCount = this.ptyManager.sendInput(sessionId, input);
10447
10462
  this.sessionStore.updateManaged(sessionId, { promptCount });