diff --git a/packages/ai/src/error/rate-limit.ts b/packages/ai/src/error/rate-limit.ts index 295ba1e61..65e4dc653 100644 --- a/packages/ai/src/error/rate-limit.ts +++ b/packages/ai/src/error/rate-limit.ts @@ -27,9 +27,7 @@ const SUBSCRIPTION_CAP_PATTERN = const TRANSIENT_INTERVAL_RATE_LIMIT_PATTERN = /\bper\s+(?:second|minute)\b/i; function matchesSubscriptionCapText(errorMessage: string): boolean { - return ( - SUBSCRIPTION_CAP_PATTERN.test(errorMessage) && !TRANSIENT_INTERVAL_RATE_LIMIT_PATTERN.test(errorMessage) - ); + return SUBSCRIPTION_CAP_PATTERN.test(errorMessage) && !TRANSIENT_INTERVAL_RATE_LIMIT_PATTERN.test(errorMessage); } const OPENROUTER_DAILY_FREE_LIMIT_PATTERN = /\bfree[-_ ]models[-_ ]per[-_ ]day\b/i; // gRPC/Connect end-streams carry the status as its name (`resource_exhausted`), @@ -67,8 +65,7 @@ const CN_TRANSIENT_CAP_PATTERN = // Common Simplified Chinese throttle phrasing. Consulted by // isOpaqueStatusBody so CN transients stay in the provider backoff lane instead // of rotating through the opaque-429 fallback. -const CN_THROTTLE_PATTERN = - /速率(?:限制|过快)|频率(?:过高|过快)|过于频繁|稍后[重再]试/; +const CN_THROTTLE_PATTERN = /速率(?:限制|过快)|频率(?:过高|过快)|过于频繁|稍后[重再]试/; /** * Classify a rate-limit error message into a reason category. diff --git a/packages/coding-agent/src/modes/controllers/input-controller.ts b/packages/coding-agent/src/modes/controllers/input-controller.ts index 3d5841a4e..3506c214d 100644 --- a/packages/coding-agent/src/modes/controllers/input-controller.ts +++ b/packages/coding-agent/src/modes/controllers/input-controller.ts @@ -292,7 +292,8 @@ export class InputController { this.ctx.ui.addInputListener(data => { if (!this.ctx.keybindings.matches(data, "app.tools.expand")) return undefined; if (this.ctx.ui.hasOverlay()) return undefined; - if (this.ctx.ui.getFocused() instanceof TreeSelectorComponent && matchesKey(data, "ctrl+o")) return undefined; + if (this.ctx.ui.getFocused() instanceof TreeSelectorComponent && matchesKey(data, "ctrl+o")) + return undefined; this.toggleToolOutputExpansion(); return { consume: true }; }); diff --git a/packages/coding-agent/test/input-controller-keybindings.test.ts b/packages/coding-agent/test/input-controller-keybindings.test.ts index 3ff9c6a13..4b668b5d5 100644 --- a/packages/coding-agent/test/input-controller-keybindings.test.ts +++ b/packages/coding-agent/test/input-controller-keybindings.test.ts @@ -747,7 +747,15 @@ describe("InputController global tool-output expand (ctrl+o)", () => { children: [], }, ] as unknown as SessionTreeNode[]; - context.setFocused(new TreeSelectorComponent(tree, "root", 20, () => {}, () => {})); + context.setFocused( + new TreeSelectorComponent( + tree, + "root", + 20, + () => {}, + () => {}, + ), + ); expect(dispatchInput(listeners, "\x18")).toEqual({ consume: true }); expect(context.ctx.toolOutputExpanded).toBe(true); diff --git a/packages/coding-agent/test/status-line-overflow.test.ts b/packages/coding-agent/test/status-line-overflow.test.ts index 112febc33..77a1a97df 100644 --- a/packages/coding-agent/test/status-line-overflow.test.ts +++ b/packages/coding-agent/test/status-line-overflow.test.ts @@ -26,7 +26,12 @@ afterAll(() => { }); /** Minimal SegmentContext factory — only path/git fields matter for these tests. */ -function createCtx(overrides?: { pathMaxLength?: number; branch?: string | null; sessionName?: string; sessionAccent?: boolean }): SegmentContext { +function createCtx(overrides?: { + pathMaxLength?: number; + branch?: string | null; + sessionName?: string; + sessionAccent?: boolean; +}): SegmentContext { const hasName = overrides?.sessionName !== undefined; return { session: { diff --git a/packages/utils/src/frontmatter.ts b/packages/utils/src/frontmatter.ts index 7e8ad8e67..47a8f6c1f 100644 --- a/packages/utils/src/frontmatter.ts +++ b/packages/utils/src/frontmatter.ts @@ -126,7 +126,15 @@ export function parseFrontmatter( content: string, options?: FrontmatterOptions, ): { frontmatter: Record; body: string } { - const { location, source, fallback, normalize = true, level = "warn", repair = true, rawKeys = false } = options ?? {}; + const { + location, + source, + fallback, + normalize = true, + level = "warn", + repair = true, + rawKeys = false, + } = options ?? {}; const finalizeKeys = (fm: Record): Record => rawKeys ? fm : normalizeFrontmatterKeys(fm); const loc = location ?? source;