Validate providers and retain complete run debugging context
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"git.a-wan.net/alan/pipelines/internal/draft"
|
||||
"git.a-wan.net/alan/pipelines/internal/pipeline"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/sahilm/fuzzy"
|
||||
@@ -19,7 +20,7 @@ func (m Model) openAuthorPicker(edit editedMsg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
|
||||
func (m Model) newPipeline(source string) (tea.Model, tea.Cmd) {
|
||||
return m.openAuthorPicker(editedMsg{source: source, createOnly: true})
|
||||
return m.openAuthorPicker(editedMsg{source: pipeline.WithDefaultModel(source, m.defaultModel), createOnly: true})
|
||||
}
|
||||
|
||||
func (m Model) editorChoices() []string {
|
||||
@@ -59,7 +60,9 @@ func (m Model) updateEditorPicker(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
d := m.editorDraft
|
||||
m.editorOpen = false
|
||||
m.editorDraft = nil
|
||||
return m, editDraftUsing(choice, d.name, d.source, true, d.createOnly, draft.Draft{Path: d.path, Name: d.name, Server: m.url, CreateOnly: d.createOnly, BaseVersion: d.baseVersion})
|
||||
return m.confirmMutation("Open "+choice+" to create/edit a draft?", func() tea.Cmd {
|
||||
return editDraftUsing(choice, d.name, d.source, true, d.createOnly, draft.Draft{Path: d.path, Name: d.name, Server: m.url, CreateOnly: d.createOnly, BaseVersion: d.baseVersion})
|
||||
})
|
||||
}
|
||||
var cmd tea.Cmd
|
||||
m.editorInput, cmd = m.editorInput.Update(msg)
|
||||
|
||||
Reference in New Issue
Block a user