feat: add permission_mode to statusline payload + hidePermissionModeIndicator setting
Problem
i use a custom statusline via statusLine.command. i'd like to fold the ⏵⏵ bypass permissions on (shift+tab to cycle) row into my custom statusline to reclaim a screen row. two things block this:
- the statusline JSON payload doesn't include
permission_mode— so my statusline script can't render it - there's no
hidePermissionModeIndicatortoggle — so even if i render it myself, the built-in row is still shown (i'd see it twice)
the vim-mode case already has both: vim.mode in the payload + hideVimModeIndicator to suppress the -- INSERT -- line. this is the same pattern, just for permission mode.
Proposed changes
1. permission_mode in the statusline payload
the buildStatusLineCommandInput function in StatusLine.tsx calls createBaseHookInput() with no arguments:
...createBaseHookInput(),
createBaseHookInput already accepts permissionMode as its first arg and already emits permission_mode in its return type. permissionMode is already in scope. the fix is:
...createBaseHookInput(permissionMode),
the field gets dropped by JSON.stringify when undefined — so with no arg it never reaches the statusline script.
2. hidePermissionModeIndicator setting
two sub-changes:
a. settings schema (settings/types.ts): add hidePermissionModeIndicator: z.boolean().optional() alongside the existing statusLine block. describe it as "Hide the built-in permission mode indicator (useful when rendering it in a custom statusline)."
b. ModeIndicator component (PromptInputFooterLeftSide.tsx): the modePart constant renders the ⏵⏵ bypass permissions on row. wrap it to check the new setting — if hidePermissionModeIndicator is true, render null for modePart.
Prior art
hideVimModeIndicatoralready exists as a toggle for the vim mode rowvim.modealready exists in the statusline payload- this request is the permission-mode analogue of both
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