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

Function TestSlashClearWipesTerminalScrollback

internal/tui/tui_test.go:857–866  ·  view source on GitHub ↗

TestSlashClearWipesTerminalScrollback: tea.ClearScreen (\x1b[2J) clears only the visible region; the saved-lines buffer needs the DECSED 3 sequence from eraseScrollback. /clear must emit both, or prior lines stay scrollable above the reset banner.

(t *testing.T)

Source from the content-addressed store, hash-verified

855 // bypassing cfg.Save(): what a user would do in an external editor.
856 yaml := []byte(`active: local
857models:
858 local:
859 llm: local-model
860 url: ` + m.cfg.Models["local"].URL + `
861 key: ""
862 context_size: 131072
863 remote:
864 llm: cloud-model
865 url: http://remote:9000
866 key: sk-r
867 context_size: 200000
868`)
869 if err := os.WriteFile(filepath.Join(m.cfg.Dir, "config.yaml"), yaml, 0o600); err != nil {

Callers

nothing calls this directly

Calls 5

newTestModelFunction · 0.85
cmdYieldsClearScreenFunction · 0.85
cmdYieldsScrollbackEraseFunction · 0.85
runSlashMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected