MCPcopy Create free account
hub / github.com/codehamr/codehamr / typeInto

Function typeInto

internal/tui/tui_test.go:230–237  ·  view source on GitHub ↗

typeInto feeds text one rune at a time, as a keyboard would, exercising the refreshSuggest hook on the KeyRunes fall-through.

(m Model, text string)

Source from the content-addressed store, hash-verified

228
229// typeInto feeds text one rune at a time, as a keyboard would, exercising the
230// refreshSuggest hook on the KeyRunes fall-through.
231func typeInto(m Model, text string) Model {
232 var mm tea.Model = m
233 for _, r := range text {
234 out, _ := mm.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{r}})
235 mm = out
236 }
237 return mm.(Model)
238}
239
240func suggestNames(m Model) []string {

Calls 1

UpdateMethod · 0.95

Tested by

no test coverage detected