emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ellama a0d7801fa3 6/7: Merge pull request #177 from min


From: ELPA Syncer
Subject: [elpa] externals/ellama a0d7801fa3 6/7: Merge pull request #177 from minad/lazy-loading
Date: Sat, 23 Nov 2024 09:58:10 -0500 (EST)

branch: externals/ellama
commit a0d7801fa3e85bdfd9a149eb81718a0d270c3243
Merge: e8f64969d6 6d2cf07b95
Author: Sergey Kostyaev <s-kostyaev@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #177 from minad/lazy-loading
    
    Lazy loading
---
 ellama.el | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/ellama.el b/ellama.el
index 6dc95f3092..61bdabb7f2 100644
--- a/ellama.el
+++ b/ellama.el
@@ -5,7 +5,7 @@
 ;; Author: Sergey Kostyaev <sskostyaev@gmail.com>
 ;; URL: http://github.com/s-kostyaev/ellama
 ;; Keywords: help local tools
-;; Package-Requires: ((emacs "28.1") (llm "0.6.0") (spinner "1.7.4") 
(transient "0.7.6") (compat "29.1"))
+;; Package-Requires: ((emacs "28.1") (llm "0.6.0") (spinner "1.7.4") 
(transient "0.7") (compat "29.1"))
 ;; Version: 0.12.5
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;; Created: 8th Oct 2023
@@ -36,15 +36,10 @@
 ;;; Code:
 
 (require 'eieio)
-(require 'json)
 (require 'llm)
 (require 'llm-provider-utils)
 (require 'spinner)
 (require 'transient)
-(require 'info)
-(require 'shr)
-(require 'eww)
-(require 'vc)
 (require 'compat)
 (eval-when-compile (require 'rx))
 
@@ -1204,6 +1199,8 @@ If EPHEMERAL non nil new session will not be associated 
with any file."
   (let ((element (ellama-context-element-text :content text)))
     (ellama-context-element-add element)))
 
+(declare-function Info-copy-current-node-name "info")
+
 ;;;###autoload
 (defun ellama-context-add-info-node (node)
   "Add info NODE to context."
@@ -1243,6 +1240,8 @@ If EPHEMERAL non nil new session will not be associated 
with any file."
 (defun ellama-context-add-webpage-quote-eww ()
   "Add webpage quote to context interactively from `eww'."
   (interactive)
+  (defvar eww-data)
+  (declare-function eww-current-url "eww")
   (if (eq major-mode 'eww-mode)
       (let* ((name (plist-get eww-data :title))
             (url (eww-current-url))
@@ -1726,8 +1725,13 @@ the full response text when the request completes (with 
BUFFER current)."
         (text (buffer-substring-no-properties beg end)))
     (ellama-stream text)))
 
+(defvar vc-git-diff-switches)
+(declare-function vc-diff-internal "vc")
+(declare-function vc-deduce-fileset "vc")
+
 (defun ellama--diff-cached ()
   "Diff staged."
+  (require 'vc)
   (let* ((default-directory
          (if (string= ".git"
                       (car (reverse
@@ -1748,6 +1752,7 @@ the full response text when the request completes (with 
BUFFER current)."
 
 (defun ellama--diff ()
   "Diff unstaged."
+  (require 'vc)
   (let* ((default-directory
          (if (string= ".git"
                       (car (reverse
@@ -2040,7 +2045,7 @@ otherwise prompt user for URL to summarize."
   (interactive
    (list
     (if-let ((url (or (and (fboundp 'thing-at-point) (thing-at-point 'url))
-                      (shr-url-at-point nil))))
+                      (and (fboundp 'shr-url-at-point) (shr-url-at-point 
nil)))))
         url
       (read-string "Enter URL you want to summarize: "))))
   (let ((buffer-name (url-retrieve-synchronously url t)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]