From 864656475a47979ba779efb2ce13ce75807537de Mon Sep 17 00:00:00 2001 From: Kenny Date: Mon, 12 Jan 2026 22:03:15 -0500 Subject: [PATCH] fix: only append ellipsis when string exceeds 100 chars --- src/hooks/claude-code-hooks/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/claude-code-hooks/index.ts b/src/hooks/claude-code-hooks/index.ts index ad07f8ba..795dcda8 100644 --- a/src/hooks/claude-code-hooks/index.ts +++ b/src/hooks/claude-code-hooks/index.ts @@ -192,7 +192,7 @@ export function createClaudeCodeHooksHook( } catch (e) { throw new Error( `[todowrite ERROR] Failed to parse todos string as JSON. ` + - `Received: ${output.args.todos.slice(0, 100)}... ` + + `Received: ${output.args.todos.length > 100 ? output.args.todos.slice(0, 100) + '...' : output.args.todos} ` + `Expected: Valid JSON array. Pass todos as an array, not a string.` ) }