diff --git a/merico/github/commit/commit.py b/merico/github/commit/commit.py index 10ecc2d..daf50b6 100644 --- a/merico/github/commit/commit.py +++ b/merico/github/commit/commit.py @@ -73,13 +73,16 @@ def read_prompt_from_file(filename): with open(filename, "r", encoding="utf-8") as file: return file.read().strip() except FileNotFoundError: - IDEService().log_info( + IDEService().ide_logging( + "error", f"File {filename} not found. " - "Please make sure it exists in the same directory as the script." + "Please make sure it exists in the same directory as the script.", ) sys.exit(1) except Exception as e: - IDEService().log_info(f"An error occurred while reading the file {filename}: {e}") + IDEService().ide_logging( + "error", f"An error occurred while reading the file {filename}: {e}" + ) sys.exit(1) diff --git a/merico/github/git_api.py b/merico/github/git_api.py index 39800f4..de6cb51 100644 --- a/merico/github/git_api.py +++ b/merico/github/git_api.py @@ -7,6 +7,7 @@ import time import requests from lib.chatmark import TextEditor +from lib.ide_service import IDEService def read_github_token(): @@ -188,7 +189,7 @@ def get_github_repo(issue_repo=False): repo = parts[-1].replace(".git", "") username = parts[-2].split(":")[-1] github_repo = f"{username}/{repo}" - print("current github repo:", github_repo, end="\n\n", file=sys.stderr, flush=True) + IDEService().ide_logging("debug", f"current github repo: {github_repo}") return github_repo except subprocess.CalledProcessError as e: print(e)