MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / loadCommands

Function loadCommands

scripts/tmux/tmux-viewer/session-loader.ts:52–62  ·  view source on GitHub ↗

* Load commands from commands.yaml

(sessionDir: string)

Source from the content-addressed store, hash-verified

50 * Load commands from commands.yaml
51 */
52async function loadCommands(sessionDir: string): Promise<Command[]> {
53 const commandsPath = path.join(sessionDir, 'commands.yaml')
54
55 try {
56 const content = await fs.readFile(commandsPath, 'utf-8')
57 const commands = yaml.load(content) as Command[]
58 return commands || []
59 } catch {
60 return []
61 }
62}
63
64/**
65 * Parse YAML front-matter from a capture file

Callers 1

loadSessionFunction · 0.85

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected