Shelve the per-pane context indicator (keep narrow-toolbar fix)
Reliable per-pane context tracking isn't achievable from transcripts: we can't distinguish 'claude is live in this pane' from 'a shell sitting in a directory that recently had a claude session' (claude renders inline, not alt-screen; no WSL foreground-process access), and the 200k-vs-1M window isn't recorded so % is unreliable. Removed the context indicator, its OSC 7 cwd injection (pty.rs), the get_pane_context backend (usage.rs), src/lib/usage.ts, the orchestration paneContext map, and the App poll. The narrow-pane toolbar reflow (leaf--narrow/xnarrow tiers, label shrink, close × pinned) is KEPT — it's verified and independent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
15c2842ce1
commit
00a1e24ecf
10 changed files with 4 additions and 568 deletions
|
|
@ -354,23 +354,6 @@ fn build_command(spec: &SpawnSpec) -> Result<(CommandBuilder, &'static str)> {
|
|||
let resolved_cwd = cwd.as_deref().unwrap_or("~");
|
||||
c.arg("--cd");
|
||||
c.arg(resolved_cwd);
|
||||
// Make the shell report its working directory via OSC 7 on every
|
||||
// prompt, so the frontend can map this pane to the claude session
|
||||
// running in it (the context-fill indicator; see usage.rs +
|
||||
// LeafPane). We set PROMPT_COMMAND in the environment and forward it
|
||||
// through WSLENV — default Ubuntu bash inherits an env-provided
|
||||
// PROMPT_COMMAND. A user shell that hard-assigns PROMPT_COMMAND (or
|
||||
// a non-bash login shell) simply won't report, and the indicator
|
||||
// stays hidden for that pane — no breakage either way.
|
||||
c.env(
|
||||
"PROMPT_COMMAND",
|
||||
r#"printf '\033]7;file://%s%s\033\\' "$HOSTNAME" "$PWD""#,
|
||||
);
|
||||
let wslenv = match std::env::var("WSLENV") {
|
||||
Ok(v) if !v.is_empty() => format!("{v}:PROMPT_COMMAND/u"),
|
||||
_ => "PROMPT_COMMAND/u".to_string(),
|
||||
};
|
||||
c.env("WSLENV", wslenv);
|
||||
Ok((c, "failed to spawn wsl.exe; is WSL installed?"))
|
||||
}
|
||||
SpawnSpec::Powershell => {
|
||||
|
|
@ -512,7 +495,7 @@ fn looks_like_password_prompt(buf: &[u8]) -> bool {
|
|||
// ---- distro enumeration -----------------------------------------------------
|
||||
|
||||
/// Run a process without flashing a console window on Windows.
|
||||
pub(crate) fn quiet_command(program: &str) -> std::process::Command {
|
||||
fn quiet_command(program: &str) -> std::process::Command {
|
||||
let mut c = std::process::Command::new(program);
|
||||
#[cfg(windows)]
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue