Files
yaze/src/cli/service/agent/prompt_manager.cc
scawful 7712456154 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.
2025-10-05 01:45:19 -04:00

48 lines
1.2 KiB
C++

#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