mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-09 21:27:53 -05:00
Simplify most important files
This commit is contained in:
@@ -10,6 +10,7 @@ from core.cli.helpers import get_line_changes
|
||||
from core.config import GET_RELEVANT_FILES_AGENT_NAME, TASK_BREAKDOWN_AGENT_NAME, TROUBLESHOOTER_BUG_REPORT
|
||||
from core.config.actions import MIX_BREAKDOWN_CHAT_PROMPT
|
||||
from core.config.constants import CONVO_ITERATIONS_LIMIT
|
||||
from core.config.magic_words import ALWAYS_RELEVANT_FILES
|
||||
from core.llm.parser import JSONParser
|
||||
from core.log import get_logger
|
||||
from core.ui.base import ProjectStage
|
||||
@@ -175,7 +176,16 @@ class RelevantFilesMixin:
|
||||
existing_files = {file.path for file in self.current_state.files}
|
||||
if not llm_response.relevant_files:
|
||||
return []
|
||||
return [path for path in llm_response.relevant_files if path in existing_files]
|
||||
paths_list = [path for path in llm_response.relevant_files if path in existing_files]
|
||||
|
||||
try:
|
||||
for file_path in ALWAYS_RELEVANT_FILES:
|
||||
if file_path not in paths_list and file_path in existing_files:
|
||||
paths_list.append(file_path)
|
||||
except Exception as e:
|
||||
log.error(f"Error while getting most important files: {e}")
|
||||
|
||||
return paths_list
|
||||
|
||||
|
||||
class FileDiffMixin:
|
||||
|
||||
@@ -1,29 +1,7 @@
|
||||
PROBLEM_IDENTIFIED = "PROBLEM_IDENTIFIED"
|
||||
ADD_LOGS = "ADD_LOGS"
|
||||
THINKING_LOGS = [
|
||||
"Pythagora is crunching the numbers...",
|
||||
"Pythagora is deep in thought...",
|
||||
"Pythagora is analyzing your request...",
|
||||
"Pythagora is brewing up a solution...",
|
||||
"Pythagora is putting the pieces together...",
|
||||
"Pythagora is working its magic...",
|
||||
"Pythagora is crafting the perfect response...",
|
||||
"Pythagora is decoding your query...",
|
||||
"Pythagora is on the case...",
|
||||
"Pythagora is computing an answer...",
|
||||
"Pythagora is sorting through the data...",
|
||||
"Pythagora is gathering insights...",
|
||||
"Pythagora is making connections...",
|
||||
"Pythagora is tuning the algorithms...",
|
||||
"Pythagora is piecing together the puzzle...",
|
||||
"Pythagora is scanning the possibilities...",
|
||||
"Pythagora is engineering a response...",
|
||||
"Pythagora is building the answer...",
|
||||
"Pythagora is mapping out a solution...",
|
||||
"Pythagora is figuring this out for you...",
|
||||
"Pythagora is thinking hard right now...",
|
||||
"Pythagora is working for you, so relax!",
|
||||
"Pythagora might take some time to figure this out...",
|
||||
ALWAYS_RELEVANT_FILES = [
|
||||
"client/src/App.tsx",
|
||||
]
|
||||
GITIGNORE_CONTENT = """# Logs
|
||||
logs
|
||||
|
||||
Reference in New Issue
Block a user