mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 11:38:38 +00:00
fix(media): strip MEDIA: prefix in loadWebMediaInternal (#13107)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 9d95e6af5a
Co-authored-by: mcaxtr <7562095+mcaxtr@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { type MockInstance, vi } from "vitest";
|
||||
import { vi } from "vitest";
|
||||
import type { TemplateContext } from "../templating.js";
|
||||
import type { FollowupRun, QueueSettings } from "./queue.js";
|
||||
import { createMockTypingController } from "./test-helpers.js";
|
||||
|
||||
// Avoid exporting vitest mock types (TS2742 under pnpm + d.ts emit).
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
type AnyMock = any;
|
||||
|
||||
type EmbeddedRunParams = {
|
||||
prompt?: string;
|
||||
extraSystemPrompt?: string;
|
||||
@@ -16,11 +20,11 @@ const state = vi.hoisted(() => ({
|
||||
runCliAgentMock: vi.fn(),
|
||||
}));
|
||||
|
||||
export function getRunEmbeddedPiAgentMock(): MockInstance {
|
||||
export function getRunEmbeddedPiAgentMock(): AnyMock {
|
||||
return state.runEmbeddedPiAgentMock;
|
||||
}
|
||||
|
||||
export function getRunCliAgentMock(): MockInstance {
|
||||
export function getRunCliAgentMock(): AnyMock {
|
||||
return state.runCliAgentMock;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user