diff --git a/src/platform/assets/composables/useMediaAssets/useAssetsApi.ts b/src/platform/assets/composables/useMediaAssets/useAssetsApi.ts index 9e3036d03..77e408a6d 100644 --- a/src/platform/assets/composables/useMediaAssets/useAssetsApi.ts +++ b/src/platform/assets/composables/useMediaAssets/useAssetsApi.ts @@ -31,7 +31,7 @@ export function useAssetsApi() { try { // For input directory, just return assets without history if (directory === 'input') { - const assets = await assetService.getAssetsByTag(directory) + const assets = await assetService.getAssetsByTag(directory, false) // Process assets to truncate long filenames for display return assets.map((asset) => ({ ...asset, diff --git a/src/platform/assets/services/assetService.ts b/src/platform/assets/services/assetService.ts index 626a52d20..f0f8afdd1 100644 --- a/src/platform/assets/services/assetService.ts +++ b/src/platform/assets/services/assetService.ts @@ -190,11 +190,21 @@ function createAssetService() { * Gets assets filtered by a specific tag * * @param tag - The tag to filter by (e.g., 'models') + * @param includePublic - Whether to include public assets (default: true) * @returns Promise - Full asset objects filtered by tag, excluding missing assets */ - async function getAssetsByTag(tag: string): Promise { + async function getAssetsByTag( + tag: string, + includePublic: boolean = true + ): Promise { + const queryParams = new URLSearchParams({ + include_tags: tag, + limit: DEFAULT_LIMIT.toString(), + include_public: includePublic ? 'true' : 'false' + }) + const data = await handleAssetRequest( - `${ASSETS_ENDPOINT}?include_tags=${tag}&limit=${DEFAULT_LIMIT}`, + `${ASSETS_ENDPOINT}?${queryParams.toString()}`, `assets for tag ${tag}` )