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:
@@ -1,28 +1,42 @@
|
||||
#ifndef YAZE_SRC_CLI_AI_SERVICE_H_
|
||||
#define YAZE_SRC_CLI_AI_SERVICE_H_
|
||||
#ifndef YAZE_SRC_CLI_SERVICE_AI_AI_SERVICE_H_
|
||||
#define YAZE_SRC_CLI_SERVICE_AI_AI_SERVICE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/status/statusor.h"
|
||||
#include "cli/service/ai/common.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
|
||||
namespace agent {
|
||||
struct ChatMessage;
|
||||
}
|
||||
// Abstract interface for AI services
|
||||
class AIService {
|
||||
public:
|
||||
virtual ~AIService() = default;
|
||||
virtual absl::StatusOr<std::vector<std::string>> GetCommands(
|
||||
|
||||
// Generate a response from a single prompt.
|
||||
virtual absl::StatusOr<AgentResponse> GenerateResponse(
|
||||
const std::string& prompt) = 0;
|
||||
|
||||
// Generate a response from a conversation history.
|
||||
virtual absl::StatusOr<AgentResponse> GenerateResponse(
|
||||
const std::vector<agent::ChatMessage>& history) = 0;
|
||||
};
|
||||
|
||||
// Mock implementation for testing
|
||||
class MockAIService : public AIService {
|
||||
public:
|
||||
absl::StatusOr<std::vector<std::string>> GetCommands(
|
||||
absl::StatusOr<AgentResponse> GenerateResponse(
|
||||
const std::string& prompt) override;
|
||||
absl::StatusOr<AgentResponse> GenerateResponse(
|
||||
const std::vector<agent::ChatMessage>& history) override;
|
||||
};
|
||||
|
||||
} // namespace cli
|
||||
} // namespace yaze
|
||||
|
||||
#endif // YAZE_SRC_CLI_AI_SERVICE_H_
|
||||
#endif // YAZE_SRC_CLI_SERVICE_AI_AI_SERVICE_H_
|
||||
|
||||
Reference in New Issue
Block a user