@@ -47,6 +47,38 @@ function renderStatusLine(segments: string[]): string {
4747 return segments.join(STATUS_SEP);
4848 }
4949
50+interface StatusBarRenderData {
51+ model: string;
52+ provider: string;
53+ cwd: string;
54+ gitBranch: string | null;
55+ sessionId: string;
56+ inputTokens: number;
57+ outputTokens: number;
58+ contextTokens: number;
59+ contextWindow: number | null;
60+ thinkingEffort?: string | null;
61+ activeAgent?: string | null;
62+ showReasoning?: boolean;
63+}
64+
65+export function buildStatusBarSignature(opts: StatusBarRenderData): string {
66+ return JSON.stringify({
67+ model: opts.model,
68+ provider: opts.provider,
69+ cwd: opts.cwd,
70+ gitBranch: opts.gitBranch,
71+ sessionId: opts.sessionId,
72+ inputTokens: opts.inputTokens,
73+ outputTokens: opts.outputTokens,
74+ contextTokens: opts.contextTokens,
75+ contextWindow: opts.contextWindow,
76+ thinkingEffort: opts.thinkingEffort ?? null,
77+ activeAgent: opts.activeAgent ?? null,
78+ showReasoning: opts.showReasoning ?? false,
79+ });
80+}
81+
5082 function fitStatusSegments(
5183 required: string[],
5284 optional: string[],
@@ -72,27 +104,13 @@ function fitStatusSegments(
72104 return `${required[0]}${STATUS_SEP}${c.dim(truncatedTail)}`;
73105 }
74106
75-export function renderStatusBar(opts: {
76- model: string;
77- provider: string;
78- cwd: string;
79- gitBranch: string | null;
80- sessionId: string;
81- inputTokens: number;
82- outputTokens: number;
83- contextTokens: number;
84- contextWindow: number | null;
85- thinkingEffort?: string | null;
86- activeAgent?: string | null;
87- showReasoning?: boolean;
88-}): void {
107+export function renderStatusBar(opts: StatusBarRenderData): void {
89108 const cols = Math.max(20, terminal.stdoutColumns || 80);
90109 const required = [c.cyan(opts.model), c.dim(opts.cwd)];
91110 const optional: string[] = [];
92111
93112 if (opts.activeAgent) optional.push(c.green(`@${opts.activeAgent}`));
94113 if (opts.thinkingEffort) optional.push(c.dim(`✦ ${opts.thinkingEffort}`));
95- if (opts.showReasoning) optional.push(c.dim("reasoning"));
96114 if (opts.provider && opts.provider !== "zen") {
97115 optional.push(c.dim(opts.provider));
98116 }