Use reqwest 0.12 with rustls-tls and add timeouts

Also improve review prompt with line calculation instructions, switch
feedback to French, and enable reasoning for OpenRouter.
This commit is contained in:
2026-06-03 20:51:21 +00:00
parent de81232201
commit cd5c5b9478
7 changed files with 46 additions and 446 deletions
+3 -2
View File
@@ -69,10 +69,11 @@ pub struct Bot {
impl Bot {
pub fn new(config: EnvConfig) -> anyhow::Result<Self> {
Ok(Self {
gitea_api: GiteaAPI::new(&config.gitea_url, &config.gitea_token),
gitea_api: GiteaAPI::new(&config.gitea_url, &config.gitea_token, config.gitea_timeout),
open_router_client: OpenRouterClient::new(
&config.open_router_api_key,
&config.open_router_model,
config.open_router_timeout,
)?,
config,
})
@@ -116,7 +117,7 @@ impl Bot {
.download_git_diff(&review_payload.pull_request.diff_url)
.await?;
let bot_request = &&REVIEW_PROMPT
let bot_request = REVIEW_PROMPT
.replace("{subject}", &review_payload.pull_request.title)
.replace("{comment}", &review_payload.comment.body)
.replace("{diff}", &git_diff);