filterParts returns only the parts matching the given type.
(parts []codersdk.ChatMessagePart, t codersdk.ChatMessagePartType)
| 14 | |
| 15 | // filterParts returns only the parts matching the given type. |
| 16 | func 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 | |
| 26 | func writeSkillMetaFileInRoot(t *testing.T, skillsRoot, name, description string) string { |
| 27 | t.Helper() |
no outgoing calls
no test coverage detected