Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 2 additions & 210 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
"author": {
"name": "Deepnote"
},
"extensionPack": [
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-slideshow",
"ms-toolsai.vscode-jupyter-cell-tags"
],
"license": "MIT",
"homepage": "https://github.com/deepnote/vscode-deepnote",
"repository": {
Expand Down Expand Up @@ -54,16 +48,12 @@
"Visualization"
],
"activationEvents": [
"onLanguage:jupyter",
"onLanguage:python",
"onLanguageModelTool:configure_notebook",
"onLanguageModelTool:notebook_install_packages",
"onLanguageModelTool:notebook_list_packages",
"onNotebook:deepnote",
"onNotebook:interactive",
"onNotebook:jupyter-notebook",
"onWebviewPanel:jupyter-variables",
"onWebviewPanel:jupyter"
"onNotebook:interactive"
],
Comment on lines 50 to 57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Activation events trimmed, but Jupyter surface still contributed.

You removed Jupyter activation triggers, yet the extension still contributes hundreds of Jupyter commands/menus/views. This leaves dead UI, unnecessary payload, and risk of unresolved contexts. Either drop these contributions or hard‑gate them behind a feature flag set to false.

Apply at least these removals as a start:

@@
         "views": {
-            "jupyter-variables": [
-                {
-                    "type": "webview",
-                    "id": "jupyterViewVariables",
-                    "name": "Jupyter Variables",
-                    "when": "jupyter.hasNativeNotebookOrInteractiveWindowOpen"
-                }
-            ],
             "deepnote": [
@@
         "debuggers": [
-            {
-                "type": "Python Kernel Debug Adapter",
-                "label": "%jupyter.debuggers.kernel%"
-            },
-            {
-                "type": "Python Interactive Window Debug Adapter",
-                "label": "%jupyter.debuggers.interactive%"
-            }
+            // (remove entire block if not supporting Jupyter debugging)
         ],

🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "PWD: $(pwd)"

echo "Finding package.json files (excluding node_modules)..."
mapfile -t pkgs < <(find . -type f -name package.json -not -path "*/node_modules/*" -print)
if [ ${#pkgs[@]} -eq 0 ]; then
  echo "No package.json found"
  exit 0
fi

for f in "${pkgs[@]}"; do
  echo
  echo "=== $f ==="
  echo "--- Raw file head (first 300 lines) ---"
  sed -n '1,300p' "$f"
  echo "--- Parsed fields ---"
  python - <<'PY' "$f"
import sys, json, re
p=sys.argv[1]
with open(p) as fh:
  d=json.load(fh)
def jprint(x):
  import json
  print(json.dumps(x, indent=2))
print("activationEvents:")
jprint(d.get("activationEvents"))
print("contributes keys:")
jprint(list(d.get("contributes",{}).keys()))
contrib=d.get("contributes",{})
print("views keys:")
jprint(list(contrib.get("views",{}).keys()))
if "jupyter-variables" in contrib.get("views",{}):
  print("jupyter-variables entry:")
  jprint(contrib["views"]["jupyter-variables"])
print("debuggers:")
jprint(contrib.get("debuggers"))
s=json.dumps(contrib)
matches = sorted(set(re.findall(r'jupyter[^\"]*', s, flags=re.IGNORECASE)))
if matches:
  print("Found jupyter-related tokens in contributes:", matches)
else:
  print("No jupyter-related tokens found in contributes.")
PY
done

echo
echo "Repo-wide ripgrep for 'jupyter' (context):"
rg -n --hidden -S -C2 "jupyter" || true

Length of output: 135


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "PWD: $(pwd)"

echo "Counting package.json files (excluding node_modules)..."
count=$(find . -type f -name package.json -not -path "*/node_modules/*" -print | wc -l)
if [ "$count" -eq 0 ]; then
  echo "No package.json found"
  exit 0
fi
echo "Found $count package.json(s)"

PYTHON=python3
if ! command -v "$PYTHON" >/dev/null 2>&1; then
  PYTHON=python
fi

find . -type f -name package.json -not -path "*/node_modules/*" -print | while IFS= read -r f; do
  echo
  echo "=== $f ==="
  echo "--- head (1-300) ---"
  sed -n '1,300p' "$f" || true
  echo "--- parsed fields ---"
  "$PYTHON" - <<'PY' "$f"
import sys, json, re
p=sys.argv[1]
try:
  with open(p) as fh:
    d=json.load(fh)
except Exception as e:
  print("JSON parse error:", e)
  sys.exit(0)
def jprint(x):
  import json
  print(json.dumps(x, indent=2, ensure_ascii=False))
print("activationEvents:")
jprint(d.get("activationEvents"))
contrib=d.get("contributes",{})
print("contributes keys:")
jprint(list(contrib.keys()))
print("views keys:")
jprint(list(contrib.get("views",{}).keys()))
if "jupyter-variables" in contrib.get("views",{}):
  print("jupyter-variables entry:")
  jprint(contrib["views"]["jupyter-variables"])
print("debuggers:")
jprint(contrib.get("debuggers"))
s=json.dumps(contrib)
matches = sorted(set(re.findall(r'jupyter[^\"]*', s, flags=re.IGNORECASE)))
if matches:
  print("Found jupyter-related tokens in contributes:", matches)
else:
  print("No jupyter-related tokens found in contributes.")
PY
done

echo
echo "Repo-wide search for 'jupyter' (excluding node_modules and .git):"
if command -v rg >/dev/null 2>&1; then
  rg -n --hidden -S -C2 "jupyter" --glob '!node_modules/**' --glob '!.git/**' || true
else
  grep -RIn --exclude-dir=node_modules --exclude-dir=.git "jupyter" || true
fi

Length of output: 35767


Remove or gate leftover Jupyter contributions in package.json

activationEvents no longer include Jupyter triggers, but package.json still contributes Jupyter commands, views and debug adapters — remove these contributions or hard‑gate them behind a disabled feature flag to avoid dead UI and unresolved enablement contexts.

File: package.json (root) — remove or gate at least the following entries:

@@
         "views": {
-            "jupyter-variables": [
-                {
-                    "type": "webview",
-                    "id": "jupyterViewVariables",
-                    "name": "Jupyter Variables",
-                    "when": "jupyter.hasNativeNotebookOrInteractiveWindowOpen"
-                }
-            ],
             "deepnote": [
@@
         "debuggers": [
-            {
-                "type": "Python Kernel Debug Adapter",
-                "label": "%jupyter.debuggers.kernel%"
-            },
-            {
-                "type": "Python Interactive Window Debug Adapter",
-                "label": "%jupyter.debuggers.interactive%"
-            }
+            // (remove entire block if not supporting Jupyter debugging)
         ],

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In package.json around lines 50 to 57, remove or gate leftover Jupyter-related
contributions that no longer have activationEvents (specifically any
contributes.commands, contributes.views, contributes.debuggers or similar
entries referencing Jupyter/Notebook/Deepnote) — either delete those entries or
wrap them behind a new disabled feature flag (e.g., "features.enableJupyter":
false) and conditionally include their contributions using that flag; also
ensure any enablementContexts referencing those commands are removed or updated
so no dead UI or unresolved contexts remain.

"main": "./dist/extension.node.proxy.js",
"browser": "./dist/extension.web.bundle.js",
Expand All @@ -75,179 +65,11 @@
}
},
"contributes": {
"walkthroughs": [
{
"id": "jupyterWelcome",
"title": "%contributes.walkthroughs.jupyterWelcome.title%",
"description": "%contributes.walkthroughs.jupyterWelcome.description%",
"when": "workspacePlatform != webworker",
"steps": [
{
"id": "ipynb.newUntitledIpynb",
"title": "%contributes.walkthroughs.jupyterWelcome.steps.ipynb.newUntitledIpynb.title%",
"description": "%contributes.walkthroughs.jupyterWelcome.steps.ipynb.newUntitledIpynb.description%",
"media": {
"svg": "resources/walkthroughs/opennotebook.svg",
"altText": "%contributes.walkthroughs.jupyterWelcome.steps.ipynb.newUntitledIpynb.media.altText%"
},
"completionEvents": [
"onCommand:ipynb.newUntitledIpynb",
"onCommand:jupyter.createnewinteractive",
"onCommand:workbench.action.files.openFolder",
"onCommand:workbench.action.files.openFileFolder"
]
},
{
"id": "jupyter.selectKernel",
"title": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.selectKernel.title%",
"description": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.selectKernel.description%",
"media": {
"svg": "resources/walkthroughs/kernel.svg",
"altText": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.selectKernel.media.altText%"
},
"completionEvents": [
"onCommand:notebook.selectKernel"
]
},
{
"id": "jupyter.exploreAndDebug",
"title": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.exploreAndDebug.title%",
"description": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.exploreAndDebug.description%",
"media": {
"svg": "resources/walkthroughs/data.svg",
"altText": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.exploreAndDebug.media.altText%"
}
},
{
"id": "jupyter.dataScienceLearnMore",
"title": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.dataScienceLearnMore.title%",
"description": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.dataScienceLearnMore.description%",
"media": {
"svg": "resources/walkthroughs/learnmore.svg",
"altText": "%contributes.walkthroughs.jupyterWelcome.steps.jupyter.dataScienceLearnMore.media.altText%"
}
}
]
}
],
"keybindings": [
{
"command": "jupyter.execSelectionInteractive",
"key": "shift+enter",
"when": "editorTextFocus && editorLangId == python && !findInputFocussed && !replaceInputFocussed && jupyter.ownsSelection && !notebookEditorFocused && !isCompositeNotebook"
},
{
"command": "jupyter.runcurrentcelladvance",
"key": "shift+enter",
"when": "editorTextFocus && !editorHasSelection && jupyter.hascodecells && !notebookEditorFocused && !isCompositeNotebook"
},
{
"command": "jupyter.runcurrentcell",
"key": "ctrl+enter",
"when": "editorTextFocus && !editorHasSelection && jupyter.hascodecells && !notebookEditorFocused && !isCompositeNotebook"
},
{
"command": "jupyter.runcurrentcellandaddbelow",
"key": "alt+enter",
"when": "editorTextFocus && !editorHasSelection && jupyter.hascodecells && !notebookEditorFocused"
},
{
"key": "escape",
"when": "isCompositeNotebook && !editorHoverVisible && !suggestWidgetVisible && !isComposing && !inSnippetMode && !exceptionWidgetVisible && !selectionAnchorSet && !LinkedEditingInputVisible && !renameInputVisible && !editorHasSelection && !accessibilityHelpWidgetVisible && !breakpointWidgetVisible && !findWidgetVisible && !markersNavigationVisible && !parameterHintsVisible && !editorHasMultipleSelections && !notificationToastsVisible && !notebookEditorFocused && !inlineChatVisible",
"command": "interactive.input.clear"
},
{
"command": "jupyter.insertCellBelowPosition",
"key": "ctrl+; s",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.insertCellBelow",
"key": "ctrl+; b",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.insertCellAbove",
"key": "ctrl+; a",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.deleteCells",
"key": "ctrl+; x",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.extendSelectionByCellAbove",
"key": "ctrl+alt+shift+[",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.extendSelectionByCellBelow",
"key": "ctrl+alt+shift+]",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.moveCellsUp",
"key": "ctrl+; u",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.moveCellsDown",
"key": "ctrl+; d",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.changeCellToMarkdown",
"key": "ctrl+; m",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.changeCellToCode",
"key": "ctrl+; c",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.gotoNextCellInFile",
"key": "ctrl+alt+]",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.gotoPrevCellInFile",
"key": "ctrl+alt+[",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.selectCellContents",
"key": "ctrl+alt+\\",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.selectCell",
"key": "ctrl+alt+shift+\\",
"when": "editorTextFocus && jupyter.hascodecells && !notebookEditorFocused"
},
{
"command": "jupyter.refreshDataViewer",
"key": "ctrl+r",
"mac": "cmd+r",
"when": "jupyter.dataViewerActive"
},
{
"command": "jupyter.runAndDebugCell",
"key": "ctrl+alt+shift+enter",
"mac": "ctrl+shift+enter"
},
{
"command": "jupyter.runByLine",
"key": "f10"
},
{
"command": "jupyter.runByLineNext",
"key": "f10"
},
{
"command": "jupyter.runByLineStop",
"key": "ctrl+enter"
}
],
"commands": [
Expand Down Expand Up @@ -1414,7 +1236,7 @@
},
"configuration": {
"type": "object",
"title": "Jupyter",
"title": "Deepnote",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Config title says “Deepnote” but all keys are jupyter. — confusing.*

Either revert the title or migrate/alias settings to deepnote.* (with code reading both). Rebrand without key migration misleads users and docs.

-            "title": "Deepnote",
+            "title": "Jupyter",

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Locating package.json files (excluding node_modules)..."
mapfile -t files < <(find . -type f -name package.json -not -path "*/node_modules/*" 2>/dev/null || true)

if [ ${#files[@]} -eq 0 ]; then
  echo "No package.json found."
  exit 0
fi

for f in "${files[@]}"; do
  echo
  echo "==== $f ===="
  echo "-- Lines around 1230-1245 (if file long enough) --"
  sed -n '1225,1250p' "$f" || true
  echo
  echo "-- Any 'title' entries matching Deepnote or Jupyter --"
  grep -nE '"title"[[:space:]]*:[[:space:]]*"(Deepnote|Jupyter)"' "$f" || echo "none"
  echo
  echo "-- Keys containing 'jupyter.' --"
  grep -nE '"jupyter\.' "$f" || echo "none"
  echo
  echo "-- Keys containing 'deepnote.' --"
  grep -nE '"deepnote\.' "$f" || echo "none"
done

Length of output: 112


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Locating package.json files (excluding node_modules)..."
files=$(find . -type f -name package.json -not -path "*/node_modules/*" 2>/dev/null || true)

if [ -z "$files" ]; then
  echo "No package.json found."
  exit 0
fi

for f in $files; do
  echo
  echo "==== $f ===="
  echo "-- Lines 1225-1250 (or whole file if shorter) --"
  total_lines=$(wc -l < "$f" || echo 0)
  if [ "$total_lines" -ge 1250 ]; then
    sed -n '1225,1250p' "$f" || true
  else
    sed -n '1,2000p' "$f" || true
  fi
  echo
  echo "-- 'title' entries matching Deepnote or Jupyter --"
  grep -nE '"title"[[:space:]]*:[[:space:]]*"(Deepnote|Jupyter)"' "$f" || echo "none"
  echo
  echo "-- Keys containing 'jupyter.' --"
  grep -nE '"jupyter\.' "$f" || echo "none"
  echo
  echo "-- Keys containing 'deepnote.' --"
  grep -nE '"deepnote\.' "$f" || echo "none"
done

Length of output: 23270


Config title is "Deepnote" but settings use jupyter. — revert title or migrate/alias keys.*
package.json (root) — "title": "Deepnote" at lines 1239 and 1816 while configuration keys are jupyter.; either change the title to "Jupyter" or add deepnote. aliases and a loader that reads both.

-            "title": "Deepnote",
+            "title": "Jupyter",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"title": "Deepnote",
"title": "Jupyter",
🤖 Prompt for AI Agents
In package.json around line 1239 (and also line 1816), the config "title" is set
to "Deepnote" while the actual configuration keys use the jupyter.* namespace;
either change the title to "Jupyter" to match the keys, or add deepnote.*
aliases and a loader that resolves both namespaces. Fix option A: update the
title fields at the indicated lines to "Jupyter". Fix option B: add deepnote.*
entries mirroring the jupyter.* keys and modify the config loader to check
deepnote.* first then fall back to jupyter.* (or vice versa), ensuring both
namespaces are supported and covered by tests/validation.

"properties": {
"jupyter.experiments.enabled": {
"type": "boolean",
Expand Down Expand Up @@ -1972,13 +1794,6 @@
}
],
"notebookPreload": [
{
"type": "jupyter-notebook",
"localResourceRoots": [
"./temp"
],
"entrypoint": "./dist/webviews/webview-side/ipywidgetsKernel/ipywidgetsKernel.js"
},
{
"type": "deepnote",
"localResourceRoots": [
Expand All @@ -1994,36 +1809,13 @@
"entrypoint": "./dist/webviews/webview-side/ipywidgetsKernel/ipywidgetsKernel.js"
}
],
"notebookRenderer": [
{
"id": "jupyter-ipywidget-renderer",
"entrypoint": "./dist/webviews/webview-side/ipywidgetsRenderer/ipywidgetsRenderer.js",
"displayName": "%jupyter.notebookRenderer.IPyWidget.displayName%",
"mimeTypes": [
"application/vnd.jupyter.widget-view+json"
],
"requiresMessaging": "always"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "jupyter",
"title": "Jupyter",
"icon": "$(notebook)"
},
{
"id": "deepnote",
"title": "Deepnote",
"icon": "resources/DnDeepnoteLineLogo.svg"
}
],
"panel": [
{
"id": "jupyter-variables",
"title": "Jupyter",
"icon": "$(notebook)"
}
]
},
"views": {
Expand Down