MCPcopy Index your code
hub / github.com/codehamr/codehamr / clearPromptHistory

Function clearPromptHistory

internal/tui/history_store.go:132–138  ·  view source on GitHub ↗

clearPromptHistory removes the on-disk file so /clear also wipes recall. A missing file is not an error: the empty-history intent already holds.

(dir string)

Source from the content-addressed store, hash-verified

130// clearPromptHistory removes the on-disk file so /clear also wipes recall.
131// A missing file is not an error: the empty-history intent already holds.
132func clearPromptHistory(dir string) error {
133 err := os.Remove(historyPath(dir))
134 if os.IsNotExist(err) {
135 return nil
136 }
137 return err
138}

Callers 2

TestPromptHistoryClearFunction · 0.85
cmdClearMethod · 0.85

Calls 1

historyPathFunction · 0.85

Tested by 1

TestPromptHistoryClearFunction · 0.68