Add data-driven dynamic question mode

This commit is contained in:
hz
2026-07-23 12:33:23 -05:00
parent 50f07a77a5
commit fcbc288a49
22 changed files with 1247 additions and 21 deletions
@@ -79,6 +79,35 @@ public class QuestionReportStore
return report;
}
public async Task<QuestionReport> CreateDynamicAsync(
DynamicGenerationClaims claims,
string userId,
string category,
string details)
{
var now = DateTime.UtcNow;
var report = new QuestionReport
{
QuestionExternalId = $"dynamic:{claims.BlueprintExternalId}:v{claims.BlueprintVersion}",
UserId = userId,
Category = category,
Details = details,
Status = QuestionReportStatus.Open,
SourceType = "dynamic",
DynamicGeneration = new DynamicGenerationDescriptor
{
BlueprintExternalId = claims.BlueprintExternalId,
BlueprintVersion = claims.BlueprintVersion,
GeneratorVersion = claims.GeneratorVersion,
Seed = claims.Seed
},
CreatedUtc = now,
UpdatedUtc = now
};
await _reports.InsertOneAsync(report);
return report;
}
public async Task<QuestionReport?> GetByIdAsync(string id)
{
if (!ObjectId.TryParse(id, out _))