feat: Improve CMake configuration and build environment verification

- Enabled JSON support by default in CMake to resolve Windows build issues.
- Added checks for the existence of the JSON library and its target, providing clear error messages if missing.
- Updated README with instructions for building with AI features.
- Enhanced the build environment verification script for better feedback on setup issues and added checks for agent folder structure.
- Introduced new CMake presets for AI-enabled builds and collaboration support.
This commit is contained in:
scawful
2025-10-04 19:43:05 -04:00
parent 226bcf8686
commit 588db01df6
5 changed files with 402 additions and 299 deletions

View File

@@ -842,7 +842,7 @@ absl::Status ModernCLI::HandleCollabCommand(const std::vector<std::string>& args
if (const char* yaze_root = std::getenv("YAZE_ROOT")) {
server_dir = std::string(yaze_root);
} else {
// Assume we're in build directory, server is ../yaze-collab-server
// Assume we're in build directory, server is ../yaze-server
server_dir = "..";
}
@@ -853,11 +853,11 @@ absl::Status ModernCLI::HandleCollabCommand(const std::vector<std::string>& args
std::string command;
#ifdef _WIN32
// Windows: Use cmd.exe to run npm start
command = "cd /D \"" + server_dir + "\\..\\yaze-collab-server\" && set PORT=" +
command = "cd /D \"" + server_dir + "\\..\\yaze-server\" && set PORT=" +
port + " && npm start";
#else
// Unix: Use bash script
command = "cd \"" + server_dir + "/../yaze-collab-server\" && PORT=" +
command = "cd \"" + server_dir + "/../yaze-server\" && PORT=" +
port + " node server.js &";
#endif
@@ -865,7 +865,7 @@ absl::Status ModernCLI::HandleCollabCommand(const std::vector<std::string>& args
if (result != 0) {
std::cout << "⚠️ Note: Server may not be installed. To install:\n";
std::cout << " cd yaze-collab-server && npm install\n";
std::cout << " cd yaze-server && npm install\n";
return absl::InternalError("Failed to start collaboration server");
}