MCPcopy Create free account
hub / github.com/Roy3838/Observer / extractAgentConfig

Function extractAgentConfig

app/src/utils/agentParser.ts:40–44  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

38 * @returns The content inside the $$$ block, or null if not found.
39 */
40export function extractAgentConfig(text: string): string | null {
41 const agentBlockRegex = /\$\$\$\s*\n?([\s\S]*?)\n?\$\$\$/;
42 const match = text.match(agentBlockRegex);
43 return match && match[1] ? match[1].trim() : null;
44}
45
46/**
47 * Extracts all agent configuration blocks from a string.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected