-
Notifications
You must be signed in to change notification settings - Fork 297
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
Refactor preferred controller for interactive #6642
Conversation
@@ -238,19 +236,8 @@ export class NativeInteractiveWindowProvider implements IInteractiveWindowProvid | |||
} | |||
|
|||
private async getControllerForInteractiveWindow(): Promise<string | undefined> { | |||
// Fetch the active interpreter and use the matching controller | |||
const api = await this.pythonApi.getApi(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic for what's the preferred should be in the manager (that's where it is today for native notebooks).
public async getInteractiveController(): Promise<VSCodeNotebookController | undefined> { | ||
// Fetch the active interpreter and use the matching controller | ||
const api = await this.pythonApi.getApi(); | ||
const activeInterpreter = await api.getActiveInterpreter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change also makes it easier for #5861
Else we have to change a few places, when ideally we should have the controllers created & return from a single place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## main #6642 +/- ##
=======================================
- Coverage 64% 63% -2%
=======================================
Files 352 409 +57
Lines 24542 28249 +3707
Branches 3750 4195 +445
=======================================
+ Hits 15930 17944 +2014
- Misses 7194 8712 +1518
- Partials 1418 1593 +175
|
Co-authored-by: Joyce Er <[email protected]>
No description provided.