MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / buildSkillMenuText

Function buildSkillMenuText

packages/node-runtime/src/ai/skill-menu.ts:22–31  ·  view source on GitHub ↗
(lines: readonly string[])

Source from the content-addressed store, hash-verified

20}
21
22export function buildSkillMenuText(lines: readonly string[]): string | null {
23 const visibleLines = normalizeSkillMenuLines(lines)
24 if (visibleLines.length === 0) return null
25
26 return `${SKILL_MENU_HEADER}
27
28${visibleLines.join('\n')}
29
30${SKILL_MENU_CLOSING}`
31}
32
33export function appendSkillMenuLines(baseMenu: string | null | undefined, lines: readonly string[]): string | null {
34 const visibleLines = normalizeSkillMenuLines(lines)

Callers 4

getSkillMenuMethod · 0.90
skill-menu.test.tsFile · 0.90
appendSkillMenuLinesFunction · 0.85

Calls 1

normalizeSkillMenuLinesFunction · 0.85

Tested by

no test coverage detected