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
The openviking_search tool no longer filters results to only include "memory" type items when using tool_context.memory_user_ids. This may return non-memory resources in results, changing previous behavior.
ifnottarget_uriandtool_context.memory_user_ids:
user_uri=client._memory_target_uri(admin_user_id)
results=awaitclient.search(
query,
target_uri=user_uri,
limit=20,
user_id=admin_user_id,
)
ifnotresults:
returnf"No results found for query: {query}"grouped_items=self._filter_search_items(results, min_score=min_score)
total=sum(len(items) foritemsingrouped_items.values())
iftotal==0:
returnf"No results found for query: {query}"returnself._format_search_items_json(grouped_items, min_score=min_score)
Restore the memory-type filtering and extraction of search items that was present in the original code, and add back the user key mode check. This ensures only memory items are included when searching user memories, which matches the original behavior.
admin_user_id = client.admin_user_id
if not target_uri and tool_context.memory_user_ids:
- user_uri = client._memory_target_uri(admin_user_id)+ if client._is_user_key_mode():+ user_uri = client._memory_target_uri(None)+ user_id = None+ else:+ user_uri = client._memory_target_uri(admin_user_id)+ user_id = admin_user_id++ logger.info(f"openviking_search: searching {user_uri} for query: {query}")
results = await client.search(
query,
target_uri=user_uri,
limit=20,
- user_id=admin_user_id,+ user_id=user_id,
)
if not results:
return f"No results found for query: {query}"
- grouped_items = self._filter_search_items(results, min_score=min_score)+ extracted_items = self._extract_search_items(results)+ memories = [+ item+ for item in extracted_items+ if item.get("type") == "memory"+ ]+ grouped_items = self._filter_search_items(memories, min_score=min_score)
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly restores original behavior: memory-type filtering via _extract_search_items, user key mode check, and logging, which were removed in the PR. This addresses a potential functional regression in user memory search results.
yeshion23333
changed the title
fix(bot): Limit grep\glob\search tool's user scope, Optimize client initialization.
fix(bot): Limit grep\glob\search tool's user scope, grep use one pattern, Optimize client initialization.
May 26, 2026
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
Related Issue
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes