Record run input directory and retry failed runs with original inputs
This commit is contained in:
@@ -75,7 +75,7 @@ func (k keyMap) ShortHelp() []key.Binding {
|
||||
return []key.Binding{key.NewBinding(key.WithKeys("n", "p"), key.WithHelp("n/p", "template")), key.NewBinding(key.WithKeys("v"), key.WithHelp("v", "render/source")), key.NewBinding(key.WithKeys("enter"), key.WithHelp("Enter", "use template")), k.cancel}
|
||||
}
|
||||
if k.runs {
|
||||
return []key.Binding{k.commands, key.NewBinding(key.WithKeys("p"), key.WithHelp("p", "pipeline")), key.NewBinding(key.WithKeys("tab"), key.WithHelp("Tab", "pane")), key.NewBinding(key.WithKeys("j", "k"), key.WithHelp("j/k", "select/scroll")), key.NewBinding(key.WithKeys("pgup", "pgdown"), key.WithHelp("PgUp/Dn", "page")), key.NewBinding(key.WithKeys("esc"), key.WithHelp("Esc", "back"))}
|
||||
return []key.Binding{k.commands, key.NewBinding(key.WithKeys("p"), key.WithHelp("p", "pipeline")), key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "retry failed")), key.NewBinding(key.WithKeys("tab"), key.WithHelp("Tab", "pane")), key.NewBinding(key.WithKeys("j", "k"), key.WithHelp("j/k", "select/scroll")), key.NewBinding(key.WithKeys("pgup", "pgdown"), key.WithHelp("PgUp/Dn", "page")), key.NewBinding(key.WithKeys("esc"), key.WithHelp("Esc", "back"))}
|
||||
}
|
||||
if k.detail {
|
||||
return []key.Binding{k.commands, k.search, key.NewBinding(key.WithKeys("n", "p"), key.WithHelp("n/p", "next/prev stage")), key.NewBinding(key.WithKeys("tab"), key.WithHelp("Tab", "pane")), key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "runs")), key.NewBinding(key.WithKeys("j", "k"), key.WithHelp("j/k", "scroll")), key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "home"))}
|
||||
@@ -289,6 +289,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
} else if msg.Type == protocol.Run || msg.Type == protocol.RunStarted {
|
||||
accepted := m.runOpen && msg.RunDetail != nil && ((msg.Type == protocol.Run && msg.RunDetail.ID == m.requestedRunID) || (msg.Type == protocol.RunStarted && msg.ID == m.runStartRequest))
|
||||
if accepted {
|
||||
if msg.Type == protocol.RunStarted {
|
||||
m.runStartRequest = ""
|
||||
}
|
||||
m.keys.runs = true
|
||||
m.runDetail = msg.RunDetail
|
||||
m.requestedRunID = msg.RunDetail.ID
|
||||
@@ -304,6 +307,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
if strings.HasPrefix(msg.ID, "run-") && m.runOpen {
|
||||
m.runError = msg.Error
|
||||
if msg.ID == m.runStartRequest {
|
||||
m.runStartRequest = ""
|
||||
}
|
||||
}
|
||||
if msg.ID != "" && msg.ID == m.detailRequest {
|
||||
m.detailLoading = false
|
||||
|
||||
Reference in New Issue
Block a user