Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: @review searches with vector terms #2125

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

dustinbyrne
Copy link
Contributor

@dustinbyrne dustinbyrne commented Nov 26, 2024

This pull request integrates the VectorTermsService into the ReviewCommand to enhance the performance of context lookups by using vector terms instead of full text. This change addresses the issue of slow searches when reviewing code in pull requests. The integration involves updates to the command constructor and modifications to how context is processed during review analysis.

Key Changes

  • Integration of VectorTermsService: The ReviewCommand constructor now accepts a VectorTermsService, suggesting terms based on provided code diffs and user prompts.
  • Modified Context Lookup: Use vector terms for querying context to reduce the processing time and improve performance, making the review process more efficient.
  • Test Updates: Adjusted existing tests and added tests in review-command.spec.ts to verify the functionality involving vector terms, ensuring that the implementation remains stable and reliable.

Review Summary

Upon review:

  • Correctness: Verified that the integration correctly uses vector terms, improving performance without sacrificing functionality.
  • Code Quality: Suggested improvements include adding more documentation for constructor parameters and ensuring methods are self-explanatory.
  • Performance: The change is likely to meet performance goals, but real-world scenario monitoring is advised to confirm the anticipated improvements.
  • Security: Suggested a review of the VectorTermsService for potential security vulnerabilities given its handling of user input.
  • Testing: Encouraged expanding test coverage to include more edge cases and failure modes.
  • Compatibility: Emphasized verifying that existing functionalities remain unaffected by these changes.

Resolves #2122

Searching the full text has proven to be too slow.
@dustinbyrne dustinbyrne self-assigned this Nov 26, 2024
@dustinbyrne dustinbyrne merged commit 1fdebed into main Nov 26, 2024
23 checks passed
@dustinbyrne dustinbyrne deleted the fix/review-vector-terms branch November 26, 2024 18:04
@appland-release
Copy link
Contributor

🎉 This PR is included in version @appland/navie-v1.36.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@review uses a very long list of search parameters
3 participants