Claude Code. Any Model. The most powerful AI coding agent now speaks every language.
fix(probe): show the Muse Key line in the interactive --probe screen
Jack Rudenko0c62978a7154
diff --git a/packages/cli/src/probe/probe-chain.ts b/packages/cli/src/probe/probe-chain.tsindex 81cb759a..a2240061 100644--- a/packages/cli/src/probe/probe-chain.ts+++ b/packages/cli/src/probe/probe-chain.ts@@ -144,6 +144,17 @@ function droppedLinkOf(};}+/**+ * The Key line text of a credential that is not an env var:+ * `<effectiveLabel> (<effectiveSource>)`, e.g.+ * `Muse Code borrowed copy · Muse Code Power Usage (signed this probe request)`.+ * Undefined for an env-var key, whose line the printer builds itself.+ */+export function keyLineText(provenance: KeyProvenance | undefined): string | undefined {+ if (!provenance?.effectiveLabel) return undefined;+ return `${provenance.effectiveLabel} (${provenance.effectiveSource})`;+}+/** The fields the printer, the TUI and the JSON share, taken from the explanation. */export interface ProbeRoutingFields {routingSource: RouteExplanation["source"];@@ -199,6 +210,7 @@ export function resultLinksFrom(...(link.credentialHint ? { credentialHint: link.credentialHint } : {}),...(link.notProbed ? { notProbed: link.notProbed } : {}),...(link.probe ? { probe: link.probe } : {}),+ ...withKeyLine(link.provenance),})),...dropped.map(@@ -216,3 +228,8 @@ export function resultLinksFrom(),];}++function withKeyLine(provenance: KeyProvenance | undefined): { keyLine?: string } {+ const keyLine = keyLineText(provenance);+ return keyLine ? { keyLine } : {};+}diff --git a/packages/cli/src/probe/probe-tui-app.tsx b/packages/cli/src/probe/probe-tui-app.tsxindex ada8c6fb..0356b7e6 100644--- a/packages/cli/src/probe/probe-tui-app.tsx+++ b/packages/cli/src/probe/probe-tui-app.tsx@@ -89,6 +89,11 @@ export interface ProbeResultLink {notProbed?: "native-auth";/** Set on a candidate the routing chain dropped: why. Never probed. */dropped?: DroppedOutcome;+ /**+ * The Key line of a credential that is not an env var (`keyLineText`):+ * `Muse Code borrowed copy · Muse Code Power Usage (signed this probe request)`.+ */+ keyLine?: string;}/**@@ -1043,6 +1048,12 @@ function DetailModel({? `wire (${winner.displayName}): ${wiring.wireSummary ?? `${wiring.effectiveStreamFormat} · ${wiring.modelTranslator}`} · ${formatContextWindow(wiring.contextWindow)} ctx`: "wire: —";+ // Key line — the credential of the link that answered, else of the first link+ // that carries one (a kept hop that failed, or a dropped no-login candidate).+ // Only a credential that is not an env var has one (Muse Code's login source+ // and tier, Vertex's project), the same text the static printer prints.+ const keyLine = (winner?.keyLine ? winner : result.links.find((l) => l.keyLine))?.keyLine;+// ── Routing advisor ────────────────────────────────────────────────// Full route: the ordered chain of providers claudish would try — the kept// hops only, each with its tier label. Dropped rows are listed above, not here.@@ -1143,6 +1154,12 @@ function DetailModel({<text><span fg={C.dim}>{` ${wireLine}`}</span></text>+ {keyLine && (+ <text>+ <span fg={C.dim}>{" Key "}</span>+ <span fg={C.fgMuted}>{keyLine}</span>+ </text>+ )}{/* Routing advisor — full route + (when picked ≠ fastest) the rule to add */}<text><span fg={C.dim}>{" route: "}</span>