MCPcopy
hub / github.com/codeaashu/claude-code / Notifications

Function Notifications

src/components/PromptInput/Notifications.tsx:55–209  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

53 isNarrow?: boolean;
54};
55export function Notifications(t0) {
56 const $ = _c(34);
57 const {
58 apiKeyStatus,
59 autoUpdaterResult,
60 debug,
61 isAutoUpdating,
62 verbose,
63 messages,
64 onAutoUpdaterResult,
65 onChangeIsUpdating,
66 ideSelection,
67 mcpClients,
68 isInputWrapped: t1,
69 isNarrow: t2
70 } = t0;
71 const isInputWrapped = t1 === undefined ? false : t1;
72 const isNarrow = t2 === undefined ? false : t2;
73 let t3;
74 if ($[0] !== messages) {
75 const messagesForTokenCount = getMessagesAfterCompactBoundary(messages);
76 t3 = tokenCountFromLastAPIResponse(messagesForTokenCount);
77 $[0] = messages;
78 $[1] = t3;
79 } else {
80 t3 = $[1];
81 }
82 const tokenUsage = t3;
83 const mainLoopModel = useMainLoopModel();
84 let t4;
85 if ($[2] !== mainLoopModel || $[3] !== tokenUsage) {
86 t4 = calculateTokenWarningState(tokenUsage, mainLoopModel);
87 $[2] = mainLoopModel;
88 $[3] = tokenUsage;
89 $[4] = t4;
90 } else {
91 t4 = $[4];
92 }
93 const isShowingCompactMessage = t4.isAboveWarningThreshold;
94 const {
95 status: ideStatus
96 } = useIdeConnectionStatus(mcpClients);
97 const notifications = useAppState(_temp);
98 const {
99 addNotification,
100 removeNotification
101 } = useNotifications();
102 const claudeAiLimits = useClaudeAiLimits();
103 let t5;
104 let t6;
105 if ($[5] !== addNotification) {
106 t5 = () => {
107 setEnvHookNotifier((text, isError) => {
108 addNotification({
109 key: "env-hook",
110 text,
111 color: isError ? "error" : undefined,
112 priority: isError ? "medium" : "low",

Callers

nothing calls this directly

Calls 12

useMainLoopModelFunction · 0.85
useIdeConnectionStatusFunction · 0.85
useAppStateFunction · 0.85
useClaudeAiLimitsFunction · 0.85
setEnvHookNotifierFunction · 0.85
getSubscriptionTypeFunction · 0.85
logEventFunction · 0.85
toIDEDisplayNameFunction · 0.85
useNotificationsFunction · 0.50

Tested by

no test coverage detected