-
Notifications
You must be signed in to change notification settings - Fork 108
WIP: add notebook.workingDirectory setting #8558
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
base: main
Are you sure you want to change the base?
Conversation
E2E Tests 🚀 |
fb3b7c2
to
2f79d0b
Compare
2f79d0b
to
723280c
Compare
723280c
to
a838fb7
Compare
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.
Pull Request Overview
This PR adds a new notebook.workingDirectory
setting that allows users to configure the default working directory for notebook kernels. The setting supports variable substitution (like ${workspaceFolder}
) and is resource-scoped, meaning it can be configured per notebook or workspace. When empty, the system falls back to using the notebook file's directory.
Key changes include:
- Addition of the new configuration setting with proper schema definition
- Integration of working directory resolution into the runtime session service
- Extension of session metadata to include the working directory
- Updates to Python LSP and Jupyter kernel session handling to respect the new setting
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/vs/workbench/contrib/notebook/common/notebookCommon.ts | Adds the workingDirectory constant to NotebookSetting |
src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts | Registers the notebook.workingDirectory configuration setting |
src/vs/workbench/services/runtimeSession/common/runtimeSessionService.ts | Adds workingDirectory to IRuntimeSessionMetadata interface |
src/vs/workbench/services/runtimeSession/common/runtimeSession.ts | Implements working directory resolution with variable substitution |
extensions/positron-supervisor/src/KallichoreSession.ts | Updates Jupyter kernel session to use configured working directory |
extensions/positron-python/src/client/positron/lsp.ts | Passes working directory to Python LSP initialization |
extensions/positron-python/python_files/posit/positron/positron_jedilsp.py | Updates Python LSP to use working directory for project path |
src/vs/workbench/services/preferences/common/preferencesModels.ts | Adds support for hiding settings via product configuration |
src/vs/workbench/services/preferences/browser/preferencesService.ts | Updates preferences service to use product service |
src/vs/base/common/product.ts | Adds hiddenSettings to product configuration interface |
product.json | Hides jupyter.notebookFileRoot setting |
Test files | Comprehensive test coverage for the new working directory functionality |
} | ||
|
||
// Get the workspace folder for variable resolution | ||
const workspaceFolder = this._workspaceContextService.getWorkspaceFolder(notebookUri) |
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.
Missing semicolon at the end of the line. Should be const workspaceFolder = this._workspaceContextService.getWorkspaceFolder(notebookUri);
const workspaceFolder = this._workspaceContextService.getWorkspaceFolder(notebookUri) | |
const workspaceFolder = this._workspaceContextService.getWorkspaceFolder(notebookUri); |
Copilot uses AI. Check for mistakes.
@@ -1645,7 +1695,7 @@ export class RuntimeSessionService extends Disposable implements IRuntimeSession | |||
* @param runtime The runtime to get the manager for. | |||
* @returns The session manager that manages the runtime. | |||
* | |||
* Throws an errror if no session manager is found for the runtime. | |||
* Throws an error if no session manager is found for the runtime. |
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 appears to be a spelling correction from 'errror' to 'error' in the comment, which is good but should be noted as a separate fix rather than part of the main feature.
Copilot uses AI. Check for mistakes.
Addresses #7988. Adds a
notebook.workingDirectory
setting.Release Notes
New Features
Bug Fixes
QA Notes
@:notebooks @:vscode-settings @:console @:extensions @:interpreter @:win