Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

Fixes #6543
Fixes #6623

This PR enables Fig autocomplete spec generation to include full command trees for azd extensions that declare the metadata capability, improving VS Code terminal IntelliSense for extension commands.

Extensions with full completions:

  • azure.ai.agents
  • azure.ai.finetune
  • azure.coding-agent
  • microsoft.azd.demo
  • microsoft.azd.extensions
  • microsoft.azd.concurx

This PR also fixes indentation issues and enables dynamic suggestions for azd config set/get/unset using the new azd config options --output json command under the hood.

image image image image

How it works

When building figspec, the SpecBuilder:

  1. Checks for extension commands by looking for the extension.id annotation
  2. Verifies the extension has the metadata capability via HasMetadataCapability()
  3. If metadata is available, generates the full command tree instead of just the entry point
// Before: just the entry point
{
  name: ['demo'],
  description: 'Demo Extension',
}

// After: full command tree from metadata
{
  name: ['demo'],
  description: 'Demo Extension',
  subcommands: [
    {
      name: ['context'],
      description: 'Get the context of the AZD project & environment.',
      options: [
        { name: ['--debug'], description: 'Enable debug mode' },
        { name: ['--help', '-h'], description: 'help for context' },
      ],
    },
    // ... other subcommands with their flags/args
  ],
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd extension source add -n local -t file -l /home/REDACTED/work/azure-dev/azure-dev/cli/azd/extensions/registry.json /home/REDACTED/work/azure-dev/azure-dev/cli/azd/pkg/prompt/prompt_models.go /home/REDACTED/work/azure-dev/azure-dev/cli/azd/pkg/prompt/prompt_service.go -qui�� hs9hXAu9J cfg x_amd64/vet . AD/microsoft-aut-o x86_64-linux-gnu/tmp/go-build2537574258/b738/_pkg_.a x_amd64/vet (dns block)
    • Triggering command: /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd extension list --source local --output json -importcfg /tmp/go-build2537574258/b738/importcfg -pack /home/REDACTED/work/azure-dev/azure-dev/cli/azd/pkg/infra/azure_resource_manager.go /home/REDACTED/work/azure-dev/azure-dev/cli/azd/pkg/infra/deployment_manager.go -W dMToCaQSI cfg x_amd64/vet . AD/microsoft-aut-o --64 x_amd64/vet (dns block)
    • Triggering command: /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd extension install azure.ai.agents --source local --version 0.1.8-preview -p s-go-api/azurede-atomic -lang=go1.23 x_amd64/vet -W LxQsGdGrv cfg x_amd64/vet . AD/microsoft-aut-o --64 x_amd64/vet (dns block)
  • code.cloudfoundry.org
    • Triggering command: /update-job-proxy /update-job-proxy -o br-f1a9f09b2487 -j DOCKER-ISOLATION-STAGE-2 fb36b73.0 64/pkg/tool/linu-e (dns block)
    • Triggering command: /update-job-proxy /update-job-proxy DROP e/git-remote-htt/etc/ssl/certs/feffd413.0 test -e C_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem e/git-remote-htt/usr/share/ca-certificates/mozilla/Hongkong_Post_Root_CA_3.crt test om/gofrs/uuid --auto /bin/git test -e oot_CA_2022.pem /usr/bin/git /usr/bin/test 88a3ebd39425b66a/usr/sbin/iptables b9711f78:go.mod e/git-remote-htt-t test (dns block)
  • dario.cat
    • Triggering command: /update-job-proxy /update-job-proxy -o br-f1a9f09b2487 -j DOCKER-ISOLATION-STAGE-2 fb36b73.0 64/pkg/tool/linu-e (dns block)
    • Triggering command: /update-job-proxy /update-job-proxy DROP e/git-remote-htt/etc/ssl/certs/feffd413.0 test -e C_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem e/git-remote-htt/usr/share/ca-certificates/mozilla/Hongkong_Post_Root_CA_3.crt test om/gofrs/uuid --auto /bin/git test -e oot_CA_2022.pem /usr/bin/git /usr/bin/test 88a3ebd39425b66a/usr/sbin/iptables b9711f78:go.mod e/git-remote-htt-t test (dns block)
  • go.googlesource.com
    • Triggering command: /update-job-proxy /update-job-proxy -o br-f1a9f09b2487 -j DOCKER-ISOLATION-STAGE-2 fb36b73.0 64/pkg/tool/linu-e (dns block)
    • Triggering command: /update-job-proxy /update-job-proxy DROP e/git-remote-htt/etc/ssl/certs/feffd413.0 test -e C_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem e/git-remote-htt/usr/share/ca-certificates/mozilla/Hongkong_Post_Root_CA_3.crt test om/gofrs/uuid --auto /bin/git test -e oot_CA_2022.pem /usr/bin/git /usr/bin/test 88a3ebd39425b66a/usr/sbin/iptables b9711f78:go.mod e/git-remote-htt-t test (dns block)
  • go.opentelemetry.io
    • Triggering command: /update-job-proxy /update-job-proxy -o br-f1a9f09b2487 -j DOCKER-ISOLATION-STAGE-2 fb36b73.0 64/pkg/tool/linu-e (dns block)
    • Triggering command: /update-job-proxy /update-job-proxy DROP e/git-remote-htt/etc/ssl/certs/feffd413.0 test -e C_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem e/git-remote-htt/usr/share/ca-certificates/mozilla/Hongkong_Post_Root_CA_3.crt test om/gofrs/uuid --auto /bin/git test -e oot_CA_2022.pem /usr/bin/git /usr/bin/test 88a3ebd39425b66a/usr/sbin/iptables b9711f78:go.mod e/git-remote-htt-t test (dns block)
  • go.uber.org
    • Triggering command: /update-job-proxy /update-job-proxy -o br-f1a9f09b2487 -j DOCKER-ISOLATION-STAGE-2 fb36b73.0 64/pkg/tool/linu-e (dns block)
    • Triggering command: /update-job-proxy /update-job-proxy DROP e/git-remote-htt/etc/ssl/certs/feffd413.0 test -e C_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem e/git-remote-htt/usr/share/ca-certificates/mozilla/Hongkong_Post_Root_CA_3.crt test om/gofrs/uuid --auto /bin/git test -e oot_CA_2022.pem /usr/bin/git /usr/bin/test 88a3ebd39425b66a/usr/sbin/iptables b9711f78:go.mod e/git-remote-htt-t test (dns block)
  • google.golang.org
    • Triggering command: /update-job-proxy /update-job-proxy -o br-f1a9f09b2487 -j DOCKER-ISOLATION-STAGE-2 fb36b73.0 64/pkg/tool/linu-e (dns block)
    • Triggering command: /update-job-proxy /update-job-proxy DROP e/git-remote-htt/etc/ssl/certs/feffd413.0 test -e C_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem e/git-remote-htt/usr/share/ca-certificates/mozilla/Hongkong_Post_Root_CA_3.crt test om/gofrs/uuid --auto /bin/git test -e oot_CA_2022.pem /usr/bin/git /usr/bin/test 88a3ebd39425b66a/usr/sbin/iptables b9711f78:go.mod e/git-remote-htt-t test (dns block)
  • gopkg.in
    • Triggering command: /update-job-proxy /update-job-proxy -o br-f1a9f09b2487 -j DOCKER-ISOLATION-STAGE-2 fb36b73.0 64/pkg/tool/linu-e (dns block)
    • Triggering command: /update-job-proxy /update-job-proxy DROP e/git-remote-htt/etc/ssl/certs/feffd413.0 test -e C_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem e/git-remote-htt/usr/share/ca-certificates/mozilla/Hongkong_Post_Root_CA_3.crt test om/gofrs/uuid --auto /bin/git test -e oot_CA_2022.pem /usr/bin/git /usr/bin/test 88a3ebd39425b66a/usr/sbin/iptables b9711f78:go.mod e/git-remote-htt-t test (dns block)
  • westus-0.in.applicationinsights.azure.com
    • Triggering command: /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd telemetry upload 64/pkg/tool/linux_amd64/vet -uns�� c/extension_metadata.go /tmp/go-build276716392/b108/vet.cfg cfg ty@v0.0.20/doc.g/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/cgo ty@v0.0.20/isatt-V=full x_amd64/compile ache/go/1.25.6/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags 4c49fdc4a8c0/bash -errorsas -ifaceassert -nilfunc ache/go/1.25.6/x-v (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Enable full figspec generation for extensions with metadata capability</issue_title>
<issue_description>Update the figspec (Fig autocomplete spec) generation in azd so that it generates the full command specification (including all subcommands, flags, and argument structure) for extensions that declare the metadata capability. This leverages the foundation merged in #6496 and should build atop latest tracing/metadata improvements such as #6528.

Requirements:

  • For each installed extension with the metadata capability, auto-include its full command tree in the figspec output, not just its basic entry point.
  • Ensure that generated specs reflect all subcommands and flags per extension metadata.
  • Provide test(s) confirming that updates/extensions with metadata are reflected in exported specs without manual intervention.
  • (Bonus) Surface recently added extensions azure.ai.agents and azure.ai.finetune in generated completions if they implement metadata.

Rationale:

  • Enables improved VS Code IntelliSense/completions for extension commands, aligning with the move toward richer extension metadata (#6496).
  • Related: #6541 - azure.ai.* extensions adopting metadata capability.
    </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 27, 2026 17:55
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable full figspec generation for extensions with metadata capability Enable full figspec generation for extensions with metadata capability Jan 27, 2026
Copilot AI requested a review from JeffreyCA January 27, 2026 18:04
@JeffreyCA
Copy link
Contributor

@copilot can you run the Figspec snapshot tests and verify they're up to date?

Copy link
Contributor Author

Copilot AI commented Jan 27, 2026

@copilot can you run the Figspec snapshot tests and verify they're up to date?

Ran the Figspec snapshot tests - they pass successfully and the snapshot file is up to date with no uncommitted changes:

--- PASS: TestFigSpec (6.88s)
PASS
ok      github.com/azure/azure-dev/cli/azd/cmd  6.906s

The test installs all extensions from the local registry, generates the figspec with full extension command trees, and verifies against the committed snapshot.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd extension source add -n local -t file -l /home/REDACTED/work/azure-dev/azure-dev/cli/azd/extensions/registry.json -fno-stack-prote-bool x_amd64/vet 9294�� o/otlp@v1.8.0/co-errorsas o/otlp@v1.8.0/co-ifaceassert x_amd64/vet . unstable x86_64-linux-gnu-bool x_amd64/vet (dns block)
    • Triggering command: /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd extension list --source local --output json x_amd64/vet /tmp/go-build230/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/vet hentication-libr-atomic -fno-stack-prote-bool x_amd64/vet 9294�� /cpu/cpu_gc_x86.-errorsas -trimpath x_amd64/vet -p parser -lang=go1.24 x_amd64/vet (dns block)
    • Triggering command: /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd extension install azure.ai.agents --source local --version 0.1.8-preview /tmp/go-build230/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/vet o/sdk/storage/az-atomic -fno-stack-prote-bool x_amd64/vet ortc�� g_.a 64/src/net/http/-ifaceassert x_amd64/vet (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable full figspec generation for extensions with metadata capability

2 participants