JetBrainsFindSymbolTool: Add parameter search_deps [skip ci]

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2025-12-09 21:48:42 +01:00
1 parent 9f5b8e792e
commit fb01cc38f7
2 files changed
+13 -1

No files matched your search

+10 -1
View File
@@ -133,7 +133,13 @@ class JetBrainsPluginClient(ToStringMixin):
return response["project_root"]
def find_symbol(
self, name_path: str, relative_path: str | None = None, include_body: bool = False, depth: int = 0, include_location: bool = False
self,
name_path: str,
relative_path: str | None = None,
include_body: bool = False,
depth: int = 0,
include_location: bool = False,
search_deps: bool = False,
) -> dict[str, Any]:
"""
Finds symbols by name.
@@ -142,6 +148,8 @@ class JetBrainsPluginClient(ToStringMixin):
:param relative_path: the relative path to which to restrict the search
:param include_body: whether to include symbol body content
:param depth: depth of children to include (0 = no children)
:param include_location: whether to include symbol location information
:param search_deps: whether to also search in dependencies
:return: Dictionary containing 'symbols' list with matching symbols
"""
@@ -151,6 +159,7 @@ class JetBrainsPluginClient(ToStringMixin):
"includeBody": include_body,
"depth": depth,
"includeLocation": include_location,
"searchDeps": search_deps,
}
return self._make_request("POST", "/findSymbol", request_data)
+3
View File
@@ -13,6 +13,7 @@ class JetBrainsFindSymbolTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptional):
depth: int = 0,
relative_path: str | None = None,
include_body: bool = False,
search_deps: bool = False,
max_answer_chars: int = -1,
) -> str:
"""
@@ -42,6 +43,7 @@ class JetBrainsFindSymbolTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptional):
If you have some knowledge about the codebase, you should use this parameter, as it will significantly
speed up the search as well as reduce the number of results.
:param include_body: If True, include the symbol's source code. Use judiciously.
:param search_deps: If True, also search in project dependencies (e.g., libraries).
:param max_answer_chars: max characters for the JSON result. If exceeded, no content is returned.
-1 means the default value from the config will be used.
:return: JSON string: a list of symbols (with locations) matching the name.
@@ -52,6 +54,7 @@ class JetBrainsFindSymbolTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptional):
relative_path=relative_path,
depth=depth,
include_body=include_body,
search_deps=search_deps,
)
result = self._to_json(response_dict)
return self._limit_length(result, max_answer_chars)