squadrant 0.13.4 → 0.13.5
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 +23 -0
- package/dist/index.js.map +1 -1
- package/dist/squadrantd.js +23 -0
- package/dist/squadrantd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2926,6 +2926,27 @@ function hasCCInputBox(screen) {
|
|
|
2926
2926
|
return false;
|
|
2927
2927
|
return lines.slice(topHR + 1, bottomHR).some((l) => /[>❯]/.test(l));
|
|
2928
2928
|
}
|
|
2929
|
+
function hasModalOptionList(screen) {
|
|
2930
|
+
if (!screen)
|
|
2931
|
+
return false;
|
|
2932
|
+
const lines = screen.split(/\r?\n/);
|
|
2933
|
+
const HR_RE = /^\s*─{10,}\s*$/;
|
|
2934
|
+
let bottomHR = -1;
|
|
2935
|
+
let topHR = -1;
|
|
2936
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
2937
|
+
if (HR_RE.test(lines[i])) {
|
|
2938
|
+
if (bottomHR === -1)
|
|
2939
|
+
bottomHR = i;
|
|
2940
|
+
else {
|
|
2941
|
+
topHR = i;
|
|
2942
|
+
break;
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
if (topHR === -1)
|
|
2947
|
+
return false;
|
|
2948
|
+
return lines.slice(topHR + 1, bottomHR).some((l) => /^\s*\d+\.\s/.test(l));
|
|
2949
|
+
}
|
|
2929
2950
|
function readInputBoxRaw(screen, opts) {
|
|
2930
2951
|
if (!screen)
|
|
2931
2952
|
return null;
|
|
@@ -3177,6 +3198,8 @@ function createCmuxDriver() {
|
|
|
3177
3198
|
const draft = parseDraftFromScreen(screen);
|
|
3178
3199
|
if (draft === null)
|
|
3179
3200
|
throw new DeferDelivery(null);
|
|
3201
|
+
if (hasModalOptionList(screen))
|
|
3202
|
+
throw new DeferDelivery(null);
|
|
3180
3203
|
if (draft === "") {
|
|
3181
3204
|
await deliver();
|
|
3182
3205
|
return;
|