feat: ship agent-first mission control v0.2.57
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Nexus.Api.Data;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Nexus.Api.Repositories;
|
||||
|
||||
@@ -58,6 +59,19 @@ public sealed class ActivityRepository(NexusDbContext db, Nexus.Api.Services.ILi
|
||||
var agentIds = Nexus.Api.Services.AgentActivityText.ExtractAgentIds(activity.Message);
|
||||
activity.Message = Nexus.Api.Services.AgentActivityText.RedactForDisplay(activity.Message);
|
||||
db.Activity.Add(activity);
|
||||
db.OutboxEvents.Add(new OutboxEvent
|
||||
{
|
||||
Type = "activity.created",
|
||||
AggregateType = "activity",
|
||||
AggregateId = activity.TaskId?.ToString() ?? Guid.NewGuid().ToString(),
|
||||
AggregateRevision = 0,
|
||||
PayloadJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
type = activity.Type,
|
||||
taskId = activity.TaskId,
|
||||
agentIds
|
||||
})
|
||||
});
|
||||
await db.SaveChangesAsync(ct);
|
||||
liveUpdates.Publish("activity.created", new
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user