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)
| 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. |
| 132 | func clearPromptHistory(dir string) error { |
| 133 | err := os.Remove(historyPath(dir)) |
| 134 | if os.IsNotExist(err) { |
| 135 | return nil |
| 136 | } |
| 137 | return err |
| 138 | } |