Record run input directory and retry failed runs with original inputs
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
"git.a-wan.net/alan/pipelines/internal/protocol"
|
||||
)
|
||||
|
||||
var commands = []string{":logs", ":new", ":drafts", ":templates", ":refresh", ":ping", ":edit", ":submit", ":versions", ":run", ":runs", ":pipeline", ":home", ":quit"}
|
||||
var commands = []string{":logs", ":new", ":drafts", ":templates", ":refresh", ":ping", ":edit", ":submit", ":versions", ":run", ":runs", ":retry", ":pipeline", ":home", ":quit"}
|
||||
|
||||
func (m Model) footerContent() string {
|
||||
label := fmt.Sprintf(" LOGS %d · :logs ", len(m.lines))
|
||||
@@ -82,6 +82,10 @@ func (m Model) pageCommands() []string {
|
||||
detailPage := m.keys.detail && !m.runOpen
|
||||
for _, command := range commands {
|
||||
switch command {
|
||||
case ":retry":
|
||||
if m.selectedFailedRun() <= 0 {
|
||||
continue
|
||||
}
|
||||
case ":pipeline":
|
||||
if id, version := m.selectedRunPipeline(); id <= 0 || version <= 0 {
|
||||
continue
|
||||
@@ -145,6 +149,8 @@ func (m Model) updatePalette(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
m.paletteOpen = false
|
||||
m.keys.palette = false
|
||||
switch command {
|
||||
case ":retry":
|
||||
return m.retrySelectedRun()
|
||||
case ":pipeline":
|
||||
return m.openRunPipeline()
|
||||
case ":drafts":
|
||||
|
||||
Reference in New Issue
Block a user