chattr icon indicating copy to clipboard operation
chattr copied to clipboard

Feature Request: Persistent chattr::chattr_app() in RStudio IDE pane?

Open fh-mthomson opened this issue 1 year ago • 3 comments

Thank you for the great chattr package to make it easy to launch LLM chats from R!

Perhaps related to https://github.com/rstudio/rstudio/issues/13671, is there a way to have two panes open (and running 2 processes accordingly) simultaneously within the RStudio IDE:

  1. Console - running iterative R code chunks
  2. E.g., Chat (Viewer, but persistent) - ask questions/debugging error messages etc while iterating on ^

Currently, I am terminating the app in Viewer to get back my Console, then needing to manually restart it, so I find myself reaching for VSCode for a persistent version of (2). I've reviewed other interfaces, but would love to find out I've overlooked something! 😄

fh-mthomson avatar May 08 '24 01:05 fh-mthomson

Hi, yeah, have you tried making the app run as an RStudio job? That way it won't block your session. You just have to set the argument to 'true':

chattr::chattr_app(as_job = TRUE)

The trade-off is that the app will not be aware of which document you have opened, so only the 'copy' button will show up in this mode. The 'send to document' will not appear.

edgararuiz avatar May 08 '24 15:05 edgararuiz

Oh, got it! That definitely works to keep the Console available and launch as a background job. However, when I go to knit a .Rmd, the rendered HTML file drops the chat from the Viewer pane, so would need to re-launch chattr.

I also see the the following when the knitting kicks off, but that's likely moreso a Workbench launcher issue not directly related to chattr : image

fh-mthomson avatar May 10 '24 00:05 fh-mthomson

Hi, yeah, have you tried making the app run as an RStudio job? That way it won't block your session. You just have to set the argument to 'true':

chattr::chattr_app(as_job = TRUE)

The trade-off is that the app will not be aware of which document you have opened, so only the 'copy' button will show up in this mode. The 'send to document' will not appear.

great suggestion. This is what I was looking for!

ChristianRohde avatar Jun 14 '24 07:06 ChristianRohde