1#ifndef YAZE_SRC_CLI_SERVICE_AGENT_DEV_ASSIST_AGENT_H_
2#define YAZE_SRC_CLI_SERVICE_AGENT_DEV_ASSIST_AGENT_H_
11#include "absl/status/status.h"
12#include "absl/status/statusor.h"
104 absl::Status
Initialize(std::shared_ptr<ToolDispatcher> tool_dispatcher,
105 std::shared_ptr<yaze::cli::AIService> ai_service =
nullptr);
130 const std::vector<std::string>& changed_files);
140 const std::string& source_file,
141 const std::string& function_name =
"");
161 const std::string& command);
170 const std::string& test_pattern =
"");
178 std::vector<AnalysisResult>
AnalyzeCodeFile(
const std::string& file_path);
229 const std::string& source_code,
230 const std::string& function_name);
Development Assistant Agent for AI-assisted yaze development.
absl::StatusOr< std::vector< AnalysisResult > > RunBuildWithAnalysis(const std::string &command)
Run a build command and analyze output.
std::shared_ptr< yaze::cli::AIService > ai_service_
std::string GetBuildStatus() const
Get build system status and health.
absl::StatusOr< std::string > GenerateTestCode(const std::string &source_file, const std::string &function_name="")
Generate test code for a function or class.
void InitializeErrorPatterns()
void SuggestTypeMismatchFix(AnalysisResult &result)
AnalysisResult AnalyzeCrash(const std::string &stack_trace)
Analyze a crash or stack trace.
absl::Status RunCMakeBuild(const BuildConfig &config)
absl::StatusOr< std::string > GenerateTestWithAI(const std::string &source_code, const std::string &function_name)
std::map< std::string, std::vector< std::string > > test_file_cache_
void SuggestMissingHeaderFix(AnalysisResult &result)
absl::Status RunCMakeConfigure(const BuildConfig &config)
AnalysisResult ParseSegfault(const std::string &stack_trace)
std::vector< std::string > FindTestsForFile(const std::string &source_file)
absl::StatusOr< std::vector< AnalysisResult > > RunTestsWithAnalysis(const std::string &test_pattern="")
Run tests and analyze failures.
void SuggestLinkOrderFix(AnalysisResult &result)
void ExtractUndefinedSymbol(const std::string &text, AnalysisResult &result)
absl::Status Initialize(std::shared_ptr< ToolDispatcher > tool_dispatcher, std::shared_ptr< yaze::cli::AIService > ai_service=nullptr)
Initialize the agent with optional AI service.
bool IsTestFile(const std::string &file_path) const
AnalysisResult ParseCompilationError(const std::string &line)
std::string GetTestFileForSource(const std::string &source_file) const
void GenerateFixSuggestions(AnalysisResult &result)
AnalysisResult ParseTestFailure(const std::string &output)
AnalysisResult ParseLinkError(const std::string &line)
std::vector< AnalysisResult > AnalyzeBuildOutput(const std::string &output)
Analyze build output for errors and warnings.
std::vector< TestSuggestion > GetAffectedTests(const std::vector< std::string > &changed_files)
Get suggested tests for changed files.
void ExtractFileAndLine(const std::string &text, AnalysisResult &result)
std::vector< AnalysisResult > AnalyzeCodeFile(const std::string &file_path)
Check code for common issues.
void SetAIEnabled(bool enabled)
Enable/disable AI-powered suggestions.
absl::StatusOr< std::string > ExecuteCommand(const std::string &command)
std::shared_ptr< ToolDispatcher > tool_dispatcher_
absl::StatusOr< std::string > GetAISuggestion(const AnalysisResult &result)
std::vector< ErrorPattern > error_patterns_
bool IsAIAvailable() const
Check if AI service is available.
AnalysisResult ParseCMakeError(const std::string &line)
absl::Status MonitorBuild(const BuildConfig &config, std::function< void(const AnalysisResult &)> on_error)
Monitor build process interactively.
Analysis result for build errors or crashes.
std::vector< std::string > suggested_fixes
std::vector< std::string > related_files
std::string error_category
Build monitoring configuration.
AnalysisResult::ErrorType type
std::function< void(const std::smatch &, AnalysisResult &) extractor)
Test suggestion for changed code.