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

Function countSystem

internal/tui/tui_test.go:1948–1956  ·  view source on GitHub ↗

countSystem counts RoleSystem messages, the shape every nudge appends.

(history []chmctx.Message)

Source from the content-addressed store, hash-verified

1946 fmt.Fprint(w, "data: "+`{"choices":[{"delta":{"content":"ok"}}]}`+"\n\n")
1947 fmt.Fprint(w, "data: [DONE]\n\n")
1948 })
1949 m.failKey = tools.BashName + "|make build"
1950 m.failStreak = maxToolFailStreak - 1 // one away from firing
1951 mm, _ := m.submit("new goal", "new goal", promptEntry{display: "new goal"})
1952 final := mm.(Model)
1953 if final.failStreak != 0 || final.failKey != "" {
1954 t.Fatalf("submit must reset the failure streak for a new goal, got key=%q streak=%d",
1955 final.failKey, final.failStreak)
1956 }
1957}
1958
1959// TestClearResetsFailureStreak: /clear starts the conversation over, including

Calls

no outgoing calls

Tested by

no test coverage detected