Skip to content

Commit 4cccebd

Browse files
committed
clean files
1 parent c6de539 commit 4cccebd

File tree

5 files changed

+11
-109
lines changed

5 files changed

+11
-109
lines changed

code365scripts.openai/Private/New-Gist.ps1

Lines changed: 0 additions & 64 deletions
This file was deleted.

code365scripts.openai/Private/Profile.ps1

Lines changed: 0 additions & 29 deletions
This file was deleted.

code365scripts.openai/Private/Test-OpenAIConnectivity.ps1

Lines changed: 0 additions & 10 deletions
This file was deleted.

code365scripts.openai/code365scripts.openai.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
# Modules that must be imported into the global environment prior to importing this module
5454
# RequiredModules = @(@{ ModuleName = 'MicrosoftTeams'; ModuleVersion = '2.0.0' }, @{ModuleName = 'AzureAD'; ModuleVersion = '2.0.2.130' })
55-
RequiredModules = @(@{ModuleName = "powershellextension"; RequiredVersion = "0.0.1"; Guid = "df717a00-1acf-45e8-a958-0c9bcb9af322" })
55+
RequiredModules = @(@{ModuleName = "powershellextension"; RequiredVersion = "0.0.2"; Guid = "df717a00-1acf-45e8-a958-0c9bcb9af322" })
5656
# Assemblies that must be loaded prior to importing this module
5757
# RequiredAssemblies = @()
5858

code365scripts.openai/code365scripts.openai.psm1

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
Import-LocalizedData -FileName "resources.psd1" -BindingVariable "resources"
22

3-
foreach ($directory in @('Public', 'Private')) {
4-
Get-ChildItem -Path "$PSScriptRoot\$directory\*.ps1" | ForEach-Object { . $_.FullName }
3+
foreach ($directory in @('Public', 'Private', '.')) {
4+
5+
$path = Join-Path -Path $PSScriptRoot -ChildPath $directory
6+
if (Test-Path $path) {
7+
Get-ChildItem -Path $path -Filter "*.ps1" | ForEach-Object { . $_.FullName }
8+
}
59
}
610

11+
712
# check if the "$home\.openai-powershell\profile.ps1" exists, if so, source it, otherwise create it and append some code
813
# $profilePath = "$home\.openai-powershell\profile.ps1"
914
# if (Test-Path $profilePath) {
@@ -51,8 +56,8 @@ Start-Job -ScriptBlock {
5156
$latestVersion = (Find-Module $module).Version
5257
$currentVersion = (Get-Module $module -ListAvailable | Select-Object -First 1).Version
5358
if ($latestVersion -gt $currentVersion) {
54-
$notification = "An update to the module ($module) is available. Current version: $currentVersion. Latest version: $latestVersion. Run 'Update-Module $module' to update the module."
55-
$Host.UI.RawUI.WindowTitle = "Update Available - $module"
56-
Write-Host $notification
59+
$notification = "An update to the module ($module) is available. Current version: $currentVersion. Latest version: $latestVersion. Run 'Update-Module $module' to update the module."
60+
$Host.UI.RawUI.WindowTitle = "Update Available - $module"
61+
Write-Host $notification
5762
}
5863
} -Name "check_openai_UpdateNotification"

0 commit comments

Comments
 (0)