Config: change gptel session derictory.

This commit is contained in:
2026-05-03 19:17:38 +08:00
parent 29b2bfb592
commit 1a941344bf
2 changed files with 5 additions and 3 deletions

View File

@@ -63,7 +63,7 @@
(string-trim clean)))
(defun my-gptel-save-session ()
"Save current gptel session to ~/gptel/ with AI-generated filename.
"Save current gptel session to ~/gptel/sessions/ with AI-generated filename.
The filename is prefixed with a YYYYMMDD-HHmmss timestamp and generated
from the last 1500 characters of the buffer."
(interactive)
@@ -94,7 +94,7 @@ from the last 1500 characters of the buffer."
"gptel-session"
generated))
(timestamp (format-time-string "%Y%m%d-%H%M%S"))
(dir (expand-file-name "~/gptel/"))
(dir (expand-file-name "~/gptel/sessions/"))
(base (concat timestamp "-" generated))
(file (expand-file-name (concat base ".org") dir)))
;; handle name collision