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

API for extending the connections pane #5785

Merged
merged 9 commits into from
Dec 20, 2024
Merged

Conversation

dfalbel
Copy link
Contributor

@dfalbel dfalbel commented Dec 17, 2024

Addresses: #5689

Add a positron public API that can be used to register new connection drivers. Registered drivers are used by the connections pane 'New Connection' button.

Copy link

github-actions bot commented Dec 17, 2024

E2E Tests 🚀  ?
This PR will run tests tagged with: @critical

@dfalbel dfalbel marked this pull request as ready for review December 18, 2024 19:37
@dfalbel dfalbel requested a review from jmcphers December 18, 2024 19:43
jmcphers
jmcphers previously approved these changes Dec 19, 2024
Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of nits but LGTM and connections pane looked healthy when I built this branch! Nice to see this becoming more extensible.

@@ -1101,6 +1101,53 @@ declare module 'positron' {
pasteText(text: string): void;
}

export interface ConnectionsInput {
// The unique identifier for the input.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments on interface members should use either the /// form or the /** form so that they show up in intellisense (etc).

if (!driver || !driver.checkDependencies) {
throw new Error(`Driver ${driverId} does not support checking dependencies`);
}
return await driver.checkDependencies();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: here and elsewhere, the await is unnecessary here -- the async syntax sugar will chain the promise for you if you return it directly

@dfalbel dfalbel merged commit 18a1951 into main Dec 20, 2024
6 checks passed
@dfalbel dfalbel deleted the feature/extend-connections-pane branch December 20, 2024 21:36
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants