fix: Properly extract and render PR URL (#553)

* fix: Properly extract and render PR URL

* cr
This commit is contained in:
Brace Sproul 2025-07-27 12:36:05 -07:00 • committed by GitHub
parent 0923c8b47e
commit eb2311955a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -525,9 +525,18 @@ export function AssistantMessage({
// Extract PR URL from the tool message content
// Format: "Created pull request: https://github.com/owner/repo/pull/123"
// or "Marked pull request as ready for review: https://github.com/owner/repo/pull/123"
let prUrl: string | undefined = undefined;
if (content && content.includes("pull request: ")) {
prUrl = content.split("pull request: ")[1].trim();
if (content) {
if (content.includes("pull request: ")) {
prUrl = content.split("pull request: ")[1].trim();
} else if (
content.includes("Marked pull request as ready for review: ")
) {
prUrl = content
.split("Marked pull request as ready for review: ")[1]
.trim();
}
}
// Extract PR number from URL if available