mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-03 04:17:54 +00:00
fix(ui): widen getCodexWindowKind parameter to accept CodexWindowSummary
The new helpers added in this PR (inferCodeReviewCadence, getCodexWindowDisplayLabel) operate on CodexWindowSummary - a Pick subset of CodexQuotaWindow without usedPercent/remainingPercent/resetAt. They pass that subset into getCodexWindowKind, which was still typed as string | CodexQuotaWindow, so tsc -b fails with TS2345 in CI. The function only reads label/category/cadence, all of which exist on CodexWindowSummary, so widening the parameter is safe and lets a real CodexQuotaWindow continue to flow through unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
a90aadd202
commit
0e602932f2
+1
-1
@@ -340,7 +340,7 @@ export type CodexWindowKind =
|
|||||||
* Map a Codex window into a semantic bucket. Prefers explicit category metadata
|
* Map a Codex window into a semantic bucket. Prefers explicit category metadata
|
||||||
* (post-2026-04 windows) and falls back to label sniffing for legacy cached data.
|
* (post-2026-04 windows) and falls back to label sniffing for legacy cached data.
|
||||||
*/
|
*/
|
||||||
export function getCodexWindowKind(labelOrWindow: string | CodexQuotaWindow): CodexWindowKind {
|
export function getCodexWindowKind(labelOrWindow: string | CodexWindowSummary): CodexWindowKind {
|
||||||
if (typeof labelOrWindow === 'object' && labelOrWindow !== null) {
|
if (typeof labelOrWindow === 'object' && labelOrWindow !== null) {
|
||||||
const w = labelOrWindow;
|
const w = labelOrWindow;
|
||||||
if (w.category === 'additional' && w.cadence) {
|
if (w.category === 'additional' && w.cadence) {
|
||||||
|
|||||||
Reference in New Issue
Block a user