Compare commits

...

5 Commits

Author SHA1 Message Date
LASTA_DEV01\lasta
dd7bc4e894 fds 2026-06-24 18:11:03 +09:00
LASTA_DEV01\lasta
911439e17c Merge branch 'main' of https://gitea.rpgrepublic.net/lasta/AI 2026-06-24 17:52:59 +09:00
LASTA_DEV01\lasta
29b34b457a f 2026-06-24 17:52:02 +09:00
lasta
1fa033e739 q 2026-05-30 14:54:46 +09:00
lasta
847a1c4f01 [restart_all_servers.bat] 2026-05-24 16:10:50 +09:00
4 changed files with 33 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@@ -94,7 +94,7 @@ export const extractorModelsResponseSchema = z.object({
z
.object({
id: z.string(),
owned_by: z.string().optional(),
owned_by: z.string().nullish(),
})
.passthrough(),
)

View File

@@ -288,6 +288,32 @@ function Stop-ExistingServers {
Start-Sleep -Milliseconds 800
}
function Quote-ProcessArguments {
param([string[]] $Arguments)
if (-not $Arguments) {
return @()
}
$quoted = @()
foreach ($arg in $Arguments) {
if ($null -eq $arg) {
continue
}
$text = [string] $arg
if ($text.Length -eq 0) {
$quoted += '""'
continue
}
if ($text -match '\s' -and -not ($text.StartsWith('"') -and $text.EndsWith('"'))) {
$escaped = $text -replace '"', '\"'
$quoted += '"' + $escaped + '"'
} else {
$quoted += $text
}
}
return $quoted
}
function Invoke-LoggedCommand {
param(
[string] $FilePath,
@@ -300,10 +326,12 @@ function Invoke-LoggedCommand {
$stderrPath = Join-Path $logDir ($LogName -replace "\.log$", ".stderr.log")
Write-Step ("Running {0} {1}" -f (Split-Path -Leaf $FilePath), ($Arguments -join " "))
$quotedArgs = Quote-ProcessArguments -Arguments $Arguments
Remove-Item -LiteralPath $logPath, $stderrPath -Force -ErrorAction SilentlyContinue
$proc = Start-Process `
-FilePath $FilePath `
-ArgumentList $Arguments `
-ArgumentList $quotedArgs `
-WorkingDirectory $WorkingDirectory `
-RedirectStandardOutput $logPath `
-RedirectStandardError $stderrPath `
@@ -338,10 +366,12 @@ function Start-LoggedServer {
[Environment]::SetEnvironmentVariable($key, [string] $Environment[$key], "Process")
}
$quotedArgs = Quote-ProcessArguments -Arguments $Arguments
try {
$proc = Start-Process `
-FilePath $FilePath `
-ArgumentList $Arguments `
-ArgumentList $quotedArgs `
-WorkingDirectory $WorkingDirectory `
-RedirectStandardOutput $stdout `
-RedirectStandardError $stderr `