@@ -35,7 +35,7 @@ This implementation adds automatic kernel selection and startup for `.deepnote`
3535** Key Methods:**
3636- ` getVenvInterpreter(deepnoteFileUri) ` : Gets the venv Python interpreter for a specific file
3737- ` ensureInstalled(interpreter, deepnoteFileUri) ` : Creates venv, installs toolkit and ipykernel, and registers kernel spec
38- - ` getVenvHash(deepnoteFileUri) ` : Creates a unique hash for kernel naming
38+ - ` getVenvHash(deepnoteFileUri) ` : Creates a unique hash for both kernel naming and venv directory paths
3939- ` getDisplayName(deepnoteFileUri) ` : Gets a friendly display name for the kernel
4040
4141#### 3. ** Deepnote Server Starter** (` src/kernels/deepnote/deepnoteServerStarter.node.ts ` )
@@ -155,7 +155,7 @@ User runs cell → Executes on Deepnote kernel
155155- ** Wheel URL** : ` https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/0.2.30.post20/deepnote_toolkit-0.2.30.post20-py3-none-any.whl `
156156- ** Default Port** : ` 8888 ` (will find next available if occupied)
157157- ** Notebook Type** : ` deepnote `
158- - ** Venv Location** : ` ~/.vscode/extensions/storage/deepnote-venvs/<file -path-hash >/ `
158+ - ** Venv Location** : ` ~/.vscode/extensions/storage/deepnote-venvs/<hashed -path>/ ` (e.g., ` venv_a1b2c3d4 ` )
159159- ** Server Provider ID** : ` deepnote-server `
160160- ** Kernel Spec Name** : ` deepnote-venv-<file-path-hash> ` (registered via ipykernel to point to venv Python)
161161- ** Kernel Display Name** : ` Deepnote (<notebook-filename>) `
@@ -302,6 +302,19 @@ Instead of creating custom kernel specs, the implementation:
3023024 . Uses this existing spec when creating the kernel connection metadata
3033035 . This ensures compatibility with the Deepnote server's kernel configuration
304304
305+ ### Virtual Environment Path Handling
306+
307+ The implementation uses a robust hashing approach for virtual environment directory names:
308+
309+ 1 . ** Path Hashing** : Uses ` getVenvHash() ` to create short, unique identifiers from file paths
310+ 2 . ** Hash Algorithm** : Implements a djb2-style hash function for better distribution
311+ 3 . ** Format** : Generates identifiers like ` venv_a1b2c3d4 ` (max 16 characters)
312+ 4 . ** Benefits** :
313+ - Avoids Windows MAX_PATH (260 character) limitations
314+ - Prevents directory structure leakage into extension storage
315+ - Provides consistent naming for both venv directories and kernel specs
316+ - Reduces collision risk with better hash distribution
317+
305318## Troubleshooting & Key Fixes
306319
307320### Issue 1: "Unable to get resolved server information"
0 commit comments