Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API for subscribing to code execution events #2238

Open
Tracked by #1617
jmcphers opened this issue Feb 9, 2024 · 3 comments
Open
Tracked by #1617

Add API for subscribing to code execution events #2238

jmcphers opened this issue Feb 9, 2024 · 3 comments
Labels
area: api Issues related to API category. area: workbench Issues related to Workbench category.

Comments

@jmcphers
Copy link
Collaborator

jmcphers commented Feb 9, 2024

Positron should have an API that allows extensions to subscribe an event that fires each time the user runs code. The event should include

  • the language in which code was executed
  • the code that was executed
  • any other relevant metadata

This is probably useful for many purposes, but the primary motivation is to make it possible for the Posit Workbench extension to build a feature that connects Positron to Posit Workbench's console auditing feature.

@jmcphers jmcphers added this to the Release Candidate milestone Feb 20, 2024
@wesm wesm added the area: api Issues related to API category. label Feb 29, 2024
@jthomasmock
Copy link
Contributor

Would this also be appropriate for Workbench to know when Positron is performing computation or not? Currently, Workbench doesn't have timeouts for VS Code, but if Workbench knows that Positron isn't actively computing something, we could have a pretty safe indication to allow timeout of a session.

@jmcphers
Copy link
Collaborator Author

No, I think that should be built out as a separate API, one that is query-based ("are you currently computing?") rather than event based.

@jthomasmock
Copy link
Contributor

No, I think that should be built out as a separate API, one that is query-based ("are you currently computing?") rather than event based.

Makes sense. Thank you, I'll open a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API category. area: workbench Issues related to Workbench category.
Projects
None yet
Development

No branches or pull requests

4 participants