mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Discover permission profiles from the app server (#42453)
## Why The permissions menu needs to reflect the profiles and configuration requirements available in the active app-server scope, including remote workspaces. ## What changed - Load permission profiles and configuration requirements asynchronously when opening the permissions menu, using the active thread working directory. - Render loading, retry, empty-catalog, and unsupported-server states, and fall back to the legacy permissions menu when explicit profiles are not configured. - Disable profiles rejected by server requirements or unavailable in the catalog. Remote custom profiles remain visible but cannot yet be selected. - Bound pagination and request time, reject malformed catalogs, and ignore responses made stale by account, thread, or modal changes. ## Testing - Cover local, session-only, remote, legacy, empty, unsupported, pagination, malformed-response, and timeout discovery paths. - Add TUI tests for loading, failures, retries, empty results, remote catalogs, stale responses, and working-directory changes. GitOrigin-RevId: 3e2ab53a4eae1179587d064f9a4c605765ea7880
This commit is contained in:
1 parent
8b8ee28a9b
commit
c9fecd3fa0
19 files changed
+797
-22
No files matched your search
@@ -15,11 +15,22 @@ impl ChatWidget {
|
||||
|
||||
/// Open a popup to choose the permissions mode.
|
||||
pub(crate) fn open_permissions_popup(&mut self) {
|
||||
if self.config.explicit_permission_profile_mode {
|
||||
self.open_permission_profiles_popup();
|
||||
if self.config.explicit_permission_profile_mode
|
||||
|| self.permission_profiles_menu_opened
|
||||
|| self
|
||||
.config
|
||||
.permissions
|
||||
.active_permission_profile()
|
||||
.is_some_and(|profile| !profile.id.starts_with(':'))
|
||||
{
|
||||
self.request_permission_profiles();
|
||||
return;
|
||||
}
|
||||
|
||||
self.open_legacy_permissions_popup();
|
||||
}
|
||||
|
||||
pub(super) fn open_legacy_permissions_popup(&mut self) {
|
||||
let include_read_only = cfg!(target_os = "windows");
|
||||
let current_approval =
|
||||
AskForApproval::from(self.config.permissions.approval_policy.value());
|
||||
|
||||
Reference in new issue
Block a user