improve ask_line tool(add conversation history context)

This commit is contained in:
benedict.lee
2025-04-09 23:45:04 +09:00
parent edaab4b6b1
commit b53d2773a9
5 changed files with 218 additions and 0 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,15 @@ 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 both the previous review comments from authors and reviewers, as well as any previous questions and answers about this code. The "Previous Question" and "Previous AI Answer" show earlier interactions about the same code. Use this context to provide a more informed and consistent answer.
{%- endif %}
A question about the selected lines:
======