mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat: Disable YOLO and AUTO_EDIT modes for untrusted folders (#7041)
This commit is contained in:
parent
2c6794feed
commit
ae1f67df04
9 changed files with 451 additions and 55 deletions
|
|
@ -564,6 +564,11 @@ export class Config {
|
|||
}
|
||||
|
||||
setApprovalMode(mode: ApprovalMode): void {
|
||||
if (!this.isTrustedFolder() && mode !== ApprovalMode.DEFAULT) {
|
||||
throw new Error(
|
||||
'Cannot enable privileged approval modes in an untrusted folder.',
|
||||
);
|
||||
}
|
||||
this.approvalMode = mode;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue