You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add API method to shutdown Jupyter kernels programmatically (Proposed API) (#16775)
* AI ready repo
* Updates
* Updates
* Initial plan
* Implement shutdown kernel command infrastructure
Co-authored-by: DonJayamanne <[email protected]>
* Add shutdown kernel command to VS Code UI and add unit test
Co-authored-by: DonJayamanne <[email protected]>
* Replace string URI comparison with isEqual function in shutdownKernel
Co-authored-by: DonJayamanne <[email protected]>
* Address feedback: Remove kernelConnector changes, call kernel.shutdown() and dispose() directly, add integration test
Co-authored-by: DonJayamanne <[email protected]>
* Fix integration test to properly call both shutdown() and dispose() methods
Co-authored-by: DonJayamanne <[email protected]>
* Remove 'shutdown' from KernelAction type as requested
Co-authored-by: DonJayamanne <[email protected]>
* Address feedback: Remove kernelConnector test, separate try-catch for dispose, support multiple argument types, move test to new file
Co-authored-by: DonJayamanne <[email protected]>
* Updates
* Fix formatting
* Convert shutdown command to API-based approach
Co-authored-by: DonJayamanne <[email protected]>
* Updated instructions
* Fix test assertion and address linting/formatting issues
- Replace assert.isNotEmpty() with assert.isDefined() in shutdown test
- Fix incorrect assertion that was causing test failure when apiKernel is undefined
- Run format-fix to ensure consistent code formatting
Co-authored-by: DonJayamanne <[email protected]>
* Move shutdown test to api.vscode.test.ts and delete separate test file
- Moved "Can shutdown a kernel correctly via API" test from shutdown.vscode.test.ts to api.vscode.test.ts
- Added necessary imports for kernels API, test helpers, and execution functions
- Updated test to create separate notebook to avoid conflicts with existing tests
- Deleted standalone shutdown.vscode.test.ts file as requested
- Fixed TypeScript compilation by removing unused IKernel import
Co-authored-by: DonJayamanne <[email protected]>
* Create api.proposed.shutdown.d.ts with authorization check
Co-authored-by: DonJayamanne <[email protected]>
* Fix formatting
* Fix API test by setting disableUI: false for user-started kernel
Co-authored-by: DonJayamanne <[email protected]>
* Fix tests
* Updates to allow list
---------
Co-authored-by: Don Jayamanne <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: DonJayamanne <[email protected]>
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,9 +87,9 @@ src/ # Source code for the extension
87
87
└── test/ # Integration, unit and end-to-end tests
88
88
```
89
89
90
-
### Component Instructions
90
+
### Component-Specific Instructions
91
91
92
-
**IMPORTANT**: Before modifying code in directories below, you **MUST** read the corresponding instruction file(s).
92
+
**IMPORTANT**: Before modifying any code in the directories listed below, you **MUST**first read the corresponding instruction file to understand the specific conventions, patterns, and architectural requirements for that component.
93
93
94
94
Each component has detailed guidelines that cover:
95
95
- Architecture patterns and design principles
@@ -99,17 +99,18 @@ Each component has detailed guidelines that cover:
**For AI/Copilot**: Always read the relevant instruction file(s) before modifying code in these directories to ensure adherence to component-specific patterns.
102
+
#### Required Reading by Directory
103
+
104
+
| Directory/Component | Instruction File | When to Read |
|`src/platform/**`|`.github/instructions/platform.instructions.md`| Before working with cross-platform abstractions, utilities, or core services |
107
+
|`src/kernels/**`|`.github/instructions/kernel.instructions.md`| Before modifying kernel management, execution, or communication logic |
108
+
|`src/kernels/jupyter/**`|`.github/instructions/kernel-jupyter.instructions.md`| Before working with Jupyter protocol implementation or Jupyter-specific features |
109
+
|`src/notebooks/**`|`.github/instructions/notebooks.instructions.md`| Before modifying notebook controllers, editing, or management features |
110
+
|`src/interactive-window/**`|`.github/instructions/interactiveWindow.instructions.md`| Before working with Python Interactive window (REPL) functionality |
111
+
|`src/standalone/**`|`.github/instructions/standalone.instructions.md`| Before modifying standalone mode or isolated execution features |
112
+
|`src/notebooks/controllers/ipywidgets/**`|`.github/instructions/ipywidgets.instructions.md`| Before working with IPython widget support |
113
+
|`src/webviews/extension-side/ipywidgets/**`|`.github/instructions/ipywidgets.instructions.md`| Before modifying extension-side widget communication |
114
+
|`src/webviews/webview-side/ipywidgets/**`|`.github/instructions/ipywidgets.instructions.md`| Before working with frontend widget rendering |
115
+
116
+
**For AI/Copilot**: Always use the `read_file` tool to read the relevant instruction file(s) before analyzing, modifying, or creating code in these directories. This ensures adherence to component-specific patterns and prevents architectural violations.
0 commit comments