feat(source-control): add push failure AI recovery (#7826)
* feat(source-control): add Fix push failure with AI for pre-push hooks Detect pre-push hook failures separately from auth/transport errors so push toasts and inline messages no longer suggest checking repo access. Mirror the commit-failure recovery flow with a fixPushFailure action, summary panel, details dialog, and agent launch recipe in Settings. Fixes #6497 * feat(source-control): add push failure AI recovery Co-authored-by: dalveytech-vincent <vincent@dalveytech.com> --------- Co-authored-by: dalveytech-vincent <vincent@dalveytech.com>
This commit is contained in:
co-authored by
dalveytech-vincent
parent
2af8fb886f
commit
070a956a72
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
DEFAULT_SOURCE_CONTROL_ACTION_COMMAND_TEMPLATES,
|
||||
renderSourceControlActionCommandTemplate
|
||||
} from './source-control-ai-actions'
|
||||
import { buildSourceControlRecoveryAgentCommandInput } from './source-control-recovery-agent-command'
|
||||
|
||||
export function buildCommitFailureAgentCommandInput({
|
||||
promptOverride,
|
||||
@@ -12,11 +9,10 @@ export function buildCommitFailureAgentCommandInput({
|
||||
commandInputTemplate?: string | null
|
||||
basePrompt: string
|
||||
}): string {
|
||||
return (
|
||||
promptOverride ??
|
||||
renderSourceControlActionCommandTemplate(
|
||||
commandInputTemplate ?? DEFAULT_SOURCE_CONTROL_ACTION_COMMAND_TEMPLATES.fixCommitFailure,
|
||||
{ basePrompt }
|
||||
)
|
||||
).trim()
|
||||
return buildSourceControlRecoveryAgentCommandInput({
|
||||
actionId: 'fixCommitFailure',
|
||||
promptOverride,
|
||||
commandInputTemplate,
|
||||
basePrompt
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user