From 25ba8e3d35f8fb28bdcffd4e0aca0e86a71d2218 Mon Sep 17 00:00:00 2001 From: Shakker Date: Wed, 17 Jun 2026 03:02:12 +0100 Subject: [PATCH] fix: clean agent lint failures --- src/agents/model-picker-visibility.ts | 1 - src/agents/plugin-text-transforms.test.ts | 34 ++++++++++++----------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/agents/model-picker-visibility.ts b/src/agents/model-picker-visibility.ts index 2b5e352e895..909dc43cb68 100644 --- a/src/agents/model-picker-visibility.ts +++ b/src/agents/model-picker-visibility.ts @@ -4,7 +4,6 @@ import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id"; import type { OpenClawConfig } from "../config/types.openclaw.js"; import { listCliRuntimeProviderIds } from "./cli-backends.js"; -import { isCliRuntimeProvider } from "./model-runtime-aliases.js"; // Retired provider ids and CLI runtime aliases are implementation surfaces, not // model picker choices. Hide them while keeping real provider/model refs visible. diff --git a/src/agents/plugin-text-transforms.test.ts b/src/agents/plugin-text-transforms.test.ts index eb553613b35..4326cdbc772 100644 --- a/src/agents/plugin-text-transforms.test.ts +++ b/src/agents/plugin-text-transforms.test.ts @@ -70,7 +70,7 @@ describe("plugin text transforms", () => { ).toBe("counter receipt on the right shelf"); }); - it("rewrites system prompt and message text content before transport", () => { + it("rewrites system prompt and message text content before transport", async () => { let capturedContext: Context | undefined; const wrapped = wrapStreamFnTextTransforms({ streamFn: (_model, context) => { @@ -87,21 +87,23 @@ describe("plugin text transforms", () => { { from: /red basket/g, to: "blue basket" }, ], }); - wrapped( - model, - { - systemPrompt: "Use orchid mailbox inside north tower", - messages: [ - { - role: "user", - content: [ - { type: "text", text: "Please use the red basket" }, - { type: "image", url: "data:image/png;base64,abc" }, - ], - }, - ], - } as Context, - undefined, + await Promise.resolve( + wrapped( + model, + { + systemPrompt: "Use orchid mailbox inside north tower", + messages: [ + { + role: "user", + content: [ + { type: "text", text: "Please use the red basket" }, + { type: "image", url: "data:image/png;base64,abc" }, + ], + }, + ], + } as Context, + undefined, + ), ); const context = capturedContext as unknown as {