Files
yaze/src/cli/modern_cli.h
scawful cc99fc2ae9 feat: Enhance AgentChatWidget with network collaboration features and UI improvements
- Added support for selecting between local and network collaboration modes in the AgentChatWidget.
- Implemented a UI for entering server URL and managing session details.
- Updated collaboration state management to include server URL and connection status.
- Improved layout of the collaboration panel with a table for session details and controls.
- Integrated a simple WebSocket client for handling network communication.
- Added CLI commands for starting and checking the status of the collaboration server.
2025-10-04 17:29:48 -04:00

74 lines
3.1 KiB
C++

#ifndef YAZE_SRC_CLI_MODERN_CLI_H_
#define YAZE_SRC_CLI_MODERN_CLI_H_
#include <functional>
#include <map>
#include <string>
#include <vector>
#include "absl/status/status.h"
#include "cli/z3ed.h"
namespace yaze {
namespace cli {
struct CommandInfo {
std::string name;
std::string description;
std::string usage;
std::function<absl::Status(const std::vector<std::string>&)> handler;
};
class ModernCLI {
public:
ModernCLI();
absl::Status Run(int argc, char* argv[]);
CommandHandler* GetCommandHandler(const std::string& name);
void PrintTopLevelHelp() const;
void PrintCategoryHelp(const std::string& category) const;
void PrintCommandSummary() const;
std::map<std::string, CommandInfo> commands_;
private:
void SetupCommands();
void ShowHelp();
void ShowCategoryHelp(const std::string& category);
void ShowCommandSummary() const;
// Command Handlers
absl::Status HandleAsarPatchCommand(const std::vector<std::string>& args);
absl::Status HandleBpsPatchCommand(const std::vector<std::string>& args);
absl::Status HandleExtractSymbolsCommand(const std::vector<std::string>& args);
absl::Status HandleAgentCommand(const std::vector<std::string>& args);
absl::Status HandleCollabCommand(const std::vector<std::string>& args);
absl::Status HandleProjectBuildCommand(const std::vector<std::string>& args);
absl::Status HandleProjectInitCommand(const std::vector<std::string>& args);
absl::Status HandleRomInfoCommand(const std::vector<std::string>& args);
absl::Status HandleRomGenerateGoldenCommand(const std::vector<std::string>& args);
absl::Status HandleRomDiffCommand(const std::vector<std::string>& args);
absl::Status HandleDungeonExportCommand(const std::vector<std::string>& args);
absl::Status HandleDungeonListObjectsCommand(const std::vector<std::string>& args);
absl::Status HandleGfxExportCommand(const std::vector<std::string>& args);
absl::Status HandleGfxImportCommand(const std::vector<std::string>& args);
absl::Status HandleCommandPaletteCommand(const std::vector<std::string>& args);
absl::Status HandlePaletteExportCommand(const std::vector<std::string>& args);
absl::Status HandlePaletteImportCommand(const std::vector<std::string>& args);
absl::Status HandlePaletteCommand(const std::vector<std::string>& args);
absl::Status HandleRomValidateCommand(const std::vector<std::string>& args);
absl::Status HandleOverworldGetTileCommand(const std::vector<std::string>& args);
absl::Status HandleOverworldFindTileCommand(const std::vector<std::string>& args);
absl::Status HandleOverworldDescribeMapCommand(const std::vector<std::string>& args);
absl::Status HandleOverworldListWarpsCommand(const std::vector<std::string>& args);
absl::Status HandleOverworldSetTileCommand(const std::vector<std::string>& args);
absl::Status HandleSpriteCreateCommand(const std::vector<std::string>& args);
absl::Status HandleChatEntryCommand(const std::vector<std::string>& args);
absl::Status HandleProposalCommand(const std::vector<std::string>& args);
absl::Status HandleWidgetCommand(const std::vector<std::string>& args);
};
} // namespace cli
} // namespace yaze
#endif // YAZE_SRC_CLI_MODERN_CLI_H_