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) {
|
||||
studioMode.value = 'video'
|
||||
// Preview only — never yank Video/Image workspace tabs.
|
||||
outputFocus.value = 'video'
|
||||
watchingLibrary.value = true
|
||||
ensureFamilyExpanded(item)
|
||||
@@ -6316,7 +6316,7 @@ function openClip(item: LibraryClip) {
|
||||
}
|
||||
|
||||
function openStill(still: LibraryStill) {
|
||||
studioMode.value = inferStillPipeline(still) === 'imagev2' ? 'editv2' : 'edit'
|
||||
// Preview only — never yank Video/Image workspace tabs.
|
||||
outputFocus.value = 'edit'
|
||||
browseFolderId.value = still.folderId
|
||||
editResultUrl.value = `/api/library/stills/${still.id}`
|
||||
@@ -6336,13 +6336,14 @@ function applyStillSettings(still: LibraryStill) {
|
||||
folderId.value = still.folderId
|
||||
browseFolderId.value = still.folderId
|
||||
rememberInputSeed(settings?.seed)
|
||||
applyPromptRestore(still.prompt || '', still)
|
||||
// Non-image stills are video start frames — keep Video mode and only restore prompt parts.
|
||||
if (!dest) {
|
||||
studioMode.value = 'video'
|
||||
outputFocus.value = 'video'
|
||||
// Stay on the current Video/Image tab. On Video, only restore prompt for
|
||||
// video-origin stills; image stills are start-frame pixels only.
|
||||
if (!imageStudio.value) {
|
||||
if (!dest) applyPromptRestore(still.prompt || '', still)
|
||||
return
|
||||
}
|
||||
applyPromptRestore(still.prompt || '', still)
|
||||
if (!dest) return
|
||||
if (dest === 'imagev2') {
|
||||
studioMode.value = 'editv2'
|
||||
outputFocus.value = 'edit'
|
||||
@@ -6403,6 +6404,9 @@ async function loadStillAsEditRef(stillId: string) {
|
||||
}
|
||||
|
||||
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 mode = still.settings?.mode
|
||||
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) {
|
||||
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
|
||||
}
|
||||
if (entry.stillGroup) {
|
||||
const stillId = focusedPartId.value || entry.stillGroup.head.id
|
||||
const still = stills.value.find(item => item.id === stillId) || entry.stillGroup.head
|
||||
const imageStill = Boolean(still?.settings?.kind === 'imagev2' || still?.settings?.kind === 'image' || still?.settings?.mode)
|
||||
// Do not force Video/Image — studio stays on whatever tab the user left it on.
|
||||
navigateTo({
|
||||
path: '/',
|
||||
query: { still: stillId, use: '1', studio: imageStill ? 'image' : 'video' }
|
||||
query: { still: stillId, use: '1' }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user