Skip to content

Conversation

@scastlara
Copy link
Collaborator

closes #88

@scastlara
Copy link
Collaborator Author

/lgtm review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦉 lgtm Review

Score: Nitpicks 🤓

🔍 Summary

This PR is a solid improvement, refactoring the prompt generation to use Jinja2 templates, which greatly enhances the readability and maintainability of the code.

While the overall approach is excellent, there are a few issues in the new templates that need attention:

  • A potential bug in the review_prompt.txt.j2 template where quoting a variable could fail if the variable's content includes a quote character.
  • Inconsistent and buggy whitespace handling in the same template, which would result in a malformed prompt.
  • The new test case test_summarizing_message_in_review has an assertion that doesn't match what the code would actually produce.

These are all relatively minor fixes. Once they are addressed, this PR will be in great shape. Nice work on this refactor!

More information
  • Id: d1589cbd362e41f0bdeef3cfd055a885
  • Model: gemini-2.5-pro
  • Created at: 2025-08-27T13:13:37.644721+00:00
Usage summary
Call 1
  • Request count: 1
  • Request tokens: 18073
  • Response tokens: 1012
  • Total tokens: 27436
Call 2
  • Request count: 1
  • Request tokens: 13222
  • Response tokens: 1255
  • Total tokens: 18858

Total tokens: 46294

See the 📚 lgtm-ai repository for more information about lgtm.

@scastlara scastlara merged commit 62976ef into main Aug 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move prompt generation to jinja

3 participants