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

Method parseSkillInvocation

agent/query_engine.go:248–264  ·  view source on GitHub ↗
(userPrompt string)

Source from the content-addressed store, hash-verified

246func stripTaskNotificationMessages(messages []map[string]any) []map[string]any {
247 kept := make([]map[string]any, 0, len(messages))
248 for _, message := range messages {
249 metadata, _ := message["metadata"].(map[string]any)
250 if source, _ := metadata["source"].(string); source == "task_notification" {
251 continue
252 }
253 kept = append(kept, message)
254 }
255 return kept
256}
257
258func (q *QueryEngine) parseSkillInvocation(userPrompt string) (*skills.SkillSpec, string) {
259 if !q.Config.SkillsEnabled || !strings.HasPrefix(userPrompt, "/") || q.CoreEngine.skillRegistry == nil {
260 return nil, ""
261 }
262 stripped := strings.TrimSpace(strings.TrimPrefix(userPrompt, "/"))
263 if stripped == "" {
264 return nil, ""
265 }
266 cmdName, args, _ := strings.Cut(stripped, " ")
267 cmdName = strings.ToLower(strings.TrimSpace(cmdName))

Callers 1

SubmitMessageMethod · 0.95

Calls 2

ResolveSkillContextCWDFunction · 0.92
FindVisibleMethod · 0.80

Tested by

no test coverage detected