MCPcopy Create free account
hub / github.com/coder/coder / RecordedInterceptions

Method RecordedInterceptions

aibridge/internal/testutil/mock_recorder.go:157–161  ·  view source on GitHub ↗

RecordedInterceptions returns a copy of recorded interceptions in a thread-safe manner. Note: This is a shallow clone (see RecordedTokenUsages for details).

()

Source from the content-addressed store, hash-verified

155// RecordedInterceptions returns a copy of recorded interceptions in a thread-safe manner.
156// Note: This is a shallow clone (see RecordedTokenUsages for details).
157func (m *MockRecorder) RecordedInterceptions() []*recorder.InterceptionRecord {
158 m.mu.Lock()
159 defer m.mu.Unlock()
160 return slices.Clone(m.interceptions)
161}
162
163// ToolUsages returns the raw toolUsages slice for direct field access in tests.
164// Use RecordedToolUsages() for thread-safe access when assertions don't need direct field access.

Callers 10

TestSimpleFunction · 0.80
TestSessionIDTrackingFunction · 0.80
TestAPIDumpFunction · 0.80
TestTraceAnthropicFunction · 0.80
TestTraceAnthropicErrFunction · 0.80
TestInjectedToolsTraceFunction · 0.80
TestTraceOpenAIFunction · 0.80
TestTraceOpenAIErrFunction · 0.80

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
CloneMethod · 0.45

Tested by 10

TestSimpleFunction · 0.64
TestSessionIDTrackingFunction · 0.64
TestAPIDumpFunction · 0.64
TestTraceAnthropicFunction · 0.64
TestTraceAnthropicErrFunction · 0.64
TestInjectedToolsTraceFunction · 0.64
TestTraceOpenAIFunction · 0.64
TestTraceOpenAIErrFunction · 0.64