@@ -197,7 +197,7 @@ export namespace Config {
197197
198198 if ( Flag . AICTRL_PERMISSION ) {
199199 const permission = JSON . parse ( Flag . AICTRL_PERMISSION )
200- warnDeprecatedLsp ( { permission } , "AICTRL_PERMISSION" )
200+ warnRemovedKeys ( { permission } , "AICTRL_PERMISSION" )
201201 result . permission = mergeDeep ( result . permission ?? { } , permission )
202202 }
203203
@@ -217,14 +217,6 @@ export namespace Config {
217217
218218 if ( ! result . username ) result . username = os . userInfo ( ) . username
219219
220- // `snapshot` toggled the removed worktree snapshots (#181). It stays valid so old configs still load.
221- if ( result . snapshot !== undefined ) log . warn ( "config key `snapshot` is deprecated and ignored" )
222-
223- // Handle migration from autoshare to share field
224- if ( result . autoshare === true && ! result . share ) {
225- result . share = "auto"
226- }
227-
228220 // Apply flag overrides for compaction settings
229221 if ( Flag . AICTRL_DISABLE_AUTOCOMPACT ) {
230222 result . compaction = { ...result . compaction , auto : false }
@@ -781,8 +773,6 @@ export namespace Config {
781773 stash_delete : z . string ( ) . optional ( ) . default ( "ctrl+d" ) . describe ( "Delete stash entry" ) ,
782774 model_provider_list : z . string ( ) . optional ( ) . default ( "ctrl+a" ) . describe ( "Open provider list from model dialog" ) ,
783775 model_favorite_toggle : z . string ( ) . optional ( ) . default ( "ctrl+f" ) . describe ( "Toggle model favorite status" ) ,
784- session_share : z . string ( ) . optional ( ) . default ( "none" ) . describe ( "Share current session" ) ,
785- session_unshare : z . string ( ) . optional ( ) . default ( "none" ) . describe ( "Unshare current session" ) ,
786776 session_interrupt : z . string ( ) . optional ( ) . default ( "escape" ) . describe ( "Interrupt current session" ) ,
787777 session_compact : z . string ( ) . optional ( ) . default ( "<leader>c" ) . describe ( "Compact the session" ) ,
788778 messages_page_up : z . string ( ) . optional ( ) . default ( "pageup,ctrl+alt+b" ) . describe ( "Scroll messages up by one page" ) ,
@@ -1009,16 +999,8 @@ export namespace Config {
1009999 . boolean ( )
10101000 . optional ( )
10111001 . describe ( "@deprecated Worktree snapshots were removed; this key is accepted and ignored." ) ,
1012- share : z
1013- . enum ( [ "manual" , "auto" , "disabled" ] )
1014- . optional ( )
1015- . describe (
1016- "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing" ,
1017- ) ,
1018- autoshare : z
1019- . boolean ( )
1020- . optional ( )
1021- . describe ( "@deprecated Use 'share' field instead. Share newly created sessions automatically" ) ,
1002+ share : z . unknown ( ) . optional ( ) . describe ( "@deprecated Session sharing was removed; this key is ignored." ) ,
1003+ autoshare : z . unknown ( ) . optional ( ) . describe ( "@deprecated Session sharing was removed; this key is ignored." ) ,
10221004 autoupdate : z
10231005 . union ( [ z . boolean ( ) , z . literal ( "notify" ) ] )
10241006 . optional ( )
@@ -1101,11 +1083,7 @@ export namespace Config {
11011083 layout : Layout . optional ( ) . describe ( "@deprecated Always uses stretch layout." ) ,
11021084 permission : Permission . optional ( ) ,
11031085 tools : z . record ( z . string ( ) , z . boolean ( ) ) . optional ( ) ,
1104- enterprise : z
1105- . object ( {
1106- url : z . string ( ) . optional ( ) . describe ( "Enterprise URL" ) ,
1107- } )
1108- . optional ( ) ,
1086+ enterprise : z . unknown ( ) . optional ( ) . describe ( "@deprecated Session sharing was removed; this key is ignored." ) ,
11091087 compaction : z
11101088 . object ( {
11111089 auto : z . boolean ( ) . optional ( ) . describe ( "Enable automatic compaction when context is full (default: true)" ) ,
@@ -1185,14 +1163,20 @@ export namespace Config {
11851163 return load ( text , { path : filepath } )
11861164 }
11871165
1188- // The LSP subsystem was removed (#144). Configs written before then may still set the
1189- // `lsp` block or an `lsp` permission rule. The schema accepts both as no-ops and keeps
1190- // them, so rewriting a config file preserves them; each config file that sets one warns once.
1191- function warnDeprecatedLsp ( config : Record < string , unknown > , source : string ) {
1192- const permission = config . permission
1193- const hasLspPermission = typeof permission === "object" && permission !== null && "lsp" in permission
1194- if ( ! ( "lsp" in config ) && ! hasLspPermission ) return
1195- log . warn ( "lsp config is deprecated and ignored; the LSP subsystem was removed" , { path : source } )
1166+ // Config keys of subsystems that were removed: LSP (#144), worktree snapshots (#181) and
1167+ // session sharing (#189; `enterprise.url` was the share service URL). The schema accepts them
1168+ // as no-ops and keeps them, so rewriting a config file preserves them; each config source
1169+ // that sets any warns once.
1170+ function removedKeys ( config : Record < string , unknown > ) {
1171+ const keys = [ "lsp" , "snapshot" , "share" , "autoshare" , "enterprise" ] . filter ( ( key ) => key in config )
1172+ if ( isRecord ( config . permission ) && "lsp" in config . permission ) keys . push ( "permission.lsp" )
1173+ return keys
1174+ }
1175+
1176+ function warnRemovedKeys ( config : Record < string , unknown > , source : string ) {
1177+ const keys = removedKeys ( config )
1178+ if ( keys . length === 0 ) return
1179+ log . warn ( `deprecated config is ignored, its subsystem was removed: ${ keys . join ( ", " ) } ` , { path : source } )
11961180 }
11971181
11981182 async function load ( text : string , options : { path : string } | { dir : string ; source : string } ) {
@@ -1207,7 +1191,7 @@ export namespace Config {
12071191 const normalized = ( ( ) => {
12081192 if ( ! data || typeof data !== "object" || Array . isArray ( data ) ) return data
12091193 const copy = { ...( data as Record < string , unknown > ) }
1210- warnDeprecatedLsp ( copy , source )
1194+ warnRemovedKeys ( copy , source )
12111195 const hadLegacy = "theme" in copy || "keybinds" in copy || "tui" in copy
12121196 if ( ! hadLegacy ) return copy
12131197 delete copy . theme
0 commit comments