Parses natural language commands into structured GUI actions. More...
#include <ai_action_parser.h>
Static Public Member Functions | |
static absl::StatusOr< std::vector< AIAction > > | ParseCommand (const std::string &command) |
static std::string | ActionToString (const AIAction &action) |
Static Private Member Functions | |
static AIActionType | ParseActionType (const std::string &verb) |
static std::map< std::string, std::string > | ExtractParameters (const std::string &command, AIActionType type) |
static bool | MatchesPlaceTilePattern (const std::string &command, std::map< std::string, std::string > *params) |
static bool | MatchesSelectTilePattern (const std::string &command, std::map< std::string, std::string > *params) |
static bool | MatchesOpenEditorPattern (const std::string &command, std::map< std::string, std::string > *params) |
Parses natural language commands into structured GUI actions.
Understands commands like:
Definition at line 53 of file ai_action_parser.h.
|
static |
Parse a natural language command into a sequence of AI actions
command | The command to parse |
Definition at line 52 of file ai_action_parser.cc.
References yaze::cli::ai::kClickButton, yaze::cli::ai::kOpenEditor, yaze::cli::ai::kPlaceTile, yaze::cli::ai::kSaveTile, yaze::cli::ai::kSelectTile, MatchesOpenEditorPattern(), MatchesPlaceTilePattern(), and MatchesSelectTilePattern().
Referenced by yaze::cli::ai::AIGUIController::ExecuteCommand().
|
static |
Convert an action back to a human-readable string
Definition at line 98 of file ai_action_parser.cc.
References yaze::cli::ai::kClickButton, yaze::cli::ai::kInvalidAction, yaze::cli::ai::kOpenEditor, yaze::cli::ai::kPlaceTile, yaze::cli::ai::kSaveTile, yaze::cli::ai::kScreenshot, yaze::cli::ai::kSelectTile, yaze::cli::ai::kVerifyTile, yaze::cli::ai::kWait, yaze::cli::ai::AIAction::parameters, and yaze::cli::ai::AIAction::type.
Referenced by yaze::cli::ai::VisionActionRefiner::BuildVerificationPrompt().
|
staticprivate |
|
staticprivate |
|
staticprivate |
Definition at line 152 of file ai_action_parser.cc.
Referenced by ParseCommand().
|
staticprivate |
Definition at line 203 of file ai_action_parser.cc.
Referenced by ParseCommand().
|
staticprivate |
Definition at line 236 of file ai_action_parser.cc.
Referenced by ParseCommand().