fix assistant tool continuation
This commit is contained in:
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();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user