Support for info in JB symbols and various improvements. Adds bs4 to deps

- Added typed dicts for most responses in jetbrains_types.py
- Fix bug in code_editor (location key no longer existed, found by mypy after adding the types)

Should be merged after next version of plugin release
This commit is contained in:
Michael Panchenko committed 2026-01-03 18:43:02 +07:00
1 parent 4f5d894bcd
commit 1d5cf33237
9 files changed
+139 -39

No files matched your search

+13 -4
View File
@@ -7,21 +7,30 @@ import json
from pprint import pprint
from serena.agent import SerenaAgent
from serena.config.serena_config import SerenaConfig
from serena.constants import REPO_ROOT
from serena.tools import FindFileTool, FindReferencingSymbolsTool, GetSymbolsOverviewTool, JetBrainsFindSymbolTool, SearchForPatternTool
from serena.tools import (
FindFileTool,
FindReferencingSymbolsTool,
JetBrainsFindSymbolTool,
JetBrainsGetSymbolsOverviewTool,
SearchForPatternTool,
)
if __name__ == "__main__":
agent = SerenaAgent(project=REPO_ROOT)
serena_config = SerenaConfig.from_config_file()
serena_config.web_dashboard = False
agent = SerenaAgent(project=REPO_ROOT, serena_config=serena_config)
# apply a tool
find_symbol_tool = agent.get_tool(JetBrainsFindSymbolTool)
find_refs_tool = agent.get_tool(FindReferencingSymbolsTool)
find_file_tool = agent.get_tool(FindFileTool)
search_pattern_tool = agent.get_tool(SearchForPatternTool)
overview_tool = agent.get_tool(GetSymbolsOverviewTool)
overview_tool = agent.get_tool(JetBrainsGetSymbolsOverviewTool)
result = agent.execute_task(
lambda: find_symbol_tool.apply("displayBasicStats"),
lambda: find_symbol_tool.apply("SerenaAgent/get_tool_description_override"),
)
pprint(json.loads(result))
# input("Press Enter to continue...")