mirror of
https://github.com/stablyai/orca.git
synced 2026-09-27 08:02:35 +00:00
* 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>
26 lines
658 B
TypeScript
26 lines
658 B
TypeScript
import {
|
|
DEFAULT_SOURCE_CONTROL_ACTION_COMMAND_TEMPLATES,
|
|
renderSourceControlActionCommandTemplate,
|
|
type SourceControlLaunchActionId
|
|
} from './source-control-ai-actions'
|
|
|
|
export function buildSourceControlRecoveryAgentCommandInput({
|
|
actionId,
|
|
promptOverride,
|
|
commandInputTemplate,
|
|
basePrompt
|
|
}: {
|
|
actionId: SourceControlLaunchActionId
|
|
promptOverride?: string
|
|
commandInputTemplate?: string | null
|
|
basePrompt: string
|
|
}): string {
|
|
return (
|
|
promptOverride ??
|
|
renderSourceControlActionCommandTemplate(
|
|
commandInputTemplate ?? DEFAULT_SOURCE_CONTROL_ACTION_COMMAND_TEMPLATES[actionId],
|
|
{ basePrompt }
|
|
)
|
|
).trim()
|
|
}
|