mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-02 05:31:02 +00:00
draft version of skill tool feature
This commit is contained in:
parent
5fddcd509c
commit
bd6e16d41b
22 changed files with 1891 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue