Skip to content

Use base-R standalone files for functionality copied in Positron? #78

Open

Description

@lionel-

It might be helpful if the functionality we copied over to Ark for tool calls in Positron was implemented in base-R only standalone files. This way the functionality is updated and tested in one place, usethis can be used to manage updates (https://usethis.r-lib.org/reference/use_standalone.html), and we wouldn't need to adapt the code to base R when we need to update.

You can see which functions we adapted in posit-dev/ark#868 (files help.R and llm_tools.R).

This is just a suggestion, I'd understand if you think this would be impractical or too constraining on your end.

Activity

  1. gadenbuie commented on Oct 23, 2025

    @gadenbuie
    Collaborator

    Thanks @lionel-. From the linked PR here are the key changes that were made:

    Specifically, the changes from btw are as follows:

    • remove dependency on tidyverse (dplyr, etc.) by rewriting transformations in base R
    • return plain-text results rather than throwing errors in most cases
    • remove dependency on rmarkdown by bundling the needed pandoc conversion bits

    We used dplyr by convenience and I could certainly see us moving dplyr to Suggests. That said, it'd be a nontrivial undertaking and I don't want to hold up releasing btw at this point.

    Similarly, in the btw + ellmer context, we prefer throwing errors. And the pandoc conversion bits are equally non-trivial.

    I'm going to leave this issue open because I do think it'd be worth the effort in the future to use base R for transformations as well as to revisit the parts that use pandoc, but just not at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions