fix: add typeof TungstenPill guard (partial cherry-pick a02a9fc)

8645d37 (Auth header) and a889ed8 (Gates reference) already present in CCP.
This commit is contained in:
James Feng 2026-06-04 14:58:21 +08:00
parent d0278e89c0
commit 8485589ca7

View File

@ -351,7 +351,9 @@ function ModeIndicator({
// its click-target Box isn't nested inside the <Text wrap="truncate">
// wrapper (reconciler throws on Box-in-Text).
// Tmux pill (ant-only) — appears right after tasks in nav order
...(process.env.USER_TYPE === 'ant' && hasTmuxSession ? [<TungstenPill key="tmux" selected={tmuxSelected} />] : []),
...(process.env.USER_TYPE === 'ant' && hasTmuxSession && typeof TungstenPill === 'function'
? [<TungstenPill key="tmux" selected={tmuxSelected} />]
: []),
...(isAgentSwarmsEnabled() && hasTeams
? [<TeamStatus key="teams" teamsSelected={teamsSelected} showHint={showHint && !hasBackgroundTasks} />]
: []),