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

Method BuildListingMessage

skills/discovery.go:39–53  ·  view source on GitHub ↗
(contextWindowTokens int, cwd string)

Source from the content-addressed store, hash-verified

37}
38
39func (d *SkillDiscovery) BuildListingMessage(contextWindowTokens int, cwd string) map[string]any {
40 text := d.GetNewSkillsAttachment(contextWindowTokens, cwd)
41 if text == nil || *text == "" {
42 return nil
43 }
44 return map[string]any{
45 "role": "user",
46 "content": []map[string]any{{"type": "text", "text": *text}},
47 "isMeta": true,
48 "metadata": map[string]any{
49 "source": SkillListingSource,
50 SkillListingMetaKey: true,
51 },
52 }
53}
54
55func (d *SkillDiscovery) FormatListing(skills []SkillSpec, budgetChars int, preserveBundled bool) string {
56 if len(skills) == 0 {

Callers 1

Calls 1

Tested by

no test coverage detected