feat: Add ROM hacking guides and prompt management for enhanced user support
- Introduced `alttp_rom_hacking_guide.txt` and `oracle_of_secrets_guide.txt` for detailed ROM structure and hacking techniques. - Implemented `PromptManager` class to manage loading and retrieving prompts based on different modes. - Enhanced system prompt with new tool capabilities for hex and palette manipulation, along with TODO management features. - Updated CLI experience with improved command handling and user guidance for ROM exploration tasks.
This commit is contained in:
47
src/cli/service/agent/prompt_manager.cc
Normal file
47
src/cli/service/agent/prompt_manager.cc
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "cli/service/agent/prompt_manager.h"
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include "util/file_util.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
namespace agent {
|
||||
|
||||
std::string PromptManager::LoadPrompt(PromptMode mode) {
|
||||
std::string path = GetPromptPath(mode);
|
||||
std::ifstream file(path);
|
||||
if (!file) return "";
|
||||
|
||||
std::ostringstream ss;
|
||||
ss << file.rdbuf();
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string PromptManager::GetPromptPath(PromptMode mode) {
|
||||
switch (mode) {
|
||||
case PromptMode::kStandard:
|
||||
return "assets/agent/system_prompt_v3.txt";
|
||||
case PromptMode::kOracleOfSecrets:
|
||||
return "assets/agent/oracle_of_secrets_guide.txt";
|
||||
case PromptMode::kCustom:
|
||||
return "assets/agent/custom_prompt.txt";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
std::vector<PromptMode> PromptManager::GetAvailableModes() {
|
||||
return {PromptMode::kStandard, PromptMode::kOracleOfSecrets};
|
||||
}
|
||||
|
||||
const char* PromptManager::ModeToString(PromptMode mode) {
|
||||
switch (mode) {
|
||||
case PromptMode::kStandard: return "ALTTP Standard";
|
||||
case PromptMode::kOracleOfSecrets: return "Oracle of Secrets";
|
||||
case PromptMode::kCustom: return "Custom";
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
} // namespace agent
|
||||
} // namespace cli
|
||||
} // namespace yaze
|
||||
29
src/cli/service/agent/prompt_manager.h
Normal file
29
src/cli/service/agent/prompt_manager.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef YAZE_CLI_SERVICE_AGENT_PROMPT_MANAGER_H_
|
||||
#define YAZE_CLI_SERVICE_AGENT_PROMPT_MANAGER_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
namespace agent {
|
||||
|
||||
enum class PromptMode {
|
||||
kStandard, // Standard ALTTP
|
||||
kOracleOfSecrets, // Oracle of Secrets hack
|
||||
kCustom // User-defined
|
||||
};
|
||||
|
||||
class PromptManager {
|
||||
public:
|
||||
static std::string LoadPrompt(PromptMode mode);
|
||||
static std::string GetPromptPath(PromptMode mode);
|
||||
static std::vector<PromptMode> GetAvailableModes();
|
||||
static const char* ModeToString(PromptMode mode);
|
||||
};
|
||||
|
||||
} // namespace agent
|
||||
} // namespace cli
|
||||
} // namespace yaze
|
||||
|
||||
#endif // YAZE_CLI_SERVICE_AGENT_PROMPT_MANAGER_H_
|
||||
Reference in New Issue
Block a user