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

Function outputAfter

e2e/cloud/toolkit-opencode-real.test.ts:60–65  ·  view source on GitHub ↗
(text: string, line: string)

Source from the content-addressed store, hash-verified

58 await term.screen.waitForText("$", { timeoutMs: 10_000 });
59
60 const outputAfter = (text: string, line: string): string | null => {
61 const echoed = text.lastIndexOf(line);
62 if (echoed === -1) return null;
63 const after = text.slice(echoed + line.length);
64 return after.trimEnd().endsWith("\n$") ? after : null;
65 };
66 const sh = async (line: string, timeoutMs: number) => {
67 await term.keyboard.type(line);
68 await term.keyboard.press("Enter");

Callers 1

shFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected