Skip to content

Commit

Permalink
fix Jupyter Notebooks in VSCode become unresponsive because the kerne…
Browse files Browse the repository at this point in the history
…l gets disposed erroneously #1463
  • Loading branch information
sestinj committed Dec 14, 2024
1 parent abf27d5 commit d393ee9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/autocomplete/context/ImportDefinitionsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export class ImportDefinitionsService {
}

private async _getFileInfo(filepath: string): Promise<FileInfo | null> {
if (filepath.endsWith(".ipynb")) {
// Commenting out this line was the solution to https://github.com/continuedev/continue/issues/1463
return null;
}

const parser = await getParserForFile(filepath);
if (!parser) {
return {
Expand Down
2 changes: 1 addition & 1 deletion core/util/treeSitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const supportedLanguages: { [key: string]: LanguageName } = {
mjs: LanguageName.JAVASCRIPT,
cjs: LanguageName.JAVASCRIPT,
py: LanguageName.PYTHON,
ipynb: LanguageName.PYTHON,
// ipynb: LanguageName.PYTHON, // It contains Python, but the file format is a ton of JSON.
pyw: LanguageName.PYTHON,
pyi: LanguageName.PYTHON,
el: LanguageName.ELISP,
Expand Down

0 comments on commit d393ee9

Please sign in to comment.