Hi Posit team
,
Thank you for including me in the Posit Assistant beta. I’ve been enjoying experimenting with it. I had a question about the intended behavior of “Insert at Cursor” when Assistant suggests code edits.
Currently, when suggesting changes, Assistant returns a unified diff-style block including diff hunk headers:
When “Insert at Cursor” is used, the entire block, including the diff hunk headers, is inserted into the script:
@@ -6,7 +6,7 @@
y = rnorm(10)
)
-ggplot(df_test_data_r) +
+ggplot(df_test_data_r, aes(x = x, y = y)) +
geom_point(color = "red", fill = "purple", stroke = 2, shape = 21, size = 5) +
geom_line(color = "black")
I was expecting behavior more similar to Positron, where the updated code replaces the existing code directly, e.g.:
ggplot(df_test_data_r, aes(x = x, y = y)) +
geom_point(color = "red", fill = "purple", stroke = 2, shape = 21, size = 5) +
geom_line(color = "black")
Is the current behavior intentional for this stage of the beta? Or is there a plan to support direct code replacement / integration similar to Positron’s Assistant workflow?
For reference:
System/Version Details
RStudio Edition: Desktop
RStudio Version: 2026.04.0-daily+279 (“Globemaster Allium”)
OS: Windows 11 (mingw32)
R: 4.5.2 (ucrt)
Assistant: 0.0.93
Thanks again. Super excited to see where this evolves!
