style: format assistant custom widget files

This commit is contained in:
ajnart committed 2026-08-30 23:06:58 +02:00
1 parent 288bbcff98
commit 135cd928ba
10 files changed
+33 -28

No files matched your search

@@ -76,7 +76,11 @@ describe("repairAssistantToolInput", () => {
});
test.each([
["customWidget_previewQuery", { previewId: "preview-1", requestId: "search" }, { sessionId: "preview-1", requestId: "search" }],
[
"customWidget_previewQuery",
{ previewId: "preview-1", requestId: "search" },
{ sessionId: "preview-1", requestId: "search" },
],
[
"customWidget_previewAction",
{ previewSessionId: "preview-1", requestId: "requestMovie", params: { mediaId: 603 } },
@@ -125,10 +125,7 @@ const repairCustomWidgetLifecycleInput = <T extends AssistantToolCallInput>(tool
return null;
}
if (typeof input !== "object" || input === null || Array.isArray(input)) return null;
const normalized = normalizeCustomWidgetLifecycleToolInput(
toolCall.toolName,
input as Record<string, unknown>,
);
const normalized = normalizeCustomWidgetLifecycleToolInput(toolCall.toolName, input as Record<string, unknown>);
if (normalized === input) return null;
return { ...toolCall, input: JSON.stringify(normalized) };
};