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

Function getPluginDirs

server/index.js:704–721  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

702};
703
704const getPluginDirs = () => {
705 const roots = getSearchRoots();
706 const dirs = [];
707
708 for (const root of roots) {
709 const pluginDir = path.join(root, 'plugin');
710 if (fs.existsSync(pluginDir)) {
711 dirs.push({ path: pluginDir, source: 'plugin-dir', root });
712 }
713
714 const pluginsDir = path.join(root, 'plugins');
715 if (fs.existsSync(pluginsDir)) {
716 dirs.push({ path: pluginsDir, source: 'plugins-dir', root });
717 }
718 }
719
720 return dirs;
721};
722
723const loadCommandsFromDir = (dirInfo) => {
724 const commands = [];

Callers 2

aggregatePluginsFunction · 0.85
index.jsFile · 0.85

Calls 1

getSearchRootsFunction · 0.85

Tested by

no test coverage detected