reflect permission-mode changes in the status line
setPermissionMode only wrote the control_request; the mode was never folded back into the session status, so the badge and Ctrl/Cmd+M looked dead. Optimistically merge + emit the new mode immediately; the next system/init still reconciles. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -674,6 +674,11 @@ class StreamJsonSession {
|
||||
'request_id': 'set-perm-${_localSeq++}',
|
||||
'request': {'subtype': 'set_permission_mode', 'mode': mode},
|
||||
}));
|
||||
// Optimistically reflect the change so the badge / status line update
|
||||
// immediately (T-250) — the control_request emits no status event, and a
|
||||
// fresh system/init only arrives later. The next init reconciles if the
|
||||
// process ends up in a different mode.
|
||||
_mergeStatus(SessionStatus(permissionMode: mode));
|
||||
}
|
||||
|
||||
Future<void> dispose() async {
|
||||
|
||||
Reference in New Issue
Block a user