Skip to content

Commit 36009f9

Browse files
committed
refactor: extract text property from structured objects
1 parent b4694b2 commit 36009f9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/sim/lib/core/utils/formatting.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ export function safelyRenderValue(value: unknown): string {
191191
}
192192

193193
if (typeof value === 'object') {
194+
// Handle common structured output pattern {text: string, type?: string}
195+
if ('text' in value && typeof (value as Record<string, unknown>).text === 'string') {
196+
return (value as Record<string, unknown>).text as string
197+
}
198+
194199
try {
195200
return JSON.stringify(value)
196201
} catch {

0 commit comments

Comments
 (0)