Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(playground): handle undefined content with toolCalls (#6364)

Hassieb Pakzadb65b0e25fc65
diff --git a/web/src/ee/features/playground/page/components/JumpToPlaygroundButton.tsx b/web/src/ee/features/playground/page/components/JumpToPlaygroundButton.tsx
index b2340113fd..8549852293 100644
--- a/web/src/ee/features/playground/page/components/JumpToPlaygroundButton.tsx
+++ b/web/src/ee/features/playground/page/components/JumpToPlaygroundButton.tsx
@@ -125,7 +125,7 @@ const ParsedChatMessageListSchema = z.array(
.transform((v) => v.text),
)
.transform((v) => v.join("")),
- z.null().transform((_) => ""),
+ z.union([z.null(), z.undefined()]).transform((_) => ""),
z.any().transform((v) => JSON.stringify(v, null, 2)),
]),
tool_calls: z