| ... | ... | @@ -124,10 +124,14 @@ function GitQuickActionIcon({ quickAction }: { quickAction: GitQuickAction }) { |
| 124 | 124 | function buildGitActionProgressStages(input: { |
| 125 | 125 | action: GitStackedAction; |
| 126 | 126 | hasCustomCommitMessage: boolean; |
| 127 | hasWorkingTreeChanges: boolean; |
| 127 | 128 | }): string[] { |
| 128 | | const commitStages = input.hasCustomCommitMessage |
| 129 | | ? ["Committing..."] |
| 130 | | : ["Generating commit message...", "Committing..."]; |
| 129 | const shouldIncludeCommitStages = input.action === "commit" || input.hasWorkingTreeChanges; |
| 130 | const commitStages = !shouldIncludeCommitStages |
| 131 | ? [] |
| 132 | : input.hasCustomCommitMessage |
| 133 | ? ["Committing..."] |
| 134 | : ["Generating commit message...", "Committing..."]; |
| 131 | 135 | if (input.action === "commit") { |
| 132 | 136 | return commitStages; |
| 133 | 137 | } |
| ... | ... | @@ -229,6 +233,7 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp |
| 229 | 233 | const progressStages = buildGitActionProgressStages({ |
| 230 | 234 | action, |
| 231 | 235 | hasCustomCommitMessage: !!commitMessage?.trim(), |
| 236 | hasWorkingTreeChanges: !!gitStatus?.hasWorkingTreeChanges, |
| 232 | 237 | }); |
| 233 | 238 | const progressToastId = toastManager.add({ |
| 234 | 239 | type: "loading", |
| ... | ... | @@ -306,6 +311,7 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp |
| 306 | 311 | }, |
| 307 | 312 | [ |
| 308 | 313 | api, |
| 314 | gitStatus?.hasWorkingTreeChanges, |
| 309 | 315 | gitStatus?.openPr?.url, |
| 310 | 316 | maybeConfirmPushToDefaultBranch, |
| 311 | 317 | runImmediateGitActionMutation, |