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