-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor and update prompt #124
Conversation
src/utils.js
Outdated
<list_of_security_hotspots> // Describe locations for possible vulnerabilities in the change, ordered by risk. Do not include a vulnerability unless it is likely to present a real security risk. If there are none, omit this section. | ||
|
||
### Other Issues | ||
<list_of_issues> // Describe any other major issues with this code such as license incompatibilities introduced by a dependency. If there are none, omit this section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `s/ such as license incompatibilities introduced by a dependency//g'
- `s/ any other major/ any other major non-security//g'
src/utils.js
Outdated
} | ||
|
||
response = response.replaceAll('### Changes', '<details>\n<summary><i>Changes</i></summary>\n\n### Changes') | ||
response = response.replaceAll('### Security Hotspots', '</details>\n\n### Security Hotspots') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Security Hotspots
section can now be omitted, this should be adapted, to get the first ###
after the ### Changes
section, otherwise it breaks the formatter.
This is custom github syntax, and the AI are not aware of
for (let i = 0; i < models.length; i++) { | ||
try { | ||
model = models[i] | ||
response = await getResponse(userPrompt, model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to ruby JS
openai debug - [puLL-Merge] - brave/pull-merge@124 DescriptionThis pull request introduces a significant refactoring across various files within the repository to standardize the implementation of model-based patch explanations for GitHub pull requests. The primary motivation for these changes seems to be the centralization of common code into utility functions, enhancement of maintainability, and improvement of code reuse across different models such as Anthropic, Bedrock, and OpenAI implementations. Possible Issues
Security Hotspots
ChangesChanges
General Implication Across Files
|
anthropic debug - [puLL-Merge] - brave/pull-merge@124 DescriptionThis PR refactors the code for explaining patches using different AI models (Anthropic, Bedrock, and OpenAI). It extracts common functionality into a new The main motivation seems to be to reduce code duplication and improve maintainability by centralizing shared logic. ChangesChanges
The main changes are nicely organized by file. The core explain patch logic for each model API remains in its respective file, while the common code is factored out to |
bedrock debug - [puLL-Merge] - brave/pull-merge@124 DescriptionThis PR refactors the ChangesChanges
|
No description provided.