MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / _construct_diff_comp_prompt

Function _construct_diff_comp_prompt

python-impl/evogit/api.py:580–593  ·  view source on GitHub ↗

A helper function to construct the prompt. Read the code and the related information (e.g. stack_trace) from the a list of commits. Then feed into the prompt constructor. The operation_type is either "mutation" or "crossover". The prompt_constructor is a function with the following s

(config, prev_commit, new_commit)

Source from the content-addressed store, hash-verified

578
579
580def _construct_diff_comp_prompt(config, prev_commit, new_commit) -> str:
581 """A helper function to construct the prompt.
582 Read the code and the related information (e.g. stack_trace) from the a list of commits.
583 Then feed into the prompt constructor.
584 The operation_type is either "mutation" or "crossover".
585 The prompt_constructor is a function with the following signature:
586 def prompt_constructor(operation_type: str, code_infos: List[CodeInfo]) -> str
587 """
588 diff = git.diff_view(config, prev_commit, new_commit)
589 prev_file_list = git.list_files(config, prev_commit)
590 prev_info = git.read_note(config, prev_commit)
591 new_info = git.read_note(config, new_commit)
592 prompt = config.diff_prompt_constructor(prev_file_list, diff, prev_info, new_info)
593 return prompt
594
595
596def llm_diff_compare(

Callers 1

llm_diff_compareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected