143 lines
5.9 KiB
C#
Executable File
143 lines
5.9 KiB
C#
Executable File
namespace MarketAlly.AIPlugin.Learning.Models
|
|
{
|
|
// Learning context models for UnifiedContextService
|
|
public class ComprehensiveContext
|
|
{
|
|
public string Query { get; set; } = "";
|
|
public string? FilePath { get; set; }
|
|
public int MaxTokens { get; set; }
|
|
public string CorrelationId { get; set; } = "";
|
|
public string? ProjectPath { get; set; }
|
|
public string? SessionId { get; set; }
|
|
public DateTime Timestamp { get; set; }
|
|
public DateTime GeneratedAt { get; set; } = DateTime.UtcNow;
|
|
public int EstimatedTotalTokens { get; set; }
|
|
public Dictionary<string, object> RelevantContext { get; set; } = new();
|
|
public CodeAnalysis? CurrentCodeAnalysis { get; set; }
|
|
public List<HistoricalInsight> HistoricalInsights { get; set; } = new();
|
|
public List<PreviousDecision> RelatedDecisions { get; set; } = new();
|
|
public ProjectContext? ProjectContext { get; set; }
|
|
}
|
|
|
|
public class CodeAnalysis
|
|
{
|
|
public List<object> CodeChunks { get; set; } = new();
|
|
public int EstimatedTokens { get; set; }
|
|
}
|
|
|
|
public class ProjectContext
|
|
{
|
|
public string ProjectPath { get; set; } = "";
|
|
public List<object> RecentChanges { get; set; } = new();
|
|
public DateTime LastAnalyzed { get; set; }
|
|
}
|
|
|
|
public class LearningSessionContext
|
|
{
|
|
public string SessionId { get; set; } = "";
|
|
public string ProjectPath { get; set; } = "";
|
|
public string Topic { get; set; } = "";
|
|
public DateTime StartTime { get; set; }
|
|
public DateTime InitializedAt { get; set; } = DateTime.UtcNow;
|
|
public List<string> Insights { get; set; } = new();
|
|
public List<string> Decisions { get; set; } = new();
|
|
public Dictionary<string, object> Metadata { get; set; } = new();
|
|
public ProjectContext? ProjectContext { get; set; }
|
|
}
|
|
|
|
public class HistoricalInsight
|
|
{
|
|
public string Id { get; set; } = "";
|
|
public string Issue { get; set; } = "";
|
|
public string Solution { get; set; } = "";
|
|
public string Category { get; set; } = "";
|
|
public string Summary { get; set; } = "";
|
|
public double Relevance { get; set; }
|
|
public DateTime Timestamp { get; set; }
|
|
public double SimilarityScore { get; set; }
|
|
public List<string> Tags { get; set; } = new();
|
|
public Dictionary<string, object> Content { get; set; } = new();
|
|
public Dictionary<string, object> Metadata { get; set; } = new();
|
|
}
|
|
|
|
public class PreviousDecision
|
|
{
|
|
public string Id { get; set; } = "";
|
|
public string SymbolName { get; set; } = "";
|
|
public string Decision { get; set; } = "";
|
|
public string Reasoning { get; set; } = "";
|
|
public string Summary { get; set; } = "";
|
|
public double Relevance { get; set; }
|
|
public string OperationType { get; set; } = "";
|
|
public bool Successful { get; set; }
|
|
public DateTime Timestamp { get; set; }
|
|
public string FilePath { get; set; } = "";
|
|
public List<string> Tags { get; set; } = new();
|
|
public Dictionary<string, object> Content { get; set; } = new();
|
|
}
|
|
|
|
public class SessionSummary
|
|
{
|
|
public string SessionId { get; set; } = "";
|
|
public string ProjectPath { get; set; } = "";
|
|
public string Summary { get; set; } = "";
|
|
public Dictionary<string, object> Metrics { get; set; } = new();
|
|
public DateTime StartTime { get; set; }
|
|
public DateTime EndTime { get; set; }
|
|
public DateTime FinalizedAt { get; set; } = DateTime.UtcNow;
|
|
public object TotalInsights { get; set; } = 0;
|
|
public object TotalDecisions { get; set; } = 0;
|
|
public bool Success { get; set; }
|
|
}
|
|
|
|
// Data models for method extraction and project analysis
|
|
public class MethodExtraction
|
|
{
|
|
public string Name { get; set; } = "";
|
|
public string? ReturnType { get; set; }
|
|
public List<string> Parameters { get; set; } = new();
|
|
public string FilePath { get; set; } = "";
|
|
public string Language { get; set; } = "";
|
|
public int LineNumber { get; set; }
|
|
public string Signature { get; set; } = "";
|
|
public string Type { get; set; } = "";
|
|
public string? Documentation { get; set; }
|
|
public string? ClassName { get; set; }
|
|
public string? Namespace { get; set; }
|
|
}
|
|
|
|
public class ProjectAnalysisResult
|
|
{
|
|
public string ProjectPath { get; set; } = "";
|
|
public string? PrimaryLanguage { get; set; }
|
|
public Dictionary<string, int> Languages { get; set; } = new();
|
|
public Dictionary<string, List<string>> Files { get; set; } = new();
|
|
public List<DetectedFramework> Frameworks { get; set; } = new();
|
|
public string? ProjectType { get; set; }
|
|
public DateTime AnalyzedAt { get; set; }
|
|
}
|
|
|
|
public class DetectedFramework
|
|
{
|
|
public string Name { get; set; } = "";
|
|
public string? Version { get; set; }
|
|
public string Language { get; set; } = "";
|
|
public string Documentation { get; set; } = "";
|
|
public List<string> CommonUsages { get; set; } = new();
|
|
public string DetectionMethod { get; set; } = ""; // package.json, requirements.txt, etc.
|
|
public List<string> DetectedFiles { get; set; } = new(); // Files that indicated this framework
|
|
}
|
|
|
|
public class MethodIndexResult
|
|
{
|
|
public string ProjectPath { get; set; } = "";
|
|
public bool Success { get; set; }
|
|
public string? Error { get; set; }
|
|
public DateTime GeneratedAt { get; set; }
|
|
public string CorrelationId { get; set; } = "";
|
|
public ProjectAnalysisResult? ProjectAnalysis { get; set; }
|
|
public RefactorIQResult? RefactorIQResult { get; set; }
|
|
public Dictionary<string, List<MethodExtraction>> MethodsByLanguage { get; set; } = new();
|
|
public int TotalMethods { get; set; }
|
|
}
|
|
} |