test: stabilize bash send-keys submit
This commit is contained in:
@@ -45,12 +45,12 @@ test("process send-keys encodes Enter for pty sessions", async () => {
|
||||
throw new Error("PTY session did not exit after send-keys");
|
||||
});
|
||||
|
||||
test("process submit sends CR for pty sessions", async () => {
|
||||
test("process submit sends Enter for pty sessions", async () => {
|
||||
const execTool = createExecTool();
|
||||
const processTool = createProcessTool();
|
||||
const result = await execTool.execute("toolcall", {
|
||||
command:
|
||||
"node -e \"process.stdin.on('data', d => { if (d.includes(13)) { process.stdout.write('submitted'); process.exit(0); } });\"",
|
||||
"node -e \"process.stdin.on('data', d => { if (d.includes(10) || d.includes(13)) { process.stdout.write('submitted'); process.exit(0); } });\"",
|
||||
pty: true,
|
||||
background: true,
|
||||
});
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line no-control-regex
|
||||
const DSR_PATTERN = /\x1b\[\??6n/g;
|
||||
|
||||
export function stripDsrRequests(input: string): { cleaned: string; requests: number } {
|
||||
|
||||
Reference in New Issue
Block a user