diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f4a38a1..2e793756 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,33 +66,19 @@ option(YAZE_MINIMAL_BUILD "Minimal build for CI (disable optional features)" OFF option(YAZE_USE_MODULAR_BUILD "Use modularized library build system for faster builds" ON) # ============================================================================ -# AI Agent Build Flags (Consolidated) +# Feature Flags - All Always Enabled for Simplified Development # ============================================================================ -# Z3ED_AI: Master flag for z3ed AI agent features (Ollama + Gemini support) -# Enables: JSON parsing, YAML config, httplib for API calls, prompt builder -option(Z3ED_AI "Enable z3ed AI agent features (Gemini/Ollama integration)" OFF) +# No conditional compilation - everything is always available +# This simplifies development and eliminates ifdef complexity +set(Z3ED_AI ON) +set(YAZE_WITH_JSON ON) +set(YAZE_WITH_GRPC ON) -# YAZE_WITH_JSON: JSON support (bundled header-only library, minimal overhead) -# Enabled by default to avoid Windows build issues with agent history codec -option(YAZE_WITH_JSON "Enable JSON support for AI integrations" ON) - -# YAZE_WITH_GRPC: gRPC for GUI automation (auto-enables JSON) -option(YAZE_WITH_GRPC "Enable gRPC-based ImGuiTestHarness for automated GUI testing (experimental)" OFF) +message(STATUS "✓ All features enabled: JSON, gRPC, AI Agent") # YAZE_SUPPRESS_WARNINGS: Suppress compiler warnings for cleaner build output option(YAZE_SUPPRESS_WARNINGS "Suppress compiler warnings (use -v preset suffix for verbose)" ON) -# Dependency resolution -if(Z3ED_AI) - message(STATUS "Z3ED_AI enabled: Activating AI agent dependencies (JSON, YAML, httplib)") - set(YAZE_WITH_JSON ON CACHE BOOL "Enable JSON support" FORCE) -endif() - -if(YAZE_WITH_GRPC AND NOT YAZE_WITH_JSON) - message(STATUS "Enabling JSON support because gRPC is enabled") - set(YAZE_WITH_JSON ON CACHE BOOL "Enable JSON support" FORCE) -endif() - # Configure minimal builds for CI/CD if(YAZE_MINIMAL_BUILD) set(YAZE_ENABLE_UI_TESTS OFF CACHE BOOL "Disabled for minimal build" FORCE) diff --git a/src/app/core/service/imgui_test_harness_service.cc b/src/app/core/service/imgui_test_harness_service.cc index 55d00fde..64b871a8 100644 --- a/src/app/core/service/imgui_test_harness_service.cc +++ b/src/app/core/service/imgui_test_harness_service.cc @@ -22,8 +22,8 @@ #include "absl/synchronization/mutex.h" #include "absl/time/clock.h" #include "absl/time/time.h" -#include "app/core/proto/imgui_test_harness.grpc.pb.h" -#include "app/core/proto/imgui_test_harness.pb.h" +#include "protos/imgui_test_harness.grpc.pb.h" +#include "protos/imgui_test_harness.pb.h" #include "app/core/service/screenshot_utils.h" #include "app/core/testing/test_script_parser.h" #include "app/test/test_manager.h" diff --git a/src/app/core/service/widget_discovery_service.h b/src/app/core/service/widget_discovery_service.h index 289b3937..b7ead6bd 100644 --- a/src/app/core/service/widget_discovery_service.h +++ b/src/app/core/service/widget_discovery_service.h @@ -5,7 +5,7 @@ #include #include "absl/strings/string_view.h" -#include "app/core/proto/imgui_test_harness.pb.h" +#include "protos/imgui_test_harness.pb.h" #include "app/gui/widgets/widget_id_registry.h" #if defined(YAZE_ENABLE_IMGUI_TEST_ENGINE) && YAZE_ENABLE_IMGUI_TEST_ENGINE diff --git a/src/app/test/test_manager.cc b/src/app/test/test_manager.cc index beb06ace..2a88e9ca 100644 --- a/src/app/test/test_manager.cc +++ b/src/app/test/test_manager.cc @@ -109,6 +109,7 @@ ImVec4 GetTestStatusColor(TestStatus status) { return ImVec4(1.0f, 1.0f, 1.0f, 1.0f); } +#if defined(YAZE_WITH_GRPC) const char* HarnessStatusToString(HarnessTestStatus status) { switch (status) { case HarnessTestStatus::kPassed: @@ -145,6 +146,7 @@ HarnessTestStatus HarnessStatusFromString(absl::string_view status) { } return HarnessTestStatus::kUnspecified; } +#endif // defined(YAZE_WITH_GRPC) // TestManager implementation TestManager& TestManager::Get() { @@ -855,6 +857,7 @@ void TestManager::DrawTestDashboard(bool* show_dashboard) { } // Harness Test Results tab (for gRPC GUI automation tests) +#if defined(YAZE_WITH_GRPC) if (ImGui::BeginTabItem("GUI Automation Tests")) { if (ImGui::BeginChild("HarnessTests", ImVec2(0, 0), true)) { // Display harness test summaries @@ -1009,6 +1012,7 @@ void TestManager::DrawTestDashboard(bool* show_dashboard) { ImGui::EndChild(); ImGui::EndTabItem(); } +#endif // defined(YAZE_WITH_GRPC) ImGui::EndTabBar(); } diff --git a/src/app/test/test_manager.h b/src/app/test/test_manager.h index 4dae328a..acf74aa4 100644 --- a/src/app/test/test_manager.h +++ b/src/app/test/test_manager.h @@ -384,12 +384,15 @@ class TestManager { #endif #endif // defined(YAZE_WITH_GRPC) +#if defined(YAZE_WITH_GRPC) std::string GenerateHarnessTestIdLocked(absl::string_view prefix) - ABSL_EXCLUSIVE_LOCKS_REQUIRED(harness_history_mutex_); + ABSL_EXCLUSIVE_LOCKS_REQUIRED(harness_history_mutex_); void TrimHarnessHistoryLocked() - ABSL_EXCLUSIVE_LOCKS_REQUIRED(harness_history_mutex_); + ABSL_EXCLUSIVE_LOCKS_REQUIRED(harness_history_mutex_); +#endif + + absl::Mutex mutex_; - absl::Mutex mutex_; }; // Utility functions for test result formatting diff --git a/src/cli/service/gui/gui_automation_client.h b/src/cli/service/gui/gui_automation_client.h index d12e4355..66a35296 100644 --- a/src/cli/service/gui/gui_automation_client.h +++ b/src/cli/service/gui/gui_automation_client.h @@ -18,7 +18,7 @@ #ifdef YAZE_WITH_GRPC #include -#include "app/core/proto/imgui_test_harness.grpc.pb.h" +#include "protos/imgui_test_harness.grpc.pb.h" #endif namespace yaze {