@@ -20,14 +20,6 @@ import { ProviderConfigRepo } from "../storage/repositories/provider-config-repo
2020import { SUPERVISOR_EVALUATION_TIMEOUT_SETTING_KEY } from "../supervisor/settings.js" ;
2121import { registerCommand } from "../ws/dispatch.js" ;
2222
23- const EMPTY_CODEX_AUDIT = {
24- codex : {
25- configPath : "" ,
26- exists : false ,
27- findings : [ ] ,
28- } ,
29- } ;
30-
3123// Settings schema
3224const SettingsSchema = z . object ( {
3325 defaultProviderId : z . string ( ) . optional ( ) ,
@@ -95,16 +87,6 @@ registerCommand("settings.get", z.object({}), async (_args, ctx) => {
9587 ) ;
9688 }
9789
98- // Surface config drift (Codex config.toml interfering settings) so the
99- // web UI can show a banner + cleanup action. Cheap to compute on every
100- // settings.get — it's a single file read + a couple regex passes.
101- try {
102- settings . externalConfigAudit = ctx . codexConfigAudit ?. audit ( ) ?? EMPTY_CODEX_AUDIT ;
103- } catch {
104- // Never let a broken audit take down settings fetch.
105- settings . externalConfigAudit = null ;
106- }
107-
10890 if ( Object . prototype . hasOwnProperty . call ( settings , SUPERVISOR_EVALUATION_TIMEOUT_SETTING_KEY ) ) {
10991 settings [ SUPERVISOR_EVALUATION_TIMEOUT_SETTING_KEY ] = resolveSupervisorEvaluationTimeoutSec (
11092 settings [ SUPERVISOR_EVALUATION_TIMEOUT_SETTING_KEY ]
@@ -160,29 +142,6 @@ registerCommand(
160142 }
161143) ;
162144
163- // settings.cleanupCodexConfig — user opts in to removing interfering entries
164- // from `~/.codex/config.toml`. A backup is written next to the file before
165- // any mutation; the backup path is returned so the UI can show it.
166- registerCommand (
167- "settings.cleanupCodexConfig" ,
168- z . object ( {
169- removeIds : z . array ( z . enum ( [ "toml_notify" , "toml_codex_hooks" ] ) ) . min ( 1 ) ,
170- } ) ,
171- async ( args , ctx ) => {
172- const result = ctx . codexConfigAudit ?. cleanup ( args . removeIds ) ?? {
173- removed : [ ] ,
174- backupPath : null ,
175- noop : true ,
176- } ;
177- return {
178- removed : result . removed ,
179- backupPath : result . backupPath ,
180- noop : result . noop ,
181- audit : ctx . codexConfigAudit ?. audit ( ) ?? EMPTY_CODEX_AUDIT ,
182- } ;
183- }
184- ) ;
185-
186145// settings.previewCommand
187146registerCommand (
188147 "settings.previewCommand" ,
0 commit comments