feat(lora-cycler): reset execution state on manual index change

Reset execution state when user manually changes LoRA index to ensure next execution starts from the user-set index. This prevents stale execution state from interfering with user-initiated index changes.
This commit is contained in:
Will Miao
2026-01-31 09:04:26 +08:00
parent 60df2df324
commit 66babf9ee1
3 changed files with 12 additions and 3 deletions

View File

@@ -56,6 +56,12 @@ const getPoolConfig = (): LoraPoolConfig | null => {
// Handle index update from user
const handleIndexUpdate = async (newIndex: number) => {
// Reset execution state when user manually changes index
// This ensures the next execution starts from the user-set index
;(props.widget as any)[HAS_EXECUTED] = false
state.executionIndex.value = null
state.nextIndex.value = null
state.setIndex(newIndex)
// Refresh list to update current LoRA display