Skip to content

Conversation

@JeffreyCA
Copy link
Member

Resolves Azure/azure-dev#5656

This pull request adds a Fig autocomplete spec for Azure Developer CLI (azd) for integrated terminal IntelliSense support:

image image

Copilot AI review requested due to automatic review settings October 20, 2025 20:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Azure Developer CLI (azd) autocomplete in VS Code's integrated terminal by introducing a comprehensive Fig specification. The spec enables IntelliSense suggestions for azd commands, subcommands, options, and dynamic content like environments, templates, and extensions.

Key Changes

  • Added a new Fig spec file for the Azure Developer CLI with full command hierarchy coverage
  • Implemented dynamic generators for listing environments, templates, extensions, and environment variables
  • Integrated the azd spec into the terminal-suggest extension's available specs list

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
extensions/terminal-suggest/src/completions/azd.ts New comprehensive Fig spec defining all azd commands, options, and dynamic generators
extensions/terminal-suggest/src/terminalSuggestMain.ts Added import and registration of the azd spec

Copy link
Contributor

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@meganrogge meganrogge requested a review from Tyriar October 23, 2025 13:16
@meganrogge meganrogge added this to the October 2025 milestone Oct 23, 2025
@meganrogge
Copy link
Contributor

@JeffreyCA how did you create this script? I think some tests would be good to add.

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome 👏

@JeffreyCA please feel free to ping us on Teams to get any updates to this merged quickly, notifications sometimes slip through the cracks.

@Tyriar Tyriar merged commit 43ce648 into microsoft:main Oct 23, 2025
17 checks passed
@Tyriar Tyriar mentioned this pull request Oct 23, 2025
@Tyriar
Copy link
Member

Tyriar commented Oct 23, 2025

Created #272906 so we can verify and mention in release notes

@JeffreyCA
Copy link
Member Author

JeffreyCA commented Oct 24, 2025

Thanks for accepting this! 🙂

@JeffreyCA how did you create this script? I think some tests would be good to add.

See Azure/azure-dev#5955. Since azd uses the Cobra CLI framework I based this off Fig's Cobra integration module that's referenced in their official docs.

In short, it implements a subcommand azd completion fig, which generates the final Fig spec by walking through the Cobra command tree and applying several customizations like for flags/args that use generators or suggestions.

I added tests on our side to ensure there's a local copy of the spec that's up to date in our repo, like when a new command is added. Would that suffice or were you suggesting a test in vscode repo?

@Tyriar
Copy link
Member

Tyriar commented Oct 25, 2025

@JeffreyCA it would be best to live in your repo. For some specs we have tests:

https://github.com/microsoft/vscode/blob/b4c5f8a3b2b66c2f23203882899ef4098b4980ea/extensions/terminal-suggest/src/test/completions/code.test.ts

There's not that useful as they repeat a lot of stuff in the spec, but what they definitely are useful for is as a sanity check that everything's working. So a single or few small test cases could be useful to add like in code.test.ts.

Thanks again!

@JeffreyCA JeffreyCA deleted the fig-spec-azd branch October 26, 2025 21:56
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code integrated terminal Intellisense support for azd

3 participants