(data)
| 23 | output.pipeTo( |
| 24 | new WritableStream({ |
| 25 | write(data) { |
| 26 | if (!isInteractive) { |
| 27 | const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || []; |
| 28 | |
| 29 | if (osc === 'interactive') { |
| 30 | // wait until we see the interactive OSC |
| 31 | isInteractive = true; |
| 32 | |
| 33 | jshReady.resolve(); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | terminal.write(data); |
| 38 | }, |
| 39 | }), |
| 40 | ); |
| 41 |