Skip to content

Improve diff preview for VSCode notebook #340

@wsxiaoys

Description

@wsxiaoys

Please describe the feature you want

Currently, Pochi's diff preview functionality works well for regular files but could be improved for VSCode notebook files (.ipynb). The current implementation in DiffView class and related code in packages/vscode/src/integrations/editor/diff-view.ts and packages/vscode/src/tools/apply-diff.ts doesn't seem to have specific handling for notebook files.

When working with notebook files, the diff preview should:

  1. Properly handle the JSON structure of notebook files
  2. Provide a more readable diff view that shows cell-level changes
  3. Preserve notebook-specific metadata and cell structure
  4. Potentially show a rendered preview of how the changes would look in the actual notebook interface

The current implementation likely treats notebook files as plain text, which makes it difficult to understand what changes are being made at the cell level.

Additional context


Please reply with a 👍 if you want this feature.

🤖 Generated with Pochi

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions