@@ -112,7 +112,7 @@ import { runFiableMode, filterByTierOrExit, fetchOpenRouterFreeModels } from '..
112112import { PROVIDER_METADATA , ENV_VAR_NAMES , isWindows , isMac } from '../src/provider-metadata.js'
113113import { parseTelemetryEnv , isTelemetryDebugEnabled , telemetryDebug , ensureTelemetryConfig , getTelemetryDistinctId , getTelemetrySystem , getTelemetryTerminal , isTelemetryEnabled , sendUsageTelemetry } from '../src/telemetry.js'
114114import { ensureFavoritesConfig , toFavoriteKey , syncFavoriteFlags , toggleFavoriteModel , reorderFavorite , pruneOrphanedFavorites } from '../src/favorites.js'
115- import { checkForUpdateDetailed , checkForUpdate , runUpdate , promptUpdateNotification , fetchLastReleaseDate } from './updater.js'
115+ import { checkForUpdateDetailed , checkForUpdate , runUpdate , fetchLastReleaseDate } from './updater.js'
116116import { promptApiKey } from '../src/setup.js'
117117import { syncShellEnv , ensureShellRcSource , promptShellEnvMigration , removeShellEnv } from '../src/shell-env.js'
118118import { stripAnsi , maskApiKey , displayWidth , padEndDisplay , tintOverlayLines , keepOverlayTargetVisible , sliceOverlayLines , calculateViewport , sortResultsWithPinnedFavorites , adjustScrollOffset } from '../src/render-helpers.js'
@@ -315,27 +315,12 @@ export async function runApp(cliArgs, config) {
315315 saveConfig ( config )
316316 }
317317
318- // 📖 Show interactive update prompt if a new version is available (skip in dev mode)
318+ // 📖 Auto-update: if a new version is available, install it immediately (skip in dev mode)
319+ // 📖 runUpdate() will relaunch the process with the new version after install completes
319320 if ( latestVersion && ! isDevMode ) {
320- const choice = await promptUpdateNotification ( latestVersion )
321- if ( choice === 'update' ) {
322- runUpdate ( latestVersion )
323- return // 📖 runUpdate relaunches the process — this line is a safety guard
324- } else if ( choice === 'changelogs' ) {
325- const { execSync : _exec } = await import ( 'child_process' )
326- const url = 'https://github.com/vava-nessa/free-coding-models/releases'
327- try {
328- if ( process . platform === 'darwin' ) _exec ( `open ${ url } ` )
329- else if ( process . platform === 'linux' ) _exec ( `xdg-open ${ url } ` )
330- else console . log ( chalk . dim ( ` 📋 ${ url } ` ) )
331- } catch { console . log ( chalk . dim ( ` 📋 ${ url } ` ) ) }
332- // 📖 After opening changelogs, re-prompt so user can still update or continue
333- const choice2 = await promptUpdateNotification ( latestVersion )
334- if ( choice2 === 'update' ) {
335- runUpdate ( latestVersion )
336- return
337- }
338- }
321+ console . log ( chalk . dim ( ` ⬆ New version v${ latestVersion } detected, updating...` ) )
322+ runUpdate ( latestVersion )
323+ return // 📖 runUpdate relaunches the process — this line is a safety guard
339324 }
340325
341326 // 📖 Dynamic OpenRouter free model discovery — fetch live free models from API
0 commit comments