yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
simple_chat_session.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_SERVICE_AGENT_SIMPLE_CHAT_SESSION_H_
2#define YAZE_SRC_CLI_SERVICE_AGENT_SIMPLE_CHAT_SESSION_H_
3
4#include <string>
5#include <vector>
6#include <memory>
7
8#include "absl/status/status.h"
11
12namespace yaze {
13
14class Rom;
15
16namespace cli {
17namespace agent {
18
33 public:
35
36 // Set ROM context for tool execution
37 void SetRomContext(Rom* rom);
38
39 // Set agent configuration
40 void SetConfig(const AgentConfig& config) {
41 config_ = config;
43 }
44
45 // Send a single message and get response (blocking)
46 absl::Status SendAndWaitForResponse(const std::string& message,
47 std::string* response_out = nullptr);
48
49 // Run interactive REPL mode (reads from stdin)
50 // If stdin is piped, runs in quiet mode
51 absl::Status RunInteractive();
52
53 // Run batch mode from file (one message per line)
54 absl::Status RunBatch(const std::string& input_file);
55
56 // Get full conversation history
57 const std::vector<ChatMessage>& GetHistory() const {
59 }
60
61 // Clear conversation history
65
66 private:
67 void PrintMessage(const ChatMessage& msg, bool show_timestamp = false);
68 void PrintTable(const ChatMessage::TableData& table);
69 std::string ReadLineWithVim();
70 std::vector<std::string> GetAutocompleteOptions(const std::string& partial);
71
74 std::unique_ptr<VimMode> vim_mode_;
75};
76
77} // namespace agent
78} // namespace cli
79} // namespace yaze
80
81#endif // YAZE_SRC_CLI_SERVICE_AGENT_SIMPLE_CHAT_SESSION_H_
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:71
const std::vector< ChatMessage > & GetHistory() const
Simple text-based chat session for AI agent interaction.
std::vector< std::string > GetAutocompleteOptions(const std::string &partial)
void SetConfig(const AgentConfig &config)
void PrintTable(const ChatMessage::TableData &table)
absl::Status RunBatch(const std::string &input_file)
void PrintMessage(const ChatMessage &msg, bool show_timestamp=false)
ConversationalAgentService agent_service_
std::unique_ptr< VimMode > vim_mode_
const std::vector< ChatMessage > & GetHistory() const
absl::Status SendAndWaitForResponse(const std::string &message, std::string *response_out=nullptr)
Main namespace for the application.