.emacs.d

the most bloated Emacs config on this planet
git clone https://git.trogloxene.org/.emacs.d.git
Log | Files | Refs

commit 775b896742a4abffc6a8e943e9d90623fd64b1ff
parent 0be9cae523805af697c0fb18c3a4f43b2d94582e
Author: andsy10 <andsy1016@gmail.com>
Date:   Sat, 26 Sep 2026 21:01:23 +0800

Optimize pilish config

Diffstat:
Mlisp/init-gptel.el | 42+++++++-----------------------------------
1 file changed, 7 insertions(+), 35 deletions(-)

diff --git a/lisp/init-gptel.el b/lisp/init-gptel.el @@ -144,7 +144,7 @@ explanations, no quotes, no punctuation, no file extension." (setq gptel-magit-model 'kimi-for-coding gptel-magit-backend (gptel-get-backend "gptel-Kimi-Code-magit")))) -;; pi +;; pi-coding-agent (use-package pilish :autoload my-pilish :config @@ -155,41 +155,13 @@ explanations, no quotes, no punctuation, no file extension." (default-directory (project-root proj))) (pilish))) - (setq pilish-thinking-display 'hidden) - (setq-default pilish--session-browser-sort "recent") + (add-hook 'pilish-session-browser-mode-hook + (lambda () + (setq pilish--session-browser-sort "recent" + pilish--session-browser-view 'recent) + (pilish--session-browser-rerender))) - (defun pilish-session-browser-delete () - "Delete the session file at point, closing any buffers that hold it open." - (interactive) - (let ((section (magit-current-section))) - (if (not (and section (eq (oref section type) 'session))) - (message "Pi: No session at point") - (let* ((path (oref section value)) - (holders - (cl-remove-if-not - (lambda (buf) - (and (buffer-live-p buf) - (with-current-buffer buf - (and (derived-mode-p 'pilish-chat-mode) - (pilish--browse-session-file-matches-p - buf path))))) - (buffer-list)))) - (when (y-or-n-p (if holders - (format "Delete session and close %d buffer(s)? %s " - (length holders) path) - (format "Delete session? %s " path))) - (let ((pilish-quit-without-confirmation t)) - (dolist (buf holders) - (kill-buffer buf))) - (delete-file path t) - (pilish--session-browser-fetch-and-render) - (message "Pi: Deleted %s" path)))))) - - (keymap-set pilish-session-browser-mode-map - "D" #'pilish-session-browser-delete) - - (transient-insert-suffix 'pilish-session-browser-dispatch '(0 0 -1) - '("D" "delete" pilish-session-browser-delete))) + (setq pilish-thinking-display 'hidden)) (provide 'init-gptel) ;;; init-gptel.el ends here