Skip to content

feat(cli): read Jupyter notebooks as cell content - #10733

Merged
marius-kilocode merged 3 commits into
mainfrom
feature-read-ipynb-content
May 29, 2026
Merged

feat(cli): read Jupyter notebooks as cell content#10733
marius-kilocode merged 3 commits into
mainfrom
feature-read-ipynb-content

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Reading .ipynb files currently sends raw notebook JSON into model context, including metadata and output payloads that obscure the useful document content.

This extracts markdown and code cell sources in document order for valid notebooks while preserving the read tool's normal pagination and truncation behavior. Malformed notebooks continue through raw-text reading so they remain inspectable, and native PDF and image attachment handling stays unchanged.

@marius-kilocode
marius-kilocode enabled auto-merge May 29, 2026 13:37
Comment thread packages/opencode/src/kilocode/tool/notebook.ts Outdated
Comment thread packages/opencode/src/kilocode/tool/notebook.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Previously Reported — Now Fixed
File Issue
packages/opencode/src/kilocode/tool/notebook.ts Inconsistent bail-out vs. skip strategy for malformed cells
packages/opencode/src/kilocode/tool/notebook.ts Double file read for malformed .ipynb files
packages/opencode/src/kilocode/tool/notebook.ts Empty-cells edge case — cells.join("\n\n") returned "" when all cells were skipped
Files Reviewed (4 files)
  • packages/opencode/src/kilocode/tool/notebook.ts — clean (empty-cells fix applied)
  • packages/opencode/test/kilocode/read-notebook.test.ts — clean (new test covers the fixed edge case)
  • packages/opencode/src/tool/read.ts — unchanged, clean
  • .changeset/read-notebook-cells.md — unchanged, clean

Reviewed by claude-sonnet-4.6 · 164,911 tokens

Review guidance: REVIEW.md from base branch main

Comment thread packages/opencode/src/kilocode/tool/notebook.ts Outdated
Comment thread packages/opencode/src/tool/read.ts
@marius-kilocode
marius-kilocode merged commit ac4536a into main May 29, 2026
18 checks passed
@marius-kilocode
marius-kilocode deleted the feature-read-ipynb-content branch May 29, 2026 14:36
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…ntent

feat(cli): read Jupyter notebooks as cell content
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.

2 participants