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 { applyRuntimePreemptiveQuotaSettings } from "./lib/runtime/preemptive-qu
186186import { ensureRuntimeRefreshGuardian } from "./lib/runtime/refresh-guardian.js" ;
187187import { ensureRuntimeSessionAffinity } from "./lib/runtime/session-affinity.js" ;
188188import { showRuntimeToast } from "./lib/runtime/toast.js" ;
189+ import { applyRuntimeUiOptions } from "./lib/runtime/ui-runtime.js" ;
189190import { SessionAffinityStore } from "./lib/session-affinity.js" ;
190191import { registerCleanup } from "./lib/shutdown.js" ;
191192import {
@@ -392,10 +393,11 @@ export const OpenAIOAuthPlugin: Plugin = async ({ client }: PluginInput) => {
392393 const applyUiRuntimeFromConfig = (
393394 pluginConfig : ReturnType < typeof loadPluginConfig > ,
394395 ) : UiRuntimeOptions => {
395- return setUiRuntimeOptions ( {
396- v2Enabled : getCodexTuiV2 ( pluginConfig ) ,
397- colorProfile : getCodexTuiColorProfile ( pluginConfig ) ,
398- glyphMode : getCodexTuiGlyphMode ( pluginConfig ) ,
396+ return applyRuntimeUiOptions ( pluginConfig , {
397+ setUiRuntimeOptions,
398+ getCodexTuiV2,
399+ getCodexTuiColorProfile,
400+ getCodexTuiGlyphMode,
399401 } ) ;
400402 } ;
401403
Original file line number Diff line number Diff line change 1+ import type { UiRuntimeOptions } from "../ui/runtime.js" ;
2+
3+ export function applyRuntimeUiOptions < TConfig > (
4+ pluginConfig : TConfig ,
5+ deps : {
6+ setUiRuntimeOptions : (
7+ options : Partial < Omit < UiRuntimeOptions , "theme" > > ,
8+ ) => UiRuntimeOptions ;
9+ getCodexTuiV2 : ( config : TConfig ) => boolean ;
10+ getCodexTuiColorProfile : (
11+ config : TConfig ,
12+ ) => UiRuntimeOptions [ "colorProfile" ] ;
13+ getCodexTuiGlyphMode : ( config : TConfig ) => UiRuntimeOptions [ "glyphMode" ] ;
14+ } ,
15+ ) : UiRuntimeOptions {
16+ return deps . setUiRuntimeOptions ( {
17+ v2Enabled : deps . getCodexTuiV2 ( pluginConfig ) ,
18+ colorProfile : deps . getCodexTuiColorProfile ( pluginConfig ) ,
19+ glyphMode : deps . getCodexTuiGlyphMode ( pluginConfig ) ,
20+ } ) ;
21+ }
You can’t perform that action at this time.
0 commit comments