@@ -179,14 +179,18 @@ export function makeTargetedProviderUpdateAction(
179179export function makeManualOnlyProviderMaintenanceCapabilities ( input : {
180180 readonly provider : ProviderDriverKind ;
181181 readonly packageName : string | null ;
182+ readonly installPath ?: string ;
182183} ) : ProviderMaintenanceCapabilities {
183- return makeProviderMaintenanceCapabilities ( {
184- provider : input . provider ,
185- packageName : input . packageName ,
186- updateExecutable : null ,
187- updateArgs : [ ] ,
188- updateLockKey : null ,
189- } ) ;
184+ return {
185+ ...makeProviderMaintenanceCapabilities ( {
186+ provider : input . provider ,
187+ packageName : input . packageName ,
188+ updateExecutable : null ,
189+ updateArgs : [ ] ,
190+ updateLockKey : null ,
191+ } ) ,
192+ ...( input . installPath ? { installPath : input . installPath } : { } ) ,
193+ } ;
190194}
191195
192196export function normalizeCommandPath ( commandPath : string ) : string {
@@ -345,13 +349,17 @@ export const resolvePackageManagedProviderMaintenance = Effect.fn(
345349 definition : PackageManagedProviderMaintenanceDefinition ,
346350 context : ProviderMaintenanceResolutionContext | null ,
347351) {
352+ if ( ! context ) {
353+ return makeManualOnlyProviderMaintenanceCapabilities ( {
354+ provider : definition . provider ,
355+ packageName : definition . npmPackageName ,
356+ } ) ;
357+ }
348358 const manual = makeManualOnlyProviderMaintenanceCapabilities ( {
349359 provider : definition . provider ,
350360 packageName : definition . npmPackageName ,
361+ installPath : context . realCommandPath ,
351362 } ) ;
352- if ( ! context ) {
353- return manual ;
354- }
355363 const commandPaths = [ context . resolvedCommandPath , context . realCommandPath ] ;
356364 const packageName = definition . npmPackageName ;
357365 // WinGet owns these files: `claude update` only reports "managed by winget"
@@ -647,10 +655,20 @@ export const makeCachedProviderMaintenanceResolution = Effect.fn(
647655 options ?. fresh ? Cache . invalidate ( cache , undefined ) . pipe ( Effect . andThen ( cached ) ) : cached ;
648656} ) ;
649657
658+ /**
659+ * An install T3 Code cannot update gets no Update button or command, so its
660+ * message names the version and the executable instead.
661+ */
662+ function manualUpdateMessage ( latestVersion : string , installPath : string | undefined ) : string {
663+ return installPath
664+ ? `Version ${ latestVersion } is out. T3 Code runs ${ installPath } ; update it with the app or tool that installed it.`
665+ : `Version ${ latestVersion } is out. Update it with the app or tool that installed it.` ;
666+ }
667+
650668function deriveVersionAdvisory ( input : {
651669 readonly currentVersion : string | null ;
652670 readonly latestVersion : string | null ;
653- readonly compareVersions ?: ( current : string , latest : string ) => number ;
671+ readonly capabilities : ProviderMaintenanceCapabilities ;
654672} ) : Pick < ServerProviderVersionAdvisory , "status" | "message" > {
655673 if ( ! input . currentVersion ) {
656674 return { status : "unknown" , message : null } ;
@@ -659,11 +677,17 @@ function deriveVersionAdvisory(input: {
659677 return { status : "unknown" , message : null } ;
660678 }
661679 if (
662- ( input . compareVersions ?? compareSemverVersions ) ( input . currentVersion , input . latestVersion ) < 0
680+ ( input . capabilities . compareVersions ?? compareSemverVersions ) (
681+ input . currentVersion ,
682+ input . latestVersion ,
683+ ) < 0
663684 ) {
664685 return {
665686 status : "behind_latest" ,
666- message : PROVIDER_UPDATE_ACTION_TOAST_MESSAGE ,
687+ message :
688+ input . capabilities . update === null
689+ ? manualUpdateMessage ( input . latestVersion , input . capabilities . installPath )
690+ : PROVIDER_UPDATE_ACTION_TOAST_MESSAGE ,
667691 } ;
668692 }
669693 return { status : "current" , message : null } ;
@@ -682,7 +706,7 @@ export function createProviderVersionAdvisory(input: {
682706 const advisory = deriveVersionAdvisory ( {
683707 currentVersion : input . currentVersion ,
684708 latestVersion,
685- ... ( capabilities . compareVersions ? { compareVersions : capabilities . compareVersions } : { } ) ,
709+ capabilities,
686710 } ) ;
687711
688712 return {
0 commit comments