Support inline permission profile selection with /permissions (#54383)

## What changed

Allow `/permissions <profile-id>` to select a built-in or custom permission profile, for example `/permissions :read-only`. Support `:ask-for-approval` and `:approve-for-me` aliases while preserving feature gates, profile requirements, full-access confirmation, and Windows sandbox setup.

Hold queued input until the selection is confirmed, and retain it on cancellation or failure. Reload custom profile definitions on re-selection without leaving unchanged requests pending.

## Testing

Add coverage for unknown and disabled profiles, approval aliases, confirmation and cancellation, discovery retries, Windows sandbox setup, and queued prompts waiting for server confirmation.

GitOrigin-RevId: ada38d3cfc6d6ac4e84ce5645fe33432c55d63cc
This commit is contained in:
Felipe Coury
2026-10-15 19:09:34 +00:00
committed by copyberry
parent 111362a6a0
commit b095b2ef23
18 changed files with 770 additions and 69 deletions
@@ -125,6 +125,12 @@ impl ChatWidget {
}
pub(super) fn on_modal_or_popup_closed(&mut self) {
if self.apply_pending_permission_profile() {
return;
}
if self.cancel_pending_permission_profile_selection() {
return;
}
if self.input_queue.suppress_queue_autosend {
self.app_event_tx.send(AppEvent::SettingsSelectionClosed);
} else {