mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 10:23:14 +00:00
fix: Properly extract and render PR URL (#553)
* fix: Properly extract and render PR URL * cr
This commit is contained in:
parent
0923c8b47e
commit
eb2311955a
1 changed files with 11 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue