@@ -448,6 +448,8 @@ which see."
448
448
449
449
; ; * Transient classes and methods for gptel
450
450
451
+ ; ; ** Class for generic gptel elisp variables
452
+
451
453
(defclass gptel-lisp-variable (transient-lisp-variable)
452
454
((display-nil :initarg :display-nil ) ; String to display if value if nil
453
455
(display-map :initarg :display-map :initform nil )) ; Display string from alist display-map
@@ -469,6 +471,8 @@ which see."
469
471
(oset obj value value)
470
472
gptel--set-buffer-locally))
471
473
474
+ ; ; ** Class for managing gptel tools
475
+
472
476
(defclass gptel--switch (transient-switch)
473
477
((category :initarg :category ))
474
478
" Class used for arguments that share a category." )
@@ -491,6 +495,8 @@ It is a list of the category and argument, e.g.
491
495
(oset obj value nil ))
492
496
(oset transient--prefix scope state)))
493
497
498
+ ; ; ** Class for managing gptel tool categories
499
+
494
500
(defclass gptel--switch-category (transient-switch)
495
501
((category :initarg :category ))
496
502
" Class used for arguments that switch a group of other arguments.
@@ -544,6 +550,8 @@ Their own value is ignored")
544
550
; ; Finally set the "value" of the category itself
545
551
(oset obj value value))
546
552
553
+ ; ; ** Class for gptel options that are three-way switches
554
+
547
555
(defclass gptel--switches (gptel-lisp-variable)
548
556
((display-if-true :initarg :display-if-true :initform " True" )
549
557
(display-if-false :initarg :display-if-false :initform " False" ))
@@ -564,6 +572,8 @@ Their own value is ignored")
564
572
(propertize display-if-true
565
573
'face (if value 'transient-value 'transient-inactive-value ))))))
566
574
575
+ ; ; ** Class for gptel's scope management, singleton
576
+
567
577
(defclass gptel--scope (gptel--switches)
568
578
((display-if-true :initarg :display-if-true :initform " buffer" )
569
579
(display-if-false :initarg :display-if-false :initform " global" ))
@@ -599,6 +609,8 @@ This is used only for setting this variable via `gptel-menu'.")
599
609
(oref obj variable)
600
610
(oset obj value value)))
601
611
612
+ ; ; ** Class for managing gptel's backend and model, singleton
613
+
602
614
(defclass gptel-provider-variable (transient-lisp-variable)
603
615
((backend :initarg :backend )
604
616
(backend-value :initarg :backend-value )
@@ -625,6 +637,8 @@ This is used only for setting this variable via `gptel-menu'.")
625
637
gptel--set-buffer-locally))
626
638
(transient-setup))
627
639
640
+ ; ; ** Class for infix options with in-buffer overlay display
641
+
628
642
(defclass gptel-option-overlaid (transient-option)
629
643
((display-nil :initarg :display-nil )
630
644
(overlay :initarg :overlay ))
0 commit comments