Integrate AI Agent Services and Chat Interface

- Added support for AI agent services, including `ConversationalAgentService`, to facilitate user interactions through a chat interface.
- Implemented `ChatTUI` for a terminal-based chat experience, allowing users to send messages and receive responses from the AI agent.
- Updated `EditorManager` to include options for displaying the agent chat widget and performance dashboard.
- Enhanced CMake configurations to include new source files for AI services and chat interface components.

This commit significantly expands the functionality of the z3ed system, paving the way for a more interactive and user-friendly experience in ROM hacking.
This commit is contained in:
scawful
2025-10-03 12:39:48 -04:00
parent 655c5547b2
commit 208b9ade51
25 changed files with 689 additions and 242 deletions

View File

@@ -6,15 +6,21 @@
#include <map>
#include "absl/status/statusor.h"
#include "cli/service/ai/common.h"
#include "cli/service/resources/resource_context_builder.h"
#include "app/rom.h"
namespace yaze {
namespace cli {
namespace agent {
struct ChatMessage;
}
// Few-shot example for prompt engineering
struct FewShotExample {
std::string user_prompt;
std::string text_response;
std::vector<std::string> expected_commands;
std::string explanation; // Why these commands work
};
@@ -47,6 +53,10 @@ class PromptBuilder {
std::string BuildContextualPrompt(
const std::string& user_prompt,
const RomContext& context);
// Build a full prompt from a conversation history
std::string BuildPromptFromHistory(
const std::vector<agent::ChatMessage>& history);
// Add custom few-shot examples
void AddFewShotExample(const FewShotExample& example);