Skip to content

Merge the 1.0.0-preview.4 release branch back to main #379

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 8 commits into from
May 16, 2025

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented May 15, 2025

PR Summary

Merge the 1.0.0-preview.4 release branch back to main.

  • Update version info for the 1.0.0-preview.4 release.
  • Use deploy box and GitHubRelease task to create the GitHub draft release.
  • Make sure the Runspace is available when importing the AIShell module and throw otherwise.
    • When validating packages, I found there were rare cases where the Runspace instance passed to the constructor of AIShell.Integration.Channel is null. The constructor is used only in the public static method CreateSingleton which is called from AIShell.psm1 to create a singleton of the Channel type upon importing the AIShell module.
    • In AIShell.psm1, we call CreateSingleton with $host.Runspace to pass in the Runspace instance, and the module's manifest defines PowerShellHostName = 'ConsoleHost', so in theory, $host.Runspace should never be null, but that just happened.
    • I'm guessing it could be related to the CompletionPredictor module loaded from my profile, which attempts to sync with the modules loaded in the default session from a separate Runspace -- somehow, the Channel singleton got created from that separate Runspace instead of the default session -- but I cannot prove it.
    • To address this issue, I added restricted checks in both AIShell.psm1 and the constructor of Channel type, to make sure that a Channel singleton can be created only if the Runspace instance is available. Related changes are in this commit: a447dee.

@daxian-dbw daxian-dbw merged commit 3e8d335 into PowerShell:main May 16, 2025
4 checks passed
@daxian-dbw daxian-dbw deleted the release-1p4 branch May 16, 2025 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants