Skip to content

Commit

Permalink
👻 Update analyzerClient.ts (#190)
Browse files Browse the repository at this point in the history
Update initialize parameters to align with
konveyor/kai#526. 

---------

Signed-off-by: Jonah Sussman <[email protected]>
  • Loading branch information
JonahSussman authored Jan 15, 2025
1 parent 3a03990 commit 461e9ce
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions vscode/src/client/analyzerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Extension } from "../helpers/Extension";
import { ExtensionState } from "../extensionState";
import { buildAssetPaths, AssetPaths } from "./paths";
import {
getConfigKaiBackendURL,
getConfigLogLevel,
getConfigKaiProviderName,
getConfigKaiProviderArgs,
Expand Down Expand Up @@ -246,34 +245,27 @@ export class AnalyzerClient {
}

// Define the initialize request parameters
// TODO: With konveyor/kai#526, config.toml will be dropped. The initialize parameters may
// TODO: change. They'll need to be updated here.
const initializeParams = {
process_id: null,
kai_backend_url: getConfigKaiBackendURL(),
root_path: vscode.workspace.workspaceFolders![0].uri.fsPath,
log_level: getConfigLogLevel(),
log_dir_path: this.kaiDir,
model_provider: this.buildModelProviderConfig(),

file_log_level: getConfigLogLevel(),
log_config: {
log_level: getConfigLogLevel(),
file_log_level: getConfigLogLevel(),
log_dir_path: this.kaiDir,
},
demo_mode: this.isDemoMode(),
cache_dir: "",

cache_dir: null,
// Analyzer and jdt.ls parameters
analyzer_lsp_rpc_path: this.getAnalyzerPath(),
analyzer_lsp_lsp_path: this.assetPaths.jdtlsBin,

analyzer_lsp_rpc_path: this.getAnalyzerPath(),
analyzer_lsp_rules_path: this.getRulesetsPath(),
// jdt.ls bundles (comma separated list of paths)
analyzer_lsp_java_bundle_path: this.assetPaths.jdtlsBundleJars.join(","),

// depOpenSourceLabelsFile
analyzer_lsp_dep_labels_path: this.assetPaths.openSourceLabelsFile,

// TODO: Do we need to include `fernFlowerPath` to support the java decompiler?
// analyzer_lsp_fernflower: this.assetPaths.fernFlowerPath,

analyzer_lsp_rules_path: this.getRulesetsPath(),
};

vscode.window.withProgress(
Expand Down

0 comments on commit 461e9ce

Please sign in to comment.