- 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.
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#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;
|
|
|
|
// 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<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_SERVICE_AI_AI_SERVICE_H_
|