xenodium / chatgpt-shell

A multi-llm Emacs shell (ChatGPT, Claude, Gemini, Ollama) + editing integrations
https://lmno.lol/alvaro
GNU General Public License v3.0
857 stars 76 forks source link

Add default directory for restoring transcripts #198

Closed djr7C4 closed 8 months ago

djr7C4 commented 8 months ago

The function chatgpt-shell-restore-session-from-transcript does not current specify the directory when reading the filename of the transcript to restore. This can be a bit inconvenient for users as they will usually have to navigate to shell-maker-transcript-default-path manually each time. This PR fixes that issue.

djr7C4 commented 8 months ago

Without file-name-as-directory, the path might not end in a slash which causes completion complete as a filename rather than complete the files located inside the directory. I've added an and which should fix the case when the path is nil.