@@ -37,14 +36,7 @@ import type { TabItem } from '@/types/comfyManagerTypes'
defineProps<{
tabs: TabItem[]
- selectedTab: TabItem
}>()
-const emit = defineEmits<{
- 'update:selectedTab': [value: TabItem]
-}>()
-
-const handleTabSelection = (tab: TabItem) => {
- emit('update:selectedTab', tab)
-}
+const selectedTab = defineModel('selectedTab')
diff --git a/src/composables/useInstalledPacks.ts b/src/composables/useInstalledPacks.ts
new file mode 100644
index 0000000000..fb79b8f640
--- /dev/null
+++ b/src/composables/useInstalledPacks.ts
@@ -0,0 +1,39 @@
+import { chunk } from 'lodash'
+import { onUnmounted } from 'vue'
+
+import { useComfyManagerStore } from '@/stores/comfyManagerStore'
+import { useComfyRegistryStore } from '@/stores/comfyRegistryStore'
+import { components } from '@/types/comfyRegistryTypes'
+
+const MAX_SIMULTANEOUS_REQUESTS = 8
+
+export const useInstalledPacks = () => {
+ const comfyManagerStore = useComfyManagerStore()
+ const { getPackById, cancelRequests } = useComfyRegistryStore()
+
+ const getInstalledIdsChunks = () =>
+ chunk(
+ Array.from(comfyManagerStore.installedPacksIds),
+ MAX_SIMULTANEOUS_REQUESTS
+ )
+
+ const getInstalledPacks = async () => {
+ const packs: components['schemas']['Node'][] = []
+ for (const packIdsChunk of getInstalledIdsChunks()) {
+ const requests = packIdsChunk.map((id) => getPackById(id))
+ const responses = await Promise.all(requests)
+ responses.forEach((pack) => {
+ if (pack) packs.push(pack)
+ })
+ }
+ return packs
+ }
+
+ onUnmounted(() => {
+ cancelRequests()
+ })
+
+ return {
+ getInstalledPacks
+ }
+}
diff --git a/src/composables/useRegistrySearch.ts b/src/composables/useRegistrySearch.ts
index b322f19b17..1b4d70c682 100644
--- a/src/composables/useRegistrySearch.ts
+++ b/src/composables/useRegistrySearch.ts
@@ -58,7 +58,6 @@ export function useRegistrySearch() {
onUnmounted(() => {
debouncedSearch.cancel() // Cancel debounced searches
registryStore.cancelRequests() // Cancel in-flight requests
- registryStore.clearCache() // Clear cached responses
})
return {
diff --git a/src/locales/en/main.json b/src/locales/en/main.json
index b450c7fa63..2f65277e98 100644
--- a/src/locales/en/main.json
+++ b/src/locales/en/main.json
@@ -92,7 +92,9 @@
"category": "Category",
"sort": "Sort",
"filter": "Filter",
- "apply": "Apply"
+ "apply": "Apply",
+ "enabled": "Enabled",
+ "installed": "Installed"
},
"manager": {
"title": "Custom Nodes Manager",
diff --git a/src/locales/fr/main.json b/src/locales/fr/main.json
index 965b6c5616..8ba976ac2c 100644
--- a/src/locales/fr/main.json
+++ b/src/locales/fr/main.json
@@ -144,6 +144,7 @@
"download": "Télécharger",
"empty": "Vide",
"enableAll": "Activer tout",
+ "enabled": "Activé",
"error": "Erreur",
"experimental": "BETA",
"export": "Exportation",
@@ -158,6 +159,7 @@
"import": "Importer",
"insert": "Insérer",
"install": "Installer",
+ "installed": "Installé",
"installing": "Installation",
"keybinding": "Raccourci clavier",
"loadAllFolders": "Charger tous les dossiers",
diff --git a/src/locales/ja/main.json b/src/locales/ja/main.json
index cd039b4add..1804c767ac 100644
--- a/src/locales/ja/main.json
+++ b/src/locales/ja/main.json
@@ -144,6 +144,7 @@
"download": "ダウンロード",
"empty": "空",
"enableAll": "すべて有効にする",
+ "enabled": "有効",
"error": "エラー",
"experimental": "ベータ",
"export": "エクスポート",
@@ -158,6 +159,7 @@
"import": "インポート",
"insert": "挿入",
"install": "インストール",
+ "installed": "インストール済み",
"installing": "インストール中",
"keybinding": "キーバインディング",
"loadAllFolders": "すべてのフォルダーを読み込む",
diff --git a/src/locales/ko/main.json b/src/locales/ko/main.json
index 14946e8393..94e614105a 100644
--- a/src/locales/ko/main.json
+++ b/src/locales/ko/main.json
@@ -144,6 +144,7 @@
"download": "다운로드",
"empty": "비어 있음",
"enableAll": "모두 활성화",
+ "enabled": "활성화됨",
"error": "오류",
"experimental": "베타",
"export": "내보내기",
@@ -158,6 +159,7 @@
"import": "가져오기",
"insert": "삽입",
"install": "설치",
+ "installed": "설치됨",
"installing": "설치 중",
"keybinding": "키 바인딩",
"loadAllFolders": "모든 폴더 로드",
diff --git a/src/locales/ru/main.json b/src/locales/ru/main.json
index 706f9fb1fa..4fc8993662 100644
--- a/src/locales/ru/main.json
+++ b/src/locales/ru/main.json
@@ -144,6 +144,7 @@
"download": "Скачать",
"empty": "Пусто",
"enableAll": "Включить все",
+ "enabled": "Включено",
"error": "Ошибка",
"experimental": "БЕТА",
"export": "Экспорт",
@@ -158,6 +159,7 @@
"import": "Импорт",
"insert": "Вставить",
"install": "Установить",
+ "installed": "Установлено",
"installing": "Установка",
"keybinding": "Привязка клавиш",
"loadAllFolders": "Загрузить все папки",
diff --git a/src/locales/zh/main.json b/src/locales/zh/main.json
index 00b0fa4a24..1e83fba95d 100644
--- a/src/locales/zh/main.json
+++ b/src/locales/zh/main.json
@@ -144,6 +144,7 @@
"download": "下载",
"empty": "空",
"enableAll": "启用全部",
+ "enabled": "已启用",
"error": "错误",
"experimental": "测试版",
"export": "导出",
@@ -158,6 +159,7 @@
"import": "导入",
"insert": "插入",
"install": "安装",
+ "installed": "已安装",
"installing": "正在安装",
"keybinding": "按键绑定",
"loadAllFolders": "加载所有文件夹",
diff --git a/src/stores/comfyManagerStore.ts b/src/stores/comfyManagerStore.ts
index e2c18e7065..1b3edc7453 100644
--- a/src/stores/comfyManagerStore.ts
+++ b/src/stores/comfyManagerStore.ts
@@ -138,6 +138,7 @@ export const useComfyManagerStore = defineStore('comfyManager', () => {
// Installed packs state
installedPacks,
+ installedPacksIds,
isPackInstalled: isInstalledPackId,
isPackEnabled: isEnabledPackId,