MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getRateLimitWarning

Function getRateLimitWarning

src/services/rateLimitMessages.ts:128–141  ·  view source on GitHub ↗
(
  limits: ClaudeAILimits,
  model: string,
)

Source from the content-addressed store, hash-verified

126 * Returns the warning message string or null if no warning should be shown
127 */
128export function getRateLimitWarning(
129 limits: ClaudeAILimits,
130 model: string,
131): string | null {
132 const message = getRateLimitMessage(limits, model)
133
134 // Only return warnings for the footer - errors are shown in AssistantTextMessages
135 if (message && message.severity === 'warning') {
136 return message.message
137 }
138
139 // Don't show errors in the footer
140 return null
141}
142
143function getLimitReachedText(limits: ClaudeAILimits, model: string): string {
144 const resetsAt = limits.resetsAt

Callers 1

Calls 1

getRateLimitMessageFunction · 0.85

Tested by

no test coverage detected