MCPcopy Create free account
hub / github.com/Microck/opencode-studio / getAgentDirs

Function getAgentDirs

server/index.js:884–896  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

882};
883
884const getAgentDirs = () => {
885 const roots = getSearchRoots();
886 const dirs = [];
887
888 for (const root of roots) {
889 dirs.push(path.join(root, 'agents'));
890 dirs.push(path.join(root, 'agent'));
891 dirs.push(path.join(root, '.opencode', 'agents'));
892 dirs.push(path.join(root, '.opencode', 'agent'));
893 }
894
895 return [...new Set(dirs)];
896};
897
898const parseAgentMarkdown = (content) => {
899 const match = content.match(/^---\s*\r?\n([\s\S]*?)\r?\n---\s*\r?\n?([\s\S]*)$/);

Callers 2

aggregateAgentsFunction · 0.85
index.jsFile · 0.85

Calls 1

getSearchRootsFunction · 0.85

Tested by

no test coverage detected