66from ...autocomplete import AutoComplete
77from .models import Steps
88from .prompts import (
9- AGENT_TIDE_SYSTEM_PROMPT , CALMNESS_SYSTEM_PROMPT , GET_CODE_IDENTIFIERS_SYSTEM_PROMPT , README_CONTEXT_PROMPT , REJECT_PATCH_FEEDBACK_TEMPLATE ,
9+ AGENT_TIDE_SYSTEM_PROMPT , CALMNESS_SYSTEM_PROMPT , CMD_BRAINSTORM_PROMPT , CMD_CODE_REVIEW_PROMPT , CMD_TRIGGER_PLANNING_STEPS , CMD_WRITE_TESTS_PROMPT , GET_CODE_IDENTIFIERS_SYSTEM_PROMPT , README_CONTEXT_PROMPT , REJECT_PATCH_FEEDBACK_TEMPLATE ,
1010 REPO_TREE_CONTEXT_PROMPT , STAGED_DIFFS_TEMPLATE , STEPS_SYSTEM_PROMPT , WRITE_PATCH_SYSTEM_PROMPT
1111)
1212from .utils import delete_file , parse_blocks , parse_steps_markdown , trim_to_patch_section
@@ -70,6 +70,8 @@ def pass_custom_logger_fn(self)->Self:
7070 async def get_repo_tree_from_user_prompt (self , history :list )-> str :
7171
7272 history_str = "\n \n " .join ([str (entry ) for entry in history ])
73+ for CMD_PROMPT in [CMD_TRIGGER_PLANNING_STEPS , CMD_WRITE_TESTS_PROMPT , CMD_BRAINSTORM_PROMPT , CMD_CODE_REVIEW_PROMPT ]:
74+ history_str .replace (CMD_PROMPT , "" )
7375 ### TODO evalutate sending last N messages and giving more importance to
7476 ### search results from latter messages
7577
@@ -82,7 +84,7 @@ async def get_repo_tree_from_user_prompt(self, history :list)->str:
8284 codeSearch = SmartCodeSearch (documents = nodes_dict )
8385 await codeSearch .initialize_async ()
8486
85- results = await codeSearch .search_smart (history_str , top_k = 5 )
87+ results = await codeSearch .search_smart (history_str , top_k = 15 )
8688
8789 self .tide .codebase ._build_tree_dict ([doc_key for doc_key ,_ in results ] or None )
8890
0 commit comments