From 179422467c8477c3ca626fa375c1645edee8a77a Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Thu, 25 Jun 2026 06:11:32 +0000 Subject: [PATCH] fix(status): show 'No target configured' in default-path status header The default-path status header (no --runtime-id) rendered 'AgentCore Status (target: )' with empty parens on a fresh no-target project, because action.ts returns targetName: '' and the '??' operator does not catch the empty string. Replace the nullish-coalesce with an explicit length check so the empty-string case falls back to 'No target configured', mirroring the --runtime-id twin already fixed in PR #1171. --- src/cli/commands/status/command.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli/commands/status/command.tsx b/src/cli/commands/status/command.tsx index dda4e226f..c0cceb037 100644 --- a/src/cli/commands/status/command.tsx +++ b/src/cli/commands/status/command.tsx @@ -209,7 +209,8 @@ export const registerStatus = (program: Command) => { render( - AgentCore Status (target: {result.targetName ?? 'No target configured'} + AgentCore Status (target:{' '} + {result.targetName && result.targetName.length > 0 ? result.targetName : 'No target configured'} {result.targetRegion ? `, ${result.targetRegion}` : ''})