(line: string, timeoutMs: number)
| 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"); |
| 69 | const snapshot = await term.screen.waitUntil( |
| 70 | (current) => outputAfter(current.text, line) !== null, |
| 71 | { timeoutMs }, |
| 72 | ); |
| 73 | return outputAfter(snapshot.text, line) ?? ""; |
| 74 | }; |
| 75 | |
| 76 | // OpenCode completes MCP OAuth for real: discovery, DCR, PKCE, its |
| 77 | // own scope request, its own token store. |
no test coverage detected