MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / outputAfter

Function outputAfter

e2e/cloud/passthrough-opencode-codemode.test.ts:236–241  ·  view source on GitHub ↗
(text: string, line: string)

Source from the content-addressed store, hash-verified

234 await term.screen.waitForText("$", { timeoutMs: 10_000 });
235
236 const outputAfter = (text: string, line: string): string | null => {
237 const echoed = text.lastIndexOf(line);
238 if (echoed === -1) return null;
239 const after = text.slice(echoed + line.length);
240 return after.trimEnd().endsWith("\n$") ? after : null;
241 };
242 const sh = async (line: string, timeoutMs: number) => {
243 await term.keyboard.type(line);
244 await term.keyboard.press("Enter");

Callers 1

shFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected