File tree Expand file tree Collapse file tree 5 files changed +7
-198
lines changed
platform/assets/composables Expand file tree Collapse file tree 5 files changed +7
-198
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ const enterFolderView = (asset: AssetItem) => {
251251 folderExecutionTime .value = executionTimeInSeconds
252252
253253 folderAssets .value = allOutputs .map ((output ) => ({
254- id: ` ${promptId }-${ output .nodeId }-${output .filename } ` ,
254+ id: ` ${output .nodeId }-${output .filename } ` ,
255255 name: output .filename ,
256256 size: 0 ,
257257 created_at: asset .created_at ,
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ export function mapTaskOutputToAssetItem(
3636 }
3737
3838 return {
39- id : ` ${ taskItem . promptId } - ${ output . nodeId } - ${ output . filename } ` ,
39+ id : taskItem . promptId ,
4040 name : output . filename ,
41- size : 0 , // Size not available from history API
41+ size : 0 ,
4242 created_at : taskItem . executionStartTimestamp
4343 ? new Date ( taskItem . executionStartTimestamp ) . toISOString ( )
4444 : new Date ( ) . toISOString ( ) ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { inject } from 'vue'
55import { downloadFile } from '@/base/common/downloadUtil'
66import { t } from '@/i18n'
77import { api } from '@/scripts/api'
8- import { extractPromptIdFromAssetId } from '@/utils/uuidUtil '
8+ import { getOutputAssetMetadata } from '../schemas/assetMetadataSchema '
99
1010import type { AssetMeta } from '../schemas/mediaAssetSchema'
1111import { MediaAssetKey } from '../schemas/mediaAssetSchema'
@@ -59,7 +59,9 @@ export function useMediaAssetActions() {
5959 const asset = mediaContext ?. asset . value
6060 if ( ! asset ) return
6161
62- const promptId = extractPromptIdFromAssetId ( asset . id )
62+ // Get promptId from metadata instead of parsing the ID string
63+ const metadata = getOutputAssetMetadata ( asset . user_metadata )
64+ const promptId = metadata ?. promptId
6365
6466 if ( ! promptId ) {
6567 toast . add ( {
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments