PowerShell / ProjectMercury

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

Cmdlet Collision with Az.Accounts for Resolve-Error (fixit) #200

Open bmkaiser opened 1 month ago

bmkaiser commented 1 month ago

Prerequisites

Steps to reproduce

When I try to run Resolve-Error or its alias fixit, the results are not sent to AI Shell. This is happening because the Az.Accounts module is already loaded as a prerequsite for the Az.Tools.Predictor module, which has an alias named Resolve-Error for the Resolve-AzError cmdlet.

> Get-Command -Name Resolve-Error -All

CommandType Name          Version Source
----------- ----          ------- ------
Alias       Resolve-Error 3.0.2   Az.Accounts
Cmdlet      Resolve-Error 0.1.0   AIShell

> Get-Alias -Name Resolve-Error | Select-Object -Property Definition

Definition
----------
Resolve-AzError

Expected behavior

When running Resolve-Error, I expect the error to be sent to the AI Shell agent for resolution.

Actual behavior

The error information is displayed in the PowerShell window and doesn't utilize the AI.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.3
PSEdition                      Core
GitCommitId                    7.4.3
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

0.1.0-alpha.12

Visuals

image

dcaro commented 1 month ago

@wyunchi-ms PTAL