MCPcopy Create free account
hub / github.com/diillson/chatcli / SetStatusCallback

Method SetStatusCallback

cli/history_compactor.go:155–159  ·  view source on GitHub ↗

SetStatusCallback registers a progress callback for UI feedback. Pass nil to clear. Safe to call concurrently.

(cb StatusCallback)

Source from the content-addressed store, hash-verified

153// SetStatusCallback registers a progress callback for UI feedback.
154// Pass nil to clear. Safe to call concurrently.
155func (hc *HistoryCompactor) SetStatusCallback(cb StatusCallback) {
156 hc.statusMu.Lock()
157 hc.onStatus = cb
158 hc.statusMu.Unlock()
159}
160
161// emitStatus invokes the current status callback (if any). Never panics
162// if the callback is nil or the caller has cleared it mid-flight.

Callers 4

RunOnceMethod · 0.80
handleCompactCommandMethod · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected