Allow @-includes outside of workspaces (with permission) (#18470)

This commit is contained in:
Tommaso Sciortino
2026-02-09 12:24:28 -08:00
committed by GitHub
parent e73288f25f
commit 262e8384d4
17 changed files with 250 additions and 64 deletions
+5 -2
View File
@@ -143,7 +143,10 @@ class LSToolInvocation extends BaseToolInvocation<LSToolParams, ToolResult> {
this.params.dir_path,
);
const validationError = this.config.validatePathAccess(resolvedDirPath);
const validationError = this.config.validatePathAccess(
resolvedDirPath,
'read',
);
if (validationError) {
return {
llmContent: validationError,
@@ -331,7 +334,7 @@ export class LSTool extends BaseDeclarativeTool<LSToolParams, ToolResult> {
this.config.getTargetDir(),
params.dir_path,
);
return this.config.validatePathAccess(resolvedPath);
return this.config.validatePathAccess(resolvedPath, 'read');
}
protected createInvocation(