mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-03 22:33:19 +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
|
// Extract PR URL from the tool message content
|
||||||
// Format: "Created pull request: https://github.com/owner/repo/pull/123"
|
// 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;
|
let prUrl: string | undefined = undefined;
|
||||||
if (content && content.includes("pull request: ")) {
|
if (content) {
|
||||||
prUrl = content.split("pull request: ")[1].trim();
|
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
|
// Extract PR number from URL if available
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue