aboutsummaryrefslogtreecommitdiff
path: root/modules/ai-quick-ask.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ai-quick-ask.el')
-rw-r--r--modules/ai-quick-ask.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/ai-quick-ask.el b/modules/ai-quick-ask.el
index 0d56be8c..16f3afae 100644
--- a/modules/ai-quick-ask.el
+++ b/modules/ai-quick-ask.el
@@ -15,6 +15,14 @@
;;; Code:
+(require 'cj-window-toggle-lib) ;; cj/side-window-display
+
+;; Shared *AI-Assistant* panel-width state, owned by ai-config.el. Forward-
+;; declared here so the escalation reopens the panel at the same remembered
+;; width as the F-key toggle without a circular require.
+(defvar cj/ai-assistant-window-width)
+(defvar cj/--ai-assistant-width)
+
(defvar-local cj/gptel-quick--prompt nil
"Buffer-local: the prompt used for the current *GPTel-Quick* session.")
@@ -125,8 +133,8 @@ side window, then dismisses the quick buffer."
(with-current-buffer ai-buf
(goto-char (point-max))
(insert seed))
- (display-buffer-in-side-window
- ai-buf '((side . right) (window-width . 0.4)))
+ (cj/side-window-display
+ ai-buf 'right 'cj/--ai-assistant-width cj/ai-assistant-window-width)
(cj/gptel-quick-dismiss))))
(provide 'ai-quick-ask)