[PR #15032] [CLOSED] Feat: Placeholder Variable Replacement Modal #46739

Closed
opened 2026-04-29 21:38:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/15032
Author: @Classic298
Created: 6/16/2025
Status: Closed

Base: devHead: feat/prompt-variable-input-modal


📝 Commits (6)

  • b5f4c85 Merge pull request #15014 from open-webui/dev
  • 29de096 Update MessageInput.svelte
  • 6e10c3f Update Commands.svelte
  • 2d24e97 Update Prompts.svelte
  • 86125eb Create VariableInputModal.svelte
  • 7d54714 Add feature to display prompt in modal and better formatting and description

📊 Changes

4 files changed (+193 additions, -3 deletions)

View changed files

📝 src/lib/components/chat/MessageInput.svelte (+51 -0)
📝 src/lib/components/chat/MessageInput/Commands.svelte (+2 -1)
📝 src/lib/components/chat/MessageInput/Commands/Prompts.svelte (+8 -2)
src/lib/components/chat/VariableInputModal.svelte (+132 -0)

📄 Description

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests to validate the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • feat: Introduces a new feature or enhancement to the codebase

Changelog Entry

Description

Fixes: https://github.com/open-webui/open-webui/discussions/15022

Added

  • Added a new modal that automatically pops up and prompts the user to (optionally) replace none or all of the variables in a prompt with a value
  • May replace none or all
  • can also close the modal while replacing none
  • detection of variables is generous, even respects spaces

BEHAVIOUR:

If you click "Submit": all input field's values will be used to replace the variables.
Empty input fields mean the variable will be replaced by nothing (i.e. deleted).
If you click cancel, or close the modal, no variables will be replaced.

This is desired behaviour, because with this, you can create prompts that contain variable names like {{required variable}} or {{optional variable}}

And when filling out the newly added modal, you can leave the optional variables empty and they will get removed if they are not needed.


Screenshots or Videos

https://github.com/user-attachments/assets/77ab651a-05b9-404c-ab74-90e7c3537967

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 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/15032 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 6/16/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/prompt-variable-input-modal` --- ### 📝 Commits (6) - [`b5f4c85`](https://github.com/open-webui/open-webui/commit/b5f4c85bb196c16a775802907aedd87366f58b0f) Merge pull request #15014 from open-webui/dev - [`29de096`](https://github.com/open-webui/open-webui/commit/29de0967d9816ffe424b48e62505cbb1b892e6b2) Update MessageInput.svelte - [`6e10c3f`](https://github.com/open-webui/open-webui/commit/6e10c3f37dcb7370e9dc6232cf4a440aeb8f6c73) Update Commands.svelte - [`2d24e97`](https://github.com/open-webui/open-webui/commit/2d24e973b2ccaaeb294311bc130ab39cba0cad6c) Update Prompts.svelte - [`86125eb`](https://github.com/open-webui/open-webui/commit/86125ebf21cfae6840f2ce548d7fa2f1ebc02d5b) Create VariableInputModal.svelte - [`7d54714`](https://github.com/open-webui/open-webui/commit/7d547148d7681421145ba27275e01f16a53bd07a) Add feature to display prompt in modal and better formatting and description ### 📊 Changes **4 files changed** (+193 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/MessageInput.svelte` (+51 -0) 📝 `src/lib/components/chat/MessageInput/Commands.svelte` (+2 -1) 📝 `src/lib/components/chat/MessageInput/Commands/Prompts.svelte` (+8 -2) ➕ `src/lib/components/chat/VariableInputModal.svelte` (+132 -0) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [X] **Target branch:** Please verify that the pull request targets the `dev` branch. - [X] **Description:** Provide a concise description of the changes made in this pull request. - [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [X] **Testing:** Have you written and run sufficient tests to validate the changes? - [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [X] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **feat**: Introduces a new feature or enhancement to the codebase # Changelog Entry ### Description Fixes: https://github.com/open-webui/open-webui/discussions/15022 ### Added - Added a new modal that automatically pops up and prompts the user to (optionally) replace none or all of the variables in a prompt with a value - May replace none or all - can also close the modal while replacing none - detection of variables is generous, even respects spaces ## **BEHAVIOUR:** If you click "Submit": **all input field's values will be used to replace the variables.** Empty input fields mean the variable will be replaced by nothing (i.e. deleted). If you click cancel, or close the modal, no variables will be replaced. This is desired behaviour, because with this, you can create prompts that contain variable names like {{required variable}} or {{optional variable}} And when filling out the newly added modal, you can leave the optional variables empty and they will get removed if they are not needed. --- ### Screenshots or Videos https://github.com/user-attachments/assets/77ab651a-05b9-404c-ab74-90e7c3537967 ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <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-29 21:38:47 -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#46739