Skip to content

Commit b7c3e1b

Browse files
committed
Fix when-let
1 parent 4329289 commit b7c3e1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

eca-chat.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ This is similar to `backward-delete-char' but protects the prompt/context line."
479479
(content (plist-get params :content)))
480480
(with-current-buffer (eca-chat--get-buffer)
481481
(pcase (plist-get content :type)
482-
("text" (when-let ((text (plist-get content :text)))
482+
("text" (when-let* ((text (plist-get content :text)))
483483
(pcase role
484484
("user" (progn
485485
(eca-chat--add-content
@@ -556,14 +556,14 @@ This is similar to `backward-delete-char' but protects the prompt/context line."
556556
(defun eca-chat-select-model ()
557557
"Select which model to use in the chat from what server supports."
558558
(interactive)
559-
(when-let ((model (completing-read "Select a model:" (append (eca--session-models eca--session) nil) nil t)))
559+
(when-let* ((model (completing-read "Select a model:" (append (eca--session-models eca--session) nil) nil t)))
560560
(setq eca-chat-custom-model model)))
561561

562562
;;;###autoload
563563
(defun eca-chat-select-behavior ()
564564
"Select which chat behavior to use from what server supports."
565565
(interactive)
566-
(when-let ((behavior (completing-read "Select a behavior:" (append (eca--session-chat-behaviors eca--session) nil) nil t)))
566+
(when-let* ((behavior (completing-read "Select a behavior:" (append (eca--session-chat-behaviors eca--session) nil) nil t)))
567567
(setq eca-chat-custom-behavior behavior)))
568568

569569
(provide 'eca-chat)

0 commit comments

Comments
 (0)