feat: implement dynamic knowledge graph updates and state management services

This commit is contained in:
2026-04-26 14:53:48 +02:00
parent 412320980f
commit 7859c9806f
30 changed files with 668 additions and 153 deletions
@@ -0,0 +1,25 @@
using NexusReader.Application.Queries.Graph;
namespace NexusReader.UI.Shared.Services;
public sealed class KnowledgeGraphService : IKnowledgeGraphService
{
public GraphDataDto? CurrentGraphData { get; private set; }
public string? ActiveNodeId { get; private set; }
public event Action? OnGraphUpdated;
public event Action<string>? OnActiveNodeChanged;
public void UpdateGraph(GraphDataDto newData)
{
CurrentGraphData = newData;
OnGraphUpdated?.Invoke();
}
public void SetActiveNode(string nodeId)
{
if (ActiveNodeId == nodeId) return;
ActiveNodeId = nodeId;
OnActiveNodeChanged?.Invoke(nodeId);
}
}