mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #15032] [CLOSED] Feat: Placeholder Variable Replacement Modal #39321
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15032
Author: @Classic298
Created: 6/16/2025
Status: ❌ Closed
Base:
dev← Head:feat/prompt-variable-input-modal📝 Commits (6)
b5f4c85Merge pull request #15014 from open-webui/dev29de096Update MessageInput.svelte6e10c3fUpdate Commands.svelte2d24e97Update Prompts.svelte86125ebCreate VariableInputModal.svelte7d54714Add 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:
devbranch.Changelog Entry
Description
Fixes: https://github.com/open-webui/open-webui/discussions/15022
Added
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.