( limits: ClaudeAILimits, model: string, )
| 126 | * Returns the warning message string or null if no warning should be shown |
| 127 | */ |
| 128 | export 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 | |
| 143 | function getLimitReachedText(limits: ClaudeAILimits, model: string): string { |
| 144 | const resetsAt = limits.resetsAt |
no test coverage detected