Open codeagent with the current editor selection as context
Source:R/addin.R
codeagent_addin_selection.RdReads the selected text in the active RStudio/Positron source editor and
opens codeagent_app() with that code pre-loaded as context. Works in
both RStudio and Positron (both support rstudioapi).