Offer nvim or OpenCode when creating a pipeline

This commit is contained in:
2026-10-09 20:53:00 +01:00
parent a50e8648f6
commit dd50344170
10 changed files with 102 additions and 16 deletions
+8 -2
View File
@@ -40,8 +40,14 @@ func TestCreateAndSubmit(t *testing.T) {
var editor tea.Cmd
updated, editor = m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'n'}})
m = updated.(Model)
if editor == nil {
t.Fatal("n should launch authoring directly, without a questionnaire")
if editor == nil || !m.editorOpen || !m.editorDraft.createOnly {
t.Fatal("n should offer an editor for a new create-only draft")
}
m.editorInput.SetValue("ocd")
updated, editor = m.Update(tea.KeyMsg{Type: tea.KeyEnter})
m = updated.(Model)
if editor == nil || m.editorOpen {
t.Fatal("new editor choice did not launch")
}
// Editor lifecycle is smoke-tested separately; feed its completion here.
source := pipeline.Template([]string{"a", "b"}, true)