TestQueueEmptyMidTurnIsNoOp: Enter on a blank prompt mid-turn stays silent, so a reflexive Enter while watching the agent doesn't queue an empty slot.
(t *testing.T)
| 46 | // TestQueueEmptyMidTurnIsNoOp: Enter on a blank prompt mid-turn stays silent, so |
| 47 | // a reflexive Enter while watching the agent doesn't queue an empty slot. |
| 48 | func TestQueueEmptyMidTurnIsNoOp(t *testing.T) { |
| 49 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 50 | m.phase = phaseThinking |
| 51 | if m.ta.Value() != "" { |
| 52 | t.Fatal("precondition: textarea empty") |
| 53 | } |
| 54 | out, _ := m.Update(tea.KeyMsg{Type: tea.KeyEnter}) |
| 55 | if out.(Model).queued != nil { |
| 56 | t.Fatalf("empty mid-turn Enter must not queue, got %+v", out.(Model).queued) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // TestQueueSecondEnterAppends: a second mid-turn Enter appends (newline-joined) |
| 61 | // to the existing slot, so a multi-part instruction builds up in one queued |
nothing calls this directly
no test coverage detected