-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
This command used to show previous interactions in compose mode. However, it now gives either the error (cl-assertion-failed ((or (seq-empty-p items) (eq (length items) 1)) nil)). The error occurs in the latest version of the package even with no customization.
Debugger entered--Lisp error: (cl-assertion-failed ((or (seq-empty-p items) (eq (length items) 1)) nil))
cl--assertion-failed((or (seq-empty-p items) (eq (length items) 1)))
(or (or (seq-empty-p items) (eq (length items) 1)) (cl--assertion-failed '(or (seq-empty-p items) (eq (length items) 1))))
(progn (or (or (seq-empty-p items) (eq (length items) 1)) (cl--assertion-failed '(or (seq-empty-p items) (eq (length items) 1)))) nil)
(let ((items (shell-maker--extract-history (buffer-string) (shell-maker-prompt shell-maker--config)))) (progn (or (or (seq-empty-p items) (eq (length items) 1)) (cl--assertion-failed '(or (seq-empty-p items) (eq (length items) 1)))) nil) (seq-first items))
(save-restriction (shell-maker-narrow-to-prompt) (let ((items (shell-maker--extract-history (buffer-string) (shell-maker-prompt shell-maker--config)))) (progn (or (or (seq-empty-p items) (eq (length items) 1)) (cl--assertion-failed '(or (seq-empty-p items) (eq ... 1)))) nil) (seq-first items)))
(save-excursion (save-restriction (shell-maker-narrow-to-prompt) (let ((items (shell-maker--extract-history (buffer-string) (shell-maker-prompt shell-maker--config)))) (progn (or (or (seq-empty-p items) (eq (length items) 1)) (cl--assertion-failed '(or ... ...))) nil) (seq-first items))))
shell-maker--command-and-response-at-point()
(progn (goto-char point-after) (shell-maker--command-and-response-at-point))
(if moved (progn (goto-char point-after) (shell-maker--command-and-response-at-point)))
(let* ((point-before (and t (point))) (point-after (and point-before (save-excursion (comint-previous-prompt (if backwards 1 -1)) (if (eq (line-number-at-pos point-before) (line-number-at-pos ...)) (progn (comint-previous-prompt ...))) (let* ((going-back ...) (response ...) (same ...)) (if same (comint-previous-prompt ...))) (point)))) (moved (and point-after (and (not (eq point-before point-after)) (not (eq (line-number-at-pos point-before) (line-number-at-pos point-after))))))) (if moved (progn (goto-char point-after) (shell-maker--command-and-response-at-point))))
shell-maker-next-command-and-response(t)
(save-current-buffer (set-buffer (chatgpt-shell--primary-buffer)) (if backwards (if (save-excursion (let ((orig-line (line-number-at-pos))) (comint-previous-prompt 1) (= orig-line (line-number-at-pos)))) (progn (error "No previous page"))) (if (save-excursion (let ((orig-line (point))) (comint-next-prompt 1) (= orig-line (point)))) (progn (error "No next page")))) (shell-maker-next-command-and-response backwards))
(and compose-buffer (save-current-buffer (set-buffer (chatgpt-shell--primary-buffer)) (if backwards (if (save-excursion (let ((orig-line ...)) (comint-previous-prompt 1) (= orig-line (line-number-at-pos)))) (progn (error "No previous page"))) (if (save-excursion (let ((orig-line ...)) (comint-next-prompt 1) (= orig-line (point)))) (progn (error "No next page")))) (shell-maker-next-command-and-response backwards)))
(let* ((shell-buffer (and t (chatgpt-shell--primary-buffer))) (compose-buffer (and shell-buffer (chatgpt-shell-prompt-compose-buffer))) (next (and compose-buffer (save-current-buffer (set-buffer (chatgpt-shell--primary-buffer)) (if backwards (if (save-excursion ...) (progn ...)) (if (save-excursion ...) (progn ...))) (shell-maker-next-command-and-response backwards))))) (if next (progn (chatgpt-shell-prompt-compose-replace-interaction (car next) (cdr next)) (text-property-search-forward 'prompt t) next) nil))
chatgpt-shell-prompt-compose-next-interaction(t)
chatgpt-shell-prompt-compose-previous-interaction()
funcall-interactively(chatgpt-shell-prompt-compose-previous-interaction)
command-execute(chatgpt-shell-prompt-compose-previous-interaction)
Metadata
Metadata
Assignees
Labels
No labels