Function: eca-chat--session-for-path

eca-chat--session-for-path is a natively compiled function defined in eca-chat-context.el.

Signature

(eca-chat--session-for-path PATH)

Documentation

Return the session whose workspace folders contain PATH, or nil.

Pure in-memory lookup over existing sessions, unlike eca-session which may probe project.el and shell out to git, so it is cheap enough for timers running in arbitrary buffers.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-context.el
(defun eca-chat--session-for-path (path)
  "Return the session whose workspace folders contain PATH, or nil.
Pure in-memory lookup over existing sessions, unlike `eca-session'
which may probe project.el and shell out to git, so it is cheap
enough for timers running in arbitrary buffers."
  (-first (lambda (session)
            (--any? (and it (f-ancestor-of? it path))
                    (eca--session-workspace-folders session)))
          (eca-vals eca--sessions)))