Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ async function parseInput(cmd) {
output.print(output.styles.success(' OK '), cmd)
}
if (cmd?.startsWith('I.grab')) {
output.print(output.styles.debug(val))
try {
Copy link

Copilot AI May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a comment here to explain that JSON.stringify is applied to handle various output types for improved readability.

Suggested change
try {
try {
// Use JSON.stringify to format the output for improved readability, especially for complex objects.

Copilot uses AI. Check for mistakes.
output.print(output.styles.debug(JSON.stringify(val, null, 2)))
} catch (err) {
output.print(output.styles.error(' ERROR '), 'Failed to stringify result:', err.message)
}
}

history.push(cmd) // add command to history when successful
Expand Down
Loading