-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Main thread runtime notebook kernels (#5926)
This PR adds notebook kernels for language runtimes in the main thread. Before this, runtime kernels lived in the `positron-notebook-controllers` extension. Having kernels in the main thread gives us more control over runtime session management. Addresses #2671. Should also address #4224 because of the way we manage notebook runtime sessions. Some changes were required in the runtime session service in order to make this possible. ### Release Notes #### New Features - Positron's notebook kernels now live in the main thread rather than in an extension. They should also be more stable. Since this was a big change, the feature can be disabled via the `positron.runtimeNotebookKernel.enable` setting. #### Bug Fixes - Cancelling the ipykernel installation modal no longer breaks kernel selection (#4224). ### QA Notes I'll run E2E tests against this branch. Playing around with notebooks should also feel stable. Should also address #4224.
- Loading branch information
Showing
35 changed files
with
3,116 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"positron.command.restartKernel.title": "Restart Kernel", | ||
"positron.command.restartKernel.shortTitle": "Restart", | ||
"python.languageServer.description": "This setting is included as a temporary workaround to disable the Jupyter extension's language server. The value should remain 'Default'.", | ||
"notebook.experimental.showExecutionInfo.description": "Enable a status bar item that shows notebook execution info such as total duration and number of cells executing." | ||
"positron.command.restartKernel.shortTitle": "Restart" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...orkbench/contrib/runtimeNotebookKernel/browser/interfaces/runtimeNotebookKernelService.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (C) 2025 Posit Software, PBC. All rights reserved. | ||
* Licensed under the Elastic License 2.0. See LICENSE.txt for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { createDecorator } from '../../../../../platform/instantiation/common/instantiation.js'; | ||
|
||
// Create the decorator for the service (used in dependency injection). | ||
export const IRuntimeNotebookKernelService = createDecorator<IRuntimeNotebookKernelService>('runtimeNotebookKernelService'); | ||
|
||
export interface IRuntimeNotebookKernelService { | ||
/** | ||
* Needed for service branding in dependency injector. | ||
*/ | ||
readonly _serviceBrand: undefined; | ||
|
||
/** | ||
* Placeholder that gets called to "initialize" the service. | ||
*/ | ||
initialize(): void; | ||
} |
Oops, something went wrong.