@@ -57,8 +57,9 @@ function fmtVer(v: SemVer3): string {
5757 return v . join ( "." ) ;
5858}
5959
60+ /** 绑定启用态文案:bindOk / sources list 共用(DRY),走 packs.list i18n */
6061function bindingEnabledLabel ( enabled : boolean ) : string {
61- return enabled ? " on" : " off";
62+ return enabled ? t ( "packs.list. on") . trim ( ) : t ( "packs.list. off") . trim ( ) ;
6263}
6364
6465/** 未配置源时的统一文案(DRY:入口勿各自拼 needKey) */
@@ -230,9 +231,9 @@ export async function probeSourceAfterInstall(opts: {
230231 uuid : opts . info . uuid ,
231232 provider : providerShortLabel ( best . hit . provider ) ,
232233 slug : best . hit . slug ,
234+ /* 报告实际写入的 binding.enabled(LSP),勿再并列一份 cfg 派生字段 */
233235 enabled : bindingEnabledLabel ( binding . enabled ) ,
234236 path : packSourcesPath ( ) ,
235- enabled : cfg . defaultBindingEnabled ? t ( "packs.list.on" ) . trim ( ) : t ( "packs.list.off" ) . trim ( ) ,
236237 } ) ,
237238 "success"
238239 ) ;
@@ -302,7 +303,8 @@ export function formatSourcesList(): string {
302303 return lines . join ( "\n" ) ;
303304 }
304305 for ( const { bpUuid, binding } of bindings ) {
305- const en = binding . enabled ? c . green ( t ( "packs.list.on" ) . trim ( ) ) : c . dim ( t ( "packs.list.off" ) . trim ( ) ) ;
306+ const label = bindingEnabledLabel ( binding . enabled ) ;
307+ const en = binding . enabled ? c . green ( label ) : c . dim ( label ) ;
306308 const tag = providerShortLabel ( binding . provider ) ;
307309 lines . push (
308310 ` [${ en } ] ${ bpUuid } ${ tag } :${ binding . slug || binding . projectId } ${ c . dim ( binding . websiteUrl || "" ) } `
@@ -442,14 +444,11 @@ async function prepareCheck(
442444 * 远程 BP 版本未更高:无需覆盖安装,但仍记下 fileId,
443445 * 否则每次启动都会重复下载同一归档(lastApplied 一直为空)。
444446 */
447+ binding . lastFileId = file . fileId ;
445448 if ( ! decision . remoteNewer ) {
446449 binding . lastAppliedFileId = file . fileId ;
447- binding . lastFileId = file . fileId ;
448- setBinding ( bpUuid , binding ) ;
449- } else {
450- binding . lastFileId = file . fileId ;
451- setBinding ( bpUuid , binding ) ;
452450 }
451+ setBinding ( bpUuid , binding ) ;
453452
454453 return withLocalBp (
455454 {
0 commit comments