Stop library Open/click from switching Video and Image tabs.
Previewing a still or clip only updates the output pane; Use as input stays on the current workspace instead of forcing Image for image stills. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
-7
@@ -6297,7 +6297,7 @@ async function generateExtension() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openClip(item: LibraryClip) {
|
function openClip(item: LibraryClip) {
|
||||||
studioMode.value = 'video'
|
// Preview only — never yank Video/Image workspace tabs.
|
||||||
outputFocus.value = 'video'
|
outputFocus.value = 'video'
|
||||||
watchingLibrary.value = true
|
watchingLibrary.value = true
|
||||||
ensureFamilyExpanded(item)
|
ensureFamilyExpanded(item)
|
||||||
@@ -6316,7 +6316,7 @@ function openClip(item: LibraryClip) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openStill(still: LibraryStill) {
|
function openStill(still: LibraryStill) {
|
||||||
studioMode.value = inferStillPipeline(still) === 'imagev2' ? 'editv2' : 'edit'
|
// Preview only — never yank Video/Image workspace tabs.
|
||||||
outputFocus.value = 'edit'
|
outputFocus.value = 'edit'
|
||||||
browseFolderId.value = still.folderId
|
browseFolderId.value = still.folderId
|
||||||
editResultUrl.value = `/api/library/stills/${still.id}`
|
editResultUrl.value = `/api/library/stills/${still.id}`
|
||||||
@@ -6336,13 +6336,14 @@ function applyStillSettings(still: LibraryStill) {
|
|||||||
folderId.value = still.folderId
|
folderId.value = still.folderId
|
||||||
browseFolderId.value = still.folderId
|
browseFolderId.value = still.folderId
|
||||||
rememberInputSeed(settings?.seed)
|
rememberInputSeed(settings?.seed)
|
||||||
applyPromptRestore(still.prompt || '', still)
|
// Stay on the current Video/Image tab. On Video, only restore prompt for
|
||||||
// Non-image stills are video start frames — keep Video mode and only restore prompt parts.
|
// video-origin stills; image stills are start-frame pixels only.
|
||||||
if (!dest) {
|
if (!imageStudio.value) {
|
||||||
studioMode.value = 'video'
|
if (!dest) applyPromptRestore(still.prompt || '', still)
|
||||||
outputFocus.value = 'video'
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
applyPromptRestore(still.prompt || '', still)
|
||||||
|
if (!dest) return
|
||||||
if (dest === 'imagev2') {
|
if (dest === 'imagev2') {
|
||||||
studioMode.value = 'editv2'
|
studioMode.value = 'editv2'
|
||||||
outputFocus.value = 'edit'
|
outputFocus.value = 'edit'
|
||||||
@@ -6403,6 +6404,9 @@ async function loadStillAsEditRef(stillId: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function stillUseAsInputMessage(still: LibraryStill) {
|
function stillUseAsInputMessage(still: LibraryStill) {
|
||||||
|
if (!imageStudio.value) {
|
||||||
|
return 'Loaded as start still. Stays on Video — switch to Image only if you want to edit it there.'
|
||||||
|
}
|
||||||
const dest = inferStillPipeline(still)
|
const dest = inferStillPipeline(still)
|
||||||
const mode = still.settings?.mode
|
const mode = still.settings?.mode
|
||||||
if (dest === 'imagev2' && mode === 'generate') return 'Generate settings loaded. Tweak and generate.'
|
if (dest === 'imagev2' && mode === 'generate') return 'Generate settings loaded. Tweak and generate.'
|
||||||
|
|||||||
+3
-4
@@ -1054,16 +1054,15 @@ function openInStudio(entry: LibraryEntry) {
|
|||||||
|
|
||||||
function useInStudio(entry: LibraryEntry) {
|
function useInStudio(entry: LibraryEntry) {
|
||||||
if (entry.kind === 'clip' && entry.group) {
|
if (entry.kind === 'clip' && entry.group) {
|
||||||
navigateTo({ path: '/', query: { clip: focusedPartId.value || entry.group.head.id, use: '1', studio: 'video' } })
|
navigateTo({ path: '/', query: { clip: focusedPartId.value || entry.group.head.id, use: '1' } })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (entry.stillGroup) {
|
if (entry.stillGroup) {
|
||||||
const stillId = focusedPartId.value || entry.stillGroup.head.id
|
const stillId = focusedPartId.value || entry.stillGroup.head.id
|
||||||
const still = stills.value.find(item => item.id === stillId) || entry.stillGroup.head
|
// Do not force Video/Image — studio stays on whatever tab the user left it on.
|
||||||
const imageStill = Boolean(still?.settings?.kind === 'imagev2' || still?.settings?.kind === 'image' || still?.settings?.mode)
|
|
||||||
navigateTo({
|
navigateTo({
|
||||||
path: '/',
|
path: '/',
|
||||||
query: { still: stillId, use: '1', studio: imageStill ? 'image' : 'video' }
|
query: { still: stillId, use: '1' }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user