feat: Enhance Networking Documentation and Introduce Automation Bridge
- Updated the networking documentation to clarify the focus on collaboration and remote access. - Added the AutomationBridge class to facilitate communication between the test harness and the AgentChatWidget, enabling real-time updates on test execution status and plan summaries. - Implemented automation callbacks in the AgentChatWidget for improved user interaction with harness automation features, including dashboard access and active test management.
This commit is contained in:
@@ -67,6 +67,21 @@ class AgentChatWidget {
|
||||
std::function<absl::Status(const std::filesystem::path&, const std::string&)> send_to_gemini;
|
||||
};
|
||||
|
||||
struct AutomationCallbacks {
|
||||
std::function<void()> open_harness_dashboard;
|
||||
std::function<void()> replay_last_plan;
|
||||
std::function<void(const std::string&)> focus_proposal;
|
||||
std::function<void()> show_active_tests;
|
||||
};
|
||||
|
||||
struct AutomationTelemetry {
|
||||
std::string test_id;
|
||||
std::string name;
|
||||
std::string status;
|
||||
std::string message;
|
||||
absl::Time updated_at = absl::InfinitePast();
|
||||
};
|
||||
|
||||
// Z3ED Command Callbacks
|
||||
struct Z3EDCommandCallbacks {
|
||||
std::function<absl::Status(const std::string&)> run_agent_task;
|
||||
@@ -84,6 +99,8 @@ class AgentChatWidget {
|
||||
std::function<std::string()> get_rom_hash;
|
||||
};
|
||||
|
||||
void RenderSnapshotPreviewPanel();
|
||||
|
||||
void SetToastManager(ToastManager* toast_manager);
|
||||
|
||||
void SetProposalDrawer(ProposalDrawer* drawer);
|
||||
@@ -94,9 +111,11 @@ class AgentChatWidget {
|
||||
collaboration_callbacks_ = callbacks;
|
||||
}
|
||||
|
||||
void SetMultimodalCallbacks(const MultimodalCallbacks& callbacks) {
|
||||
multimodal_callbacks_ = callbacks;
|
||||
}
|
||||
void SetMultimodalCallbacks(const MultimodalCallbacks& callbacks);
|
||||
void SetAutomationCallbacks(const AutomationCallbacks& callbacks);
|
||||
|
||||
void UpdateHarnessTelemetry(const AutomationTelemetry& telemetry);
|
||||
void SetLastPlanSummary(const std::string& summary);
|
||||
|
||||
void SetZ3EDCommandCallbacks(const Z3EDCommandCallbacks& callbacks) {
|
||||
z3ed_callbacks_ = callbacks;
|
||||
@@ -141,6 +160,12 @@ public:
|
||||
char specific_window_buffer[128] = {};
|
||||
};
|
||||
|
||||
struct AutomationState {
|
||||
std::vector<AutomationTelemetry> recent_tests;
|
||||
bool harness_connected = false;
|
||||
absl::Time last_poll = absl::InfinitePast();
|
||||
};
|
||||
|
||||
// Agent Configuration State
|
||||
struct AgentConfigState {
|
||||
std::string ai_provider = "mock"; // mock, ollama, gemini
|
||||
@@ -218,8 +243,8 @@ public:
|
||||
void RenderAgentConfigPanel();
|
||||
void RenderZ3EDCommandPanel();
|
||||
void RenderRomSyncPanel();
|
||||
void RenderSnapshotPreviewPanel();
|
||||
void RenderProposalManagerPanel();
|
||||
void RenderHarnessPanel();
|
||||
void RenderSystemPromptEditor();
|
||||
void RenderFileEditorTabs();
|
||||
void RefreshCollaboration();
|
||||
@@ -287,6 +312,7 @@ public:
|
||||
// Main state
|
||||
CollaborationState collaboration_state_;
|
||||
MultimodalState multimodal_state_;
|
||||
AutomationState automation_state_;
|
||||
AgentConfigState agent_config_;
|
||||
RomSyncState rom_sync_state_;
|
||||
Z3EDCommandState z3ed_command_state_;
|
||||
@@ -294,6 +320,7 @@ public:
|
||||
// Callbacks
|
||||
CollaborationCallbacks collaboration_callbacks_;
|
||||
MultimodalCallbacks multimodal_callbacks_;
|
||||
AutomationCallbacks automation_callbacks_;
|
||||
Z3EDCommandCallbacks z3ed_callbacks_;
|
||||
RomSyncCallbacks rom_sync_callbacks_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user