MCPcopy Create free account
hub / github.com/anomalyco/opencode / onClose

Method onClose

packages/opencode/src/cli/cmd/run/footer.ts:378–388  ·  view source on GitHub ↗
(fn: () => void)

Source from the content-addressed store, hash-verified

376 }
377
378 public onClose(fn: () => void): () => void {
379 if (this.isClosed) {
380 fn()
381 return () => {}
382 }
383
384 this.closes.add(fn)
385 return () => {
386 this.closes.delete(fn)
387 }
388 }
389
390 public event(next: FooterEvent): void {
391 if (next.type === "turn.duration") {

Callers 15

ModalFunction · 0.80
runActionFunction · 0.80
dismissFunction · 0.80
DialogFunction · 0.80
initFunction · 0.80
clearFunction · 0.80
replaceFunction · 0.80
RunFooterSubagentBodyFunction · 0.80
runPromptQueueFunction · 0.80
ModelSelectorPopoverFunction · 0.80
selectFunction · 0.80
ModelSelectorPopoverV2Function · 0.80

Calls 3

addMethod · 0.65
fnFunction · 0.50
deleteMethod · 0.45

Tested by

no test coverage detected