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,8 @@
|
||||
const asRecord = (value: unknown): Record<string, unknown> | null =>
|
||||
typeof value === "object" && value !== null && !Array.isArray(value) ? (value as Record<string, unknown>) : null;
|
||||
|
||||
export const getAssistantIconSearchQuery = (toolName: string, args: unknown) => {
|
||||
if (toolName !== "icon_findIcons") return null;
|
||||
const searchText = asRecord(args)?.searchText;
|
||||
return typeof searchText === "string" && searchText.trim().length > 0 ? searchText.trim() : "";
|
||||
};
|
||||
Reference in new issue
Block a user