[PR #23024] [CLOSED] fix: preserve prefilled input value in input event dialog #50025

Closed
opened 2026-04-30 02:29:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23024
Author: @yang1002378395-cmyk
Created: 3/25/2026
Status: Closed

Base: devHead: fix-prefilled-input-reset-v2


📝 Commits (1)

  • dc22bb2 fix: preserve prefilled input value in input event dialog

📊 Changes

2 files changed (+5 additions, -1 deletions)

View changed files

📝 src/lib/components/chat/Chat.svelte (+3 -0)
📝 src/lib/components/common/ConfirmDialog.svelte (+2 -1)

📄 Description

Summary

Fixes #23019

Problem

When sending an input event call with a prefilled value, the value was being reset to empty on subsequent calls.

Root Cause

Commit fb26be7 introduced logic to reset the input value when showing the dialog to avoid accidentally sending previous user input. However, this reset was applied unconditionally, even when the value was intentionally prefilled by the event caller.

Solution

Add a prefilled prop to ConfirmDialog.svelte that prevents the reset when the value was set by the event caller:

  1. Added prefilled prop to ConfirmDialog.svelte
  2. Modified the reset logic to skip when prefilled=true
  3. Added eventConfirmationPrefilled state in Chat.svelte
  4. Set prefilled=true when data.value exists

This preserves the intended behavior of clearing stale user input while allowing prefilled values to persist.

Testing

Manually tested with input event calls containing prefilled values - the value now persists correctly on repeated calls.

CLA

I have read and agree to the Contributor License Agreement.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/23024 **Author:** [@yang1002378395-cmyk](https://github.com/yang1002378395-cmyk) **Created:** 3/25/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix-prefilled-input-reset-v2` --- ### 📝 Commits (1) - [`dc22bb2`](https://github.com/open-webui/open-webui/commit/dc22bb226e6ad9a467d449fcd978d4e96948e062) fix: preserve prefilled input value in input event dialog ### 📊 Changes **2 files changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Chat.svelte` (+3 -0) 📝 `src/lib/components/common/ConfirmDialog.svelte` (+2 -1) </details> ### 📄 Description ## Summary Fixes #23019 ### Problem When sending an input event call with a prefilled value, the value was being reset to empty on subsequent calls. ### Root Cause Commit fb26be7 introduced logic to reset the input value when showing the dialog to avoid accidentally sending previous user input. However, this reset was applied unconditionally, even when the value was intentionally prefilled by the event caller. ### Solution Add a `prefilled` prop to `ConfirmDialog.svelte` that prevents the reset when the value was set by the event caller: 1. Added `prefilled` prop to `ConfirmDialog.svelte` 2. Modified the reset logic to skip when `prefilled=true` 3. Added `eventConfirmationPrefilled` state in `Chat.svelte` 4. Set `prefilled=true` when `data.value` exists This preserves the intended behavior of clearing stale user input while allowing prefilled values to persist. ### Testing Manually tested with input event calls containing prefilled values - the value now persists correctly on repeated calls. ### CLA I have read and agree to the Contributor License Agreement. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-30 02:29:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#50025