mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 22:16:23 +00:00
Followup after 34e1fae7 - added more ignored directories
This commit is contained in:
1 parent
34e1fae739
commit
57dec4c7ca
8 files changed
+45
-8
No files matched your search
@@ -7,6 +7,8 @@ import json
|
||||
from pathlib import Path
|
||||
from pprint import pprint
|
||||
|
||||
from toon_format import encode
|
||||
|
||||
from serena.agent import SerenaAgent
|
||||
from serena.config.serena_config import SerenaConfig
|
||||
from serena.constants import REPO_ROOT
|
||||
@@ -24,7 +26,7 @@ if __name__ == "__main__":
|
||||
serena_config = SerenaConfig.from_config_file()
|
||||
serena_config.web_dashboard = False
|
||||
# project = Path(REPO_ROOT).parent / "serena-jetbrains-plugin-copy"
|
||||
project = Path(REPO_ROOT) / "test/resources/repos/python/test_repo"
|
||||
project = Path(REPO_ROOT)
|
||||
agent = SerenaAgent(project=str(project), serena_config=serena_config)
|
||||
|
||||
# apply a tool
|
||||
@@ -37,11 +39,12 @@ if __name__ == "__main__":
|
||||
inline_symbol = agent.get_tool(JetBrainsInlineSymbol)
|
||||
|
||||
result = agent.execute_task(
|
||||
lambda: inline_symbol.apply(
|
||||
relative_path="test_repo/nested.py",
|
||||
name_path="OuterClass/NestedClass",
|
||||
keep_definition=True,
|
||||
lambda: overview_tool.apply(
|
||||
# name_path_pattern="SerenaAgent",
|
||||
relative_path="src/serena/agent.py",
|
||||
depth=2,
|
||||
# keep_definition=True,
|
||||
)
|
||||
)
|
||||
pprint(json.loads(result))
|
||||
pprint(encode(json.loads(result)))
|
||||
# input("Press Enter to continue...")
|
||||
Reference in new issue
Block a user