docs(ai): Use English for docstrings

This commit is contained in:
kj
2026-08-06 00:07:17 -03:00
parent 66ef378009
commit 4101ae7fa2

View File

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