Send PR url and repository host in InputContext.Git#13936
Conversation
Adds url to PullRequest and host to Repository: - PullRequest.url: populated from PrInfo.url (gh pr view output) - Repository.host: populated by adding 'url' to the 'gh repo view' JSON fields and parsing the host from it Both fields are already available client-side; this change wires them through to the server so agents receive direct PR links. Bumps warp_multi_agent_api to proto PR commit (warpdotdev/warp-proto-apis#338). Co-Authored-By: Oz <oz-agent@warp.dev>
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR threads repository host and pull request URL metadata through the Git context sent to the agent API, including local and remote repository metadata paths.
Concerns
Cargo.tomlchanges thewarp_multi_agent_apigit rev, but the PR diff does not include the matchingCargo.lockupdate. Locked builds/CI will fail because the lockfile still pins the previous rev.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| warp-workflows = { git = "https://github.com/warpdotdev/workflows", rev = "793a98ddda6ef19682aed66364faebd2829f0e01" } | ||
| warp_multi_agent_api = { git = "https://github.com/warpdotdev/warp-proto-apis.git", rev = "3d26f166b74469d5c12080ef6a3423fadee4d0e3" } | ||
| # TODO: restore stable rev once https://github.com/warpdotdev/warp-proto-apis/pull/338 is merged | ||
| warp_multi_agent_api = { git = "https://github.com/warpdotdev/warp-proto-apis.git", rev = "2ab8a60eddfb2cb06b149520d80556ce92b3b399" } |
There was a problem hiding this comment.
warp_multi_agent_api at a different git rev, but the PR does not update Cargo.lock; locked CI builds will reject the mismatch until the lockfile is regenerated and committed.
Co-Authored-By: Oz <oz-agent@warp.dev>
Summary
Wires two new fields through from client to server so agents receive direct PR links and repository host info:
PullRequest.url: Full PR URL (e.g.https://github.com/owner/repo/pull/42), sourced fromPrInfo.urlwhichgh pr viewalready returns. This powers theGithubPullRequestcontext chip — now that URL is also sent to the server.Repository.host: The git host (e.g.github.com), parsed from the repo URL added togh repo view --json name,owner,url.Both fields were available client-side but never forwarded. The
AIAgentContextenum variants and all construction/conversion sites are updated accordingly.Dependencies
urlandhostproto fieldsCargo.tomltemporarily pointswarp_multi_agent_apiat the proto PR commit; must be updated to the stable rev once DUP: Duplicate of 333 - Monterey support / Compatibility #338 is mergedChanges
util/git.rs:RepositoryInfogainshost: Option<String>;gh repo viewnow requests theurlfield to parse it fromai/agent/mod.rs:AIAgentContext::Repository+PullRequestgainhostandurlfieldsai/blocklist/context_model.rs: passeshost/urlthrough fromRepositoryInfo/PrInfoai/agent/api/convert_to.rs: writes both new fields into the proto messageremote_server/proto/diff_state.proto+git_status_proto.rs:RepositoryInfogainshostfor parity on the SSH remote path (remotePrInfoalready carriedurl)Co-Authored-By: Oz oz-agent@warp.dev