MCPcopy Index your code
hub / github.com/coder/coder / RecordInterception

Method RecordInterception

coderd/aibridged/translator.go:26–44  ·  view source on GitHub ↗
(ctx context.Context, req *aibridge.InterceptionRecord)

Source from the content-addressed store, hash-verified

24}
25
26func (t *recorderTranslation) RecordInterception(ctx context.Context, req *aibridge.InterceptionRecord) error {
27 _, err := t.client.RecordInterception(ctx, &proto.RecordInterceptionRequest{
28 Id: req.ID,
29 ApiKeyId: t.apiKeyID,
30 InitiatorId: req.InitiatorID,
31 Provider: req.Provider,
32 ProviderName: req.ProviderName,
33 Model: req.Model,
34 UserAgent: req.UserAgent,
35 Client: req.Client,
36 ClientSessionId: req.ClientSessionID,
37 Metadata: marshalForProto(req.Metadata),
38 StartedAt: timestamppb.New(req.StartedAt),
39 CorrelatingToolCallId: req.CorrelatingToolCallID,
40 CredentialKind: req.CredentialKind,
41 CredentialHint: req.CredentialHint,
42 })
43 return err
44}
45
46func (t *recorderTranslation) RecordInterceptionEnded(ctx context.Context, req *aibridge.InterceptionRecordEnded) error {
47 _, err := t.client.RecordInterceptionEnded(ctx, &proto.RecordInterceptionEndedRequest{

Callers

nothing calls this directly

Calls 3

marshalForProtoFunction · 0.85
RecordInterceptionMethod · 0.65
NewMethod · 0.65

Tested by

no test coverage detected