You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add collaborative_tool decorator for AI tool awareness
- Add collaborative_tool decorator in utils.py that enables real-time collaborative awareness
- Decorator automatically sets user presence in global and notebook-specific awareness systems
- Supports automatic file_path detection from function parameters
- Graceful error handling ensures tool execution continues if awareness fails
- Add comprehensive test suite with 15 tests covering all functionality
- Update README with example usage for creating collaborative tools
- Fix mypy type errors in notebook.py and utils.py
- Add pytest-asyncio dependency for async testing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
For developers building AI tools that need collaborative awareness, `jupyter_ai_tools` provides a `collaborative_tool` decorator that automatically enables real-time collaboration features:
40
+
41
+
```python
42
+
from jupyter_ai_tools.utils import collaborative_tool
# For tools without user context, simply omit the user parameter
61
+
@collaborative_tool()
62
+
asyncdefmy_tool_no_user(file_path: str):
63
+
"""Tool without collaborative awareness"""
64
+
returnf"Processed {file_path}"
65
+
```
66
+
67
+
This decorator enables other users in the same Jupyter environment to see when your AI tool is actively working on shared notebooks, improving the collaborative experience.
0 commit comments