[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ellama ee030435d4 02/19: Add option to always show cont
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ellama ee030435d4 02/19: Add option to always show context line in header or mode line |
Date: |
Sun, 23 Feb 2025 06:58:06 -0500 (EST) |
branch: externals/ellama
commit ee030435d480df28ef9872d1ae059ac855c2928b
Author: Sergey Kostyaev <sskostyaev@gmail.com>
Commit: Sergey Kostyaev <sskostyaev@gmail.com>
Add option to always show context line in header or mode line
Added new customization option `ellama-context-line-always-visible` to
ensure
the context header or mode line is always visible, even when there is no
content
in the context. Updated relevant functions to incorporate this new option.
Fix #237
---
README.org | 2 ++
ellama.el | 32 +++++++++++++++++++++-----------
2 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/README.org b/README.org
index 1bda4fb572..6e5c2a6ad5 100644
--- a/README.org
+++ b/README.org
@@ -444,6 +444,8 @@ argument generated text string.
~display-buffer-same-window~.
- ~ellama-preview-context-element-display-action-function~: Display
action function for ~ellama-preview-context-element~.
+- ~ellama-context-line-always-visible~: Make context header or mode line always
+ visible, even with empty context.
** Minor modes
diff --git a/ellama.el b/ellama.el
index 23a0ff6007..694057b0e4 100644
--- a/ellama.el
+++ b/ellama.el
@@ -131,6 +131,11 @@ Make reasoning models more useful for many cases."
:group 'ellama
:type 'boolean)
+(defcustom ellama-context-line-always-visible nil
+ "Make context header or mode line always visible, even with empty context."
+ :group 'ellama
+ :type 'boolean)
+
(defcustom ellama-command-map
(let ((map (make-sparse-keymap)))
;; code
@@ -1085,15 +1090,16 @@ If EPHEMERAL non nil new session will not be associated
with any file."
(declare-function posframe-hide "ext:posframe")
(with-current-buffer ellama--context-buffer
(erase-buffer)
- (when ellama--global-context
- (insert (format
- " ellama ctx: %s"
- (string-join
- (mapcar
- (lambda (el)
- (ellama-context-element-display el))
- ellama--global-context)
- " ")))))
+ (if ellama--global-context
+ (insert (format
+ " ellama ctx: %s"
+ (string-join
+ (mapcar
+ (lambda (el)
+ (ellama-context-element-display el))
+ ellama--global-context)
+ " ")))
+ (insert " ellama ctx")))
(when ellama-context-posframe-enabled
(require 'posframe)
(if ellama--global-context
@@ -1139,7 +1145,9 @@ If EPHEMERAL non nil new session will not be associated
with any file."
(defun ellama-context-update-header-line ()
"Update and display context information in the header line."
- (if (and ellama-context-header-line-mode ellama--global-context)
+ (if (and ellama-context-header-line-mode
+ (or ellama-context-line-always-visible
+ ellama--global-context))
(add-to-list 'header-line-format '(:eval (ellama-context-line)) t)
(setq header-line-format (delete '(:eval (ellama-context-line))
header-line-format))))
@@ -1165,7 +1173,9 @@ If EPHEMERAL non nil new session will not be associated
with any file."
(defun ellama-context-update-mode-line ()
"Update and display context information in the mode line."
- (if (and ellama-context-mode-line-mode ellama--global-context)
+ (if (and ellama-context-mode-line-mode
+ (or ellama-context-line-always-visible
+ ellama--global-context))
(add-to-list 'mode-line-format '(:eval (ellama-context-line)) t)
(setq mode-line-format (delete '(:eval (ellama-context-line))
mode-line-format))))
- [elpa] externals/ellama updated (1c52902d4d -> fb01a0cefe), ELPA Syncer, 2025/02/23
- [elpa] externals/ellama ee030435d4 02/19: Add option to always show context line in header or mode line,
ELPA Syncer <=
- [elpa] externals/ellama bbac4df186 01/19: Reorganize transient menu, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama d007a0f96f 04/19: Display current context in transient menu, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama 25d34ce337 10/19: Fix community prompts, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama 49593e60fa 12/19: Update variable prompt format, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama f94002a405 15/19: Bump version, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama 62364b5a4e 05/19: Add functionality to remove context elements by name, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama 4340f71d75 06/19: Refactor `ellama-context-mode` to be a derived mode, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama ad88edf9ed 16/19: Merge pull request #238 from s-kostyaev/ux-improvements, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama fb01a0cefe 19/19: Merge pull request #241 from s-kostyaev/improve-readme, ELPA Syncer, 2025/02/23
- [elpa] externals/ellama 7e0b688d7f 03/19: Enhance transient model loading description, ELPA Syncer, 2025/02/23