feat(skills): flag unmanaged skills with a green dot on the Import button

- Add an optional `enabled` flag to useScanUnmanagedSkills; the Skills panel
  scans once on mount (enabled:true), with 30s staleTime + keepPreviousData to
  dedupe disk IO across navigations.
- App subscribes to the shared query (enabled:false) and renders a green dot +
  tooltip on the top-bar Import button when unmanaged skills are available.
This commit is contained in:
Jason
2026-06-24 23:47:04 +08:00
parent a4eb5f3778
commit f1328d89fc
3 changed files with 28 additions and 4 deletions
+2 -1
View File
@@ -90,8 +90,9 @@ const UnifiedSkillsPanel = React.forwardRef<
const toggleAppMutation = useToggleSkillApp();
const uninstallMutation = useUninstallSkill();
const restoreBackupMutation = useRestoreSkillBackup();
// enabled: true —— 进入 Skill 页面时自动静默扫描一次(绿点提示来源)
const { data: unmanagedSkills, refetch: scanUnmanaged } =
useScanUnmanagedSkills();
useScanUnmanagedSkills({ enabled: true });
const importMutation = useImportSkillsFromApps();
const installFromZipMutation = useInstallSkillsFromZip();
const {