refactor(ui): remove pick-up-in-terminal, keep ConPTY as the single session entry
Two context-menu entries opened a Claude session for the same task via different mechanisms (embedded ConPTY vs. an external wt terminal). Drop the external-terminal path entirely, including its worker hub method, launcher plumbing, and localization keys, since the embedded ConPTY session already covers every case it did.
This commit is contained in:
@@ -24,10 +24,12 @@ using ClaudeDo.Data.Models;
|
||||
|
||||
namespace ClaudeDo.Worker.Planning;
|
||||
|
||||
// Spawns the Claude CLI inside a visible Windows Terminal window. Used for every
|
||||
// human-driven session: an interactive planning session (start/resume) and the ad-hoc
|
||||
// "Run interactively" action. Headless task execution does NOT come through here — that
|
||||
// path is ClaudeProcess (prompt over stdin, no terminal).
|
||||
// Spawns the Claude CLI inside a visible Windows Terminal window for an interactive
|
||||
// planning session (start/resume). Headless task execution does NOT come through here —
|
||||
// that path is ClaudeProcess (prompt over stdin, no terminal) — nor does an embedded
|
||||
// ConPTY interactive session (IInteractiveLaunchSpecService), which reuses this class's
|
||||
// arg-building helpers (BuildResumeArgs, BuildPlanningStart/ResumeArgs) for a bare
|
||||
// Exe/Args pair instead of a wrapped pwsh command line.
|
||||
public sealed class WindowsTerminalLauncher : ITerminalLauncher
|
||||
{
|
||||
private const string AllowedTools = "mcp__claudedo__*,Read,Grep,Glob,WebFetch,WebSearch,Skill";
|
||||
@@ -84,26 +86,6 @@ public sealed class WindowsTerminalLauncher : ITerminalLauncher
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task LaunchResumeAsync(string workingDir, string claudeSessionId, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!Directory.Exists(workingDir))
|
||||
throw new TerminalLaunchException($"Working directory does not exist: {workingDir}");
|
||||
|
||||
var resolvedWt = ResolveWtOrThrow();
|
||||
var resolvedClaude = ResolveClaudeOrThrow();
|
||||
|
||||
var command = BuildResumeCommand(resolvedClaude, claudeSessionId);
|
||||
|
||||
StartInWindowsTerminal(resolvedWt, workingDir, command, static _ => { });
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// Resumes a session by id with no extra flags: the user drives every tool approval in the
|
||||
// terminal, unlike planning which additionally allowlists its MCP planning tools.
|
||||
internal static string BuildResumeCommand(string claudePath, string claudeSessionId) =>
|
||||
BuildPwshCommand(claudePath, BuildResumeArgs(claudeSessionId));
|
||||
|
||||
// The raw claude CLI args for a --resume launch, shared with InteractiveLaunchSpecService
|
||||
// (which needs the bare Exe/Args pair for a ConPTY host, not a wrapped pwsh command line).
|
||||
internal static IReadOnlyList<string> BuildResumeArgs(string claudeSessionId) =>
|
||||
|
||||
Reference in New Issue
Block a user