Fix Windows path/spawn regressions and session visibility (#552)
* Update OpenCode CLI detection * fix(windows): handle cli file-url import and cmd shim spawn Fixes #533 and #521. * fix(windows): stabilize api path rewrite and session merge Fixes #548.
This commit is contained in:
committed by
GitHub
parent
122a45a890
commit
6eb5d1afa9
@@ -4,7 +4,7 @@ import path from 'path';
|
||||
import fs from 'fs';
|
||||
import net from 'net';
|
||||
import { spawn, spawnSync } from 'child_process';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { fileURLToPath, pathToFileURL } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
@@ -625,7 +625,7 @@ const commands = {
|
||||
return;
|
||||
}
|
||||
|
||||
const { startWebUiServer } = await import(serverPath);
|
||||
const { startWebUiServer } = await import(pathToFileURL(serverPath).href);
|
||||
await startWebUiServer({
|
||||
port: options.port,
|
||||
attachSignals: true,
|
||||
|
||||
Reference in New Issue
Block a user