Skip to content

Commit baae06b

Browse files
authored
fix: conditionally show invoke in deploy next steps only when agents exist (#508)
Closes #507
1 parent b8bb758 commit baae06b

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

src/cli/tui/screens/deploy/DeployScreen.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,18 @@ interface DeployScreenProps {
3636
}
3737

3838
/** Next steps shown after successful deployment */
39-
const DEPLOY_NEXT_STEPS: NextStep[] = [
40-
{ command: 'invoke', label: 'Test your agent' },
41-
{ command: 'status', label: 'View deployment status' },
42-
];
39+
function getDeployNextSteps(hasAgents: boolean): NextStep[] {
40+
if (hasAgents) {
41+
return [
42+
{ command: 'invoke', label: 'Test your agent' },
43+
{ command: 'status', label: 'View deployment status' },
44+
];
45+
}
46+
return [
47+
{ command: 'add', label: 'Add an agent' },
48+
{ command: 'status', label: 'View deployment status' },
49+
];
50+
}
4351

4452
export function DeployScreen({
4553
isInteractive,
@@ -367,7 +375,7 @@ export function DeployScreen({
367375

368376
{allSuccess && !diffMode && (
369377
<NextSteps
370-
steps={DEPLOY_NEXT_STEPS}
378+
steps={getDeployNextSteps((context?.projectSpec.agents.length ?? 0) > 0)}
371379
isInteractive={isInteractive}
372380
onSelect={step => {
373381
if (step.command === 'invoke') {

0 commit comments

Comments
 (0)