Add datasource relevance filter support (--query)#3
Conversation
Mirror the backend/MCP datasource relevance filter in the skill:
- get_datasources() accepts an optional natural-language query, sends it
as ?query=, parses the X-CodeAlive-Total-Data-Sources header, and
returns a {dataSources, message} envelope with fail-open detection
- datasources.py gains a --query flag, renders relevanceReason per
source and the omitted-count / fail-open message
- SKILL.md, workflows reference, and the context-explorer agent now
recommend passing the user's task as --query
- Bump plugin version to 2.1.0
Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request introduces a new --query parameter to the datasources.py script and the underlying CodeAliveClient.get_datasources API method, enabling AI-powered relevance filtering of data sources based on a user's task. The changes also include updated documentation, CLI options, and new tests. Feedback on the implementation points out two key issues: first, HTTP header lookups should be case-insensitive to handle normalized lowercase headers robustly; second, the relevance_message helper needs to be adjusted to correctly handle cases where the relevance filter runs successfully but returns zero matching data sources, rather than incorrectly falling back to the 'filtering unavailable' message.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Mirror the backend/MCP datasource relevance filter in the skill: