yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::cli::agent::ToolDispatcher Class Reference

#include <tool_dispatcher.h>

Collaboration diagram for yaze::cli::agent::ToolDispatcher:

Classes

struct  BatchResult
 Result of a batch tool call. More...
 
struct  BatchToolCall
 Batch tool call request. More...
 
struct  ToolInfo
 Tool information for discoverability. More...
 
struct  ToolPreferences
 

Public Member Functions

std::vector< ToolInfoGetAvailableTools () const
 Get list of all available tools.
 
std::optional< ToolInfoGetToolInfo (const std::string &tool_name) const
 Get detailed information about a specific tool.
 
std::vector< ToolInfoSearchTools (const std::string &query) const
 Search tools by keyword.
 
BatchResult DispatchBatch (const BatchToolCall &batch)
 Execute multiple tool calls in a batch.
 
 ToolDispatcher ()=default
 
absl::StatusOr< std::string > Dispatch (const ::yaze::cli::ToolCall &tool_call)
 
void SetRomContext (Rom *rom)
 
void SetProjectContext (project::YazeProject *project)
 
void SetAsarWrapper (core::AsarWrapper *asar_wrapper)
 
void SetToolPreferences (const ToolPreferences &prefs)
 
const ToolPreferencespreferences () const
 

Private Member Functions

bool IsToolEnabled (const ToolDefinition &def) const
 

Private Attributes

Romrom_context_ = nullptr
 
project::YazeProjectproject_context_ = nullptr
 
core::AsarWrapperasar_wrapper_ = nullptr
 
ToolPreferences preferences_
 

Detailed Description

Definition at line 24 of file tool_dispatcher.h.

Constructor & Destructor Documentation

◆ ToolDispatcher()

yaze::cli::agent::ToolDispatcher::ToolDispatcher ( )
default

Member Function Documentation

◆ GetAvailableTools()

std::vector< ToolDispatcher::ToolInfo > yaze::cli::agent::ToolDispatcher::GetAvailableTools ( ) const

Get list of all available tools.

Definition at line 133 of file tool_dispatcher.cc.

References yaze::cli::agent::ToolRegistry::Get(), yaze::cli::agent::ToolRegistry::GetAllTools(), and IsToolEnabled().

Referenced by SearchTools().

Here is the call graph for this function:

◆ GetToolInfo()

std::optional< ToolDispatcher::ToolInfo > yaze::cli::agent::ToolDispatcher::GetToolInfo ( const std::string & tool_name) const

Get detailed information about a specific tool.

Definition at line 145 of file tool_dispatcher.cc.

References yaze::cli::agent::ToolRegistry::Get(), yaze::cli::agent::ToolRegistry::GetToolDefinition(), and yaze::cli::agent::ToolDispatcher::ToolInfo::name.

Here is the call graph for this function:

◆ SearchTools()

std::vector< ToolDispatcher::ToolInfo > yaze::cli::agent::ToolDispatcher::SearchTools ( const std::string & query) const

Search tools by keyword.

Definition at line 154 of file tool_dispatcher.cc.

References GetAvailableTools().

Here is the call graph for this function:

◆ DispatchBatch()

ToolDispatcher::BatchResult yaze::cli::agent::ToolDispatcher::DispatchBatch ( const BatchToolCall & batch)

◆ Dispatch()

◆ SetRomContext()

void yaze::cli::agent::ToolDispatcher::SetRomContext ( Rom * rom)
inline

◆ SetProjectContext()

void yaze::cli::agent::ToolDispatcher::SetProjectContext ( project::YazeProject * project)
inline

Definition at line 113 of file tool_dispatcher.h.

References project_context_.

◆ SetAsarWrapper()

void yaze::cli::agent::ToolDispatcher::SetAsarWrapper ( core::AsarWrapper * asar_wrapper)
inline

Definition at line 114 of file tool_dispatcher.h.

References asar_wrapper_.

◆ SetToolPreferences()

◆ preferences()

const ToolPreferences & yaze::cli::agent::ToolDispatcher::preferences ( ) const
inline

Definition at line 119 of file tool_dispatcher.h.

References preferences_.

◆ IsToolEnabled()

Member Data Documentation

◆ rom_context_

Rom* yaze::cli::agent::ToolDispatcher::rom_context_ = nullptr
private

Definition at line 125 of file tool_dispatcher.h.

Referenced by Dispatch(), and SetRomContext().

◆ project_context_

project::YazeProject* yaze::cli::agent::ToolDispatcher::project_context_ = nullptr
private

Definition at line 126 of file tool_dispatcher.h.

Referenced by Dispatch(), and SetProjectContext().

◆ asar_wrapper_

core::AsarWrapper* yaze::cli::agent::ToolDispatcher::asar_wrapper_ = nullptr
private

Definition at line 127 of file tool_dispatcher.h.

Referenced by Dispatch(), and SetAsarWrapper().

◆ preferences_

ToolPreferences yaze::cli::agent::ToolDispatcher::preferences_
private

Definition at line 128 of file tool_dispatcher.h.

Referenced by IsToolEnabled(), preferences(), and SetToolPreferences().


The documentation for this class was generated from the following files: