Added
- Smart Type Inference: When a type filter returns no matches, the search now automatically falls back to inferred types or performs a type-less search to surface relevant results.
- Cached Search Index: Build and cache a derived search index to speed up suggestions and improve search quality.
- New
suggest_python_doc_typesTool: A dedicated tool to suggest documentation types based on query context. - Type Suggestions: Enhanced
python_docstool now provides type suggestions when exact matches aren't found. - Schema-Aware Cache Invalidation: Cached documents missing required fields (e.g., anchorIndex) are automatically refetched even within TTL.
Enhanced
- Search Quality: Tightened type matching to require exact type equality for more accurate results.
- Result Display: Updated
formatSearchResultsto display fallback information and type suggestions when applicable. - DocService API: New methods
getSearchIndex(),searchWithFallback(),suggestTypes(), andgetAvailableTypes().
Technical
- Added
SearchIndexand dedicated cache path toCacheManager. - Added comprehensive tests for search index inference.
- Added tests for TTL-based fetch and schema-aware invalidation.
- Added tests for garbage collection of expired cache files.
Documentation
- Updated README to document schema-aware invalidation behavior.
Full Changelog: https://github.com/yriveiro/opencode-python-docs/commits/v0.2.0