Skip to content

Commit 896304f

Browse files
Suggest pulumi neo in preview/up diagnostics (#23326)
## Summary - Append a one-line hint suggesting the local `pulumi neo` CLI agent next to the existing cloud-console link printed under "Diagnostics:" on failure. - Show the Neo hint block from `pulumi preview` too (previously only `pulumi up` set `ShowLinkToNeo`). - Suppression via `PULUMI_SUPPRESS_NEO_LINK` covers both lines — no new env var. ## Test plan - [ ] `pulumi up` against a stack with a failing resource shows the cloud link followed by the `pulumi neo` line. - [ ] `pulumi preview` against the same stack now shows the same hint (previously absent). - [ ] `PULUMI_SUPPRESS_NEO_LINK=true` suppresses both lines for `preview` and `up`. - [ ] DIY backend (`pulumi login --local`) renders neither line. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
1 parent ca026f0 commit 896304f

6 files changed

Lines changed: 11 additions & 1 deletion

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
changes:
2+
- type: feat
3+
scope: cli
4+
description: Suggest `pulumi neo` in `pulumi preview` and `pulumi up` diagnostics output

‎pkg/backend/display/ai.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func PrintNeoLink(out io.Writer, opts Options, permalink string) {
8484
fmt.Fprintln(out, " "+"Would you like additional help with this update?")
8585
fmt.Fprintln(out, " "+
8686
opts.Color.Colorize(colors.Underline+colors.BrightBlue+ExplainFailureLink(permalink)+colors.Reset))
87+
fmt.Fprintln(out, " "+"Or run `pulumi neo` for an interactive agent in your terminal.")
8788
fmt.Fprintln(out)
8889
}
8990

‎pkg/backend/display/ai_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func TestRenderCopilotErrorSummary(t *testing.T) {
4646
4747
Would you like additional help with this update?
4848
http://foo.bar/baz?explainFailure
49+
Or run `+"`pulumi neo`"+` for an interactive agent in your terminal.
4950
5051
`, neoDelimiterEmoji())
5152
assert.Equal(t, expectedCopilotSummary, buf.String())

‎pkg/backend/display/progress.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ func (display *ProgressDisplay) printDiagnostics() {
849849
colors.SpecCreateReplacement + "[Pulumi Neo]" + colors.Reset + " Would you like help with these diagnostics?")
850850
display.println(" " +
851851
colors.Underline + colors.Blue + ExplainFailureLink(display.permalink) + colors.Reset)
852+
display.println(" " + "Or run `pulumi neo` for an interactive agent in your terminal.")
852853
display.println("")
853854
}
854855
}

‎pkg/cmd/pulumi/operations/preview.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@ func NewPreviewCmd() *cobra.Command {
438438
displayOpts.SuppressPermalink = true
439439
}
440440

441+
// Link to Neo will be shown for orgs that have Neo enabled, unless the user explicitly suppressed it.
442+
logging.V(7).Infof("PULUMI_SUPPRESS_NEO_LINK=%v", env.SuppressNeoLink.Value())
443+
displayOpts.ShowLinkToNeo = !env.SuppressNeoLink.Value()
444+
441445
configureNeoOptions(neoEnabled, cmd, &displayOpts, isDIYBackend)
442446
configureNeoTaskOption(neoTaskOnFailure, cmd, &displayOpts, isDIYBackend)
443447

‎pkg/cmd/pulumi/operations/up.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,6 @@ func NewUpCmd() *cobra.Command {
668668
}
669669

670670
// Link to Neo will be shown for orgs that have Neo enabled, unless the user explicitly suppressed it.
671-
// Currently only available for `pulumi up`.
672671
logging.V(7).Infof("PULUMI_SUPPRESS_NEO_LINK=%v", env.SuppressNeoLink.Value())
673672
opts.Display.ShowLinkToNeo = !env.SuppressNeoLink.Value()
674673

0 commit comments

Comments
 (0)