-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Prompt Variables #616
Add Prompt Variables #616
Conversation
@Huachao any chance of this PR getting merged? or is there anything else need to be modified? Thanks |
@theerapatcha sorry for the late reply, thanks for your contribution, before diving into the implementation, I want to have some discussions with you.
|
To make it align with your design, I can change it to use just plainly Thanks for your reply. |
For the first question, does the user requires a file-level prompt variable like the credential information for all APIs? For the second question, I prefer the syntax that one prompt variable one-line, since I want to add an optional placeholder for a variable description with syntax # @prompt secret My demo service secret For the third question, I think the |
|
The design LGTM, wait for your PR. Thanks for your contribution. |
I made changes per discussed. You might need to re-review because most of the source code has been changed due to the prompt variable replacement logic which needs to be handled in the Btw, I have no idea why LGTM analysis keeps showing failed and I can't find any log that is related. |
Updated README.md Updated syntax highlighter
@Huachao resolved the conflicts! does anything need to be changed? Thanks |
Shame this hasn't been merged, was there anything blocking it? |
Just coming from httpYac (https://httpyac.github.io/), which has this feature, any reason why this can't be merged? |
@theerapatcha the only block is that the code has conflicts, I will continue work on this when I am free |
@Huachao resolved all the conflicts! |
@theerapatcha I add some comments, and most of other parts looks really great to me |
Utilize inputBox placeHolder for PromptVariable description Fix excess grave accent (`) in http autocomplete element
@Huachao fixed as suggested (as well as one minor misplaced symbol). thanks! |
@theerapatcha Merged, thanks for your great contribution |
Great news, I just tested it and it works perfect. 🎊 If I may add a suggestion for improvement: Defaults. Maybe taking any previously globally setted value for the given variable as a default (maybe prefilling the popup field) will work so in case I want to keep the default just hitting enter will work. Something like
So having the popup prefilled with the "SomeDefaultValue" allow me just to hit enter to accept it. So there will be no need to add any extra syntax to achieve it, also if the text on the popup were preselected I can just type to overwrite the default or even just hit "backspace" to erase the popup field to input an "empty" value as it currently does. Just a suggestion 😉 Good work anyway 👍 |
Thank you so much! |
Agree this would be awesome. Another suggestion in addition to defaults - remembering the previous value entered the last time I was prompted. |
Prompt variable
is a variable that will prompt for user input every time user sending a request.Some variables are meant to be changed all the time such as Session ID or OTP code.
Therefore, I think it is better to let the user input the designated value of that variable instead of changing the source code every time.