Skip to content

Commit 416fa5a

Browse files
bchapuisclaude
andcommitted
Pretty-print JSON output in ToStringNode for better readability
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b357fe8 commit 416fa5a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/runtime/src/nodes/text/to-string-node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ export class ToStringNode extends ExecutableNode {
5959
// Handle arrays
6060
else if (Array.isArray(value)) {
6161
try {
62-
result = JSON.stringify(value);
62+
result = JSON.stringify(value, null, 2);
6363
} catch {
6464
result = value.toString();
6565
}
6666
}
6767
// Handle objects (including JSON)
6868
else if (typeof value === "object") {
6969
try {
70-
result = JSON.stringify(value);
70+
result = JSON.stringify(value, null, 2);
7171
} catch {
7272
result = value.toString();
7373
}

0 commit comments

Comments
 (0)