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

Function filterParts

agent/agentcontextconfig/api_test.go:16–24  ·  view source on GitHub ↗

filterParts returns only the parts matching the given type.

(parts []codersdk.ChatMessagePart, t codersdk.ChatMessagePartType)

Source from the content-addressed store, hash-verified

14
15// filterParts returns only the parts matching the given type.
16func filterParts(parts []codersdk.ChatMessagePart, t codersdk.ChatMessagePartType) []codersdk.ChatMessagePart {
17 var out []codersdk.ChatMessagePart
18 for _, p := range parts {
19 if p.Type == t {
20 out = append(out, p)
21 }
22 }
23 return out
24}
25
26func writeSkillMetaFileInRoot(t *testing.T, skillsRoot, name, description string) string {
27 t.Helper()

Callers 3

TestContextPartsFromDirFunction · 0.85
TestResolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected