yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
automation_bridge.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_AGENT_AUTOMATION_BRIDGE_H_
2#define YAZE_APP_EDITOR_AGENT_AUTOMATION_BRIDGE_H_
3
4#if defined(YAZE_WITH_GRPC)
5
6// Must define before any ImGui includes (test_manager.h includes ImGui headers)
7#ifndef IMGUI_DEFINE_MATH_OPERATORS
8#define IMGUI_DEFINE_MATH_OPERATORS
9#endif
10
11#include <string>
12
13#include "absl/synchronization/mutex.h"
16
17namespace yaze {
18namespace editor {
19
20class AutomationBridge : public test::HarnessListener {
21 public:
22 AutomationBridge() = default;
23 ~AutomationBridge() override = default;
24
25 void SetAgentChat(AgentChat* chat) {
26 absl::MutexLock lock(&mutex_);
27 agent_chat_ = chat;
28 }
29
30 void OnHarnessTestUpdated(
31 const test::HarnessTestExecution& execution) override;
32
33 void OnHarnessPlanSummary(const std::string& summary) override;
34
35 private:
36 absl::Mutex mutex_;
37 AgentChat* agent_chat_ ABSL_GUARDED_BY(mutex_) = nullptr;
38};
39
40} // namespace editor
41} // namespace yaze
42
43#endif // defined(YAZE_WITH_GRPC)
44
45#endif // YAZE_APP_EDITOR_AGENT_AUTOMATION_BRIDGE_H_