azure-cli-extensions icon indicating copy to clipboard operation
azure-cli-extensions copied to clipboard

{Interactive} Pass the cli_ctx when it calls `handle_exception`

Open kceiw opened this issue 2 years ago • 7 comments


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

When an exception is thrown and handled, it may also ask for the LLM for the suggestion to fix the error. To make that work, we need to pass the cli_ctx when we call handle_exception directly in the interactive mode. The feature is enabled/disabled separately by a configuration though. See this PR for what is done to show the suggestion when an error occurs. https://github.com/Azure/azure-cli/pull/27801

General Guidelines

  • [x] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • [x] Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

kceiw avatar Nov 08 '23 21:11 kceiw

Hi @kceiw, Usually we only allow pull requests to be submitted to the main branch, please double check your pull request target branch error_recovery_integrated_with_gpt.

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

Hi @kceiw, Please write the description of changes which can be perceived by customers into HISTORY.rst. If you want to release a new extension version, please update the version in setup.py as well.

Hi @kceiw, Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Interactive

yonzhan avatar Nov 08 '23 21:11 yonzhan

With the latest changes in the related PR, we don't need the change in this PR anymore. We just need to have azure-cli-core to enable this feature.

kceiw avatar Dec 11 '23 23:12 kceiw

We still need the change in this PR. Re-open it.

kceiw avatar Dec 11 '23 23:12 kceiw