From aa06568852fe2121673be48d53d8dba96a272a9c Mon Sep 17 00:00:00 2001 From: Thierry Pouplier Date: Fri, 1 May 2026 14:35:48 +0000 Subject: [PATCH] refactor: replace sleep-for vterm hack with process-send-string for Hermes launch - Replaced sleep-for 0.5 + vterm-send-string timing hack with direct process-send-string (no timing race) - Removed TUI chat command, SSH uses -t PTY for clean CLI mode - Lines 947-957 in config.el --- doom/.config/doom/config.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index 040345e..0d1a372 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -946,16 +946,15 @@ Handles org-clock and context link capture for tasks." (evil-local-set-key 'insert (kbd "C-j") #'vterm--self-insert))) ;; Quick launch Hermes Agent on lazyworkhorse server (defun gortium/hermes-vterm () - "Launch Hermes Agent in a vterm buffer via SSH to lazyworkhorse." + "Launch Hermes Agent in vterm via SSH to lazyworkhorse (CLI mode)." (interactive) (let ((buf (get-buffer-create "*hermes*"))) (switch-to-buffer buf) (unless (get-buffer-process buf) (vterm buf) - (sleep-for 0.5) - ;; SSH to server, then exec into docker and run hermes from venv - (vterm-send-string "ssh lazyworkhorse 'docker exec -it hermes /opt/hermes/.venv/bin/hermes chat'") - (vterm-send-return))))) + (let ((proc (get-buffer-process buf))) + (when proc + (process-send-string proc "ssh -t lazyworkhorse hermes\n"))))))) ;; GPTel AI chat for emacs (use-package! gptel