MCPcopy Create free account
hub / github.com/coder/aibridge / RecordInterception

Method RecordInterception

example/recorder.go:75–84  ·  view source on GitHub ↗
(ctx context.Context, req *aibridge.InterceptionRecord)

Source from the content-addressed store, hash-verified

73}
74
75func (r *SQLiteRecorder) RecordInterception(ctx context.Context, req *aibridge.InterceptionRecord) error {
76 metadata, _ := json.Marshal(req.Metadata)
77 _, err := r.stmtInsertInterception.ExecContext(ctx,
78 req.ID, req.InitiatorID, req.Provider, req.Model, req.StartedAt, string(metadata),
79 )
80 if err != nil {
81 r.logger.Warn(ctx, "failed to record interception", slog.Error(err))
82 }
83 return err
84}
85
86func (r *SQLiteRecorder) RecordInterceptionEnded(ctx context.Context, req *aibridge.InterceptionRecordEnded) error {
87 _, err := r.stmtUpdateInterception.ExecContext(ctx, req.EndedAt, req.ID)

Callers

nothing calls this directly

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected