Replace openrouter-rs with in-tree client and require sandbox
Remove the openrouter-rs dependency in favor of a minimal in-tree OpenRouter chat-completions client, and drop the BOT_NAME and SANDBOX_ENABLED config options. Reviews now always run inside the sandbox, and the review prompt asks the model to read files with the available tools instead of embedding the diff.
This commit is contained in:
@@ -27,25 +27,29 @@ pub const REVIEW_PROMPT: &str = "
|
||||
|
||||
This is the user comment: \"{comment}\"
|
||||
|
||||
The code changes (only added lines, with line numbers):
|
||||
The pull request changes these files and lines:
|
||||
|
||||
{diff}
|
||||
{changes}
|
||||
|
||||
Please review the code changes and provide feedback.
|
||||
`added` line numbers refer to the new version of the file, `removed` line
|
||||
numbers to the old version, as they appear in the diff.
|
||||
|
||||
IMPORTANT: the `line` field must be the line number shown before each line.
|
||||
The provided code has the format: `filename:line:code`
|
||||
The code is not provided: read the files you need with the available tools
|
||||
before answering. Review only the listed lines.
|
||||
|
||||
Return your feedback, in french, with only this json format, reviews must contain each review
|
||||
All fields are mandatory.
|
||||
(filename field must contain the full path with extension) and comment must contain a final summary:
|
||||
(filename field must contain the full path with extension; line must be one of the
|
||||
listed line numbers for that file, and side must be \"added\" when the line comes
|
||||
from the `added` list or \"removed\" when it comes from the `removed` list)
|
||||
and comment must contain a final summary:
|
||||
|
||||
{
|
||||
\"reviews\": [
|
||||
{
|
||||
\"filename\": \"\",
|
||||
\"line\": ,
|
||||
\"code\": \"\",
|
||||
\"side\": \"\",
|
||||
\"message\": \"\"
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user