fix assistant tool continuation

This commit is contained in:
ajnart committed 2026-08-14 11:32:11 +02:00
1 parent f4f6773f26
commit bb6e8e5c5a
13 files changed
+469 -11

No files matched your search

@@ -0,0 +1,14 @@
import { describe, expect, test } from "vitest";
import { getAssistantIconSearchQuery } from "./assistant-tool-label";
describe("getAssistantIconSearchQuery", () => {
test("extracts and trims the streamed icon search target", () => {
expect(getAssistantIconSearchQuery("icon_findIcons", { searchText: " homarr " })).toBe("homarr");
});
test("distinguishes browsing all icons from unrelated tools", () => {
expect(getAssistantIconSearchQuery("icon_findIcons", {})).toBe("");
expect(getAssistantIconSearchQuery("app_create", { searchText: "homarr" })).toBeNull();
});
});