mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Add and improve JSDoc comments for core tool methods (#3128)
This commit is contained in:
@@ -122,7 +122,11 @@ export class GlobTool extends BaseTool<GlobToolParams, ToolResult> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a path is within the root directory.
|
||||
* Checks if a given path is within the root directory bounds.
|
||||
* This security check prevents accessing files outside the designated root directory.
|
||||
*
|
||||
* @param pathToCheck The absolute path to validate
|
||||
* @returns True if the path is within the root directory, false otherwise
|
||||
*/
|
||||
private isWithinRoot(pathToCheck: string): boolean {
|
||||
const absolutePathToCheck = path.resolve(pathToCheck);
|
||||
|
||||
Reference in New Issue
Block a user