MCPcopy Index your code
hub / github.com/anomalyco/opencode / setNotice

Method setNotice

packages/opencode/src/cli/cmd/run/footer.ts:651–673  ·  view source on GitHub ↗
(status: string)

Source from the content-addressed store, hash-verified

649 }
650
651 private setNotice(status: string): void {
652 const restore = this.noticeTimeout ? this.noticeRestoreStatus : this.state().status
653 this.clearNoticeTimer(false)
654 this.patch({ status })
655 if (!status) {
656 this.noticeRestoreStatus = ""
657 return
658 }
659
660 this.noticeRestoreStatus = restore
661 const version = this.statusVersion
662 this.noticeTimeout = setTimeout(() => {
663 this.noticeTimeout = undefined
664 if (this.isGone || version !== this.statusVersion) {
665 this.noticeRestoreStatus = ""
666 return
667 }
668
669 const next = this.noticeRestoreStatus
670 this.noticeRestoreStatus = ""
671 this.patch({ status: next })
672 }, NOTICE_DURATION)
673 }
674
675 private setRequestExitHandler = (fn?: () => boolean): void => {
676 this.requestExitHandler = fn

Callers 1

RunFooterClass · 0.95

Calls 3

clearNoticeTimerMethod · 0.95
patchMethod · 0.95
stateMethod · 0.80

Tested by

no test coverage detected