mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-28 02:23:33 +00:00
fix: clean agent lint failures
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user