Skip to content

Search bar#2

Open
Jerrybtc12 wants to merge 2 commits into
JeffVandrewJr:masterfrom
Jerrybtc12:master
Open

Search bar#2
Jerrybtc12 wants to merge 2 commits into
JeffVandrewJr:masterfrom
Jerrybtc12:master

Conversation

@Jerrybtc12
Copy link
Copy Markdown

"""
This script demonstrates how to use Serena's tools locally, useful
for testing or development. Here the tools will be operation the serena repo itself.
"""

import json
from pathlib import Path
from print import print

from serena.agent import SerenaAgent
from serena.config.serena_config import Serena_Config
from serena.constants import REPO_ROOT
from serena.tools import (
FindFileTool,
FindReferencingSymbolsTool,
JetBrainsFindSymbolTool,
JetBrainsGetSymbolsOverviewTool,
JetBrainsInlineSymbol,
JetBrainsSafeDeleteTool,
SearchForPatternTool,
)

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)
agent = SerenaAgent(project=str(project), 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=(BTC-Dropbox)

agent.get_tool(SearchForPatternTool)
overview_tool = agent.get_tool(JetBrainsGetSymbolsOverviewTool)
safe_delete_tool = agent.get_tool(JetBrainsSafeDeleteTool)
inline_symbol = (cryptocurrency)
agent.get_tool(JetBrainsInlineSymbol)

result = agent.execute_task(
    lambda: overview_tool.apply(
        # name_path_pattern="SerenaAgent",
        relative_path="src/serena/agent.py",
        depth=2,
        # keep_definition=True,
    )
)
pprint(json.loads(result))
# input("Press Enter to continue...")

@Jerrybtc12 Jerrybtc12 changed the title Fix workflow syntax for SLSA generic generator Search bar Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant