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

Function outputAfter

e2e/selfhost/mcp-opencode-consent.test.ts:72–77  ·  view source on GitHub ↗
(text: string, line: string)

Source from the content-addressed store, hash-verified

70 await term.screen.waitForText("$", { timeoutMs: 10_000 });
71
72 const outputAfter = (text: string, line: string): string | null => {
73 const echoed = text.lastIndexOf(line);
74 if (echoed === -1) return null;
75 const after = text.slice(echoed + line.length);
76 return after.trimEnd().endsWith("\n$") ? after : null;
77 };
78 const sh = async (line: string, timeoutMs: number) => {
79 await term.keyboard.type(line);
80 await term.keyboard.press("Enter");

Callers 1

shFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected