-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/telegram buttons backend #147
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…or: tweaked some variable names for more concise code
…RESPONSE instead (it's the only way to make them work with custom python responses)
…bles used in functions)
…d (very minor tweaks)
…om a Telegram chat. One special case is handled in `AddButtons`
…fix: not using ctx.current_node.misc (it's not saved between nodes, I guess this feature was removed from Chatsky, my mistake)
…ing empty buttons (wrongly expected it from frontend previously)
…ceiving removeButtons, some minor fixes
…uttonsData structure from frontend
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added the backend for Telegram buttons. (the frontend will allow users to add buttons in bot responses and transition conditions)
Converting button from
frontend_flows.yaml
into ayaml
format compatible with Chatsky. This PR does so by making Chatsky import theAddButtons
class from Chatsky-UI intoPRE_RESPONSE
, which is just a modified 'PRE_RESPONSE' processing function from Chatsky.AddButtons
PRE_RESPONSE
function, which gets imported viaexternal:chatsky_ui
clause by Chatsky.Checklist
json_converter
structure works for an arbitrary format offrontend_flows.yaml
To Consider
ReplyKeyboardMarkup
looks extremely ugly for some reason (both on PC and especially my phone), not like in their examples of this class. Maybe they updated it or I'm doing it wrong. (it was probably a bad update) Well, at leastInlineKeyboardMarkup
looks good.ReplyKeyboard
isn't removed automatically. It could be removed with a certain combo ofPRE_TRANSITION
andPRE_RESPONSE
processing and changingContext.misc
. But for now it's in the backlog as there are more pressing tasks in Chatsky-UI.ConditionConverters
at backend and then add it to a bigcnd.Any
from Chatsky. Maybe such a menu could be called "Add parallel conditions" or something. But that's for the frontend to decide. I think it's a decent idea. The backend for that sounds easy to make..ignore
files, scripts (such aslint
), distribution manifest (if files are added/deleted)