MCPcopy Create free account
hub / github.com/codeaashu/claude-code / VoiceModeNoticeInner

Function VoiceModeNoticeInner

src/components/LogoV2/VoiceModeNotice.tsx:23–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 return t0;
22}
23function VoiceModeNoticeInner() {
24 const $ = _c(4);
25 const [show] = useState(_temp);
26 let t0;
27 let t1;
28 if ($[0] !== show) {
29 t0 = () => {
30 if (!show) {
31 return;
32 }
33 const newCount = (getGlobalConfig().voiceNoticeSeenCount ?? 0) + 1;
34 saveGlobalConfig(prev => {
35 if ((prev.voiceNoticeSeenCount ?? 0) >= newCount) {
36 return prev;
37 }
38 return {
39 ...prev,
40 voiceNoticeSeenCount: newCount
41 };
42 });
43 };
44 t1 = [show];
45 $[0] = show;
46 $[1] = t0;
47 $[2] = t1;
48 } else {
49 t0 = $[1];
50 t1 = $[2];
51 }
52 useEffect(t0, t1);
53 if (!show) {
54 return null;
55 }
56 let t2;
57 if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
58 t2 = <Box paddingLeft={2}><AnimatedAsterisk /><Text dimColor={true}> Voice mode is now available · /voice to enable</Text></Box>;
59 $[3] = t2;
60 } else {
61 t2 = $[3];
62 }
63 return t2;
64}
65function _temp() {
66 return isVoiceModeEnabled() && getInitialSettings().voiceEnabled !== true && (getGlobalConfig().voiceNoticeSeenCount ?? 0) < MAX_SHOW_COUNT && !shouldShowOpus1mMergeNotice();
67}

Callers

nothing calls this directly

Calls 2

getGlobalConfigFunction · 0.85
saveGlobalConfigFunction · 0.85

Tested by

no test coverage detected