Skip to content

Commit e10297c

Browse files
committed
Release 1.238.2025
1 parent 6a31932 commit e10297c

99 files changed

Lines changed: 91841 additions & 2840 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Functions/GenXdev.AI.Data/Export-ImageIndex.ps1

Whitespace-only changes.
Lines changed: 101 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,117 @@
1+
################################################################################
2+
<#
3+
.SYNOPSIS
4+
Adds the GenXdev MCP server to LM Studio using a deeplink configuration.
5+
6+
.DESCRIPTION
7+
This function creates an MCP (Model Context Protocol) server configuration
8+
for GenXdev and launches LM Studio with a deeplink to automatically add the
9+
server. The function encodes the server configuration as a Base64 string and
10+
constructs an appropriate LM Studio deeplink URL for seamless integration.
11+
12+
.PARAMETER ServerName
13+
The name to assign to the MCP server in LM Studio. This name will be displayed
14+
in the LM Studio interface when managing MCP servers.
15+
16+
.PARAMETER Url
17+
The HTTP URL where the GenXdev MCP server is listening for connections. This
18+
should include the protocol, host, port, and path components.
19+
20+
.EXAMPLE
21+
Add-GenXdevMCPServerToLMStudio -ServerName "GenXdev" -Url "http://localhost:2175/mcp"
22+
23+
Opens LM Studio and adds a new MCP server named "GenXdev" pointing to the
24+
default GenXdev MCP server endpoint.
25+
26+
.EXAMPLE
27+
Add-GenXdevMCPServerToLMStudio "MyGenXdev" "http://192.168.1.100:2175/mcp"
28+
29+
Opens LM Studio and adds a new MCP server named "MyGenXdev" pointing to a
30+
remote GenXdev MCP server instance.
31+
#>
132
function Add-GenXdevMCPServerToLMStudio {
33+
34+
[CmdletBinding()]
35+
236
param(
3-
[string]$ServerName = 'GenXdev',
4-
[string]$Url = 'http://localhost:2175/mcp'
37+
###############################################################################
38+
[Parameter(
39+
Mandatory = $false,
40+
Position = 0,
41+
HelpMessage = "The name to assign to the MCP server in LM Studio"
42+
)]
43+
[string] $ServerName = 'GenXdev',
44+
###############################################################################
45+
[Parameter(
46+
Mandatory = $false,
47+
Position = 1,
48+
HelpMessage = "The HTTP URL where the GenXdev MCP server is listening"
49+
)]
50+
[string] $Url = 'http://localhost:2175/mcp'
51+
###############################################################################
552
)
653

7-
# PowerShell script to launch LM Studio with a deeplink to add GenXdev MCP server
54+
begin {
855

9-
# Define the MCP server configuration as a JSON string
10-
$mcpConfig = @"
56+
# output verbose information about the operation being performed
57+
Microsoft.PowerShell.Utility\Write-Verbose (
58+
"Preparing to add GenXdev MCP server '${ServerName}' at '${Url}' to " +
59+
"LM Studio"
60+
)
61+
}
62+
63+
process {
64+
65+
# create the mcp server configuration as a json string for lm studio
66+
$mcpConfig = @"
1167
{
1268
"servers": {
13-
"ServerName": {
69+
"${ServerName}": {
1470
"type": "http",
15-
"url": "$Url"
71+
"url": "${Url}"
1672
}
1773
}
1874
}
1975
"@
2076

21-
# Encode the JSON configuration for the deeplink
22-
$encodedConfig = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($mcpConfig))
77+
# output verbose information about the configuration being created
78+
Microsoft.PowerShell.Utility\Write-Verbose (
79+
"Created MCP configuration JSON for server registration"
80+
)
81+
82+
# encode the json configuration as base64 for deeplink transmission
83+
$encodedConfig = [Convert]::ToBase64String(
84+
[System.Text.Encoding]::UTF8.GetBytes($mcpConfig)
85+
)
86+
87+
# output verbose information about the encoding process
88+
Microsoft.PowerShell.Utility\Write-Verbose (
89+
"Encoded configuration as Base64 string for deeplink URL"
90+
)
91+
92+
# construct the lm studio deeplink url with encoded configuration
93+
$deeplink = "lmstudio://mcp?config=${encodedConfig}"
2394

24-
# Construct the LM Studio deeplink
25-
$deeplink = "lmstudio://mcp?config=$encodedConfig"
95+
# output verbose information about the deeplink construction
96+
Microsoft.PowerShell.Utility\Write-Verbose (
97+
"Constructed LM Studio deeplink: ${deeplink}"
98+
)
2699

27-
# Launch LM Studio with the deeplink using Start-Process
28-
Microsoft.PowerShell.Management\Start-Process -FilePath $deeplink
100+
# launch lm studio application with the deeplink using start-process
101+
Microsoft.PowerShell.Management\Start-Process -FilePath $deeplink
29102

30-
Microsoft.PowerShell.Utility\Write-Host 'Launched LM Studio with deeplink to add GenXdev MCP server.'
31-
}
103+
# output confirmation message to the user about the operation
104+
Microsoft.PowerShell.Utility\Write-Host (
105+
"Launched LM Studio with deeplink to add GenXdev MCP server."
106+
)
107+
}
108+
109+
end {
110+
111+
# output verbose information about the completion of the operation
112+
Microsoft.PowerShell.Utility\Write-Verbose (
113+
"Successfully completed GenXdev MCP server addition to LM Studio"
114+
)
115+
}
116+
}
117+
################################################################################

