Skip to content

Instantly share code, notes, and snippets.

View jwiegley's full-sized avatar

John Wiegley jwiegley

View GitHub Profile
(cl-defstruct (eshell-function-target
(:constructor nil)
(:constructor eshell-function-target-create
(output-function &optional close-function)))
"An Eshell target that calls an OUTPUT-FUNCTION."
output-function close-function)
(defun eshell-exec-lisp (printer errprint func-or-form args form-p)
"Execute a Lisp FUNC-OR-FORM, maybe passing ARGS.
PRINTER and ERRPRINT are functions to use for printing regular
(defun eshell-exec-lisp (printer errprint func-or-form args form-p)
"Execute a Lisp FUNC-OR-FORM, maybe passing ARGS.
PRINTER and ERRPRINT are functions to use for printing regular
messages and errors, respectively. FORM-P should be non-nil if
FUNC-OR-FORM represent a Lisp form; ARGS will be ignored in that
case."
(eshell-condition-case err
(let ((result
(save-current-buffer
(if form-p
(defun eshell-lisp-command (object &optional args)
"Insert Lisp OBJECT, using ARGS if a function."
(unless eshell-allow-commands
(signal 'eshell-commands-forbidden '(lisp)))
(catch 'eshell-external ; deferred to an external command
(when (memq eshell-in-pipeline-p '(nil last))
(eshell-set-exit-info 0))
(setq eshell-last-arguments args)
(let* ((eshell-ensure-newline-p t)
(command-form-p (functionp object))
(defun eshell-exec-lisp (printer errprint func-or-form args form-p)
"Execute a Lisp FUNC-OR-FORM, maybe passing ARGS.
PRINTER and ERRPRINT are functions to use for printing regular
messages and errors, respectively. FORM-P should be non-nil if
FUNC-OR-FORM represent a Lisp form; ARGS will be ignored in that
case."
(eshell-condition-case err
(let ((result
(save-current-buffer
(if form-p
diff --git i/lisp/eshell/esh-cmd.el w/lisp/eshell/esh-cmd.el
index f0c3a6a3e14..2801eacb231 100644
--- i/lisp/eshell/esh-cmd.el
+++ w/lisp/eshell/esh-cmd.el
@@ -1485,7 +1485,13 @@ eshell-exec-lisp
(if form-p
(eval func-or-form)
(apply func-or-form args)))))
- (and result (funcall printer result))
+ ;; As a special case, a Lisp function or form may evaluate to an
*Prompt*: This is great. Can you show me any pull requests I have open that are still waiting to be merged?
*Response*:
{
"tool_calls": [],
"content": ""
}
To check your open pull requests, I need to know which specific repository you're interested in. Could you please specify the repository name (e.g., "haskell-project" or "emacs-config") you'd like me to check for open PRs? This is required because the GitHub API needs the exact repository to query.
May 21 22:33:39 vulcan systemd[1]: Started LLM Gateway to provide model access, fallbacks and spend tracking across 100+ LLMs..
May 21 22:33:42 vulcan litellm[163219]: Traceback (most recent call last):
May 21 22:33:42 vulcan litellm[163219]: File "/nix/store/kjvgj2n3yn70hmjifg6y0bk9m4rf7jba-python3-3.12.10/lib/python3.12/pathlib.py", line 1311, in mkdir
May 21 22:33:42 vulcan litellm[163219]: os.mkdir(self, mode)
May 21 22:33:42 vulcan litellm[163219]: FileNotFoundError: [Errno 2] No such file or directory: '/.cache/prisma-python/binaries/5.17.0/393aa359c9ad4a4bb28630fb5613f9c281cde053'
May 21 22:33:42 vulcan litellm[163219]: During handling of the above exception, another exception occurred:
May 21 22:33:42 vulcan litellm[163219]: Traceback (most recent call last):
May 21 22:33:42 vulcan litellm[163219]: File "/nix/store/kjvgj2n3yn70hmjifg6y0bk9m4rf7jba-python3-3.12.10/lib/python3.12/pathlib.py", line 1311, in mkdir
May 21 22:33:42 vulcan litellm[163219]: os.mkdir(self, mode)
May 21 22:33:42 vul
{ config, lib, pkgs, ... }:
let
portal = pkgs.stdenv.mkDerivation {
name = "nginx-portal";
src = ./nginx-portal;
installPhase = ''
mkdir -p $out
cp -r $src/* $out/
'';
};

NOTE Pool thoughts

John: In the pool now, no Element

Will I be able to put an @ cookie at the beginning of a system prompt in gptel-directives, and use that to set the model for when that directive is used? Like if I need to use a specific local LLM for tool-related prompts…

* New chat
*Prompt*: Hello
*Response*:
#+begin_reasoning
<think>
Okay, the user started a new chat and just said "Hello". I should respond in a friendly and helpful manner. Let me keep it concise as instructed. Maybe greet them back and offer assistance. Let's see, "Hello! How can I assist you today?" That sounds good. Short and to the point.
</think>
#+end_reasoning