Add tests for ChatHistoryWidget and related features (#3921)

This commit is contained in:
Christian Byrne
2025-05-18 09:16:06 -07:00
committed by GitHub
parent 22dc84324e
commit a7ee3fae05
6 changed files with 385 additions and 8 deletions

View File

@@ -96,8 +96,7 @@ const setPromptInput = (text: string, previousResponseId?: string | null) => {
}
const handleEdit = (index: number) => {
if (!promptInput) return
promptInput ??= widget?.node.widgets?.find((w) => w.name === 'prompt')
editIndex.value = index
const prevResponseId = index === 0 ? 'start' : getPreviousResponseId(index)
const promptText = parsedHistory.value[index]?.prompt ?? ''