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

Function sh

e2e/cloud/passthrough-opencode-codemode.test.ts:242–250  ·  view source on GitHub ↗
(line: string, timeoutMs: number)

Source from the content-addressed store, hash-verified

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");
245 const snapshot = await term.screen.waitUntil(
246 (current) => outputAfter(current.text, line) !== null,
247 { timeoutMs },
248 );
249 return outputAfter(snapshot.text, line) ?? "";
250 };
251
252 // OpenCode's own OAuth against the target: discovery, DCR, PKCE.
253 const consent = opencode.completeOAuthConsent(home, email, home.openedUrls().length);

Calls 2

outputAfterFunction · 0.70
waitUntilMethod · 0.65

Tested by

no test coverage detected