mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-12 00:20:15 +00:00
[bugfix] Fix enable pack functionality to use proper API endpoint (#6157)
## Summary - Fixed issue where enabling a disabled pack incorrectly triggered installation instead of using the dedicated enable endpoint - Added proper `enablePack` method in the manager service layer - Updated store and component to use the correct API call ## Problem When users toggled a disabled pack to enable it via `PackEnableToggle` component, the system was incorrectly calling the install endpoint with full installation parameters instead of the simpler enable endpoint that only requires the pack ID. ## Solution 1. **Added dedicated `enablePack` method in `comfyManagerService.ts`**: - Uses the `'enable'` task kind with `EnablePackParams` - Only requires `cnr_id` parameter (simpler than install) 2. **Updated `comfyManagerStore.ts`**: - Created proper `enablePack` function that queues an enable task - Removed the incorrect aliasing where `enablePack` was pointing to `installPack` 3. **Simplified `PackEnableToggle.vue`**: - Now calls `enablePack` with only required parameters (id, version) - Removed unnecessary installation-specific parameters ## Test plan - [x] Enable a disabled pack and verify it uses the enable endpoint (not install) - [x] Confirm the pack is properly enabled after the operation - [x] Check that the task queue shows "Enabling" message (not "Installing") - [x] Verify existing install/uninstall functionality still works Fixes #6154 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6157-bugfix-Fix-enable-pack-functionality-to-use-proper-API-endpoint-2926d73d3650819fa4caf1b848f99735) by [Unito](https://www.unito.io) --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -228,6 +228,14 @@ export const useComfyManagerService = () => {
|
||||
return queueTask('disable', params, ui_id, signal)
|
||||
}
|
||||
|
||||
const enablePack = async (
|
||||
params: components['schemas']['EnablePackParams'],
|
||||
ui_id?: string,
|
||||
signal?: AbortSignal
|
||||
): Promise<null> => {
|
||||
return queueTask('enable', params, ui_id, signal)
|
||||
}
|
||||
|
||||
const updatePack = async (
|
||||
params: components['schemas']['UpdatePackParams'],
|
||||
ui_id?: string,
|
||||
@@ -321,7 +329,7 @@ export const useComfyManagerService = () => {
|
||||
getImportFailInfoBulk,
|
||||
installPack,
|
||||
uninstallPack,
|
||||
enablePack: installPack, // enable is done via install
|
||||
enablePack,
|
||||
disablePack,
|
||||
updatePack,
|
||||
updateAllPacks,
|
||||
|
||||
Reference in New Issue
Block a user