fix(claude): surface usage-limit pauses #6639
Closedflamboh(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/6639/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
flamboh(GitHub profile, opens in a new tab) closed this
- @@ -715,3 +720,4 @@715720 layout={COMPOSER_LAYOUT_TRANSITION}716721 style={{ maxWidth: props.contentMaxWidth }}717722 >723+ {usageLimitCopy ? (@@ -0,0 +30,21 @@30+ new Date(timestamp),31+ );32+}33+34+export function readUsageLimit(value: unknown): UsageLimitNotice | null {35+ if (!value || typeof value !== "object") return null;36+ const notice = value as Partial<UsageLimitNotice>;37+ if (38+ typeof notice.occurrenceId !== "string" ||39+ typeof notice.provider !== "string" ||40+ typeof notice.message !== "string"41+ ) {42+ return null;43+ }44+ return {45+ occurrenceId: notice.occurrenceId,46+ provider: notice.provider,47+ message: notice.message,48+ ...(typeof notice.resetsAt === "number" && Number.isFinite(notice.resetsAt)49+ ? { resetsAt: notice.resetsAt }50+ : {}),@@ -0,0 +32,21 @@32+ );33+}34+35+export function readUsageLimit(value: unknown): UsageLimitNotice | null {36+ if (!value || typeof value !== "object") return null;37+ const notice = value as Partial<UsageLimitNotice>;38+ if (39+ typeof notice.occurrenceId !== "string" ||40+ typeof notice.provider !== "string" ||41+ typeof notice.message !== "string"42+ ) {43+ return null;44+ }45+ return {46+ occurrenceId: notice.occurrenceId,47+ provider: notice.provider,48+ message: notice.message,49+ ...(notice.windowType === undefined ? {} : { windowType: notice.windowType }),50+ ...(typeof notice.resetsAt === "number" && Number.isFinite(notice.resetsAt)51+ ? { resetsAt: notice.resetsAt }52+ : {}),
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
55976d48-b69c-430d-9411-0f99bba259d8You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share