@volter/supercode-terminal 0.2.64 → 0.2.65
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/index.mjs +7 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1723,9 +1723,15 @@ const COMPOSER_READY = Object.freeze({
|
|
|
1723
1723
|
* and anchoring on column 0 instead would read a drawn-in prompt as absent.
|
|
1724
1724
|
*/
|
|
1725
1725
|
function composerLine(screen, caret) {
|
|
1726
|
-
|
|
1726
|
+
// Read as text: a capture keeps its escapes (the daemon's readiness wait reads one), and Grok draws its composer
|
|
1727
|
+
// line after a reset (`ESC[0m❯`), so a caret test on the raw line never matched and Grok never read as ready
|
|
1728
|
+
// (yuerans, 2026-10-06: `open --new grok --input` dropped its brief; mail to an idle Grok waited for ever).
|
|
1729
|
+
return screen.split('\n').some((line) => caret.test(line.replace(ANSI_SEQUENCE, '').trim()));
|
|
1727
1730
|
}
|
|
1728
1731
|
|
|
1732
|
+
/** A terminal escape sequence: CSI (`ESC[…x`), OSC (`ESC]…BEL` or `ESC]…ESC\\`), or a two-character escape. */
|
|
1733
|
+
const ANSI_SEQUENCE = /\u001b\[[0-?]*[ -\/]*[@-~]|\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)|\u001b[@-Z\\-_]/gu;
|
|
1734
|
+
|
|
1729
1735
|
/**
|
|
1730
1736
|
* Is the program of this kind showing its idle composer — ready to be given a
|
|
1731
1737
|
* first message — on this captured screen?
|