MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / SetSink

Function SetSink

internal/debug/debug.go:76–80  ·  view source on GitHub ↗

SetSink registers a callback fired on each Record. The TUI uses it to nudge a re-render of the debug panel. Pass nil to unregister.

(f func(Event))

Source from the content-addressed store, hash-verified

74// SetSink registers a callback fired on each Record. The TUI uses it to nudge
75// a re-render of the debug panel. Pass nil to unregister.
76func SetSink(f func(Event)) {
77 mu.Lock()
78 sink = f
79 mu.Unlock()
80}
81
82// Record appends a payload-less event and returns its ID (0 if disabled).
83func Record(source string, level Level, message string) uint64 {

Callers 2

mainFunction · 0.92

Calls

no outgoing calls

Tested by 1