feat(workspace): composer like Claude Desktop, image thumbnails, tool icons in the picker

This commit is contained in:
2026-10-02 16:13:27 +07:00
parent 4802684d2f
commit f35bf2043f
15 changed files with 414 additions and 185 deletions
@@ -253,16 +253,12 @@ describe("AiToolIcon", () => {
expect(container.querySelector('img[src="/api/ai-tools/cursor/icon"]')).toBeTruthy();
});
it("uses the shipped mark, and a light/dark pair for Hermes", async () => {
it("uses the shipped mark, one for every theme", async () => {
const { AiToolIcon } = await import("../../AiToolIcon");
const { container, rerender } = render(<AiToolIcon tool={{ id: "claude", label: "Claude" }} />);
expect(container.querySelector('img[src="/ai-tools/claude.svg"]')).toBeTruthy();
rerender(<AiToolIcon tool={{ id: "hermes", label: "Hermes" }} />);
expect(container.querySelector('img[src="/ai-tools/hermes-black.svg"]')?.className).toMatch(
/dark:hidden/
);
expect(container.querySelector('img[src="/ai-tools/hermes-white.svg"]')?.className).toMatch(
/hidden dark:block/
);
expect(container.querySelectorAll("img")).toHaveLength(1);
expect(container.querySelector('img[src="/ai-tools/hermes.svg"]')).toBeTruthy();
});
});