Update z3ed CLI tool and project build configuration

- Updated `.clang-tidy` and `.clangd` configurations for improved code quality checks and diagnostics.
- Added new submodules for JSON and HTTP libraries to support future features.
- Refined README and documentation files to standardize naming conventions and improve clarity.
- Introduced a new command palette in the CLI for easier command access and execution.
- Implemented various CLI handlers for managing ROM, sprites, palettes, and dungeon functionalities.
- Enhanced the TUI components for better user interaction and command execution.
- Added AI service integration for generating commands based on user prompts, expanding the CLI's capabilities.
This commit is contained in:
scawful
2025-10-01 08:57:10 -04:00
parent e7d4f5ea02
commit ba50d89e7d
46 changed files with 2421 additions and 965 deletions

View File

@@ -6,7 +6,6 @@
#include <memory>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
#include "absl/status/status.h"
@@ -14,14 +13,25 @@
#include "app/snes.h"
#include "util/macro.h"
// Forward declarations
namespace ftxui {
class ScreenInteractive;
}
namespace yaze {
namespace cli {
// Forward declaration
class TuiComponent;
class CommandHandler {
public:
CommandHandler() = default;
virtual ~CommandHandler() = default;
virtual absl::Status Run(const std::vector<std::string>& arg_vec) = 0;
virtual void RunTUI(ftxui::ScreenInteractive& screen) {
// Default implementation does nothing
}
Rom rom_;
};
@@ -33,7 +43,9 @@ class ApplyPatch : public CommandHandler {
class AsarPatch : public CommandHandler {
public:
AsarPatch();
absl::Status Run(const std::vector<std::string>& arg_vec) override;
void RunTUI(ftxui::ScreenInteractive& screen) override;
};
class CreatePatch : public CommandHandler {
@@ -56,6 +68,20 @@ class GfxImport : public CommandHandler {
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class Palette : public CommandHandler {
public:
Palette();
absl::Status Run(const std::vector<std::string>& arg_vec) override;
void RunTUI(ftxui::ScreenInteractive& screen) override;
};
class CommandPalette : public CommandHandler {
public:
CommandPalette();
absl::Status Run(const std::vector<std::string>& arg_vec) override;
void RunTUI(ftxui::ScreenInteractive& screen) override;
};
class PaletteExport : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
@@ -71,6 +97,56 @@ class DungeonExport : public CommandHandler {
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class DungeonListObjects : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class RomValidate : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class RomDiff : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class RomGenerateGolden : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class ProjectInit : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class ProjectBuild : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class Agent : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class OverworldGetTile : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class OverworldSetTile : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class SpriteCreate : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class Open : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override {