From efc90d26b816b7ba55532bb7a45a371676cc4527 Mon Sep 17 00:00:00 2001 From: can1357 Date: Thu, 9 Jul 2026 18:34:06 +0200 Subject: [PATCH] style: applied biome fixes to integrated issue fixes --- packages/ai/test/cursor-exec-handlers.test.ts | 4 ++-- packages/coding-agent/src/config/model-registry.ts | 7 ++++++- .../src/modes/components/tool-execution.ts | 3 ++- .../coding-agent/test/bundled-agent-parsing.test.ts | 5 +---- .../test/internal-urls/memory-protocol.test.ts | 10 +++++++++- packages/coding-agent/test/rpc-skill-command.test.ts | 8 +++++++- 6 files changed, 27 insertions(+), 10 deletions(-) diff --git a/packages/ai/test/cursor-exec-handlers.test.ts b/packages/ai/test/cursor-exec-handlers.test.ts index c79b0e12d..5063e81ec 100644 --- a/packages/ai/test/cursor-exec-handlers.test.ts +++ b/packages/ai/test/cursor-exec-handlers.test.ts @@ -1,5 +1,5 @@ -import { create } from "@bufbuild/protobuf"; import { describe, expect, it } from "bun:test"; +import { create } from "@bufbuild/protobuf"; import { type BlockState, buildCursorHistoryForTest, @@ -10,7 +10,7 @@ import { streamCursor, type ToolCallState, } from "@oh-my-pi/pi-ai/providers/cursor"; -import { setCursorProviderModule, streamCursor as lazyStreamCursor } from "@oh-my-pi/pi-ai/providers/register-builtins"; +import { streamCursor as lazyStreamCursor, setCursorProviderModule } from "@oh-my-pi/pi-ai/providers/register-builtins"; import type { AssistantMessage, Context, CursorExecHandlers, Model, ToolResultMessage } from "@oh-my-pi/pi-ai/types"; import { AssistantMessageEventStream } from "@oh-my-pi/pi-ai/utils/event-stream"; import { buildModel } from "@oh-my-pi/pi-catalog/build"; diff --git a/packages/coding-agent/src/config/model-registry.ts b/packages/coding-agent/src/config/model-registry.ts index 44d11ffcf..82c4e0545 100644 --- a/packages/coding-agent/src/config/model-registry.ts +++ b/packages/coding-agent/src/config/model-registry.ts @@ -1604,7 +1604,12 @@ export class ModelRegistry { if (strategy === "online-if-uncached") { // Mirror shouldFetchRemoteSources: built-in managers use the catalog's // default TTL, so only refresh when the manager will actually fetch. - const cache = readModelCache(cacheProviderId, BUILT_IN_DISCOVERY_CACHE_TTL_MS, Date.now, this.#cacheDbPath); + const cache = readModelCache( + cacheProviderId, + BUILT_IN_DISCOVERY_CACHE_TTL_MS, + Date.now, + this.#cacheDbPath, + ); const cacheAgeMs = cache ? Date.now() - cache.updatedAt : Number.POSITIVE_INFINITY; if (cache?.fresh && (cache.authoritative || cacheAgeMs < BUILT_IN_DISCOVERY_NON_AUTHORITATIVE_RETRY_MS)) { return peekedKey; diff --git a/packages/coding-agent/src/modes/components/tool-execution.ts b/packages/coding-agent/src/modes/components/tool-execution.ts index a958a233c..de9f9c483 100644 --- a/packages/coding-agent/src/modes/components/tool-execution.ts +++ b/packages/coding-agent/src/modes/components/tool-execution.ts @@ -828,7 +828,8 @@ export class ToolExecutionComponent extends Container implements NativeScrollbac if (this.#result !== undefined) return false; const toolValue = (this.#tool as { forceFirstResultViewportRepaint?: FirstResultViewportRepaint } | undefined) ?.forceFirstResultViewportRepaint; - const value = toolValue !== undefined ? toolValue : toolRenderers[this.#toolName]?.forceFirstResultViewportRepaint; + const value = + toolValue !== undefined ? toolValue : toolRenderers[this.#toolName]?.forceFirstResultViewportRepaint; if (typeof value === "function") return value(this.#args, this.#renderState); return value === true; } diff --git a/packages/coding-agent/test/bundled-agent-parsing.test.ts b/packages/coding-agent/test/bundled-agent-parsing.test.ts index e66f41f0e..a4da8e57d 100644 --- a/packages/coding-agent/test/bundled-agent-parsing.test.ts +++ b/packages/coding-agent/test/bundled-agent-parsing.test.ts @@ -1,10 +1,7 @@ import { describe, expect, it } from "bun:test"; import { Effort } from "@oh-my-pi/pi-ai"; import { buildModel } from "@oh-my-pi/pi-catalog/build"; -import { - resolveAgentModelPatterns, - resolveModelOverride, -} from "@oh-my-pi/pi-coding-agent/config/model-resolver"; +import { resolveAgentModelPatterns, resolveModelOverride } from "@oh-my-pi/pi-coding-agent/config/model-resolver"; import { Settings } from "@oh-my-pi/pi-coding-agent/config/settings"; import { getBundledAgent } from "@oh-my-pi/pi-coding-agent/task/agents"; diff --git a/packages/coding-agent/test/internal-urls/memory-protocol.test.ts b/packages/coding-agent/test/internal-urls/memory-protocol.test.ts index 331ad66ce..a0efc7bee 100644 --- a/packages/coding-agent/test/internal-urls/memory-protocol.test.ts +++ b/packages/coding-agent/test/internal-urls/memory-protocol.test.ts @@ -245,7 +245,15 @@ describe("MemoryProtocolHandler — mnemopi bridge (issue #4443)", () => { .prepare( "INSERT INTO facts (fact_id, session_id, subject, predicate, object, timestamp, confidence) VALUES (?, ?, ?, ?, ?, ?, ?)", ) - .run("0473bbdb8da6df92", beam.sessionId, "Glab", "works-without", "mise prefix", "2026-07-01T00:00:00.000Z", 0.9); + .run( + "0473bbdb8da6df92", + beam.sessionId, + "Glab", + "works-without", + "mise prefix", + "2026-07-01T00:00:00.000Z", + 0.9, + ); const router = InternalUrlRouter.instance(); const resource = await router.resolve("memory://0473bbdb8da6df92"); diff --git a/packages/coding-agent/test/rpc-skill-command.test.ts b/packages/coding-agent/test/rpc-skill-command.test.ts index 02795389b..1100ace66 100644 --- a/packages/coding-agent/test/rpc-skill-command.test.ts +++ b/packages/coding-agent/test/rpc-skill-command.test.ts @@ -60,7 +60,13 @@ describe("tryRunRpcSkillCommand", () => { { skillsSettings: { enableSkillCommands: true }, skills: [ - { name: "reviewer", description: "Review code", filePath: skillPath, baseDir: dir, source: "project" }, + { + name: "reviewer", + description: "Review code", + filePath: skillPath, + baseDir: dir, + source: "project", + }, ], async promptCustomMessage(nextMessage, nextOptions) { expect(nextMessage.customType).toBe(SKILL_PROMPT_MESSAGE_TYPE);