|
@@ -170,6 +170,7 @@ async function runBackgroundUpdateCheck(
|
|
|
'[auto-update-checker] Already on latest version for channel:',
|
|
'[auto-update-checker] Already on latest version for channel:',
|
|
|
channel,
|
|
channel,
|
|
|
);
|
|
);
|
|
|
|
|
+ showStagedSkillsReviewToast(ctx, stagedSkillsThisUpdate);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -198,6 +199,7 @@ async function runBackgroundUpdateCheck(
|
|
|
8000,
|
|
8000,
|
|
|
);
|
|
);
|
|
|
log('[auto-update-checker] Auto-update disabled, notification only');
|
|
log('[auto-update-checker] Auto-update disabled, notification only');
|
|
|
|
|
+ showStagedSkillsReviewToast(ctx, stagedSkillsThisUpdate);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -224,12 +226,12 @@ async function runBackgroundUpdateCheck(
|
|
|
try {
|
|
try {
|
|
|
const syncResult = syncBundledSkillsFromPackage(packageRoot);
|
|
const syncResult = syncBundledSkillsFromPackage(packageRoot);
|
|
|
installedSkills = syncResult.installed;
|
|
installedSkills = syncResult.installed;
|
|
|
- for (const skill of [...syncResult.installed, ...syncResult.adopted]) {
|
|
|
|
|
- stagedSkillsThisUpdate.delete(skill);
|
|
|
|
|
- }
|
|
|
|
|
for (const skill of syncResult.stagedThisSync) {
|
|
for (const skill of syncResult.stagedThisSync) {
|
|
|
stagedSkillsThisUpdate.add(skill);
|
|
stagedSkillsThisUpdate.add(skill);
|
|
|
}
|
|
}
|
|
|
|
|
+ for (const skill of [...syncResult.installed, ...syncResult.adopted]) {
|
|
|
|
|
+ stagedSkillsThisUpdate.delete(skill);
|
|
|
|
|
+ }
|
|
|
if (syncResult.failed.length > 0) {
|
|
if (syncResult.failed.length > 0) {
|
|
|
log(
|
|
log(
|
|
|
`[auto-update-checker] Skill sync warnings/failures: ${syncResult.failed.join(', ')}`,
|
|
`[auto-update-checker] Skill sync warnings/failures: ${syncResult.failed.join(', ')}`,
|
|
@@ -322,6 +324,21 @@ function showMajorUpgradeToast(ctx: PluginInput, version: string): void {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function showStagedSkillsReviewToast(
|
|
|
|
|
+ ctx: PluginInput,
|
|
|
|
|
+ stagedSkills: ReadonlySet<string>,
|
|
|
|
|
+): void {
|
|
|
|
|
+ if (stagedSkills.size === 0) return;
|
|
|
|
|
+
|
|
|
|
|
+ showToast(
|
|
|
|
|
+ ctx,
|
|
|
|
|
+ 'Skill updates need review',
|
|
|
|
|
+ `Manual review required: ${[...stagedSkills].join(', ')}`,
|
|
|
|
|
+ 'info',
|
|
|
|
|
+ 8000,
|
|
|
|
|
+ );
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
export function getAutoUpdateInstallDir(): string {
|
|
export function getAutoUpdateInstallDir(): string {
|
|
|
return resolveInstallContext()?.installDir ?? CACHE_DIR;
|
|
return resolveInstallContext()?.installDir ?? CACHE_DIR;
|
|
|
}
|
|
}
|