fix(explore): allow LSP and ast-grep tools
This commit is contained in:
@@ -13,12 +13,14 @@ export interface PermissionFormat {
|
||||
* Creates tool restrictions that deny specified tools.
|
||||
*/
|
||||
export function createAgentToolRestrictions(
|
||||
denyTools: string[]
|
||||
denyTools: string[],
|
||||
allowTools: string[] = [],
|
||||
): PermissionFormat {
|
||||
return {
|
||||
permission: Object.fromEntries(
|
||||
denyTools.map((tool) => [tool, "deny" as const])
|
||||
),
|
||||
permission: Object.fromEntries([
|
||||
...denyTools.map((tool) => [tool, "deny" as const]),
|
||||
...allowTools.map((tool) => [tool, "allow" as const]),
|
||||
]),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user