Fix for history items sometimes not appearing again

New items from the history endpoint were being ignored due to the sorting based on priority, and left out of the merge
Fixed by removing that optimization so they all go through merge.
This commit is contained in:
Jennifer Weber
2025-08-26 16:14:53 -07:00
committed by Jennifer Weber
parent a0d66bb0d7
commit 68f0275a83

View File

@@ -437,10 +437,6 @@ export const useQueueStore = defineStore('queue', () => {
tasks.value.flatMap((task: TaskItemImpl) => task.flatten())
)
const lastHistoryQueueIndex = computed<number>(() =>
historyTasks.value.length ? historyTasks.value[0].queueIndex : -1
)
const hasPendingTasks = computed<boolean>(() => pendingTasks.value.length > 0)
const update = async () => {
@@ -471,11 +467,7 @@ export const useQueueStore = defineStore('queue', () => {
const allIndex = new Set<number>(
history.History.map((item: TaskItem) => item.prompt.priority)
)
const newHistoryItems = toClassAll(
history.History.filter(
(item) => item.prompt.priority > lastHistoryQueueIndex.value
)
)
const newHistoryItems = toClassAll(history.History)
const existingHistoryItems = historyTasks.value.filter((item) =>
allIndex.has(item.queueIndex)
)
@@ -524,7 +516,6 @@ export const useQueueStore = defineStore('queue', () => {
tasks,
flatTasks,
lastHistoryQueueIndex,
hasPendingTasks,
update,