PowerShell / ProjectMercury

An interactive shell to work with AI-powered assistance providers
MIT License
50 stars 11 forks source link

Merge the parameter injection prototype into the `azureAgents` branch #208

Closed daxian-dbw closed 1 month ago

daxian-dbw commented 1 month ago

PR Summary

Merge the parameter injection prototype into the azureAgents branch, to reduce the maintenance complexity.

  1. Add the /replace command
  2. Retrieve data locally with 2 tiers of data source to assist user to input values for placeholders.
    • The 1st tier is the cache data generated from parsing the AzCLI help content. We the description and static values for a parameter from this data source.
    • The 2nd tier is the AzCLI tab completion, to get the dynamic values for a parameter, such as --resource-group.
  3. Fix a bug when handling remote query.
  4. Fix the data retrieval code to handle the case when the generated command is not AzCLI command
  5. Send pseudo values to the server handler instead of real values from user to avoid any privacy issue. After receiving response, the agent will replace all pseudo values with the real values before displaying to the user.