fix: clean agent lint failures

This commit is contained in:
Shakker
2026-06-17 03:02:12 +01:00
parent 70de1047b8
commit 25ba8e3d35
2 changed files with 18 additions and 17 deletions

View File

@@ -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.

View File

@@ -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 {