@volter/supercode-terminal 0.2.49 → 0.2.51
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 +2 -2
- package/package.json +1 -1
- package/substrate/tmux.js +9 -4
package/index.mjs
CHANGED
|
@@ -1739,7 +1739,7 @@ export function composerText(kind, screen) {
|
|
|
1739
1739
|
const lines = String(screen ?? '').split('\n').map(styledCells);
|
|
1740
1740
|
const plain = lines.map((cells) => cells.map((cell) => cell.char).join(''));
|
|
1741
1741
|
const rule = /^\s*[─━]{4,}\s*$/u;
|
|
1742
|
-
const footer = /^\s*(?:\? for shortcuts\b|[^\n]+ · (?:~[\\/]|[\\/]|[A-Z]:[\\/])[^\n]
|
|
1742
|
+
const footer = /^\s*(?:\? for shortcuts\b|[^\n]+ · (?:~(?:[\\/]|(?=\s|$))|[\\/]|[A-Z]:[\\/])[^\n]*$|.*← for agents\s*$|.*\bcontext(?:\s+\d+%)?\s+left\b)/iu;
|
|
1743
1743
|
const caret = kind === 'codex' ? /^\s*›(?:\s|$)/u : /^\s*[❯>](?:\s|$)/u;
|
|
1744
1744
|
for (let row = plain.length - 1; row >= 0; row -= 1) {
|
|
1745
1745
|
if (!caret.test(plain[row])) continue;
|
|
@@ -1750,7 +1750,7 @@ export function composerText(kind, screen) {
|
|
|
1750
1750
|
// Startup can draw a caret before loading finishes or a modal opens. A rule
|
|
1751
1751
|
// alone is not Codex's ready editor; require its footer at the live bottom.
|
|
1752
1752
|
if (kind === 'codex' && (plain.slice(end + 1).some((line) => line.trim()) ||
|
|
1753
|
-
plain.
|
|
1753
|
+
/\bmodel:\s+loading\b/iu.test(plain.findLast((line) => /\bmodel:/iu.test(line)) ?? ''))) return null;
|
|
1754
1754
|
if (kind === 'claude-code' && (row === 0 || !rule.test(plain[row - 1]))) return null;
|
|
1755
1755
|
const first = plain[row].match(caret)[0].length;
|
|
1756
1756
|
const value = lines.slice(row, end).map((cells, index) => cells
|
package/package.json
CHANGED
package/substrate/tmux.js
CHANGED
|
@@ -62,8 +62,13 @@ export async function createSession({ command, cwd, env, name, owner, ownerOptio
|
|
|
62
62
|
const bootstrapDirectories = [];
|
|
63
63
|
const paneBootstrapArgs = (pane) => {
|
|
64
64
|
const commandArgs = command === undefined ? [] : [command.program, ...(command.arguments ?? [])];
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
// With neither command nor overrides, retain tmux's default-shell and
|
|
66
|
+
// default-command behavior rather than choosing a shell for it.
|
|
67
|
+
if (command === undefined && Object.keys(sessionEnv).length === 0)
|
|
68
|
+
return [];
|
|
69
|
+
// The complete command rides the private bootstrap file as well as its
|
|
70
|
+
// environment. tmux's command message is bounded (roughly 16 KiB), much
|
|
71
|
+
// smaller than a native CLI's legal initial prompt.
|
|
67
72
|
const directory = mkdtempSync(join(tmpdir(), "tmux-session-env-"));
|
|
68
73
|
bootstrapDirectories.push(directory);
|
|
69
74
|
const shell = process.env.SHELL ?? "/bin/sh";
|
|
@@ -408,10 +413,10 @@ function writeSessionEnvironmentBootstrap(directory, pane, environment, command)
|
|
|
408
413
|
"set +a",
|
|
409
414
|
'rm -f -- "$environment_path" "$0"',
|
|
410
415
|
'rmdir -- "$(dirname -- "$0")" 2>/dev/null || true',
|
|
411
|
-
|
|
416
|
+
`exec ${command.map(shellQuote).join(" ")}`,
|
|
412
417
|
""
|
|
413
418
|
].join("\n"), { flag: "wx", mode: 0o700 });
|
|
414
|
-
return [wrapperPath, environmentPath
|
|
419
|
+
return [wrapperPath, environmentPath];
|
|
415
420
|
}
|
|
416
421
|
function shellQuote(value) {
|
|
417
422
|
return `'${value.replaceAll("'", `'"'"'`)}'`;
|