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:
Marcus Castro
2026-02-14 17:41:26 -03:00
committed by GitHub
parent 1bde33c0bc
commit 07850e8a93
9 changed files with 110 additions and 40 deletions

View File

@@ -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;
}