mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-20 01:01:53 +00:00
fix(acp): add missing await for async isToolEnabled in Session.runTool
PermissionManager.isToolEnabled was changed to async in this PR but the call site in Session.runTool was not updated, causing the Promise to be evaluated as a truthy value and the L1 tool-enablement check to always pass — effectively disabling permission denial in the ACP session path.
This commit is contained in:
parent
585bce06d2
commit
cb97bf6068
1 changed files with 1 additions and 1 deletions
|
|
@ -590,7 +590,7 @@ export class Session implements SessionContext {
|
|||
|
||||
// ---- L1: Tool enablement check ----
|
||||
const pm = this.config.getPermissionManager?.();
|
||||
if (pm && !pm.isToolEnabled(fc.name as string)) {
|
||||
if (pm && !(await pm.isToolEnabled(fc.name as string))) {
|
||||
return earlyErrorResponse(
|
||||
new Error(
|
||||
`Qwen Code requires permission to use "${fc.name}", but that permission was declined.`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue