MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / LoggingVirtualTerminal

Class LoggingVirtualTerminal

packages/pi-tui/test/tui-render.test.ts:24–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24class LoggingVirtualTerminal extends VirtualTerminal {
25 private writes: string[] = [];
26
27 override write(data: string): void {
28 this.writes.push(data);
29 super.write(data);
30 }
31
32 getWrites(): string {
33 return this.writes.join("");
34 }
35
36 clearWrites(): void {
37 this.writes = [];
38 }
39}
40
41async function withEnv<T>(updates: Record<string, string | undefined>, run: () => Promise<T>): Promise<T> {
42 const previousValues = new Map<string, string | undefined>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected