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:
ofir-frd
2025-04-24 09:32:43 +03:00
committed by GitHub
5 changed files with 108 additions and 2 deletions

View File

@ -119,6 +119,7 @@ async_ai_calls=true
[pr_questions] # /ask #
enable_help_text=false
use_conversation_history=true
[pr_code_suggestions] # /improve #

View File

@ -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:
======