Spaces:
Paused
Paused
Download console/src/utils/agentBackend.test.ts from mysticaldragon/HF: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/utils/agentBackend.test.ts
- Command line
-
hf download hf://spaces/mysticaldragon/HF/console/src/utils/agentBackend.test.ts
-
curl -L -o agentBackend.test.ts https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/utils/agentBackend.test.ts
1.14 kB
| 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); | |
| }); | |
| }); | |