docs(ai): Use English for docstrings
This commit is contained in:
@@ -163,16 +163,16 @@
|
|||||||
;; activo en las sesiones gptel normales.
|
;; activo en las sesiones gptel normales.
|
||||||
(defun kj-gptel-magit--string-response-callback (callback)
|
(defun kj-gptel-magit--string-response-callback (callback)
|
||||||
"Return a callback that forwards only string responses to CALLBACK.
|
"Return a callback that forwards only string responses to CALLBACK.
|
||||||
Descarta las celdas (reasoning . TEXTO) con las que gptel entrega el
|
Discards the (reasoning . TEXT) cells through which gptel delivers the
|
||||||
contenido de thinking al callback (ver `gptel-request')."
|
thinking content to the callback (see `gptel-request')."
|
||||||
(lambda (response &rest args)
|
(lambda (response &rest args)
|
||||||
(when (stringp response)
|
(when (stringp response)
|
||||||
(apply callback response args))))
|
(apply callback response args))))
|
||||||
|
|
||||||
(defun kj-gptel-magit--sanitize-callback (orig-fn &rest args)
|
(defun kj-gptel-magit--sanitize-callback (orig-fn &rest args)
|
||||||
"Around advice for `gptel-magit--request'.
|
"Around advice for `gptel-magit--request'.
|
||||||
Envuelve el argumento :callback de ARGS para que las respuestas con
|
Wraps the :callback argument of ARGS so that responses with reasoning
|
||||||
contenido de reasoning no rompan gptel-magit."
|
content do not break gptel-magit."
|
||||||
(let ((pos (cl-position :callback args)))
|
(let ((pos (cl-position :callback args)))
|
||||||
(when (and pos (functionp (nth (1+ pos) args)))
|
(when (and pos (functionp (nth (1+ pos) args)))
|
||||||
(setf (nth (1+ pos) args)
|
(setf (nth (1+ pos) args)
|
||||||
@@ -223,8 +223,8 @@ if they exist."
|
|||||||
|
|
||||||
(defun kj-gptel--agent-buffer-setup ()
|
(defun kj-gptel--agent-buffer-setup ()
|
||||||
"Load AGENTS.md rules when a gptel-agent session buffer is created.
|
"Load AGENTS.md rules when a gptel-agent session buffer is created.
|
||||||
Dispara para sesiones nuevas (buffer *gptel-agent:*) y para sesiones
|
Fires for new sessions (buffer *gptel-agent:*) and for sessions
|
||||||
restauradas desde un archivo guardado (gptel--preset de agente)."
|
restored from a saved file (gptel--preset of the agent)."
|
||||||
(when (and (bound-and-true-p gptel-mode)
|
(when (and (bound-and-true-p gptel-mode)
|
||||||
(or (string-prefix-p "*gptel-agent" (buffer-name))
|
(or (string-prefix-p "*gptel-agent" (buffer-name))
|
||||||
(and (boundp 'gptel--preset)
|
(and (boundp 'gptel--preset)
|
||||||
@@ -254,10 +254,10 @@ gptel-agent's header, rendered as (:eval (funcall DISPLAY))."
|
|||||||
(throw 'found action))))))))))
|
(throw 'found action))))))))))
|
||||||
|
|
||||||
(defun kj-gptel-toggle-plan-agent (&optional _data)
|
(defun kj-gptel-toggle-plan-agent (&optional _data)
|
||||||
"Alternar entre el agente por defecto (build) y el modo plan.
|
"Toggle between the default agent (build) and plan mode.
|
||||||
Equivale a hacer clic en el botón del header: invoca la misma acción
|
Equivalent to clicking the header button: it invokes the same action
|
||||||
que gptel-agent usa para ese botón. DATA se ignora (compatibilidad
|
that gptel-agent uses for that button. DATA is ignored (compatibility
|
||||||
con `buttonize')."
|
with `buttonize')."
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless (bound-and-true-p gptel-mode)
|
(unless (bound-and-true-p gptel-mode)
|
||||||
(user-error "No estás en una sesión gptel"))
|
(user-error "No estás en una sesión gptel"))
|
||||||
@@ -371,7 +371,7 @@ Uses eglot and flymake; starts the language server if needed."
|
|||||||
default-directory))
|
default-directory))
|
||||||
|
|
||||||
(defun kj-gptel--read-prompt (name)
|
(defun kj-gptel--read-prompt (name)
|
||||||
"Read the opencode prompt file NAME (p. ej. \"title.txt\") from the agents dir."
|
"Read the opencode prompt file NAME (e.g. \"title.txt\") from the agents dir."
|
||||||
(string-trim
|
(string-trim
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents
|
(insert-file-contents
|
||||||
|
|||||||
Reference in New Issue
Block a user