Skip to content

Commit a67409a

Browse files
committed
Install AIShell module on macOS
1 parent b78aa7e commit a67409a

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

tools/scripts/install-aishell.ps1

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,12 @@ function Uninstall-AIShellApp {
204204
}
205205

206206
function Install-AIShellModule {
207-
if ($IsWindows) {
208-
$modVersion = $Script:ModuleVersion
209-
Write-Host "Installing the PowerShell module 'AIShell' $modVersion ..."
210-
Install-PSResource -Name AIShell -Repository PSGallery -Prerelease -TrustRepository -Version $modVersion -ErrorAction Stop -WarningAction SilentlyContinue
211-
} else {
212-
Write-Host -ForegroundColor Yellow "Currently the AIShell PowerShell module will only work in iTerm2 terminal and still has limited support but if you would like to test it, you can install it with 'Install-PSResource -Name AIShell -Repository PSGallery -Prerelease'."
213-
Write-Host -ForegroundColor Yellow "The AI Shell app has been added to your path, please run 'aish' to use the standalone experience."
207+
$modVersion = $Script:ModuleVersion
208+
Write-Host "Installing the PowerShell module 'AIShell' $modVersion ..."
209+
Install-PSResource -Name AIShell -Repository PSGallery -Prerelease -TrustRepository -Version $modVersion -ErrorAction Stop -WarningAction SilentlyContinue
210+
211+
if ($IsMacOS) {
212+
Write-Host -ForegroundColor Yellow "NOTE: The 'AIShell' PowerShell module only works in iTerm2 terminal in order to provide the sidecar experience."
214213
}
215214
}
216215

@@ -237,12 +236,16 @@ if ($Uninstall) {
237236
Uninstall-AIShellApp
238237
Uninstall-AIShellModule
239238

240-
$message = $IsWindows ? "AI Shell App and PowerShell module have" : "AI Shell App has"
241-
Write-Host "`n$message been successfully uninstalled." -ForegroundColor Green
239+
Write-Host -ForegroundColor Green "`nAI Shell App and PowerShell module have been successfully uninstalled."
242240
} else {
243241
Install-AIShellApp
244242
Install-AIShellModule
245243

246-
$message = $IsWindows ? "'Start-AIShell'" : "'aish'"
247-
Write-Host "`nInstallation succeeded.`nTo learn more about AI Shell please visit https://aka.ms/AIShell-Docs.`nTo get started please run $message to start AI Shell." -ForegroundColor Green
244+
$condition = $IsMacOS ? " if you are in iTerm2" : $null
245+
Write-Host -ForegroundColor Green -Object @"
246+
247+
Installation succeeded.
248+
To learn more about AI Shell please visit https://aka.ms/AIShell-Docs.
249+
To get started, please run 'Start-AIShell' to use the sidecar experience${condition}, or run 'aish' to use the standalone experience.
250+
"@
248251
}

0 commit comments

Comments
 (0)