Skip to content

Add datasource relevance filter support (--query)#3

Merged
sciapanCA merged 2 commits into
mainfrom
feature/datasource-relevance-filter
Jun 9, 2026
Merged

Add datasource relevance filter support (--query)#3
sciapanCA merged 2 commits into
mainfrom
feature/datasource-relevance-filter

Conversation

@sciapanCA

Copy link
Copy Markdown
Collaborator

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

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]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread skills/codealive-context-engine/scripts/lib/api_client.py
Comment thread skills/codealive-context-engine/scripts/lib/api_client.py
@sciapanCA sciapanCA merged commit 4160f2f into main Jun 9, 2026
1 check 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.

1 participant