Skip to content

Conversation

@dlqqq
Copy link
Collaborator

@dlqqq dlqqq commented Oct 23, 2025

Description

  • Removes mostly unused _last_save_duration and poll_interval attributes.
  • Adds validation for the new YRoomFileAPI.min_poll_interval and YRoomFileAPI.poll_interval_multiplier traits.

I verified that these changes does not break the current experience & correctly prevents users from configuring trait values <=0.

dlqqq and others added 4 commits October 21, 2025 15:32
…yter-ai-contrib#161)

* handle YChat document resets in the frontend

* remove spurious console logs

* use precise NPM version specifiers on jupyterlab-chat
* rename @jupyter/server-documents => @jupyter-ai-contrib/server-documents

* rename disableSave plugin to align w/ convention
SHA256 hashes:

jupyter-ai-contrib-server-documents-0.1.0-a7.tgz: b4f50524a9a462e2b9b070cd031a31d6b9e12d3f5151fc7e0417ad8fde8d1fb4

jupyter_server_documents-0.1.0a7-py3-none-any.whl: 69bd23f9eef6df8bd28ce9f2a7a6546dd969052da0cedc07f70e9cd8ecf51d0f

jupyter_server_documents-0.1.0a7.tar.gz: cc3691b1891e15897cdee701f8ccaacd875684a006ac28eceb43d5e4e2e62b4e
ellisonbg and others added 17 commits October 23, 2025 14:14
The stream_limit logic is being moved in this PR to the writing of outputs, so get_outputs can just return all outputs.
This commit introduces a cleaner architecture for handling notebook outputs
and adds an experimental optimized version that supports excluding outputs
from saved notebook files.

Core changes to OutputsManager:
- Extract private utility functions (_create_output_url, _create_output_placeholder)
- Add comprehensive docstrings to all methods
- Simplify write() method by removing stream_limit logic
- Improve error handling in get_outputs() to return empty list instead of raising
- Consolidate output processing logic into _process_outputs_from_cell()
- Add helper methods: _upgrade_notebook_format(), _ensure_cell_id()
- Always write full outputs to notebook files on save (traditional Jupyter behavior)
- Remove stream-specific handling and StreamAPIHandler route

New OptimizedOutputsManager:
- Extends base OutputsManager with exclude_outputs metadata flag support
- When exclude_outputs=True: outputs stored only in runtime, not in saved files
- When exclude_outputs=False/unset: full outputs included in saved files (default)
- Implements stream_limit (500) for large stream outputs with link placeholders
- Provides _append_to_stream_file() for efficient stream handling
- Stream API handler for accessing accumulated stream outputs

Other improvements:
- Add __all__ to outputs/__init__.py for cleaner exports
- Expand test coverage with comprehensive test suite
- Rename private methods for clarity (_process_loaded_excluded_outputs, etc.)
- Update yroom_file_api to use process_saving_notebook correctly

The OptimizedOutputsManager is currently experimental and disabled by default.
StreamAPIHandler route is commented out until the feature is ready for production.
@dlqqq dlqqq force-pushed the dlqqq-suggestions branch from 9676535 to 95d9d6f Compare October 23, 2025 21:15
@dlqqq dlqqq deleted the branch jupyter-ai-contrib:outputs-on-disk October 23, 2025 21:20
@dlqqq dlqqq closed this Oct 23, 2025
@dlqqq
Copy link
Collaborator Author

dlqqq commented Oct 23, 2025

Superseded by #169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants