diff --git a/packages/ai/src/error/rate-limit.ts b/packages/ai/src/error/rate-limit.ts index e44cffcca..4a302ade4 100644 --- a/packages/ai/src/error/rate-limit.ts +++ b/packages/ai/src/error/rate-limit.ts @@ -86,8 +86,7 @@ const DASHSCOPE_TOKEN_LIMIT_MESSAGE_PATTERN = /** True for DashScope/Bailian's documented OpenAI-compatible TPM/TPS throttle. */ export function isDashScopeTokenLimitText(errorMessage: string): boolean { return ( - DASHSCOPE_TOKEN_LIMIT_DOC_PATTERN.test(errorMessage) && - DASHSCOPE_TOKEN_LIMIT_MESSAGE_PATTERN.test(errorMessage) + DASHSCOPE_TOKEN_LIMIT_DOC_PATTERN.test(errorMessage) && DASHSCOPE_TOKEN_LIMIT_MESSAGE_PATTERN.test(errorMessage) ); } diff --git a/packages/ai/src/oneshot-retry.ts b/packages/ai/src/oneshot-retry.ts index 0470625e1..e04d0d09c 100644 --- a/packages/ai/src/oneshot-retry.ts +++ b/packages/ai/src/oneshot-retry.ts @@ -177,8 +177,7 @@ export async function retryTransientCompletion( ? thrown.message : String(thrown) : ((message as AssistantMessage).errorMessage ?? "unknown error"); - const errorStatus = - thrown !== undefined ? AIError.status(thrown) : (message as AssistantMessage).errorStatus; + const errorStatus = thrown !== undefined ? AIError.status(thrown) : (message as AssistantMessage).errorStatus; const lastAttempt = attempt >= maxAttempts; if (lastAttempt || !isRetryableOneshotFailure(errorId, errorStatus, errorMessage)) { if (thrown !== undefined) throw thrown; diff --git a/packages/coding-agent/src/edit/hashline/execute.ts b/packages/coding-agent/src/edit/hashline/execute.ts index 892354da6..ac573866d 100644 --- a/packages/coding-agent/src/edit/hashline/execute.ts +++ b/packages/coding-agent/src/edit/hashline/execute.ts @@ -11,7 +11,6 @@ * round-trip once. */ import { randomUUID } from "node:crypto"; -import { prompt } from "@oh-my-pi/pi-utils"; import { type BlockResolution, buildCompactDiffPreview, @@ -29,6 +28,7 @@ import { UnseenLinesError, } from "@oh-my-pi/hashline"; import type { AgentToolResult } from "@oh-my-pi/pi-agent-core"; +import { prompt } from "@oh-my-pi/pi-utils"; import type { FileDiagnosticsResult, WritethroughCallback, WritethroughDeferredHandle } from "../../lsp"; import type { ToolSession } from "../../tools"; import { outputMeta, resolveArtifactSpillThresholdBytes } from "../../tools/output-meta"; diff --git a/packages/coding-agent/src/modes/interactive-mode.ts b/packages/coding-agent/src/modes/interactive-mode.ts index 95087cfac..78a41674d 100644 --- a/packages/coding-agent/src/modes/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive-mode.ts @@ -4447,10 +4447,7 @@ export class InteractiveMode implements InteractiveModeContext { return; } - this.#welcomeComponent.setModel( - this.session.model?.name ?? "Unknown", - this.session.model?.provider ?? "Unknown", - ); + this.#welcomeComponent.setModel(this.session.model?.name ?? "Unknown", this.session.model?.provider ?? "Unknown"); this.ui.requestRender(); } diff --git a/packages/coding-agent/src/session/agent-session.ts b/packages/coding-agent/src/session/agent-session.ts index 1ecaa5bdd..4773e0e28 100644 --- a/packages/coding-agent/src/session/agent-session.ts +++ b/packages/coding-agent/src/session/agent-session.ts @@ -2064,10 +2064,7 @@ export class AgentSession { */ #subscriberEmitGate: Promise = Promise.resolve(); - async #emitSessionEvent( - event: AgentSessionEvent, - options: { detachExtensions?: boolean } = {}, - ): Promise { + async #emitSessionEvent(event: AgentSessionEvent, options: { detachExtensions?: boolean } = {}): Promise { if (event.type === "message_update") { this.#emit(event); void this.#queueExtensionEvent(event);