feat(worker): in-app interactive session service, replacing the wt terminal launch
InteractiveSessionService resolves a task's list working dir + seeded prompt, spawns a StreamingClaudeSession (claude stream-json in the list dir, model+auto as before), registers it in LiveSessionRegistry, streams output over TaskMessage, and broadcasts InteractiveSessionStarted/Ended (an exit watcher fires Ended). The hub's OpenInteractiveTerminalAsync now starts this in-app session; SendInteractiveMessage and StopInteractiveSession route to it. The external Windows-Terminal interactive launch (LaunchInteractiveAsync / InteractiveLaunchContext / OpenInteractiveAsync) is removed; planning sessions keep their terminal launch.
This commit is contained in:
@@ -21,7 +21,7 @@ public sealed class ClearMyDayHubTests : IDisposable
|
||||
null!, null!, null!, null!, broadcaster, _db.CreateFactory(),
|
||||
null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!,
|
||||
null!, new ClaudeDo.Worker.Online.OnlineInboxConfig(), new ClaudeDo.Worker.Online.OnlineTokenStore(),
|
||||
new ClaudeDo.Worker.Runner.PendingQuestionRegistry());
|
||||
new ClaudeDo.Worker.Runner.PendingQuestionRegistry(), null!);
|
||||
hub.Clients = new FakeHubCallerClients(new RecordingClientProxy());
|
||||
hub.Context = new FakeHubCallerContext();
|
||||
return hub;
|
||||
|
||||
@@ -31,7 +31,7 @@ public sealed class OnlineInboxHubTests : IDisposable
|
||||
var hub = new WorkerHub(
|
||||
null!, null!, null!, null!, broadcaster, null!,
|
||||
null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!,
|
||||
cfg, inboxCfg, store, new ClaudeDo.Worker.Runner.PendingQuestionRegistry());
|
||||
cfg, inboxCfg, store, new ClaudeDo.Worker.Runner.PendingQuestionRegistry(), null!);
|
||||
hub.Clients = new FakeHubCallerClients(new RecordingClientProxy());
|
||||
hub.Context = new FakeHubCallerContext();
|
||||
return (hub, inboxCfg, store);
|
||||
|
||||
@@ -57,7 +57,7 @@ public sealed class PlanningHubTests : IDisposable
|
||||
null!, null!, null!, null!, null!, null!, null!, null!, null!,
|
||||
_planning, _launcher, null!, null!, null!, null!, null!, null!, null!, null!,
|
||||
null!, new ClaudeDo.Worker.Online.OnlineInboxConfig(), new ClaudeDo.Worker.Online.OnlineTokenStore(),
|
||||
new ClaudeDo.Worker.Runner.PendingQuestionRegistry());
|
||||
new ClaudeDo.Worker.Runner.PendingQuestionRegistry(), null!);
|
||||
hub.Clients = new FakeHubCallerClients(_proxy);
|
||||
hub.Context = new FakeHubCallerContext();
|
||||
return hub;
|
||||
@@ -179,7 +179,6 @@ internal sealed class FakeTerminalLauncher : ITerminalLauncher
|
||||
public bool ShouldThrow { get; set; }
|
||||
public int LaunchStartCalls { get; private set; }
|
||||
public int LaunchResumeCalls { get; private set; }
|
||||
public int LaunchInteractiveCalls { get; private set; }
|
||||
|
||||
public Task LaunchPlanningStartAsync(PlanningSessionStartContext ctx, CancellationToken cancellationToken)
|
||||
{
|
||||
@@ -193,13 +192,6 @@ internal sealed class FakeTerminalLauncher : ITerminalLauncher
|
||||
LaunchResumeCalls++;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task LaunchInteractiveAsync(InteractiveLaunchContext ctx, CancellationToken cancellationToken)
|
||||
{
|
||||
if (ShouldThrow) throw new TerminalLaunchException("fake launch failure");
|
||||
LaunchInteractiveCalls++;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class RecordingClientProxy : IClientProxy
|
||||
|
||||
@@ -21,7 +21,7 @@ public sealed class WorktreeStateHubTests : IDisposable
|
||||
null!, null!, null!, null!, broadcaster, _db.CreateFactory(),
|
||||
null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!, null!,
|
||||
null!, new ClaudeDo.Worker.Online.OnlineInboxConfig(), new ClaudeDo.Worker.Online.OnlineTokenStore(),
|
||||
new ClaudeDo.Worker.Runner.PendingQuestionRegistry());
|
||||
new ClaudeDo.Worker.Runner.PendingQuestionRegistry(), null!);
|
||||
hub.Clients = new FakeHubCallerClients(new RecordingClientProxy());
|
||||
hub.Context = new FakeHubCallerContext();
|
||||
return hub;
|
||||
|
||||
Reference in New Issue
Block a user