Merge pull request #4271 from contributor/chat-history-files-auto-create-dir
Some checks are pending
pre-commit / pre-commit (push) Waiting to run

fix: Auto-create parent directories for chat history files
This commit is contained in:
paul-gauthier 2025-06-25 06:29:10 -07:00 committed by GitHub
commit 856d94c1dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -307,8 +307,9 @@ class InputOutput:
self.yes = yes
if input_history_file is not None:
Path(input_history_file).mkdir(parents=True, exist_ok=True)
self.input_history_file = input_history_file
Path(self.input_history_file).parent.mkdir(parents=True, exist_ok=True)
self.llm_history_file = llm_history_file
if chat_history_file is not None:
self.chat_history_file = Path(chat_history_file)