Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tools/wta/src/agent_pane_origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pub fn append_default(session_id: &str, pane_session_id: Option<&str>) {
tracing::warn!(
target: "agent_pane_origin",
session_id = %session_id,
path = %path.display(),
error = %err,
"failed to append origin record",
);
Expand Down
7 changes: 0 additions & 7 deletions tools/wta/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3131,7 +3131,6 @@ impl App {
tracing::warn!(
target: "agents_view",
key = %key,
cwd = %raw_cwd_string,
"dispatch_resume: stored cwd is no longer a valid directory; falling back to profile default",
);
}
Expand All @@ -3149,8 +3148,6 @@ impl App {
argv.push("-d".to_string());
argv.push(cwd.clone());
}
let cwd_string = valid_cwd.clone().unwrap_or_default();

// Optimistic state flip: bump Historical/Ended -> Idle so a rapid
// second Enter on the same row sees a non-terminal status and
// skips this branch (idempotent: ResumeDispatched no-ops on live
Expand Down Expand Up @@ -3186,7 +3183,6 @@ impl App {
cli = %cli_id,
commandline = %commandline,
launch_commandline = %launch_commandline,
cwd = %cwd_string,
"dispatch_resume: new-tab scheduled",
);

Expand Down Expand Up @@ -3331,7 +3327,6 @@ impl App {
tracing::warn!(
target: "agents_view",
key = %key,
cwd = %raw_cwd_string,
"dispatch_resume_in_agent_pane: stored cwd is no longer a valid directory; omitting from resume_in_new_agent_tab event",
);
}
Expand Down Expand Up @@ -3359,7 +3354,6 @@ impl App {
tracing::info!(
target: "agents_view",
key = %s.key,
cwd = %cwd_string,
"dispatch_resume_in_agent_pane: resume_in_new_agent_tab event published",
);

Expand Down Expand Up @@ -5423,7 +5417,6 @@ impl App {
target: "acp_load_session",
tab_id,
session_id,
cwd = ?cwd,
"inbound load_session event from WT"
);
if tab_id.is_empty() || session_id.is_empty() {
Expand Down
7 changes: 3 additions & 4 deletions tools/wta/src/coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,10 @@ async fn execute_choice(
.unwrap_or(DelegatePromptDelivery::LaunchThenSend);
let target_label = open_target_label(target);
coordinator_log(&format!(
"open_and_send begin target={} parent={:?} agent={:?} cwd={:?} title={:?} direction={:?} delivery_mode={} input_chars={}",
"open_and_send begin target={} parent={:?} agent={:?} title={:?} direction={:?} delivery_mode={} input_chars={}",
target_label,
parent,
agent,
cwd,
title,
direction,
delegate_prompt_delivery_label(delivery_mode),
Expand Down Expand Up @@ -511,8 +510,8 @@ async fn execute_choice(
} => {
let target_label = open_target_label(target);
coordinator_log(&format!(
"open begin target={} parent={:?} cwd={:?} title={:?} direction={:?}",
target_label, parent, cwd, title, direction
"open begin target={} parent={:?} title={:?} direction={:?}",
target_label, parent, title, direction
));
let _ = event_tx.send(AppEvent::ExecutionInfo(format!(
"Opening {}.",
Expand Down
8 changes: 3 additions & 5 deletions tools/wta/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ async fn run_delegate(
cwd: Option<&str>,
) -> Result<()> {
// Log the prompt length, not the text — the prompt is user content.
tracing::info!(prompt_chars = prompt.map(|p| p.chars().count()), agent = agent_cmd, cwd, "run_delegate started");
tracing::info!(prompt_chars = prompt.map(|p| p.chars().count()), agent = agent_cmd, "run_delegate started");
Comment thread
vanzue marked this conversation as resolved.
tracing::trace!(target: "delegate.content", prompt = ?prompt, "run_delegate prompt");

let (debug_tx, _) = tokio::sync::mpsc::unbounded_channel::<app::DebugMessage>();
Expand Down Expand Up @@ -1718,8 +1718,8 @@ async fn delegate_with_context(

// The commandline bakes in the user prompt (`-i "<prompt>"`); keep it out
// of the debug log and only emit it at trace.
tracing::debug!(cwd, "delegate_with_context: launching");
tracing::trace!(target: "delegate.content", commandline, cwd, "delegate_with_context commandline");
tracing::debug!("delegate_with_context: launching");
tracing::trace!(target: "delegate.content", commandline, "delegate_with_context commandline");

shell_mgr
.wt_create_tab(Some(&commandline), cwd, None)
Expand Down Expand Up @@ -2567,7 +2567,6 @@ async fn run_acp_app(
if v.is_none() {
tracing::warn!(
target: "acp_load_session",
cwd = %s,
"--initial-load-cwd refers to a missing directory; dropping from load_session params",
);
}
Expand All @@ -2577,7 +2576,6 @@ async fn run_acp_app(
target: "acp_load_session",
session_id = sid,
tab_id = %tab_id,
cwd = ?cwd,
"queueing boot-time initial load_session via AppEvent::WtEvent"
);
let mut params = serde_json::Map::new();
Expand Down
25 changes: 9 additions & 16 deletions tools/wta/src/master/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ use std::sync::{Arc, OnceLock, Weak};
/// helper sharing this master.
const NOTIF_CHANNEL_CAPACITY: usize = 1024;
const SESSION_NEW_TIMEOUT_SECS: u64 = 120;
const MASTER_PIPE_DISCOVERY_FILE: &str = "master-pipe.txt";

use acp::Agent as _;
use acp::Client as _;
Expand Down Expand Up @@ -493,7 +494,6 @@ impl acp::Client for MasterClient {
op = "write_text_file",
helper_id = ?helper_id,
session_id = ?sid,
path = ?args.path,
"forwarding fs/write_text_file to helper"
);
forwarder.write_text_file(args).await
Expand All @@ -511,7 +511,6 @@ impl acp::Client for MasterClient {
op = "read_text_file",
helper_id = ?helper_id,
session_id = ?sid,
path = ?args.path,
"forwarding fs/read_text_file to helper"
);
forwarder.read_text_file(args).await
Expand All @@ -532,14 +531,6 @@ impl acp::Client for MasterClient {
args_len = args.args.len(),
"forwarding terminal/create to helper"
);
// Command line can carry user/file content — trace only.
tracing::trace!(
target: "master.content",
session_id = ?sid,
command = %args.command,
args = ?args.args,
"create_terminal command"
);
forwarder.create_terminal(args).await
}

Expand Down Expand Up @@ -800,7 +791,6 @@ impl acp::Agent for HelperHandler {
step = "helper→agent",
op = "new_session",
helper_id = ?self.helper_id,
cwd = ?args.cwd,
mcp_servers = args.mcp_servers.len(),
pane_session_id = ?wta_meta.pane_session_id,
"forwarding new_session"
Expand Down Expand Up @@ -1312,7 +1302,8 @@ impl MasterPipeDiscoveryGuard {
if let Err(err) = std::fs::create_dir_all(parent) {
tracing::warn!(
target: "master",
path = %path.display(),
discovery_file = MASTER_PIPE_DISCOVERY_FILE,
pipe_name = %pipe_name,
error = %err,
"failed to create master pipe discovery directory"
);
Comment thread
vanzue marked this conversation as resolved.
Expand All @@ -1325,14 +1316,15 @@ impl MasterPipeDiscoveryGuard {
match std::fs::write(path, pipe_name) {
Ok(()) => tracing::info!(
target: "master",
path = %path.display(),
discovery_file = MASTER_PIPE_DISCOVERY_FILE,
pipe_name = %pipe_name,
"master pipe discovery file written"
),
Err(err) => {
tracing::warn!(
target: "master",
path = %path.display(),
discovery_file = MASTER_PIPE_DISCOVERY_FILE,
pipe_name = %pipe_name,
error = %err,
"failed to write master pipe discovery file"
);
Comment thread
vanzue marked this conversation as resolved.
Expand Down Expand Up @@ -1362,7 +1354,8 @@ impl Drop for MasterPipeDiscoveryGuard {
if let Err(err) = std::fs::remove_file(path) {
tracing::warn!(
target: "master",
path = %path.display(),
discovery_file = MASTER_PIPE_DISCOVERY_FILE,
pipe_name = %self.pipe_name,
error = %err,
"failed to remove master pipe discovery file"
);
Comment thread
vanzue marked this conversation as resolved.
Expand Down Expand Up @@ -2312,7 +2305,7 @@ where
tracing::info!(
target: "session_hook",
session_id = %sid.0,
new_title = %disk_title,
title_len = disk_title.chars().count(),
"upgraded synthetic title from on-disk session artefacts",
Comment thread
vanzue marked this conversation as resolved.
);
}
Expand Down
4 changes: 1 addition & 3 deletions tools/wta/src/protocol/acp/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,13 +929,12 @@ fn truncate_for_prompt(text: &str, max_chars: usize) -> String {
fn format_pane_context_summary(pane_context: Option<&PaneContext>) -> String {
match pane_context {
Some(context) => format!(
"pane_id={:?} tab_id={:?} window_id={:?} source_pane_id={:?} effective_source_pane_id={:?} cwd={:?}",
"pane_id={:?} tab_id={:?} window_id={:?} source_pane_id={:?} effective_source_pane_id={:?}",
context.pane_id,
context.tab_id,
context.window_id,
context.source_pane_id,
context.effective_source_pane_id(),
context.cwd
),
None => "none".to_string(),
}
Expand Down Expand Up @@ -3331,7 +3330,6 @@ async fn run_inner(
let cwd = active_pane_cwd
.clone()
.unwrap_or_else(|| std::env::current_dir().unwrap_or_default());
startup_probe.log(&format!("Using session cwd={}", cwd.display()));
let session_future = conn.new_session(acp::NewSessionRequest::new(cwd));
let session = tokio::time::timeout(std::time::Duration::from_secs(15), session_future)
.await
Expand Down
Loading