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

Function metadataToMap

coderd/aibridgedserver/aibridgedserver.go:678–690  ·  view source on GitHub ↗
(in map[string]*anypb.Any)

Source from the content-addressed store, hash-verified

676}
677
678func metadataToMap(in map[string]*anypb.Any) map[string]any {
679 meta := make(map[string]any, len(in))
680 for k, v := range in {
681 if v == nil {
682 continue
683 }
684 var sv structpb.Value
685 if err := v.UnmarshalTo(&sv); err == nil {
686 meta[k] = sv.AsInterface()
687 }
688 }
689 return meta
690}

Callers 5

RecordInterceptionMethod · 0.85
RecordTokenUsageMethod · 0.85
RecordPromptUsageMethod · 0.85
RecordToolUsageMethod · 0.85
RecordModelThoughtMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected