draft version of skill tool feature

This commit is contained in:
tanzhenxin 2025-12-10 17:18:44 +08:00
parent 5fddcd509c
commit bd6e16d41b
22 changed files with 1891 additions and 9 deletions

View file

@ -120,6 +120,10 @@ export function makeRelative(
const resolvedTargetPath = path.resolve(targetPath);
const resolvedRootDirectory = path.resolve(rootDirectory);
if (!isSubpath(resolvedRootDirectory, resolvedTargetPath)) {
return resolvedTargetPath;
}
const relativePath = path.relative(resolvedRootDirectory, resolvedTargetPath);
// If the paths are the same, path.relative returns '', return '.' instead