Functions/GenXdev.AI.Queries/Get-MediaFileAudioTranscription.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,10 +764,10 @@ function Get-MediaFileAudioTranscription {
764764
-ErrorAction SilentlyContinue
765765

766766
# check if the module was successfully loaded
767-
$module = Microsoft.PowerShell.Core\Get-Module `
767+
$ModuleObj = Microsoft.PowerShell.Core\Get-Module `
768768
'Microsoft.WinGet.Client' -ErrorAction SilentlyContinue
769769

770-
if ($null -eq $module) {
770+
if ($null -eq $ModuleObj) {
771771

772772
return $false
773773
}

Functions/GenXdev.AI/EnsureGithubCLIInstalled.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ function EnsureGithubCLIInstalled {
3737
function IsWinGetInstalled {
3838
try {
3939
Microsoft.PowerShell.Core\Import-Module 'Microsoft.WinGet.Client' -ErrorAction Stop
40-
$module = Microsoft.PowerShell.Core\Get-Module 'Microsoft.WinGet.Client' -ErrorAction Stop
41-
return $null -ne $module
40+
$ModuleObj = Microsoft.PowerShell.Core\Get-Module 'Microsoft.WinGet.Client' -ErrorAction Stop
41+
return $null -ne $ModuleObj
4242
}
4343
catch [System.IO.FileNotFoundException] {
4444
Microsoft.PowerShell.Utility\Write-Verbose 'WinGet module not found'

Functions/GenXdev.AI/EnsurePaintNet.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function EnsurePaintNet {
4343
function IsWinGetInstalled {
4444
try {
4545
Microsoft.PowerShell.Core\Import-Module 'Microsoft.WinGet.Client' -ErrorAction Stop
46-
$module = Microsoft.PowerShell.Core\Get-Module 'Microsoft.WinGet.Client' -ErrorAction Stop
47-
return $null -ne $module
46+
$ModuleObj = Microsoft.PowerShell.Core\Get-Module 'Microsoft.WinGet.Client' -ErrorAction Stop
47+
return $null -ne $ModuleObj
4848
}
4949
catch [System.IO.FileNotFoundException] {
5050
Microsoft.PowerShell.Utility\Write-Verbose 'WinGet module not found'

Functions/GenXdev.AI/EnsureWinMergeInstalled.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ function EnsureWinMergeInstalled {
3838
-ErrorAction SilentlyContinue
3939

4040
# verify if module was loaded successfully
41-
$module = Microsoft.PowerShell.Core\Get-Module 'Microsoft.WinGet.Client' `
41+
$ModuleObj = Microsoft.PowerShell.Core\Get-Module 'Microsoft.WinGet.Client' `
4242
-ErrorAction SilentlyContinue
4343

44-
return $null -ne $module
44+
return $null -ne $ModuleObj
4545
}
4646

4747
########################################################################

Functions/GenXdev.AI/New-LLMTextChat.ps1

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -811,13 +811,6 @@ function New-LLMTextChat {
811811
Microsoft.PowerShell.Core\ForEach-Object {
812812
$null = $_.function.Remove('callback')
813813
}
814-
815-
# serialize function definitions to json for instructions
816-
$functionInfo = $functionInfoObj |
817-
Microsoft.PowerShell.Utility\ConvertTo-Json `
818-
-ErrorAction SilentlyContinue `
819-
-WarningAction SilentlyContinue `
820-
-Depth 10
821814
}
822815
}
823816

Functions/GenXdev.AI/Start-GenXdevMCPServer.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function Start-GenXdevMCPServer {
9999
}
100100
serverInfo = @{
101101
name = 'GenXdev-PowerShell-MCP-Server'
102-
version = '1.236.2025'
102+
version = '1.238.2025'
103103
}
104104
}
105105
}
@@ -197,7 +197,7 @@ function Start-GenXdevMCPServer {
197197
}
198198
serverInfo = @{
199199
name = 'GenXdev-PowerShell-MCP-Server'
200-
version = '1.236.2025'
200+
version = '1.238.2025'
201201
}
202202
}
203203
}
@@ -733,7 +733,7 @@ function Start-GenXdevMCPServer {
733733
Description = "Shows GenXdev PowerShell modules with their cmdlets and aliases, allow it to take a few seconds or more. Don't invoke this function without parameters, that would be too much data. Wildcards allowed like * and ?"
734734
AllowedParams = @(
735735
'CmdletName=string',
736-
'BaseModuleName=string',
736+
'ModuleName=string',
737737
'NoLocal',
738738
'OnlyPublished',
739739
'FromScripts',
@@ -750,7 +750,7 @@ function Start-GenXdevMCPServer {
750750
Description = "Gets GenXdev PowerShell modules with their cmdlets and aliases, allow it to take a few seconds or more. Don't invoke this function without parameters, that would be too much data. Wildcards allowed like * and ?"
751751
AllowedParams = @(
752752
'CmdletName=string',
753-
'BaseModuleName=string',
753+
'ModuleName=string',
754754
'NoLocal',
755755
'OnlyPublished',
756756
'FromScripts',
@@ -865,7 +865,7 @@ function Start-GenXdevMCPServer {
865865
AllowedParams = @(
866866
'CmdletName=string',
867867
'Description=string',
868-
'BaseModuleName',
868+
'ModuleName',
869869
'ModuleName',
870870
'CmdletAliases'
871871
)

GenXdev.AI.Data.psm1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ if ($major -ne 10) {
1111
}
1212

1313

14-
. "$PSScriptRoot\Functions\GenXdev.AI.Data\Export-ImageIndex.ps1"

GenXdev.AI.psd1

Lines changed: 3 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: genXdev
55
#
6-
# Generated on: 08/08/2025
6+
# Generated on: 13/08/2025
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
RootModule = 'GenXdev.AI.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.236.2025'
15+
ModuleVersion = '1.238.2025'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ ClrVersion = '9.0.0.1'
5151
ProcessorArchitecture = 'Amd64'
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'GenXdev.Queries'; ModuleVersion = '1.236.2025'; })
54+
RequiredModules = @(@{ModuleName = 'GenXdev.Queries'; ModuleVersion = '1.238.2025'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
# RequiredAssemblies = @()
@@ -146,94 +146,17 @@ FileList = 'GenXdev.AI.Data.psm1', 'GenXdev.AI.DeepStack.psm1',
146146
'GenXdev.AI.LMStudio.psm1', 'GenXdev.AI.psd1', 'GenXdev.AI.psm1',
147147
'GenXdev.AI.Queries.psm1', 'ISSUES.md', 'LICENSE', 'license.txt',
148148
'powershell.jpg', 'programmer.jpg', 'README.md',
149-
'Tests\GenXdev.AI.Queries\Add-EmoticonsToText.Tests.ps1',
150-
'Tests\GenXdev.AI.Queries\Add-ImageDirectories.Tests.ps1',
151-
'Tests\GenXdev.AI.Queries\ConvertFrom-CorporateSpeak.Tests.ps1',
152-
'Tests\GenXdev.AI.Queries\ConvertFrom-DiplomaticSpeak.Tests.ps1',
153-
'Tests\GenXdev.AI.Queries\ConvertTo-CorporateSpeak.Tests.ps1',
154-
'Tests\GenXdev.AI.Queries\ConvertTo-DiplomaticSpeak.Tests.ps1',
155-
'Tests\GenXdev.AI.Queries\Export-ImageIndex.Tests.ps1',
156149
'Tests\GenXdev.AI.Queries\Find-Image.Tests.ps1',
157-
'Tests\GenXdev.AI.Queries\Find-IndexedImage.Tests.ps1',
158-
'Tests\GenXdev.AI.Queries\Get-AIImageCollection.Tests.ps1',
159-
'Tests\GenXdev.AI.Queries\Get-AIKnownFacesRootpath.Tests.ps1',
160-
'Tests\GenXdev.AI.Queries\Get-AIMetaLanguage.Tests.ps1',
161-
'Tests\GenXdev.AI.Queries\Get-Fallacy.Tests.ps1',
162-
'Tests\GenXdev.AI.Queries\Get-ImageIndexPath.Tests.ps1',
163-
'Tests\GenXdev.AI.Queries\Get-ImageIndexStats.Tests.ps1',
164150
'Tests\GenXdev.AI.Queries\Get-MediaFileAudioTranscription.Tests.ps1',
165-
'Tests\GenXdev.AI.Queries\Get-ScriptExecutionErrorFixPrompt.Tests.ps1',
166-
'Tests\GenXdev.AI.Queries\Get-SimularMovieTitles.Tests.ps1',
167-
'Tests\GenXdev.AI.Queries\Invoke-AIPowershellCommand.Tests.ps1',
168-
'Tests\GenXdev.AI.Queries\Invoke-ImageFacesUpdate.Tests.ps1',
169-
'Tests\GenXdev.AI.Queries\Invoke-ImageKeywordUpdate.Tests.ps1',
170-
'Tests\GenXdev.AI.Queries\Invoke-ImageMetadataUpdate.Tests.ps1',
171-
'Tests\GenXdev.AI.Queries\Invoke-ImageObjectsUpdate.Tests.ps1',
172-
'Tests\GenXdev.AI.Queries\Invoke-ImageScenesUpdate.Tests.ps1',
173-
'Tests\GenXdev.AI.Queries\Invoke-QueryImageContent.Tests.ps1',
174-
'Tests\GenXdev.AI.Queries\Remove-ImageDirectories.Tests.ps1',
175-
'Tests\GenXdev.AI.Queries\Remove-ImageMetaData.Tests.ps1',
176-
'Tests\GenXdev.AI.Queries\Save-FoundImageFaces.Tests.ps1',
177-
'Tests\GenXdev.AI.Queries\Save-FoundImageObjects.Tests.ps1',
178-
'Tests\GenXdev.AI.Queries\Save-Transcriptions.Tests.ps1',
179-
'Tests\GenXdev.AI.Queries\Set-AIImageCollection.Tests.ps1',
180-
'Tests\GenXdev.AI.Queries\Set-AIKnownFacesRootpath.Tests.ps1',
181-
'Tests\GenXdev.AI.Queries\Set-AIMetaLanguage.Tests.ps1',
182-
'Tests\GenXdev.AI.Queries\Set-ImageIndexPath.Tests.ps1',
183-
'Tests\GenXdev.AI.Queries\Set-WindowsWallpaperEx.Tests.ps1',
184-
'Tests\GenXdev.AI.Queries\Show-FoundImagesInBrowser.Tests.ps1',
185-
'Tests\GenXdev.AI.Queries\Show-GenXdevScriptErrorFixInIde.Tests.ps1',
186-
'Tests\GenXdev.AI.Queries\Start-AudioTranscription.Tests.ps1',
187-
'Tests\GenXdev.AI.Queries\Update-AllImageMetaData.Tests.ps1',
188-
'Tests\GenXdev.AI.LMStudio\Add-GenXdevMCPServerToLMStudio.Tests.ps1',
189-
'Tests\GenXdev.AI.LMStudio\EnsureLMStudio.Tests.ps1',
190151
'Tests\GenXdev.AI.LMStudio\Get-LMStudioLoadedModelList.Tests.ps1',
191152
'Tests\GenXdev.AI.LMStudio\Get-LMStudioModelList.Tests.ps1',
192153
'Tests\GenXdev.AI.LMStudio\Get-LMStudioPaths.Tests.ps1',
193-
'Tests\GenXdev.AI.LMStudio\Get-LMStudioTextEmbedding.Tests.ps1',
194-
'Tests\GenXdev.AI.LMStudio\Get-LMStudioWindow.Tests.ps1',
195-
'Tests\GenXdev.AI.LMStudio\Initialize-LMStudioModel.Tests.ps1',
196-
'Tests\GenXdev.AI.LMStudio\Install-LMStudioApplication.Tests.ps1',
197154
'Tests\GenXdev.AI.LMStudio\Start-LMStudioApplication.Tests.ps1',
198155
'Tests\GenXdev.AI.LMStudio\Test-LMStudioInstallation.Tests.ps1',
199156
'Tests\GenXdev.AI.LMStudio\Test-LMStudioProcess.Tests.ps1',
200-
'Tests\GenXdev.AI.DeepStack\Compare-ImageFaces.Tests.ps1',
201-
'Tests\GenXdev.AI.DeepStack\EnsureDeepStack.Tests.ps1',
202-
'Tests\GenXdev.AI.DeepStack\Get-ImageDetectedFaces.Tests.ps1',
203-
'Tests\GenXdev.AI.DeepStack\Get-ImageDetectedObjects.Tests.ps1',
204-
'Tests\GenXdev.AI.DeepStack\Get-ImageDetectedScenes.Tests.ps1',
205-
'Tests\GenXdev.AI.DeepStack\Get-RegisteredFaces.Tests.ps1',
206-
'Tests\GenXdev.AI.DeepStack\Invoke-ImageEnhancement.Tests.ps1',
207-
'Tests\GenXdev.AI.DeepStack\Register-AllFaces.Tests.ps1',
208-
'Tests\GenXdev.AI.DeepStack\Register-Face.Tests.ps1',
209-
'Tests\GenXdev.AI.DeepStack\Unregister-AllFaces.Tests.ps1',
210-
'Tests\GenXdev.AI.DeepStack\Unregister-Face.Tests.ps1',
211-
'Tests\GenXdev.AI\Approve-NewTextFileContent.Tests.ps1',
212-
'Tests\GenXdev.AI\Convert-DotNetTypeToLLMType.Tests.ps1',
213157
'Tests\GenXdev.AI\ConvertTo-LMStudioFunctionDefinition.Tests.ps1',
214-
'Tests\GenXdev.AI\EnsureGithubCLIInstalled.Tests.ps1',
215-
'Tests\GenXdev.AI\EnsurePaintNet.Tests.ps1',
216-
'Tests\GenXdev.AI\EnsureWinMergeInstalled.Tests.ps1',
217-
'Tests\GenXdev.AI\GenerateMasonryLayoutHtml.Tests.ps1',
218-
'Tests\GenXdev.AI\Get-AIDefaultLLMSettings.Tests.ps1',
219-
'Tests\GenXdev.AI\Get-AILLMSettings.Tests.ps1',
220-
'Tests\GenXdev.AI\Get-CpuCore.Tests.ps1',
221-
'Tests\GenXdev.AI\Get-HasCapableGpu.Tests.ps1',
222-
'Tests\GenXdev.AI\Get-NumberOfCpuCores.Tests.ps1',
223158
'Tests\GenXdev.AI\Get-TextTranslation.Tests.ps1',
224-
'Tests\GenXdev.AI\Get-VectorSimilarity.Tests.ps1',
225159
'Tests\GenXdev.AI\Invoke-CommandFromToolCall.Tests.ps1',
226-
'Tests\GenXdev.AI\Invoke-LLMBooleanEvaluation.Tests.ps1',
227-
'Tests\GenXdev.AI\Invoke-LLMQuery.Tests.ps1',
228-
'Tests\GenXdev.AI\Invoke-LLMStringListEvaluation.Tests.ps1',
229-
'Tests\GenXdev.AI\Invoke-LLMTextTransformation.Tests.ps1',
230-
'Tests\GenXdev.AI\Invoke-WinMerge.Tests.ps1',
231-
'Tests\GenXdev.AI\New-LLMAudioChat.Tests.ps1',
232-
'Tests\GenXdev.AI\New-LLMTextChat.Tests.ps1',
233-
'Tests\GenXdev.AI\Set-AILLMSettings.Tests.ps1',
234-
'Tests\GenXdev.AI\Set-GenXdevAICommandNotFoundAction.Tests.ps1',
235-
'Tests\GenXdev.AI\Start-GenXdevMCPServer.Tests.ps1',
236-
'Tests\GenXdev.AI\Test-DeepLinkImageFile.Tests.ps1',
237160
'Functions\GenXdev.AI.Queries\Add-EmoticonsToText.ps1',
238161
'Functions\GenXdev.AI.Queries\Add-ImageDirectories.ps1',
239162
'Functions\GenXdev.AI.Queries\ConvertFrom-CorporateSpeak.ps1',
@@ -298,7 +221,6 @@ FileList = 'GenXdev.AI.Data.psm1', 'GenXdev.AI.DeepStack.psm1',
298221
'Functions\GenXdev.AI.DeepStack\Register-Face.ps1',
299222
'Functions\GenXdev.AI.DeepStack\Unregister-AllFaces.ps1',
300223
'Functions\GenXdev.AI.DeepStack\Unregister-Face.ps1',
301-
'Functions\GenXdev.AI.Data\Export-ImageIndex.ps1',
302224
'Functions\GenXdev.AI\Approve-NewTextFileContent.ps1',
303225
'Functions\GenXdev.AI\Convert-DotNetTypeToLLMType.ps1',
304226
'Functions\GenXdev.AI\ConvertTo-LMStudioFunctionDefinition.ps1',

0 commit comments

Comments
 (0)