Spaces:
Paused
Paused
File size: 1,143 Bytes
4e7644b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | import { describe, expect, it } from "vitest";
import { requiresQwenPawModel, supportsAgentAttachments } from "./agentBackend";
describe("requiresQwenPawModel", () => {
it("requires a configured model for native QwenPaw agents", () => {
expect(requiresQwenPawModel("qwenpaw")).toBe(true);
});
it("does not inspect QwenPaw models for Codex agents", () => {
expect(requiresQwenPawModel("codex")).toBe(false);
});
});
describe("supportsAgentAttachments", () => {
it("keeps attachments enabled for native agents", () => {
expect(supportsAgentAttachments("qwenpaw")).toBe(true);
});
it("enables sender drop handling when Codex declares attachments", () => {
expect(
supportsAgentAttachments("codex", {
attachments: true,
}),
).toBe(true);
});
it("enables sender drop handling when Qoder declares attachments", () => {
expect(
supportsAgentAttachments("qoder", {
attachments: true,
}),
).toBe(true);
});
it("keeps attachments hidden for backends without the capability", () => {
expect(supportsAgentAttachments("qoder", {})).toBe(false);
});
});
|