fix: improve llmwiki search integration
This commit is contained in:
1 parent
4809ee7db3
commit
56044d9cb7
20 files changed
+504
-66
No files matched your search
@@ -0,0 +1,41 @@
|
||||
. "$PSScriptRoot\env.ps1"
|
||||
|
||||
$PidFile = Join-Path $PidDir "frontend.pid"
|
||||
$LogFile = Join-Path $LogDir "frontend.log"
|
||||
|
||||
if (Test-PidRunning $PidFile) {
|
||||
$existingPid = Get-Content -LiteralPath $PidFile | Select-Object -First 1
|
||||
Write-Host "Frontend is already running (pid $existingPid)."
|
||||
Write-Host "URL: $FrontendPublicBaseUrl"
|
||||
exit 0
|
||||
}
|
||||
|
||||
$NpmCmd = (Get-Command npm.cmd -ErrorAction SilentlyContinue).Source
|
||||
if (-not $NpmCmd) {
|
||||
throw "npm.cmd was not found in PATH. Install Node.js or add npm.cmd to PATH."
|
||||
}
|
||||
|
||||
Remove-Item -LiteralPath $PidFile -Force -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Host "Starting frontend..."
|
||||
Write-Host "Log: $LogFile"
|
||||
|
||||
$RunnerFile = Join-Path $RuntimeDir "run-frontend.ps1"
|
||||
$runner = @"
|
||||
`$ErrorActionPreference = "Continue"
|
||||
Set-Location -LiteralPath $(ConvertTo-PSLiteral $FrontendDir)
|
||||
`$env:VITE_BACKEND_BASE_URL = $(ConvertTo-PSLiteral $BackendPublicBaseUrl)
|
||||
`$env:VITE_LANGGRAPH_BASE_URL = $(ConvertTo-PSLiteral "$BackendPublicBaseUrl/api")
|
||||
& $(ConvertTo-PSLiteral $NpmCmd) run dev -- --host $(ConvertTo-PSLiteral $FrontendHost) --port $(ConvertTo-PSLiteral $FrontendPort) *> $(ConvertTo-PSLiteral $LogFile)
|
||||
"@
|
||||
Set-Content -LiteralPath $RunnerFile -Value $runner -Encoding UTF8
|
||||
|
||||
$proc = Start-Process -FilePath "powershell.exe" -ArgumentList @(
|
||||
"-NoProfile",
|
||||
"-ExecutionPolicy", "Bypass",
|
||||
"-File", $RunnerFile
|
||||
) -WindowStyle Hidden -PassThru
|
||||
|
||||
Set-Content -LiteralPath $PidFile -Value $proc.Id
|
||||
Write-Host "Frontend started (pid $($proc.Id))."
|
||||
Write-Host "URL: $FrontendPublicBaseUrl"
|
||||
Reference in new issue
Block a user