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
In this PR we add the parameters details = full in the search_docs_tool tool, so it can return all the searches and full text if needed. By default it will still use the detail = snippet mode.
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test A
Test B
Test Configuration:
Firmware version:
Hardware:
Toolchain:
SDK:
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
Any dependent changes have been merged and published in downstream modules
Review: detail="full" doesn't fully close #218 (result count still capped)
Thanks for this — the field-passthrough restoration in detail="full" mode is clean and correct (shallow copy only reassigns immutable top-level keys, so cached upstream items aren't mutated; HTML stripping matches the pre-snippet v0.2.0 behavior). One gap worth addressing before merge:
Issue #218 asks for an option that "would return all the 50 results and all the text." This PR restores all the text/fields, but not all the results. In search_qiskit_docs, results are still sliced unconditionally:
selected=results[:effective_top_k]
and effective_top_k is clamped to MAX_SEARCH_TOP_K (default 10). So even with detail="full", a caller gets at most 10 results (5 by default) — there's no way to reach the original 50.
Scenario: upstream returns 50 matches; a user upgrading from 0.2.0 sets detail="full" expecting the old full result set → receives only 5 (or at most 10 with top_k=10). The PR description's "return all the searches" isn't achievable through the tool as written.
Suggested fix (either works):
Let full mode bypass the top_k clamp (or raise its ceiling in that mode) so it can return the complete result set, or
Keep the cap and adjust the PR/issue scope + docstrings to state that full restores fields/text but the result count stays capped.
The snippet-by-default behavior is correct — #218 explicitly wants the original-behavior option disabled by default, so no change needed there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In this PR we add the parameters
details = fullin the search_docs_tool tool, so it can return all the searches and full text if needed. By default it will still use thedetail = snippetmode.Linked Issue(s)
Fixes #218
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: