facult 2.17.13 → 2.17.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ai.ts +8 -2
package/package.json
CHANGED
package/src/ai.ts
CHANGED
|
@@ -870,8 +870,11 @@ function inferProposalKind(args: {
|
|
|
870
870
|
targetPath: string | null;
|
|
871
871
|
targetKind?: GraphNodeKind | null;
|
|
872
872
|
}): ProposalKind {
|
|
873
|
+
if (args.targetKind === "skill" && args.targetPath) {
|
|
874
|
+
return "update_asset";
|
|
875
|
+
}
|
|
873
876
|
if (args.target.includes("/skills/") || args.target.endsWith("/SKILL.md")) {
|
|
874
|
-
return "add_skill";
|
|
877
|
+
return args.targetPath ? "update_asset" : "add_skill";
|
|
875
878
|
}
|
|
876
879
|
if (args.target.includes("/snippets/")) {
|
|
877
880
|
return "extract_snippet";
|
|
@@ -1626,7 +1629,10 @@ async function resolveProposalTargetNode(
|
|
|
1626
1629
|
homeDir,
|
|
1627
1630
|
rootDir: args.rootDir,
|
|
1628
1631
|
});
|
|
1629
|
-
const pathValue =
|
|
1632
|
+
const pathValue =
|
|
1633
|
+
node?.kind === "skill" && node.path
|
|
1634
|
+
? join(node.path, "SKILL.md")
|
|
1635
|
+
: (node?.path ?? fallbackPath);
|
|
1630
1636
|
if (!pathValue) {
|
|
1631
1637
|
throw new Error(`Could not resolve target path for ${target}`);
|
|
1632
1638
|
}
|