MCP add tool
This commit is contained in:
parent
7e88fbc347
commit
6545b53310
@ -15,7 +15,7 @@ export function handleAdd(registry: ComponentRegistry, input: AddInput): AddResu
|
|||||||
if (!comp || !comp.hasStyledVersion) return null;
|
if (!comp || !comp.hasStyledVersion) return null;
|
||||||
|
|
||||||
const kebab = toKebab(comp.meta.name);
|
const kebab = toKebab(comp.meta.name);
|
||||||
const registryDir = resolve(import.meta.dirname, "../../registry/src/components");
|
const registryDir = resolve(import.meta.dirname, "../../../registry/src/components");
|
||||||
const sourcePath = join(registryDir, `${kebab}.tsx`);
|
const sourcePath = join(registryDir, `${kebab}.tsx`);
|
||||||
|
|
||||||
try { accessSync(sourcePath); } catch { return null; }
|
try { accessSync(sourcePath); } catch { return null; }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user