$ErrorActionPreference = "Stop"
$ProjectRoot = Split-Path -Parent $PSScriptRoot
Push-Location (Join-Path $ProjectRoot "backend")
try {
    uv run python -m zbt.commands.seed_knowledge
    if ($LASTEXITCODE -ne 0) { throw "知识库初始化失败。" }
}
finally {
    Pop-Location
}
