Skip to content
Merged

Dev #2631

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
76713d0
AB#32307 store AI runtime configuration in database
jacobwillsmith Jun 26, 2026
a8baa4a
AB#32307 wire AI generation request plumbing
jacobwillsmith Jun 26, 2026
15e2a5a
AB#32307 repair AI migration chain
jacobwillsmith Jun 26, 2026
804f187
AB#32307 fix AI generation test regressions
jacobwillsmith Jun 26, 2026
73e4446
AB#32307 address Copilot review fixes
jacobwillsmith Jun 26, 2026
c971382
AB#32307 fix payload validator formatting
jacobwillsmith Jun 26, 2026
e471a52
AB#32307 add forward AI schema repair migration
jacobwillsmith Jun 26, 2026
b4c9154
AB#32307 tighten AI operation resolution
jacobwillsmith Jun 26, 2026
c3bbf2c
AB#32307 restore historical AI migrations
jacobwillsmith Jun 26, 2026
b83aa89
[AB#33555] Add ExternalStatusVisibility to Applications and UI
plavoie-BC Jun 29, 2026
5b612e7
[AB#33555] Add ExternalStatusVisibility to breadcrumb widget
plavoie-BC Jun 29, 2026
3c5a9f0
[AB#33555] Change External Status Label
plavoie-BC Jun 29, 2026
632d2e9
[AB#33555] Implement external status visibility updates
plavoie-BC Jun 29, 2026
8ca2445
[AB#33555] Update database connection ports in appsettings
plavoie-BC Jun 29, 2026
64e25f1
[AB#33555] Revert EF migration for fix
plavoie-BC Jun 30, 2026
27a602c
Merge remote-tracking branch 'origin/dev' into feature/AB#33555-publi…
plavoie-BC Jun 30, 2026
8695b8c
[AB#33555] Add back ExternalStatusVisibility migration
plavoie-BC Jun 30, 2026
fac7855
[AB#33555] Fix connection string edit
plavoie-BC Jun 30, 2026
cb56da6
AB#32307 repair AI schema and seeding
jacobwillsmith Jun 30, 2026
9ce185d
AB#32307 flatten AI prompt editing
jacobwillsmith Jun 30, 2026
a28ba7c
AB#32307 update AI tests for strict seeding
jacobwillsmith Jun 30, 2026
4172221
AB#32307 fix prompt edit modal compile break
jacobwillsmith Jun 30, 2026
458846c
AB#32307 simplify AI schema rebuild
jacobwillsmith Jun 30, 2026
5badab4
AB#33228: Cancel Payment Transaction - Initial Draft
aurelio-aot Jun 30, 2026
4bd020c
AB#32307 queue concrete AI stages for all generation
jacobwillsmith Jun 30, 2026
07b51db
#AB33663 - Removed category as a default column
DavidBrightBcGov Jul 2, 2026
a39db23
Merge pull request #2626 from bcgov/bugfix/AB#33663-payment-list-cate…
DavidBrightBcGov Jul 2, 2026
c0cdd7f
features/AB#33374-NotificationsRolePermissions
JamesPasta Jul 2, 2026
e3e436e
Merge pull request #2628 from bcgov/features/AB#33374-NotificationsRo…
JamesPasta Jul 2, 2026
693a4a1
AB#33228: Fix sonarqube issues
aurelio-aot Jul 2, 2026
f35968e
Merge pull request #2627 from bcgov/feature/AB#33228-Cancel-Payment-T…
JamesPasta Jul 2, 2026
c480be2
AB#32307 tighten AI schema and prompt defaults
jacobwillsmith Jul 2, 2026
5a44b84
AB#32307 require application id for queued AI requests
jacobwillsmith Jul 2, 2026
3504189
AB#32307 add prompt metadata defaults in tests
jacobwillsmith Jul 2, 2026
7056f38
AB#32307 keep seeded prompt metadata non-null
jacobwillsmith Jul 2, 2026
12a38a0
AB#32307 finalize AI prompt and generation updates
jacobwillsmith Jul 3, 2026
7868fdf
AB#32307 simplify AI queue status handling
jacobwillsmith Jul 3, 2026
c7e31c6
AB#32307 tighten ai authorization and resolver errors
jacobwillsmith Jul 3, 2026
076c75f
AB#32307 tighten AI generation and configuration access
jacobwillsmith Jul 3, 2026
32f98f8
AB#32307 restore partial AI generation support
jacobwillsmith Jul 3, 2026
26cbb8e
AB#32307 make AI queue async and fail fast
jacobwillsmith Jul 3, 2026
23cc6e3
AB#32307 fix tenant search and ppt slide logging
jacobwillsmith Jul 3, 2026
2a9a53d
AB#32307 refine ai permissions and rate limiting
jacobwillsmith Jul 3, 2026
3d74dee
AB#32307 virtualize prompt lookup app service
jacobwillsmith Jul 3, 2026
103f53a
AB#32307 support v2 AI prompt versions
jacobwillsmith Jul 3, 2026
ff037a9
AB#32307 remove ai default operation fallback
jacobwillsmith Jul 3, 2026
312b44e
AB#32307 align AI analysis contract
jacobwillsmith Jul 3, 2026
7f98724
AB#33673 - Creating DataTable context menus
DavidBrightBcGov Jul 3, 2026
c51a419
AB#33673 - SonarQube es2020 - Prefer `globalThis` over `window`.
DavidBrightBcGov Jul 3, 2026
da1cda0
AB#32307 remove public ai generate-all endpoint
jacobwillsmith Jul 3, 2026
24ca095
AB#32307 tighten AI prompt and queue behavior
jacobwillsmith Jul 3, 2026
84453cb
Merge pull request #2630 from bcgov/feature/AB#33673-datatable-contex…
DavidBrightBcGov Jul 3, 2026
5042bef
AB#32307 tighten AI runtime resolution
jacobwillsmith Jul 3, 2026
9c845e3
AB#32307 clean pipeline job tests
jacobwillsmith Jul 3, 2026
f34c477
AB#32307 normalize prompt metadata json
jacobwillsmith Jul 3, 2026
21066ee
AB#32307 finalize AI runtime cleanup
jacobwillsmith Jul 3, 2026
6aa29a1
AB#32307 fix AI resolver test constructor calls
jacobwillsmith Jul 3, 2026
8d5e2e3
AB#32307 fix AI resolver test stubs
jacobwillsmith Jul 3, 2026
47cb354
AB#32307 fix AI test nullability warnings
jacobwillsmith Jul 3, 2026
80d094a
[AB#33555] Re-apply EF migration
plavoie-BC Jul 6, 2026
fdd5d37
[AB#33555] Re-apply EF migration
plavoie-BC Jul 6, 2026
98b82f0
[AB#33555] Optimize Details Action Bar
plavoie-BC Jul 6, 2026
0dbd0bc
[AB#33555] Update Applicant Portal Submission Provider
plavoie-BC Jul 6, 2026
5b9ec3e
[AB#33555] Fix Submission Info Unit Test
plavoie-BC Jul 6, 2026
84d53ac
AB#33604: Add ApproxNumberOfEmployees in Applications List
aurelio-aot Jul 6, 2026
097335d
AB#33228: Change Status When Cancelling Payment Requests
aurelio-aot Jul 6, 2026
e8bd0b2
Merge pull request #2633 from bcgov/feature/AB#33228-CancelPayment-Up…
JamesPasta Jul 6, 2026
6846985
Merge pull request #2632 from bcgov/bugfix/AB#33604-Missing-ApproxNum…
JamesPasta Jul 6, 2026
737eb5f
AB#33573 - fixed Notifications layout issue
hasanpour Jul 7, 2026
1029093
Merge pull request #2634 from bcgov/bugfix/AB#33573-Notifications-pag…
hasanpour Jul 7, 2026
572ba43
Merge pull request #2622 from bcgov/feature/AB#33555-publish-status
JamesPasta Jul 7, 2026
43ea034
Merge pull request #2606 from bcgov/feature/AB#32307-store-ai-runtime…
JamesPasta Jul 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ public interface IAIGenerationAppService : IApplicationService
Task<ApplicationAnalysisResultDto> GenerateApplicationAnalysisAsync(Guid applicationId, string? promptVersion = null);

Task<ApplicationScoringResultDto> GenerateApplicationScoringAsync(Guid applicationId, string? promptVersion = null);

Task<ApplicationContentResultDto> GenerateContentAsync(Guid applicationId, string? promptVersion = null);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,59 @@ public class AIPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
// AI Permission Group
var aiPermissionsGroup = context.AddGroup(
AIPermissions.GroupName,
L("Permission:AI"));
// AI Permission Group
var aiPermissionsGroup = context.AddGroup(
AIPermissions.GroupName,
L("Permission:AI"));

var aiReporting = aiPermissionsGroup.AddPermission(
AIPermissions.Reporting.ReportingDefault,
L("Permission:AI.Reporting"))
.RequireFeatures("Unity.AIReporting");

var aiReporting = aiPermissionsGroup.AddPermission(
AIPermissions.Reporting.ReportingDefault,
L("Permission:AI.Reporting"))
.RequireFeatures("Unity.AIReporting");
aiReporting.AddChild(
AIPermissions.Reporting.CreateEditDataModel,
L("Permission:AI.Reporting.CreateEditDataModel"))
.RequireFeatures("Unity.AIReporting");

aiReporting.AddChild(
AIPermissions.Reporting.CreateEditDataModel,
L("Permission:AI.Reporting.CreateEditDataModel"))
.RequireFeatures("Unity.AIReporting");
var viewApplicationAnalysis = aiPermissionsGroup.AddPermission(
AIPermissions.Analysis.ViewApplicationAnalysis,
L("Permission:AI.ViewApplicationAnalysis"))
.RequireFeatures("Unity.AI.ApplicationAnalysis");

var viewApplicationAnalysis = aiPermissionsGroup.AddPermission(
AIPermissions.Analysis.ViewApplicationAnalysis,
L("Permission:AI.ViewApplicationAnalysis"))
.RequireFeatures("Unity.AI.ApplicationAnalysis");
viewApplicationAnalysis.AddChild(
AIPermissions.Analysis.GenerateApplicationAnalysis,
L("Permission:AI.GenerateApplicationAnalysis"))
.RequireFeatures("Unity.AI.ApplicationAnalysis");

viewApplicationAnalysis.AddChild(
AIPermissions.Analysis.GenerateApplicationAnalysis,
L("Permission:AI.GenerateApplicationAnalysis"))
.RequireFeatures("Unity.AI.ApplicationAnalysis");
var viewAttachmentSummary = aiPermissionsGroup.AddPermission(
AIPermissions.Analysis.ViewAttachmentSummary,
L("Permission:AI.ViewAttachmentSummary"))
.RequireFeatures("Unity.AI.AttachmentSummaries");

var viewAttachmentSummary = aiPermissionsGroup.AddPermission(
AIPermissions.Analysis.ViewAttachmentSummary,
L("Permission:AI.ViewAttachmentSummary"))
.RequireFeatures("Unity.AI.AttachmentSummaries");
viewAttachmentSummary.AddChild(
AIPermissions.Analysis.GenerateAttachmentSummaries,
L("Permission:AI.GenerateAttachmentSummaries"))
.RequireFeatures("Unity.AI.AttachmentSummaries");

viewAttachmentSummary.AddChild(
AIPermissions.Analysis.GenerateAttachmentSummaries,
L("Permission:AI.GenerateAttachmentSummaries"))
.RequireFeatures("Unity.AI.AttachmentSummaries");
var viewScoringResult = aiPermissionsGroup.AddPermission(
AIPermissions.Analysis.ViewScoringResult,
L("Permission:AI.ViewScoringResult"))
.RequireFeatures("Unity.AI.Scoring");

var viewScoringResult = aiPermissionsGroup.AddPermission(
AIPermissions.Analysis.ViewScoringResult,
L("Permission:AI.ViewScoringResult"))
.RequireFeatures("Unity.AI.Scoring");

viewScoringResult.AddChild(
AIPermissions.Analysis.GenerateScoring,
L("Permission:AI.GenerateScoring"))
.RequireFeatures("Unity.AI.Scoring");

var settingManagement = context.GetGroup(SettingManagementPermissions.GroupName);
var configureAI = settingManagement.AddPermission(
AIPermissions.Configuration.ConfigureAI,
L("Permission:AI.ConfigureAI"));
configureAI.StateCheckers.Add(new AnyFeaturePermissionStateProvider(
"Unity.AI.Scoring",
"Unity.AI.AttachmentSummaries",
"Unity.AI.ApplicationAnalysis"));
viewScoringResult.AddChild(
AIPermissions.Analysis.GenerateScoring,
L("Permission:AI.GenerateScoring"))
.RequireFeatures("Unity.AI.Scoring");

var settingManagement = context.GetGroup(SettingManagementPermissions.GroupName);
var configureAI = settingManagement.AddPermission(
AIPermissions.Configuration.ConfigureAI,
L("Permission:AI.ConfigureAI"));
configureAI.StateCheckers.Add(new AnyFeaturePermissionStateProvider(
"Unity.AI.Scoring",
"Unity.AI.AttachmentSummaries",
"Unity.AI.ApplicationAnalysis"));
}

private static LocalizableString L(string name)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;

namespace Unity.AI.Prompts;

public class AIPromptDto : AuditedEntityDto<Guid>
{
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public PromptType Type { get; set; }
public int VersionNumber { get; set; }
public string SystemPrompt { get; set; } = string.Empty;
public string UserPrompt { get; set; } = string.Empty;
public string? MetadataJson { get; set; }
public bool IsActive { get; set; }
public List<AIPromptVersionDto> Versions { get; set; } = new();
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Unity.AI.Prompts;

public class CreateUpdateAIPromptDto
{
public Guid PromptId { get; set; }

[DisplayName("VersionNumber")]
public int VersionNumber { get; set; }

[Required]
[MaxLength(200)]
[DisplayName("PromptName")]
public string Name { get; set; } = string.Empty;
[DisplayName("SystemPrompt")]
public string SystemPrompt { get; set; } = string.Empty;

[MaxLength(2000)]
[DisplayName("PromptDescription")]
public string? Description { get; set; }
[Required]
[DisplayName("UserPrompt")]
public string UserPrompt { get; set; } = string.Empty;

[DisplayName("PromptType")]
public PromptType Type { get; set; }
[DisplayName("MetadataJson")]
public string? MetadataJson { get; set; }

[DisplayName("PromptIsActive")]
public bool IsActive { get; set; } = true;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ public interface IAIPromptAppService : ICrudAppService<
PagedAndSortedResultRequestDto,
CreateUpdateAIPromptDto>
{
System.Threading.Tasks.Task<ListResultDto<AIPromptDto>> GetByPromptAsync(Guid promptId);
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public Task<string> ExtractTextAsync(string fileName, Stream fileContent, string
{
if (fileContent == null)
{
_logger.LogDebug("File content stream is null for {FileName}", fileName);
return Task.FromResult(string.Empty);
}

Expand All @@ -49,7 +48,6 @@ public Task<string> ExtractTextAsync(string fileName, Stream fileContent, string

if (extension == ".doc")
{
_logger.LogDebug("Legacy .doc extraction is not supported for {FileName}", fileName);
return Task.FromResult(string.Empty);
}

Expand All @@ -63,12 +61,6 @@ public Task<string> ExtractTextAsync(string fileName, Stream fileContent, string
_ => ExtractByContentType(fileName, fileContent, normalizedContentType, cancellationToken)
};

if (string.IsNullOrEmpty(rawText))
{
_logger.LogDebug("No text extraction available for content type {ContentType} with extension {Extension}",
contentType, extension);
}

return Task.FromResult(NormalizeAndLimitText(rawText, fileName));
}
catch (OperationCanceledException)
Expand Down Expand Up @@ -138,12 +130,9 @@ private string ExtractTextFromTextFile(Stream fileContent, CancellationToken can
builder.Append(buffer, 0, Math.Min(read, remaining));
if (builder.Length >= MaxExtractedTextLength)
{
_logger.LogDebug("Truncated text content to {MaxLength} characters", MaxExtractedTextLength);
break;
}
}

_logger.LogDebug("Extracted {CharacterCount} characters from text-based content.", builder.Length);
return builder.ToString();
}
catch (Exception ex)
Expand Down Expand Up @@ -180,7 +169,6 @@ private string ExtractTextFromPdfFile(string fileName, Stream fileContent, Cance
}
}

_logger.LogDebug("Extracted PDF text from {ProcessedPageCount} pages for {FileName}", processedPageCount, fileName);
return builder.ToString();
}
catch (Exception ex)
Expand All @@ -200,11 +188,6 @@ private string ExtractTextFromWordDocx(string fileName, Stream fileContent, Canc
var processedParagraphCount = AppendDocxParagraphText(document, builder, cancellationToken);
var processedTableRowCount = AppendDocxTableText(document, builder, cancellationToken);

_logger.LogDebug(
"Extracted Word text from {ProcessedParagraphCount} paragraphs and {ProcessedTableRowCount} table rows for {FileName}",
processedParagraphCount,
processedTableRowCount,
fileName);
return builder.ToString();
}
catch (Exception ex)
Expand Down Expand Up @@ -324,11 +307,6 @@ private string ExtractTextFromExcelFile(string fileName, Stream fileContent, Can
}
}

_logger.LogDebug(
"Extracted Excel text from {ProcessedSheetCount} sheets and {ProcessedRowCount} rows for {FileName}",
processedSheetCount,
processedRowCount,
fileName);
return builder.ToString();
}
catch (Exception ex)
Expand Down Expand Up @@ -371,7 +349,6 @@ private string ExtractTextFromPowerPointFile(string fileName, Stream fileContent
}
}

_logger.LogDebug("Extracted PowerPoint text from {ProcessedSlideCount} slides for {FileName}", processedSlideCount, fileName);
return builder.ToString();
}
catch (Exception ex)
Expand All @@ -390,14 +367,12 @@ private IEnumerable<ZipArchiveEntry> GetOrderedPowerPointSlideEntries(ZipArchive

if (slideEntriesByName.Count == 0)
{
_logger.LogDebug("No slide entries found in PowerPoint archive.");
return Enumerable.Empty<ZipArchiveEntry>();
}

var orderedSlideNames = TryGetPowerPointSlideOrder(archive);
if (orderedSlideNames.Count == 0)
{
_logger.LogDebug("Using PowerPoint part-name order fallback for {SlideCount} slides.", slideEntriesByName.Count);
return slideEntriesByName.Values
.OrderBy(entry => GetPowerPointSlideNumber(entry.FullName))
.ToList();
Expand All @@ -417,8 +392,6 @@ private IEnumerable<ZipArchiveEntry> GetOrderedPowerPointSlideEntries(ZipArchive
{
orderedEntries.AddRange(slideEntriesByName.Values.OrderBy(entry => GetPowerPointSlideNumber(entry.FullName)));
}

_logger.LogDebug("Resolved PowerPoint presentation order for {SlideCount} slides.", orderedEntries.Count);
return orderedEntries;
}

Expand Down Expand Up @@ -583,7 +556,7 @@ private List<string> TryGetPowerPointSlideOrder(ZipArchive archive)
}
catch (Exception ex)
{
_logger.LogDebug(ex, "Falling back to part-name slide order for PowerPoint extraction.");
_logger.LogDebug(ex, "Could not determine PowerPoint slide order from relationships; falling back to part-name order.");
return new List<string>();
}
}
Expand Down Expand Up @@ -691,7 +664,6 @@ private string NormalizeAndLimitText(string text, string fileName)
if (normalized.Length > MaxExtractedTextLength)
{
normalized = normalized.Substring(0, MaxExtractedTextLength);
_logger.LogDebug("Truncated extracted content to {MaxLength} characters", MaxExtractedTextLength);
}

return normalized;
Expand Down
Loading
Loading