feat(desktop): spawn local server with password (#8139)

This commit is contained in:
Brendan Allan
2026-01-13 13:58:00 +08:00
committed by GitHub
parent c0b214232d
commit f05f175842
9 changed files with 118 additions and 44 deletions

View File

@@ -41,8 +41,13 @@ export function getCurrentSidecar(target = RUST_TARGET) {
export async function copyBinaryToSidecarFolder(source: string, target = RUST_TARGET) {
await $`mkdir -p src-tauri/sidecars`
const dest = `src-tauri/sidecars/opencode-cli-${target}${process.platform === "win32" ? ".exe" : ""}`
const dest = windowsify(`src-tauri/sidecars/opencode-cli-${target}`)
await $`cp ${source} ${dest}`
console.log(`Copied ${source} to ${dest}`)
}
export function windowsify(path: string) {
if (path.endsWith(".exe")) return path
return `${path}${process.platform === "win32" ? ".exe" : ""}`
}