From ad0818b7b6ab528c8741365e8c71ac1affa8e65f Mon Sep 17 00:00:00 2001 From: David Zager Date: Tue, 17 Dec 2024 11:52:09 -0500 Subject: [PATCH] :sparkles: bump kai + make kai-rpc-server cwd outside workspace Signed-off-by: David Zager --- scripts/collect-assets.js | 2 +- vscode/src/client/analyzerClient.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/collect-assets.js b/scripts/collect-assets.js index 689e0b9f..80b2688c 100755 --- a/scripts/collect-assets.js +++ b/scripts/collect-assets.js @@ -17,7 +17,7 @@ await downloadGitHubRelease({ org: "konveyor", repo: "kai", - releaseTag: "v0.0.3", + releaseTag: "v0.0.4", /* Release asset filenames and nodejs equivalent platform/arch diff --git a/vscode/src/client/analyzerClient.ts b/vscode/src/client/analyzerClient.ts index 7df777c0..1b5e1924 100644 --- a/vscode/src/client/analyzerClient.ts +++ b/vscode/src/client/analyzerClient.ts @@ -143,18 +143,22 @@ export class AnalyzerClient { ): Promise<[ChildProcessWithoutNullStreams, number | undefined]> { // TODO: Ensure serverState is starting - const serverCwd = this.kaiRuntimeDir; + const serverCwd = vscode.Uri.joinPath(this.extContext.storageUri!, "kai-rpc-server"); const serverPath = this.getKaiRpcServerPath(); const serverArgs = this.getKaiRpcServerArgs(); const serverEnv = await this.getKaiRpcServerEnv(); + if (!fs.existsSync(serverCwd.fsPath)) { + await vscode.workspace.fs.createDirectory(serverCwd); + } + this.outputChannel.appendLine(`server cwd: ${serverCwd}`); this.outputChannel.appendLine(`server path: ${serverPath}`); this.outputChannel.appendLine(`server args:`); serverArgs.forEach((arg) => this.outputChannel.appendLine(` ${arg}`)); const kaiRpcServer = spawn(serverPath, serverArgs, { - cwd: serverCwd, + cwd: this.extContext.storageUri?.fsPath, env: serverEnv, });