chore(repo): applied biome formatting

This commit is contained in:
can1357
2026-08-16 02:15:26 +02:00
parent 55e5da3d17
commit db056bd8cb
5 changed files with 5 additions and 13 deletions
+1 -2
View File
@@ -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)
);
}
+1 -2
View File
@@ -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;
@@ -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";
@@ -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();
}
@@ -2064,10 +2064,7 @@ export class AgentSession {
*/
#subscriberEmitGate: Promise<void> = Promise.resolve();
async #emitSessionEvent(
event: AgentSessionEvent,
options: { detachExtensions?: boolean } = {},
): Promise<void> {
async #emitSessionEvent(event: AgentSessionEvent, options: { detachExtensions?: boolean } = {}): Promise<void> {
if (event.type === "message_update") {
this.#emit(event);
void this.#queueExtensionEvent(event);