Add a slash command to control permissions (#2474)
A slash command to control permissions https://github.com/user-attachments/assets/c0edafcd-2085-4e09-8009-ba69c4f1c153 --------- Co-authored-by: ae <ae@openai.com>
This commit is contained in:
@@ -387,6 +387,11 @@ impl App<'_> {
|
||||
widget.open_model_popup();
|
||||
}
|
||||
}
|
||||
SlashCommand::Approvals => {
|
||||
if let AppState::Chat { widget } = &mut self.app_state {
|
||||
widget.open_approvals_popup();
|
||||
}
|
||||
}
|
||||
SlashCommand::Quit => {
|
||||
break;
|
||||
}
|
||||
@@ -514,6 +519,16 @@ impl App<'_> {
|
||||
widget.set_model(model);
|
||||
}
|
||||
}
|
||||
AppEvent::UpdateAskForApprovalPolicy(policy) => {
|
||||
if let AppState::Chat { widget } = &mut self.app_state {
|
||||
widget.set_approval_policy(policy);
|
||||
}
|
||||
}
|
||||
AppEvent::UpdateSandboxPolicy(policy) => {
|
||||
if let AppState::Chat { widget } = &mut self.app_state {
|
||||
widget.set_sandbox_policy(policy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
terminal.clear()?;
|
||||
|
||||
Reference in New Issue
Block a user