Skip to content

Commit b6b9c18

Browse files
authored
Merge the v1.0.0-preview.2 release branch back to main
2 parents 9b66a08 + 9653de5 commit b6b9c18

File tree

8 files changed

+26
-18
lines changed

8 files changed

+26
-18
lines changed

.github/workflows/dotnet.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup .NET
2121
uses: actions/setup-dotnet@v4
2222
with:
23-
dotnet-version: 8.0.403
23+
dotnet-version: 8.0.406
2424
- name: Build
2525
shell: pwsh
2626
run: |
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup .NET
3838
uses: actions/setup-dotnet@v4
3939
with:
40-
dotnet-version: 8.0.403
40+
dotnet-version: 8.0.406
4141
- name: Build
4242
shell: pwsh
4343
run: |
@@ -54,7 +54,7 @@ jobs:
5454
- name: Setup .NET
5555
uses: actions/setup-dotnet@v4
5656
with:
57-
dotnet-version: 8.0.403
57+
dotnet-version: 8.0.406
5858
- name: Build
5959
shell: pwsh
6060
run: |

build.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ function Copy-1PFilesToSign
336336
[string] $TargetRoot
337337
)
338338

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

341341
if (Test-Path $TargetRoot) {
342342
Remove-Item -Path $TargetRoot -Recurse -Force

global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "8.0.403"
3+
"version": "8.0.406"
44
}
55
}

shell/AIShell.Integration/AIShell.Integration.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="System.Management.Automation" Version="7.4.5">
13+
<PackageReference Include="System.Management.Automation" Version="7.4.7">
1414
<ExcludeAssets>contentFiles</ExcludeAssets>
1515
<PrivateAssets>All</PrivateAssets>
1616
</PackageReference>
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
@{
22
RootModule = 'AIShell.psm1'
33
NestedModules = @("AIShell.Integration.dll")
4-
ModuleVersion = '1.0.1'
4+
ModuleVersion = '1.0.2'
55
GUID = 'ECB8BEE0-59B9-4DAE-9D7B-A990B480279A'
66
Author = 'Microsoft Corporation'
77
CompanyName = 'Microsoft Corporation'
88
Copyright = '(c) Microsoft Corporation. All rights reserved.'
99
Description = 'Integration with the AIShell to provide intelligent shell experience'
10-
PowerShellVersion = '7.4.5'
10+
PowerShellVersion = '7.4.6'
1111
FunctionsToExport = @()
1212
CmdletsToExport = @('Start-AIShell','Invoke-AIShell','Resolve-Error')
1313
VariablesToExport = '*'
1414
AliasesToExport = @('aish', 'askai', 'fixit')
1515
HelpInfoURI = 'https://aka.ms/aishell-help'
16-
PrivateData = @{ PSData = @{ Prerelease = 'preview1'; ProjectUri = 'https://github.com/PowerShell/AIShell' } }
16+
PrivateData = @{ PSData = @{ Prerelease = 'preview2'; ProjectUri = 'https://github.com/PowerShell/AIShell' } }
1717
}

shell/agents/Microsoft.Azure.Agent/DataRetriever.cs

+7-8
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,11 @@ private void PairPlaceholdersForCLICode(ResponseData data)
485485
{
486486
if (!cmds.TryGetValue(script, out command))
487487
{
488-
int firstParamIndex = script.IndexOf("--");
489-
command = script.AsSpan(0, firstParamIndex).Trim().ToString();
488+
// The generated command may contain both long (--xxx) and short (-x) flag forms for its parameters.
489+
int firstParamIndex = script.IndexOf(" -");
490+
command = firstParamIndex is -1
491+
? script.Trim()
492+
: script.AsSpan(0, firstParamIndex).Trim().ToString();
490493
cmds.Add(script, command);
491494
}
492495

@@ -502,12 +505,8 @@ private void PairPlaceholdersForCLICode(ResponseData data)
502505
argIndex--;
503506
}
504507

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

513512
placeholderFound = true;

shell/shell.common.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<TargetFramework>net8.0</TargetFramework>
99
<ImplicitUsings>enable</ImplicitUsings>
1010
<LangVersion>12.0</LangVersion>
11-
<Version>1.0.0-preview.1</Version>
11+
<Version>1.0.0-preview.2</Version>
1212

1313
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1414
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

tools/packaging/packaging.psm1

+9
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,15 @@ function New-TarballPackage
148148
}
149149
}
150150

151+
if (Get-Command -Name chmod -CommandType Application -ErrorAction Ignore) {
152+
Write-Verbose "Add the execution permission to 'aish'" -Verbose
153+
$executable = Join-Path $PackageSourcePath 'aish'
154+
chmod +x $executable
155+
156+
$permission = Get-ChildItem $executable | ForEach-Object UnixFileMode
157+
Write-Verbose "File permission: $permission" -Verbose
158+
}
159+
151160
if (Get-Command -Name tar -CommandType Application -ErrorAction Ignore) {
152161
Write-Verbose "Create tarball package" -Verbose
153162
$options = "-czf"

0 commit comments

Comments
 (0)