Skip to content

Merge the 1.0.0-preview.2 release branch back to main #344

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

Merged
merged 5 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.403
dotnet-version: 8.0.406
- name: Build
shell: pwsh
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.403
dotnet-version: 8.0.406
- name: Build
shell: pwsh
run: |
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.403
dotnet-version: 8.0.406
- name: Build
shell: pwsh
run: |
Expand Down
2 changes: 1 addition & 1 deletion build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ function Copy-1PFilesToSign
[string] $TargetRoot
)

$pattern = "*.ps*1", "AIShell.*.dll", "aish.dll", "aish.exe", "Markdown.VT.dll", "ReadLine.dll"
$pattern = "*.ps*1", "AIShell.*.dll", "aish.dll", "aish.exe", "Markdown.VT.dll", "ReadLine.dll", "Microsoft.Azure.Agent.dll"

if (Test-Path $TargetRoot) {
Remove-Item -Path $TargetRoot -Recurse -Force
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0.403"
"version": "8.0.406"
}
}
2 changes: 1 addition & 1 deletion shell/AIShell.Integration/AIShell.Integration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Management.Automation" Version="7.4.5">
<PackageReference Include="System.Management.Automation" Version="7.4.7">
<ExcludeAssets>contentFiles</ExcludeAssets>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
Expand Down
6 changes: 3 additions & 3 deletions shell/AIShell.Integration/AIShell.psd1
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@{
RootModule = 'AIShell.psm1'
NestedModules = @("AIShell.Integration.dll")
ModuleVersion = '1.0.1'
ModuleVersion = '1.0.2'
GUID = 'ECB8BEE0-59B9-4DAE-9D7B-A990B480279A'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = '(c) Microsoft Corporation. All rights reserved.'
Description = 'Integration with the AIShell to provide intelligent shell experience'
PowerShellVersion = '7.4.5'
PowerShellVersion = '7.4.6'
FunctionsToExport = @()
CmdletsToExport = @('Start-AIShell','Invoke-AIShell','Resolve-Error')
VariablesToExport = '*'
AliasesToExport = @('aish', 'askai', 'fixit')
HelpInfoURI = 'https://aka.ms/aishell-help'
PrivateData = @{ PSData = @{ Prerelease = 'preview1'; ProjectUri = 'https://github.com/PowerShell/AIShell' } }
PrivateData = @{ PSData = @{ Prerelease = 'preview2'; ProjectUri = 'https://github.com/PowerShell/AIShell' } }
}
15 changes: 7 additions & 8 deletions shell/agents/Microsoft.Azure.Agent/DataRetriever.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,11 @@ private void PairPlaceholdersForCLICode(ResponseData data)
{
if (!cmds.TryGetValue(script, out command))
{
int firstParamIndex = script.IndexOf("--");
command = script.AsSpan(0, firstParamIndex).Trim().ToString();
// The generated command may contain both long (--xxx) and short (-x) flag forms for its parameters.
int firstParamIndex = script.IndexOf(" -");
command = firstParamIndex is -1
? script.Trim()
: script.AsSpan(0, firstParamIndex).Trim().ToString();
cmds.Add(script, command);
}

Expand All @@ -502,12 +505,8 @@ private void PairPlaceholdersForCLICode(ResponseData data)
argIndex--;
}

// The generated AzCLI command may contain both long (--xxx) and short (-x) flag forms
// for its parameters. So we need to properly handle it when looking for the parameter
// right before the placeholder value.
int paramIndex = 1 + Math.Max(
script.LastIndexOf(" --", argIndex),
script.LastIndexOf(" -", argIndex));
// The parameter for this argument may use either long (--xxx) or short (-x) flag forms.
int paramIndex = script.LastIndexOf(" -", argIndex);
parameter = script.AsSpan(paramIndex, argIndex - paramIndex).Trim().ToString();

placeholderFound = true;
Expand Down
2 changes: 1 addition & 1 deletion shell/shell.common.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>12.0</LangVersion>
<Version>1.0.0-preview.1</Version>
<Version>1.0.0-preview.2</Version>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
9 changes: 9 additions & 0 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ function New-TarballPackage
}
}

if (Get-Command -Name chmod -CommandType Application -ErrorAction Ignore) {
Write-Verbose "Add the execution permission to 'aish'" -Verbose
$executable = Join-Path $PackageSourcePath 'aish'
chmod +x $executable

$permission = Get-ChildItem $executable | ForEach-Object UnixFileMode
Write-Verbose "File permission: $permission" -Verbose
}

if (Get-Command -Name tar -CommandType Application -ErrorAction Ignore) {
Write-Verbose "Create tarball package" -Verbose
$options = "-czf"
Expand Down