From 9f9f9e4537d38a3bf8596aa5a20362136c355336 Mon Sep 17 00:00:00 2001 From: owenizedd Date: Tue, 6 May 2025 12:08:48 +0700 Subject: [PATCH 1/3] feat: better I.grab logging --- lib/pause.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pause.js b/lib/pause.js index c4ba0a0e1..1cd708842 100644 --- a/lib/pause.js +++ b/lib/pause.js @@ -175,7 +175,7 @@ async function parseInput(cmd) { output.print(output.styles.success(' OK '), cmd) } if (cmd?.startsWith('I.grab')) { - output.print(output.styles.debug(val)) + output.print(output.styles.debug(JSON.stringify(val, null, 2))) } history.push(cmd) // add command to history when successful From 680054589c4a64469777d513dcb8efba6238a9ed Mon Sep 17 00:00:00 2001 From: Ryan Owen Thionanda Date: Wed, 7 May 2025 07:37:10 +0700 Subject: [PATCH 2/3] Update lib/pause.js Add try/catch Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- lib/pause.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pause.js b/lib/pause.js index 1cd708842..86724c6fb 100644 --- a/lib/pause.js +++ b/lib/pause.js @@ -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(JSON.stringify(val, null, 2))) + try { + 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 From 937b701950b40fa0d9bc9e8b04e61b0e4a93c7a6 Mon Sep 17 00:00:00 2001 From: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Date: Wed, 7 May 2025 16:54:39 +0200 Subject: [PATCH 3/3] Update lib/pause.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- lib/pause.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pause.js b/lib/pause.js index 86724c6fb..de887a08a 100644 --- a/lib/pause.js +++ b/lib/pause.js @@ -179,6 +179,7 @@ async function parseInput(cmd) { output.print(output.styles.debug(JSON.stringify(val, null, 2))) } catch (err) { output.print(output.styles.error(' ERROR '), 'Failed to stringify result:', err.message) + output.print(output.styles.error(' RAW VALUE '), String(val)) } }