Skip to content

Send PR url and repository host in InputContext.Git#13936

Open
szgupta wants to merge 2 commits into
masterfrom
suraj/pr-input-context
Open

Send PR url and repository host in InputContext.Git#13936
szgupta wants to merge 2 commits into
masterfrom
suraj/pr-input-context

Conversation

@szgupta

@szgupta szgupta commented Jul 18, 2026

Copy link
Copy Markdown
Member

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 from PrInfo.url which gh pr view already returns. This powers the GithubPullRequest context 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 to gh repo view --json name,owner,url.

Both fields were available client-side but never forwarded. The AIAgentContext enum variants and all construction/conversion sites are updated accordingly.

Dependencies

Changes

  • util/git.rs: RepositoryInfo gains host: Option<String>; gh repo view now requests the url field to parse it from
  • ai/agent/mod.rs: AIAgentContext::Repository + PullRequest gain host and url fields
  • ai/blocklist/context_model.rs: passes host/url through from RepositoryInfo/PrInfo
  • ai/agent/api/convert_to.rs: writes both new fields into the proto message
  • remote_server/proto/diff_state.proto + git_status_proto.rs: RepositoryInfo gains host for parity on the SSH remote path (remote PrInfo already carried url)

Co-Authored-By: Oz oz-agent@warp.dev

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>
@cla-bot cla-bot Bot added the cla-signed label Jul 18, 2026
@oz-for-oss

oz-for-oss Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

@szgupta

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.toml changes the warp_multi_agent_api git rev, but the PR diff does not include the matching Cargo.lock update. 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

Comment thread Cargo.toml
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" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This manifest now points 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.

@szgupta
szgupta requested a review from cephalonaut July 18, 2026 05:00
Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant