% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addins.R
\name{addin_fix_selected_error}
\alias{addin_fix_selected_error}
\title{Fix an error by selecting its text}
\usage{
addin_fix_selected_error()
}
\value{
Invisible \code{NULL} (called for side-effects).
}
\description{
Select the error message text in the editor (or paste it into a temporary
comment), then trigger this addin.  The addin pairs the selected text with
the complete source file currently open in the editor and asks the LLM for a
fix, displaying the result in a review dialog.
}
\details{
This addin is the recommended fallback when \code{\link[=addin_fix_console_error]{addin_fix_console_error()}} does
not detect an error automatically (e.g., because the error occurred inside a
\code{tryCatch()} block or in a separate R process).

\strong{Workflow}
\enumerate{
\item Copy the error message from the console.
\item Paste it anywhere in the source file, or simply select it in the console
output if your terminal supports that.
\item Select the error text in the editor.
\item Trigger this addin.
\item Review and apply the suggested fix.
}
}
\seealso{
\code{\link[=addin_fix_console_error]{addin_fix_console_error()}}, \code{\link[=llmcoder_setup]{llmcoder_setup()}}
}
