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:
Towsty
2026-09-04 13:26:05 -05:00
co-authored by Cursor
parent 5ffb65706f
commit 1155edc3bd
2 changed files with 14 additions and 11 deletions
+11 -7
View File
@@ -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.'