MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / StripSkillContextMessages

Function StripSkillContextMessages

skills/runtime.go:30–43  ·  view source on GitHub ↗
(messages []map[string]any, sources map[string]struct{})

Source from the content-addressed store, hash-verified

28}
29
30func StripSkillContextMessages(messages []map[string]any, sources map[string]struct{}) []map[string]any {
31 if sources == nil {
32 sources = SkillTransientSources
33 }
34 var kept []map[string]any
35 for _, message := range messages {
36 metadata, _ := message["metadata"].(map[string]any)
37 source, _ := metadata["source"].(string)
38 if _, drop := sources[source]; !drop {
39 kept = append(kept, message)
40 }
41 }
42 return kept
43}
44
45func ResolveSkillContextCWD(defaultCWD string, context map[string]any) string {
46 if context != nil {

Calls

no outgoing calls