Skip to content

Commit

Permalink
Fixed debug driver
Browse files Browse the repository at this point in the history
Signed-off-by: JonahSussman <[email protected]>
  • Loading branch information
JonahSussman committed Dec 12, 2024
1 parent fb5fe05 commit 7edf779
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ run-demo:

run-debug-driver:
python kai/reactive_codeplanner/main.py \
--kai-config example/config.toml \
--kai-config example/initialize.toml \
--source-directory example/coolstore \
--rules-directory example/analysis/rulesets/default/generated \
--analyzer-lsp-server-binary example/analysis/kai-analyzer-rpc \
Expand Down
15 changes: 14 additions & 1 deletion kai/reactive_codeplanner/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
import time
import tomllib
from pathlib import Path
from typing import Any, Generator

Expand Down Expand Up @@ -125,8 +126,20 @@ def main() -> None:

logger.info("Starting reactive codeplanner with configuration: %s", config)

kai_config = KaiRpcApplicationConfig.model_validate_filepath(args.kai_config)
kai_config_dict = {
**tomllib.load(open(args.kai_config, "rb")),
"root_path": args.source_directory,
"analyzer_lsp_lsp_path": args.analyzer_lsp_path,
"analyzer_lsp_rules_path": args.rules_directory,
"analyzer_lsp_rpc_path": args.analyzer_lsp_server_binary,
"analyzer_lsp_java_bundle_path": args.analyzer_lsp_java_bundle,
"analyzer_lsp_dep_labels_path": args.dep_open_source_labels_path,
}

kai_config = KaiRpcApplicationConfig.model_validate(kai_config_dict)

logging.init_logging_from_log_config(kai_config.log_config)

model_provider = ModelProvider(kai_config.models)

analyzer = AnalyzerLSP(
Expand Down

0 comments on commit 7edf779

Please sign in to comment.