dsh-rule-engine 0.4.2 → 0.4.3
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.
|
@@ -73,7 +73,9 @@ export function operationOf(toolName, args) {
|
|
|
73
73
|
const cp = extractCopyPaths(text);
|
|
74
74
|
if (cp && cp.source) pathPrefixes.push(normalizePath(cp.source));
|
|
75
75
|
pathPrefixes = [...new Set(pathPrefixes.filter(Boolean))];
|
|
76
|
-
|
|
76
|
+
// P0-1d:主写目标优先取真实写参数(Copy-Item 的 Destination 等),
|
|
77
|
+
// 避免"源路径比目标长"时最长路径误选源(13A 误拦);授权匹配仍走多候选 pathPrefixes
|
|
78
|
+
pathPrefix = writeTargets[0] || pathPrefixes.sort((a, b) => b.length - a.length)[0] || inferPathPrefixFromText(text);
|
|
77
79
|
} else if (name === "skill") {
|
|
78
80
|
type = "skill";
|
|
79
81
|
pathPrefix = "";
|