File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ import { runOAuthBrowserFlow } from "./lib/runtime/oauth-browser-flow.js";
186186import { applyRuntimePreemptiveQuotaSettings } from "./lib/runtime/preemptive-quota.js" ;
187187import { ensureRuntimeRefreshGuardian } from "./lib/runtime/refresh-guardian.js" ;
188188import { ensureRuntimeSessionAffinity } from "./lib/runtime/session-affinity.js" ;
189+ import { getRuntimeStatusMarker } from "./lib/runtime/status-marker.js" ;
189190import { showRuntimeToast } from "./lib/runtime/toast.js" ;
190191import { applyRuntimeUiOptions } from "./lib/runtime/ui-runtime.js" ;
191192import { SessionAffinityStore } from "./lib/session-affinity.js" ;
@@ -409,16 +410,7 @@ export const OpenAIOAuthPlugin: Plugin = async ({ client }: PluginInput) => {
409410 const getStatusMarker = (
410411 ui : UiRuntimeOptions ,
411412 status : "ok" | "warning" | "error" ,
412- ) : string => {
413- if ( ! ui . v2Enabled ) {
414- if ( status === "ok" ) return "✓" ;
415- if ( status === "warning" ) return "!" ;
416- return "✗" ;
417- }
418- if ( status === "ok" ) return ui . theme . glyphs . check ;
419- if ( status === "warning" ) return "!" ;
420- return ui . theme . glyphs . cross ;
421- } ;
413+ ) : string => getRuntimeStatusMarker ( ui , status ) ;
422414
423415 const invalidateAccountManagerCache = ( ) : void => {
424416 cachedAccountManager = null ;
Original file line number Diff line number Diff line change 1+ import type { UiRuntimeOptions } from "../ui/runtime.js" ;
2+
3+ export function getRuntimeStatusMarker (
4+ ui : UiRuntimeOptions ,
5+ status : "ok" | "warning" | "error" ,
6+ ) : string {
7+ if ( ! ui . v2Enabled ) {
8+ if ( status === "ok" ) return "✓" ;
9+ if ( status === "warning" ) return "!" ;
10+ return "✗" ;
11+ }
12+ if ( status === "ok" ) return ui . theme . glyphs . check ;
13+ if ( status === "warning" ) return "!" ;
14+ return ui . theme . glyphs . cross ;
15+ }
You can’t perform that action at this time.
0 commit comments