Skip to content

Commit 12c6627

Browse files
authored
Refactor WTA helper runtime ownership (#504)
* Refactor WTA helper runtime ownership Move the per-pane helper TUI runtime out of main.rs and into the helper module without changing behavior. Document the broader incremental architecture refactor and correct the crate description. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b3f5f1bc-78dd-4424-9417-88029e6535ad * Remove local refactor plan from PR Keep the architecture roadmap as an untracked local planning document rather than a repository artifact. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b3f5f1bc-78dd-4424-9417-88029e6535ad * Remove redundant helper channel import Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b3f5f1bc-78dd-4424-9417-88029e6535ad * Rename helper TUI module to runtime Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b3f5f1bc-78dd-4424-9417-88029e6535ad --------- Copilot-Session: b3f5f1bc-78dd-4424-9417-88029e6535ad
1 parent 88518f1 commit 12c6627

4 files changed

Lines changed: 1140 additions & 1124 deletions

File tree

tools/wta/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "wta"
33
version = "0.1.0"
44
edition = "2021"
5-
description = "Windows Terminal Agent — ACP TUI client / MCP tool server"
5+
description = "Windows Terminal ACP agent bridge and control CLI"
66
build = "build.rs"
77

88
[[bin]]

tools/wta/src/helper/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
// is passed in and speaks ACP JSON-RPC over it. From the helper's
99
// perspective, master IS the agent.
1010
//
11-
// All App / event-loop machinery is reused from `run_default_tui_over_pipe`;
12-
// the only delta is the ACP transport, which is selected via
13-
// `--connect-master` and threaded down through `run_acp_app`, which drives
14-
// `run_acp_client_over_pipe` against the wta-master pipe.
11+
// The helper implementation lives in `helper/runtime.rs`: WT connection,
12+
// terminal lifecycle, channel wiring, and the event loop.
1513

1614
use anyhow::Result;
1715

1816
use crate::Cli;
1917

18+
mod runtime;
19+
2020
/// Helper-mode entry point. Routes the ACP traffic through a named pipe
2121
/// to the wta-master singleton instead of spawning a private agent CLI
2222
/// subprocess.
2323
pub async fn run_helper_mode(cli: Cli, pipe_name: String) -> Result<()> {
24-
crate::run_default_tui_over_pipe(cli, pipe_name).await
24+
runtime::run_default_tui_over_pipe(cli, pipe_name).await
2525
}

0 commit comments

Comments
 (0)