@pixelbyte-software/pixcode 1.50.5 → 1.50.6

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.html CHANGED
@@ -35,7 +35,7 @@
35
35
 
36
36
  <!-- Prevent zoom on iOS -->
37
37
  <meta name="format-detection" content="telephone=no" />
38
- <script type="module" crossorigin src="/assets/index-BSxc8Vid.js"></script>
38
+ <script type="module" crossorigin src="/assets/index-DVEXTVKy.js"></script>
39
39
  <link rel="modulepreload" crossorigin href="/assets/vendor-react-DB6V5Fl1.js">
40
40
  <link rel="modulepreload" crossorigin href="/assets/vendor-codemirror-CIYNS698.js">
41
41
  <link rel="modulepreload" crossorigin href="/assets/vendor-xterm-C7tpxJl7.js">
@@ -289,22 +289,24 @@ function detectProviderTerminalState(provider, output) {
289
289
  terminalStateReason: 'process_exit',
290
290
  };
291
291
  }
292
- const lastBusy = Math.max(getLastRegexMatchIndex(cleanOutput, /(?:^|\n)\s*[•*]\s*(?:Working|Running|Thinking)\b/giu), getLastRegexMatchIndex(cleanOutput, /\bWorking\s*\([^)]*esc to interrupt[^)]*\)/giu), getLastRegexMatchIndex(cleanOutput, /\bmsg=interrupt\b/giu));
292
+ const lastWeakBusy = getLastRegexMatchIndex(cleanOutput, /(?:^|\n)\s*[•*]\s*(?:Working|Running|Thinking)\b/giu);
293
+ const lastStrongBusy = Math.max(getLastRegexMatchIndex(cleanOutput, /\bWorking\s*\([^)]*esc to interrupt[^)]*\)/giu), getLastRegexMatchIndex(cleanOutput, /\bmsg=interrupt\b/giu));
294
+ const lastBusy = Math.max(lastWeakBusy, lastStrongBusy);
293
295
  if (provider === 'codex') {
294
296
  const lastPrompt = Math.max(getLastRegexMatchIndex(cleanOutput, /(?:^|\n)\s*›(?:\s|$)/gu), getLastRegexMatchIndex(cleanOutput, /(?:^|\n)\s*❯(?:\s|$)/gu));
295
- if (lastBusy >= 0) {
296
- const isBusy = lastPrompt <= lastBusy;
297
+ if (lastPrompt >= 0) {
298
+ const isBusy = lastStrongBusy > lastPrompt;
297
299
  return {
298
300
  terminalState: isBusy ? 'busy' : 'idle',
299
301
  isBusy,
300
- terminalStateReason: isBusy ? 'codex_busy_marker_after_prompt' : 'codex_prompt_after_busy_marker',
302
+ terminalStateReason: isBusy ? 'codex_strong_busy_marker_after_prompt' : 'codex_prompt_after_busy_marker',
301
303
  };
302
304
  }
303
- if (lastPrompt >= 0 && /(?:Initialized|Baseline check passed|I did not modify files|Use \/skills)/iu.test(cleanOutput)) {
305
+ if (lastBusy >= 0) {
304
306
  return {
305
- terminalState: 'idle',
306
- isBusy: false,
307
- terminalStateReason: 'codex_idle_prompt',
307
+ terminalState: 'busy',
308
+ isBusy: true,
309
+ terminalStateReason: 'codex_busy_marker_without_prompt',
308
310
  };
309
311
  }
310
312
  }
@@ -2522,6 +2524,10 @@ function handleShellConnection(ws, request) {
2522
2524
  shellProcess.onExit((exitCode) => {
2523
2525
  console.log('🔚 Shell process exited with code:', exitCode.exitCode, 'signal:', exitCode.signal);
2524
2526
  const session = ptySessionsMap.get(ptySessionKey);
2527
+ if (session?.pty && session.pty !== shellProcess) {
2528
+ console.log('↩️ Ignoring stale PTY exit for replacement session:', ptySessionKey);
2529
+ return;
2530
+ }
2525
2531
  const exitMessage = `\r\n\x1b[33mProcess exited with code ${exitCode.exitCode}${exitCode.signal ? ` (${exitCode.signal})` : ''}\x1b[0m\r\n`;
2526
2532
  if (session) {
2527
2533
  session.lifecycleState = exitCode.exitCode === 0 && !exitCode.signal ? 'completed' : 'failed';