diff --git a/configs/init-ai.el b/configs/init-ai.el index 84bde29..0fbba01 100644 --- a/configs/init-ai.el +++ b/configs/init-ai.el @@ -196,12 +196,12 @@ content do not break gptel-magit." :init (defvar kj-gptel-agents-dir (expand-file-name "configs/gptel-agents" user-emacs-directory) - "Directorio con los agentes y prompts portados de opencode para gptel-agent.") + "Directory with the agents and prompts ported from opencode for gptel-agent.") (defcustom kj-gptel-opencode-small-model nil - "Modelo para títulos/resúmenes de sesión (debe existir en el backend activo). -nil usa el modelo actual de la sesión." - :type '(choice (const :tag "Modelo actual de la sesión" nil) string) + "Model for session titles/summaries (must exist in the active backend). +nil uses the current session's model." + :type '(choice (const :tag "Current session model" nil) string) :group 'gptel) (defun kj-gptel-load-agents-md () "Add AGENTS.md rules to the current gptel buffer context. @@ -317,10 +317,10 @@ Uses eglot and flymake; starts the language server if needed." (require 'flymake nil t) (let ((buf (kj-gptel--lsp-buffer path))) (if (not buf) - (format "No se pudo abrir el archivo %s" path) + (format "Could not open file %s" path) (with-current-buffer buf (if (not (eglot-current-server)) - (format "Sin servidor LSP para %s (modo %s)." + (format "No LSP server for %s (mode %s)." path major-mode) (let ((deadline (+ (float-time) 5))) (while (and (< (float-time) deadline) @@ -335,7 +335,7 @@ Uses eglot and flymake; starts the language server if needed." (sit-for 0.2)))) (let ((diags (flymake-diagnostics (point-min) (point-max)))) (if (null diags) - (format "Sin diagnósticos para %s." path) + (format "No diagnostics for %s." path) (mapconcat (lambda (d) (let ((beg (flymake-diagnostic-beg d)) @@ -355,14 +355,14 @@ Uses eglot and flymake; starts the language server if needed." (require 'eglot) (let ((buf (kj-gptel--lsp-buffer path))) (if (not buf) - "No hay un buffer con servidor LSP conectado en el proyecto." + "There is no buffer with a connected LSP server in the project." (condition-case err (with-current-buffer buf (let ((res (eglot--workspace-symbols query))) (if (null res) - (format "Sin símbolos que coincidan con \"%s\"." query) + (format "No symbols matching \"%s\"." query) (mapconcat #'substring-no-properties res "\n")))) - (error (format "Error en la consulta LSP: %S" err)))))) + (error (format "Error in the LSP query: %S" err)))))) (defun kj-gptel--project-root () "Return the current project root, or `default-directory'." @@ -398,11 +398,11 @@ Tries `patch -p1' first and falls back to `-p0'." (let* ((root (kj-gptel--project-root)) (r1 (kj-gptel--patch-apply diff root 1))) (if (zerop (car r1)) - (format "Parche aplicado correctamente.\n%s" (cdr r1)) + (format "Patch applied successfully.\n%s" (cdr r1)) (let ((r0 (kj-gptel--patch-apply diff root 0))) (if (zerop (car r0)) - (format "Parche aplicado correctamente (con -p0).\n%s" (cdr r0)) - (format "No se pudo aplicar el parche (exit %s).\n%s" + (format "Patch applied successfully (with -p0).\n%s" (cdr r0)) + (format "Could not apply the patch (exit %s).\n%s" (car r1) (cdr r1))))))) (defun kj-gptel-plan-write (filename content) @@ -412,7 +412,7 @@ Tries `patch -p1' first and falls back to `-p0'." (file (expand-file-name (file-name-nondirectory filename) dir))) (make-directory dir t) (with-temp-file file (insert content)) - (format "Plan guardado en %s" file))) + (format "Plan saved to %s" file))) (defun kj-gptel-opencode-summary () "Generate a PR-style summary of the current gptel session (prompt summary.txt)." @@ -504,7 +504,7 @@ Tries `patch -p1' first and falls back to `-p0'." ((error user-error) (concat (if (eq (car err) 'inhibited-interaction) - "Error: la expresión intentó pedir entrada al usuario de forma interactiva, lo cual está bloqueado en la tool Eval." + "Error: the expression tried to prompt the user for input interactively, which is blocked in the Eval tool." (format "Error: eval failed with error %S: %S" (car err) (cdr err))) (and output (format "\n\nSTDOUT:\n%s" output))))) (kill-buffer standard-output)))) @@ -543,27 +543,27 @@ and is not captured)." (gptel-make-tool :name "lsp_diagnostics" :function #'kj-gptel-lsp-diagnostics - :description "Obtener los diagnósticos LSP (errores y advertencias) de un archivo, vía el servidor de lenguaje (eglot). + :description "Get the LSP diagnostics (errors and warnings) of a file via the language server (eglot). -Úsalo para saber si un archivo tiene errores tras editarlo o para comprobar el estado del código. Recibe la ruta del archivo y devuelve una línea por diagnóstico con formato ruta:línea:columna [tipo] mensaje. Si el servidor LSP no está conectado para ese archivo, intenta iniciarlo." +Use it to know if a file has errors after editing it or to check the state of the code. It takes the file path and returns one line per diagnostic in the format path:line:column [type] message. If the LSP server is not connected for that file, it tries to start it." :args '((:name "path" :type string - :description "Ruta del archivo del que obtener los diagnósticos.")) + :description "Path of the file to get diagnostics from.")) :category "gptel-agent" :include t) (gptel-make-tool :name "lsp_symbols" :function #'kj-gptel-lsp-symbols - :description "Buscar símbolos (funciones, clases, variables, etc.) en el workspace mediante LSP (eglot). + :description "Search workspace symbols (functions, classes, variables, etc.) via LSP (eglot). -Útil para localizar definiciones por nombre o ver qué símbolos existen. Recibe una consulta (patrón) y devuelve la lista de símbolos coincidentes en formato \"contenedor nombre Tipo\"." +Useful for locating definitions by name or seeing which symbols exist. It takes a query (pattern) and returns the list of matching symbols in the format \"container name Type\"." :args '((:name "query" :type string - :description "Patrón a buscar en los símbolos del workspace.") + :description "Pattern to search in the workspace symbols.") (:name "path" :type string - :description "Ruta de un archivo del proyecto cuyo servidor LSP usar (opcional)." + :description "Path of a project file whose LSP server to use (optional)." :optional t)) :category "gptel-agent" :include t) @@ -571,12 +571,12 @@ and is not captured)." (gptel-make-tool :name "apply_patch" :function #'kj-gptel-apply-patch - :description "Aplicar un diff unificado a los archivos del proyecto. + :description "Apply a unified diff to the project files. -Recibe un diff unificado (formato git o --- a/ / +++ b/). Se aplica con la herramienta patch (intenta -p1 y luego -p0). Úsalo para ediciones grandes o que tocan varios archivos, en lugar de múltiples llamadas a Edit. Modifica archivos del proyecto." +Takes a unified diff (git format or --- a/ / +++ b/). It is applied with the patch tool (tries -p1 and then -p0). Use it for large edits or edits that touch multiple files, instead of multiple Edit calls. Modifies project files." :args '((:name "diff" :type string - :description "El diff unificado a aplicar, con cabeceras de archivo (--- a/... y +++ b/...).")) + :description "The unified diff to apply, with file headers (--- a/... and +++ b/...).")) :category "gptel-agent" :confirm t :include t) @@ -584,15 +584,15 @@ Recibe un diff unificado (formato git o --- a/ / +++ b/). Se aplica con la herra (gptel-make-tool :name "plan_write" :function #'kj-gptel-plan-write - :description "Guardar el plan actual como archivo Markdown en .gptel/plans/ del proyecto. + :description "Save the current plan as a Markdown file in .gptel/plans/ of the project. -Úsalo cuando hayas elaborado un plan, para persistirlo en disco y poder retomarlo después. Guarda el contenido en .gptel/plans/.md. No modifica ningún otro archivo." +Use it when you have drafted a plan, to persist it to disk and be able to resume it later. Saves the content to .gptel/plans/.md. Does not modify any other file." :args '((:name "filename" :type string - :description "Nombre del archivo del plan (p. ej. refactor-auth.md).") + :description "Name of the plan file (e.g. refactor-auth.md).") (:name "content" :type string - :description "Contenido Markdown del plan.")) + :description "Markdown content of the plan.")) :category "gptel-agent" :confirm t :include t))