(props: Props)
| 60 | // hook call chains. Without this split, toggling /brief mid-render would |
| 61 | // violate Rules of Hooks (the inner variant calls ~10 more hooks). |
| 62 | export function SpinnerWithVerb(props: Props): React.ReactNode { |
| 63 | const isBriefOnly = useAppState(s => s.isBriefOnly); |
| 64 | // REPL overrides isBriefOnly→false when viewing a teammate transcript |
| 65 | // (see isBriefOnly={viewedTeammateTask ? false : isBriefOnly}). That |
| 66 | // prop isn't threaded here, so replicate the gate from the store — |
| 67 | // teammate view needs the real spinner (which shows teammate status). |
| 68 | const viewingAgentTaskId = useAppState(s_0 => s_0.viewingAgentTaskId); |
| 69 | // Hoisted to mount-time — this component re-renders at animation framerate. |
| 70 | const briefEnvEnabled = feature('KAIROS') || feature('KAIROS_BRIEF') ? |
| 71 | // biome-ignore lint/correctness/useHookAtTopLevel: feature() is a compile-time constant |
| 72 | useMemo(() => isEnvTruthy(process.env.CLAUDE_CODE_BRIEF), []) : false; |
| 73 | |
| 74 | // Runtime gate mirrors isBriefEnabled() but inlined — importing from |
| 75 | // BriefTool.ts would leak tool-name strings into external builds. Single |
| 76 | // spinner instance → hooks stay unconditional (two subs, negligible). |
| 77 | if ((feature('KAIROS') || feature('KAIROS_BRIEF')) && (getKairosActive() || getUserMsgOptIn() && (briefEnvEnabled || getFeatureValue_CACHED_MAY_BE_STALE('tengu_kairos_brief', false))) && isBriefOnly && !viewingAgentTaskId) { |
| 78 | return <BriefSpinner mode={props.mode} overrideMessage={props.overrideMessage} />; |
| 79 | } |
| 80 | return <SpinnerWithVerbInner {...props} />; |
| 81 | } |
| 82 | function SpinnerWithVerbInner({ |
| 83 | mode, |
| 84 | loadingStartTimeRef, |
nothing calls this directly
no test coverage detected