-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Interactive] Integrate Recommendation capability into interactive
#5950
Conversation
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
How can we guarantee there is no regression with this change? |
Our recommendations are based on the correlation between commands, suggesting more frequent command combinations to users, and have achieved better results in tests. If the user wants to disable the recommendation feature, it can be disabled by |
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
[Release] Update index.json for extension [ interactive ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=59035&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az interactive
Description
Outline
[Revolutionary Change] Integrate the cli recommendation to make the completion ability more intelligent and provide the scenario completion.
[Add] Support command recommendations that predicts the next commands users might need.
[Add] Support scenario recommendations to help users complete the complex scenarios more smoothly and simply.
[Add] Support new config
az config set interactive.enable_recommender=False
to disable these new recommenders.[Add] Add loading bar to avoid command execution errors caused by uncompleted command loading and param update. User can use CTRL+C to cancel the loading bar or
az config set interactive.enable_preloading=False
to disable it.[Add] Add value completion mechanism for param value in scenarios
[Add] Support searching ability for scenarios
[Optimize] Update telemetry feedback function and add 'CLIRecommendation' property. (Details: https://github.com/hackathon-cli-recommendation/cli-recommendation/blob/master/Docs/feedback_design.md)
[Optimize] Optimize param completion mechanism to recommend one parameter at a time.
[Optimize] Support using 'CTRL+C' to refresh the panel interface
[Fix] Fix display offset in toolbar
[Fix] Command execution errors caused by uncompleted command loading and param update
[Others] Remove README.rst and modified setup file
[Others] Import styled text print from azure-cli-core.style
File Structure
azext_interactive
Intelligent AZ Interactive (Revolutionary Change)
Recommendation
We have integrated the cli recommendation to make the completion ability more intelligent and provide the scenario completion. This is a revolutionary change. Users can enable or disable the recommendation feature by running the following commands:
Command Recommendation
Command recommendation uses an intelligent algorithm to suggest the most relevant and frequently used command for the user based on their historical command inputs. By analyzing the user's input history and matching it with the highest relevant commands, Intelligent Az Interactive can assist Azure CLI beginners in making quick and informed decisions, saving them time and effort.
The command recommendation feature can also be a good way to broaden users' knowledge boundaries and help them recognize and learn commands that are related to their common commands but never used before.
Scenario Identification
Scenario identification is another powerful feature that automatically recognizes the user's current scenario and recommends a set of commands that are most relevant to the user's needs. This feature is based on our extensive database of over 600+ business scenarios, which cover a wide range of use cases across various scenes. By analyzing the user's input history, Intelligent Az Interactive can identify the relevant scenario and suggest the most appropriate command set, helping new CLI users to quickly accomplish their tasks with confidence and ease.
Search for Scenarios
We have added the ability to help users search for scenarios based on keywords. When the user enters some keywords or descriptions, we will recommend the scenarios that are most likely to be used based on the keywords and descriptions of the functions the user wants to implement.
Loading Bar
The loading bar is a feature that we have implemented to provide users with a more stable and predictable experience while using our platform. Its primary function is to prevent command parameter detection errors that may occur due to incomplete loading. By displaying the progress of initialization through the loading bar, users can be assured that the initialization process is ongoing and they can expect to see a fully loaded interface once the bar reaches 100%.
Additionally, the loading bar helps prevent user interface lagging or freezing due to insufficient memory. By preloading the necessary resources and data, users can avoid encountering these issues when inputting commands.
The loading bar is an essential tool that improves the user experience by ensuring that all necessary components are loaded before usage, thereby reducing the risk of encountering errors and providing a smoother, more stable platform.
Please refer to the following gif to see the loading bar in action:
Value Completion in Scenarios
We added a completion mechanism for param value in scenarios to improve the completion ability of param value in
scenarios. In multiple commands of the same scenario, once the user enters a param value, we store the value entered by
the user based on the scenario sample value and some special global params, and automatically recommend the completion
of these param values in subsequent commands.
Telemetry Feedback Optimization
To collect data and facilitate the optimization and tuning of the cli recommendation model, we have optimized the
telemetry feedback function. We have added
CLIRecommendation
to theproperties
of telemetry feedback. For details,please refer
to cli-recommendation.