@f5xc-salesdemos/pi-tui 19.29.3 → 19.29.4

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5xc-salesdemos/pi-tui",
4
- "version": "19.29.3",
4
+ "version": "19.29.4",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "homepage": "https://github.com/f5xc-salesdemos/xcsh",
7
7
  "author": "Can Boluk",
@@ -37,8 +37,8 @@
37
37
  "fmt": "biome format --write ."
38
38
  },
39
39
  "dependencies": {
40
- "@f5xc-salesdemos/pi-natives": "19.29.3",
41
- "@f5xc-salesdemos/pi-utils": "19.29.3",
40
+ "@f5xc-salesdemos/pi-natives": "19.29.4",
41
+ "@f5xc-salesdemos/pi-utils": "19.29.4",
42
42
  "marked": "^17.0"
43
43
  },
44
44
  "devDependencies": {
package/src/terminal.ts CHANGED
@@ -503,6 +503,10 @@ export class ProcessTerminal implements Terminal {
503
503
  }
504
504
 
505
505
  async drainInput(maxMs = 1000, idleMs = 50): Promise<void> {
506
+ // Stop the periodic OSC 11 poll first. drainInput precedes relinquishing
507
+ // the TTY (exit, or a cooked-mode subprocess); a poll query fired now would
508
+ // have its response echoed as gibberish once raw mode is gone.
509
+ this.#stopOsc11Poll();
506
510
  if (this.#kittyProtocolActive) {
507
511
  // Disable Kitty keyboard protocol first so any late key releases
508
512
  // do not generate new Kitty escape sequences.
package/src/tui.ts CHANGED
@@ -580,6 +580,18 @@ export class TUI extends Container {
580
580
  this.terminal.stop();
581
581
  }
582
582
 
583
+ /**
584
+ * Suspend the UI to hand the TTY to a cooked-mode subprocess (e.g. an
585
+ * interactive `aws sso login`). Drains pending terminal input while still in
586
+ * raw mode, then stops — so a late capability-probe response (notably the
587
+ * periodic OSC 11 poll) cannot be echoed as gibberish during the cooked-mode
588
+ * window. Pair with start() once the subprocess exits.
589
+ */
590
+ async suspendForSubprocess(maxDrainMs = 150): Promise<void> {
591
+ await this.terminal.drainInput(maxDrainMs);
592
+ this.stop();
593
+ }
594
+
583
595
  requestRender(force = false): void {
584
596
  if (force) {
585
597
  this.#previousLines = [];