Adjust commit

This commit is contained in:
kagami 2024-05-09 21:45:56 +08:00
parent 25572af366
commit 55e30a9592
2 changed files with 5 additions and 17 deletions

View File

@ -4,13 +4,11 @@ import re
import subprocess
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "libs"))
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "libs"))
sys.path.append(os.path.dirname(__file__))
# from llm_api import chat_completion_stream # noqa: E402
from devchat.llm import chat_completion_stream
from chatmark import Checkbox, Form, TextEditor # noqa: E402
from ide_services import IDEService # noqa: E402
from llm_api import chat_completion_stream # noqa: E402
from lib.chatmark import Checkbox, Form, TextEditor
from lib.ide_service import IDEService
diff_too_large_message_en = (
"Commit failed. The modified content is too long "

View File

@ -3,6 +3,7 @@ import os
import sys
import requests
from devchat.llm import chat_completion_stream
def get_script_path():
@ -10,17 +11,6 @@ def get_script_path():
return os.path.dirname(__file__)
def update_sys_path():
"""Extend system path to include library directories."""
libs_path = os.path.join(get_script_path(), "..", "..", "..", "libs")
root_path = os.path.join(get_script_path(), "..", "..", "libs")
sys.path.extend([libs_path, root_path])
update_sys_path()
from llm_api import chat_completion_stream # noqa: E402
def load_commit_cache():
"""Load or initialize the commit cache."""
try: