| ... | ... | @@ -226,17 +226,14 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp |
| 226 | 226 | }); |
| 227 | 227 | return; |
| 228 | 228 | } |
| 229 | | const promise = api.shell.openExternal(prUrl); |
| 230 | | toastManager.promise(promise, { |
| 231 | | loading: { title: "Opening PR...", data: threadToastData }, |
| 232 | | success: { title: "PR opened", data: threadToastData }, |
| 233 | | error: (err) => ({ |
| 229 | void api.shell.openExternal(prUrl).catch((err) => { |
| 230 | toastManager.add({ |
| 231 | type: "error", |
| 234 | 232 | title: "Unable to open PR link", |
| 235 | 233 | description: err instanceof Error ? err.message : "An error occurred.", |
| 236 | 234 | data: threadToastData, |
| 237 | | }), |
| 235 | }); |
| 238 | 236 | }); |
| 239 | | void promise.catch(() => undefined); |
| 240 | 237 | }, [api, gitStatusForActions?.openPr?.url, threadToastData]); |
| 241 | 238 | |
| 242 | 239 | const runGitActionWithToast = useCallback( |