The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | export function splitAndroidHeaderActions<Action extends { readonly overflowOnly?: boolean }>( |
| 2 | actions: ReadonlyArray<Action>, |
| 3 | wide: boolean, |
| 4 | ) { |
| 5 | const inline = actions.filter((action) => !action.overflowOnly); |
| 6 | const directCount = actions.length > 2 ? (wide ? 3 : 1) : inline.length; |
| 7 | const visibleActions = inline.slice(0, directCount); |
| 8 | return { |
| 9 | visibleActions, |
| 10 | overflowActions: actions.filter((action) => !visibleActions.includes(action)), |
| 11 | }; |
| 12 | } |