Skip to content

feat(opencode): add Jupyter notebook tool with read, edit, and execute support#30721

Open
coder11125 wants to merge 3 commits into
anomalyco:devfrom
coder11125:dev
Open

feat(opencode): add Jupyter notebook tool with read, edit, and execute support#30721
coder11125 wants to merge 3 commits into
anomalyco:devfrom
coder11125:dev

Conversation

@coder11125
Copy link
Copy Markdown

@coder11125 coder11125 commented Jun 4, 2026

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a notebook tool so agents can work with .ipynb files directly. It supports three operations:

  • read – shows all cells and their current outputs
  • edit – replaces a cell's source by index and clears its outputs
  • execute – runs cells via jupyter nbconvert --execute --inplace. For a single cell, a temporary notebook is created, executed, and outputs are copied back to the original; the temp file is
    cleaned up automatically.

Requires jupyter on PATH.

How did you verify your code works?

Type-checked against the existing codebase with tsc --skipLibCheck — no new errors beyond pre-existing infrastructure ones (the project uses tsgo which wasn't available in this environment). Manual
review against the patterns in shell.ts, read.ts, and write.ts.

Screenshots / recordings

N/A — not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

coder11125 and others added 2 commits June 4, 2026 15:49
…e support

Implements a new `notebook` tool that allows agents to read .ipynb cells
with outputs, edit cell source by index, and execute cells via
`jupyter nbconvert --execute`. Single-cell execution uses a scoped
temporary notebook with automatic cleanup via Effect.addFinalizer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Hey! Your PR title Add Jupyter notebook tool with read, edit, and execute support doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 4, 2026
@coder11125 coder11125 changed the title Add Jupyter notebook tool with read, edit, and execute support feat(opencode): add Jupyter notebook tool with read, edit, and execute support Jun 4, 2026
@github-actions github-actions Bot removed needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Jun 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

1 participant