Skip to content

feat: Add native Jupyter notebook (.ipynb) support - #11414

Closed
pnpm-aftab wants to merge 16 commits into
anomalyco:devfrom
pnpm-aftab:feature/jupyter-notebook-support
Closed

pnpm-aftab wants to merge 16 commits into
anomalyco:devfrom
pnpm-aftab:feature/jupyter-notebook-support

Conversation

@pnpm-aftab

Copy link
Copy Markdown

Summary

Add comprehensive support for editing Jupyter notebooks with 5 new tools:

  • read_notebook: Parse and display notebook structure and content
  • edit_notebook_cell: Edit specific cells while preserving metadata
  • add_notebook_cell: Insert new cells at any position
  • delete_notebook_cell: Remove cells from notebooks
  • list_notebook_cells: Quick overview of all cells

Features

  • Full JSON structure validation and preservation
  • Supports code, markdown, and raw cell types
  • Maintains execution counts and outputs
  • Cell metadata and language info preserved
  • Compatible with Jupyter notebook format 4.x+

Testing

  • Created comprehensive test suite (test_notebook_tools.ts)
  • All 5 tools tested and verified working
  • Cross-validated with Python nbformat library
  • Test artifacts preserved in D:/test_notebooks/

Closes #11409

Add comprehensive support for editing Jupyter notebooks with 5 new tools:
- read_notebook: Parse and display notebook structure and content
- edit_notebook_cell: Edit specific cells while preserving metadata
- add_notebook_cell: Insert new cells at any position
- delete_notebook_cell: Remove cells from notebooks
- list_notebook_cells: Quick overview of all cells

Features:
- Full JSON structure validation and preservation
- Supports code, markdown, and raw cell types
- Maintains execution counts and outputs
- Cell metadata and language info preserved
- Compatible with Jupyter notebook format 4.x+

This enables OpenCode to work with data science notebooks,
making it useful for researchers and data scientists.
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

pnpm-aftab and others added 13 commits January 31, 2026 00:30
The GitLab provider loader was missing the 'key' property in its return
object, which is required by the Provider.Info interface. This was causing
test failures in the GitLab Duo provider tests.

The 'key' property should contain the API key (from auth or environment)
and is used by the test framework to verify provider configuration.
Replace `any` types with proper TypeScript types and type guards:
- Add CellOutput union type for better type safety
- Replace `Record<string, any>` with `Record<string, unknown>`
- Add proper type guard function for notebook validation
- Extract constants for preview length defaults

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add missing Notebook type imports to add-notebook-cell and delete-notebook-cell
- Fix assertExternalDirectory call in notebook-utils to pass minimal context
- Remove redundant stats check that always returns true

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Apr 12, 2026
@pnpm-aftab
pnpm-aftab deleted the feature/jupyter-notebook-support branch April 23, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add native Jupyter notebook (.ipynb) support

1 participant