Skip to content

Conversation

@ellisonbg
Copy link
Collaborator

Summary

• Delete output files from disk when notebook cell outputs are cleared in memory
• Pass file_id to process_saving_notebook to enable proper cleanup

Changes

  • Modified process_saving_notebook method in OutputsManager to accept file_id parameter
  • Added logic to call clear() method when cell outputs are already empty, ensuring disk cleanup
  • Updated YRoomFileAPI to pass file_id when processing notebooks for saving

This ensures that when outputs are cleared in the notebook editor, the corresponding output files are also removed from disk, preventing orphaned files and maintaining consistency between memory and disk state.

This is the first part of fixing #134

Copy link
Collaborator

@3coins 3coins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellisonbg
Thanks for making this change, code looks good, left some minor comments.

@Zsailer Zsailer merged commit ef6d49a into jupyter-ai-contrib:main Jul 22, 2025
8 of 10 checks passed
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.

3 participants