Files
memex/projects/org-skill-web-research/src/research-logic.lisp

11 lines
610 B
Common Lisp

(in-package :org-agent)
(defun ask-gemini-web (prompt)
"Calls the Playwright stealth bridge to interact with Gemini Web UI via a persistent profile."
(let* ((script-path (namestring (merge-pathnames "src/gemini-web.js" (asdf:system-source-directory :org-skill-web-research)))))
(multiple-value-bind (output error-output exit-code)
(uiop:run-program (list "node" script-path prompt) :output :string :error-output :string :ignore-error-status t)
(if (= exit-code 0)
output
(format nil "(:type :LOG :payload (:text \"Node Error (~a): ~a\"))" exit-code error-output)))))