mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-16 18:40:40 +08:00
Merge pull request #1687 from benedict-lee/feat/add-conversation-history-on-line-question
Improvement: Enhance ask_line tool by adding PR review comment threads as context
This commit is contained in:
@ -119,6 +119,7 @@ async_ai_calls=true
|
||||
|
||||
[pr_questions] # /ask #
|
||||
enable_help_text=false
|
||||
use_conversation_history=true
|
||||
|
||||
|
||||
[pr_code_suggestions] # /improve #
|
||||
|
@ -43,6 +43,19 @@ Now focus on the selected lines from the hunk:
|
||||
======
|
||||
Note that lines in the diff body are prefixed with a symbol that represents the type of change: '-' for deletions, '+' for additions, and ' ' (a space) for unchanged lines
|
||||
|
||||
{%- if conversation_history %}
|
||||
|
||||
Previous discussion on this code:
|
||||
======
|
||||
{{ conversation_history|trim }}
|
||||
======
|
||||
|
||||
Consider this conversation history (format: "N. Username: Message", where numbers indicate the comment order). When responding:
|
||||
- Maintain consistency with previous technical explanations
|
||||
- Address unresolved issues from earlier discussions
|
||||
- Build upon existing knowledge without contradictions
|
||||
- Incorporate relevant context while focusing on the current question
|
||||
{%- endif %}
|
||||
|
||||
A question about the selected lines:
|
||||
======
|
||||
|
Reference in New Issue
Block a user