MCPcopy Create free account
hub / github.com/diillson/chatcli / resetTerminal

Method resetTerminal

cli/command_handler.go:255–262  ·  view source on GitHub ↗

resetTerminal handles /reset, /redraw and /clear.

(_ context.Context, _ string)

Source from the content-addressed store, hash-verified

253
254// resetTerminal handles /reset, /redraw and /clear.
255func (ch *CommandHandler) resetTerminal(_ context.Context, _ string) bool {
256 fmt.Print("\033[0m")
257 _ = os.Stdout.Sync()
258 ch.cli.restoreTerminal()
259 time.Sleep(50 * time.Millisecond)
260 ch.cli.forceRefreshPrompt()
261 return false
262}
263
264// handleContextCommand delegates to the ContextHandler.
265func (ch *CommandHandler) handleContextCommand(ctx context.Context, userInput string) {

Callers

nothing calls this directly

Calls 3

SyncMethod · 0.80
restoreTerminalMethod · 0.80
forceRefreshPromptMethod · 0.45

Tested by

no test coverage detected