[PR #23021] [CLOSED] fix: prefilled input value resets when sending input event call #50024

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

📋 Pull Request Information

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

Base: mainHead: fix-prefilled-input-reset


📝 Commits (1)

  • b3575ff fix: prefilled input value resets when sending input event call

📊 Changes

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

View changed files

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

📄 Description

Summary

Fixes #23019

Problem

When sending an event call of type input with a prefilled value, the prefilled value is reset and sent empty on subsequent calls.

Root Cause

Commit fb26be7 introduced a reset in init() that clears inputValue every time the dialog shows, even when the value is intentionally prefilled.

Solution

  • Added prefilled prop to ConfirmDialog.svelte
  • Only reset inputValue when !prefilled
  • Pass prefilled={!!eventConfirmationInputValue} from Chat.svelte

Testing

  1. Create a filter function that sends an input event with prefilled value
  2. Trigger multiple prompts
  3. Verify prefilled value persists on subsequent calls

Files Changed

  • src/lib/components/common/ConfirmDialog.svelte: Added prefilled prop and conditional reset
  • src/lib/components/chat/Chat.svelte: Pass prefilled prop based on inputValue existence

🔄 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/23021 **Author:** [@yang1002378395-cmyk](https://github.com/yang1002378395-cmyk) **Created:** 3/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-prefilled-input-reset` --- ### 📝 Commits (1) - [`b3575ff`](https://github.com/open-webui/open-webui/commit/b3575ffd196d192e95c3bf24a67cdce5758d68ac) fix: prefilled input value resets when sending input event call ### 📊 Changes **2 files changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Chat.svelte` (+1 -0) 📝 `src/lib/components/common/ConfirmDialog.svelte` (+2 -1) </details> ### 📄 Description ## Summary Fixes #23019 ## Problem When sending an event call of type `input` with a prefilled `value`, the prefilled value is reset and sent empty on subsequent calls. ## Root Cause Commit fb26be7 introduced a reset in `init()` that clears `inputValue` every time the dialog shows, even when the value is intentionally prefilled. ## Solution - Added `prefilled` prop to `ConfirmDialog.svelte` - Only reset `inputValue` when `!prefilled` - Pass `prefilled={!!eventConfirmationInputValue}` from `Chat.svelte` ## Testing 1. Create a filter function that sends an input event with prefilled value 2. Trigger multiple prompts 3. Verify prefilled value persists on subsequent calls ## Files Changed - `src/lib/components/common/ConfirmDialog.svelte`: Added `prefilled` prop and conditional reset - `src/lib/components/chat/Chat.svelte`: Pass `prefilled` prop based on inputValue existence --- <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:53 -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#50024