fix(worker): register TaskRepository in DI and guard null WorkingDir

This commit is contained in:
mika kuns
2026-04-23 23:17:30 +02:00
parent 6cb20a9213
commit c048264b95
2 changed files with 5 additions and 2 deletions

View File

@@ -63,6 +63,9 @@ builder.Services.AddSingleton(sp =>
builder.Services.AddSingleton<IPlanningTerminalLauncher, WindowsTerminalPlanningLauncher>();
builder.Services.AddHttpContextAccessor();
builder.Services.AddScoped<PlanningMcpContextAccessor>();
builder.Services.AddScoped<ClaudeDoDbContext>(sp =>
sp.GetRequiredService<IDbContextFactory<ClaudeDoDbContext>>().CreateDbContext());
builder.Services.AddScoped<TaskRepository>();
builder.Services.AddScoped<PlanningMcpService>();
builder.Services.AddMcpServer()
.WithHttpTransport()