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

Method disposeTranscriptChildren

apps/kimi-code/src/tui/kimi-tui.ts:1884–1892  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1882 }
1883
1884 private disposeTranscriptChildren(): void {
1885 // Dispose disposable children (e.g. ShellRunComponent's 1s timer,
1886 // ThinkingComponent's spinner) before dropping them, so a /clear, session
1887 // switch, or shutdown can't leak intervals that keep firing requestRender
1888 // on a removed component.
1889 for (const child of this.state.transcriptContainer.children) {
1890 if (hasDispose(child)) child.dispose();
1891 }
1892 }
1893
1894 private clearTranscriptAndRedraw(): void {
1895 this.streamingUI.discardPending();

Callers 2

stopMethod · 0.95

Calls 2

hasDisposeFunction · 0.90
disposeMethod · 0.65

Tested by

no test coverage detected