The market card showed the generic agent glyph: neither the registry nor the package gave a picture. package.json's magpie.icon gives it to the market card (magpie reads it from npm), and agent.icon to the agent magpie adds. Ran: bun test packages/aider, bun scripts/check.mjs; the URL answers 200 image/png.
27 lines
1023 B
JavaScript
27 lines
1023 B
JavaScript
import { expect, test } from "bun:test"
|
|
import { agent, connect } from "./aider.agent.js"
|
|
|
|
test("says where Aider keeps its model", () => {
|
|
expect(agent).toMatchObject({ id: "aider", config: "~/.aider.conf.yml", model: "model", prefix: "openai/" })
|
|
})
|
|
|
|
test("shows Aider's own icon, as the package gives it", async () => {
|
|
const pkg = await Bun.file(new URL("./package.json", import.meta.url)).json()
|
|
expect(agent.icon).toBe("https://aider.chat/assets/icons/apple-touch-icon.png")
|
|
expect(pkg.magpie.icon).toBe(agent.icon)
|
|
})
|
|
|
|
test("points Aider at magpie with its own key", () => {
|
|
const out = connect({
|
|
gateway: { url: "http://127.0.0.1:3425", v1: "http://127.0.0.1:3425/v1", key: "magpie-aider" },
|
|
model: { id: "deepseek/deepseek-flash", name: "DeepSeek Flash" },
|
|
models: [],
|
|
agent: { id: "aider", config: "/home/u/.aider.conf.yml" },
|
|
})
|
|
expect(out).toEqual({
|
|
"openai-api-base": "http://127.0.0.1:3425/v1",
|
|
"openai-api-key": "magpie-aider",
|
|
"show-model-warnings": false,
|
|
})
|
|
})
|