@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
21 lines • 779 B
JavaScript
/**
* Lazy boundary for `@earendil-works/pi-pty` (and `@xterm/headless`).
*
* pi-pty's screen model imports `@xterm/headless` at module evaluation, which
* spends hundreds of milliseconds in `RegExp.prototype.test` on every CLI boot
* even when no terminal session is created. This module owns the one deferred
* import; session construction awaits {@link loadPty} first.
*
* Follows the repository's documented lazy-boundary pattern
* (`packages/ai/src/api/*.lazy.ts`).
*/
let loaded;
export async function loadPty() {
loaded ??= await import("@earendil-works/pi-pty");
return loaded;
}
/** The loaded module, or `undefined` until something has awaited {@link loadPty}. */
export function loadedPty() {
return loaded;
}
//# sourceMappingURL=pty.lazy.js.map