feat(cv-import): add source-grounded review and explicit corrections
This commit is contained in:
@@ -219,7 +219,8 @@ public sealed partial class ProfileCvController : ControllerBase
|
||||
.Where(x => x.OwnerUserId == user.Id);
|
||||
var isSqlite = _db.Database.IsSqlite();
|
||||
if (!isSqlite)
|
||||
runsQuery = runsQuery.OrderByDescending(x => x.StartedAtUtc).Take(10);
|
||||
runsQuery = runsQuery.OrderByDescending(x => x.StartedAtUtc).Take(10)
|
||||
.Union(_db.CvExtractionRuns.AsNoTracking().Where(x => x.OwnerUserId == user.Id && x.Status == "pending_review"));
|
||||
var runs = await runsQuery.Select(x => new CvExtractionRunListItem(
|
||||
x.Id,
|
||||
x.Trigger,
|
||||
@@ -233,8 +234,8 @@ public sealed partial class ProfileCvController : ControllerBase
|
||||
x.LlmPromptVersion,
|
||||
x.ErrorMessage,
|
||||
null)).ToListAsync(HttpContext.RequestAborted);
|
||||
if (isSqlite)
|
||||
runs = runs.OrderByDescending(x => x.StartedAtUtc).Take(10).ToList();
|
||||
runs = runs.OrderByDescending(x => x.StartedAtUtc).Take(10).Concat(runs.Where(x => x.Status == "pending_review"))
|
||||
.DistinctBy(x => x.Id).OrderByDescending(x => x.StartedAtUtc).ToList();
|
||||
|
||||
var runIds = runs.Select(run => run.Id.ToString(System.Globalization.CultureInfo.InvariantCulture)).ToList();
|
||||
var operations = await _db.UserOperations.AsNoTracking()
|
||||
|
||||
Reference in New Issue
Block a user