yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
automation_bridge.cc
Go to the documentation of this file.
1#define IMGUI_DEFINE_MATH_OPERATORS
2
4#include "absl/time/clock.h"
5
6#if defined(YAZE_WITH_GRPC)
7
8#include "absl/time/time.h"
10
11// test_manager.h already included in automation_bridge.h
12
13namespace yaze {
14namespace editor {
15
16void AutomationBridge::OnHarnessTestUpdated(
17 const test::HarnessTestExecution& execution) {
18 absl::MutexLock lock(&mutex_);
19 if (!agent_chat_) {
20 return;
21 }
22
23 AgentChat::AutomationTelemetry telemetry;
24 telemetry.test_id = execution.test_id;
25 telemetry.name = execution.name;
26 telemetry.status = test::HarnessStatusToString(execution.status);
27 telemetry.message = execution.error_message;
28 telemetry.updated_at = (execution.completed_at == absl::InfiniteFuture() ||
29 execution.completed_at == absl::InfinitePast())
30 ? absl::Now()
31 : execution.completed_at;
32
33 agent_chat_->UpdateHarnessTelemetry(telemetry);
34}
35
36void AutomationBridge::OnHarnessPlanSummary(const std::string& summary) {
37 absl::MutexLock lock(&mutex_);
38 if (!agent_chat_) {
39 return;
40 }
41 agent_chat_->SetLastPlanSummary(summary);
42}
43
44} // namespace editor
45} // namespace yaze
46
47#endif // defined(YAZE_WITH_GRPC)