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:
megaproxy 2026-05-28 23:47:06 +01:00
parent 15c2842ce1
commit 00a1e24ecf
10 changed files with 4 additions and 568 deletions

View file

@ -39,26 +39,6 @@ export interface SshHost {
export const listDistros = (): Promise<string[]> => invoke("list_distros");
// ---- claude context tracking ----------------------------------------------
/** One claude session's current context-window occupancy, read from its
* transcript. Mirrors Rust SessionContext. `contextTokens` is the prompt
* size of the last assistant turn (input + both cache buckets). */
export interface SessionContext {
sessionId: string;
cwd: string;
distro: string;
lastActiveMs: number;
contextTokens: number;
model: string;
}
/** Scan ~/.claude/projects in the given WSL distros (distinct distros of open
* WSL panes) and return each recent session's current context occupancy.
* WSL/Windows only returns [] otherwise. */
export const getPaneContext = (distros: string[]): Promise<SessionContext[]> =>
invoke("get_pane_context", { distros });
export const spawnPane = (args: {
spec: SpawnSpec;
cols: number;