fix assistant exports and tool calls

This commit is contained in:
ajnart committed 2026-08-10 14:09:44 +02:00
1 parent f7eed7ce8a
commit 305c9af2da
15 files changed
+756 -29

No files matched your search

@@ -51,4 +51,27 @@ describe("findIcons", () => {
expect(result.icons).toMatchObject([{ slug: "example/empty", icons: [] }]);
});
test("finds the Homarr icon and returns its exact local repository URL", async () => {
const db = createDb();
await db.insert(iconRepositories).values({ id: "dashboard-icons", slug: "homarr-labs/dashboard-icons" });
await db.insert(icons).values({
id: "homarr-svg",
name: "homarr.svg",
url: "https://cdn.example.com/homarr.svg",
checksum: "homarr",
iconRepositoryId: "dashboard-icons",
});
const caller = iconsRouter.createCaller({ db, deviceType: undefined, session: null });
await expect(caller.findIcons({ searchText: "homarr" })).resolves.toMatchObject({
countIcons: 1,
icons: [
{
slug: "homarr-labs/dashboard-icons",
icons: [{ name: "homarr.svg", url: "https://cdn.example.com/homarr.svg" }],
},
],
});
});
});