You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ask_user: say that question cards only work in the Bot's own chat, and tell the Bot when a new card replaces an open one
#1171
Two small changes that would clear up most of the "card didn't show up" confusion we ran into. Behaviour and references are as of v0.3.1 (ds-bot/src/host/). Lost answers are a separate bug, reported in #1170.
1. Say in ask_user's description that it only works in the Bot's own chat
ask_user refuses group Sessions (tools.js:682, "Question cards only work in your own chat…"), but its tool description (tools.js:658) and its prompt line (prompt.js:17) don't say so. show_view says it in both places: prompt.js:18 ("It only works in your own chat, not in a group") and tools.js:717 (where: 'your own chat'). As a result, a Bot in a group chat calls ask_user, gets refused, and the user sees no card. Adding the same sentence in both places, as show_view has it, would fix this.
A related question: #1118 reads as if question cards are expected in group chats and only fail to reach IM, while tools.js:682 refuses them. Which behaviour is intended?
2. Tell the Bot when a new card replaces one that is still open
Each chat has one card slot. A new card overwrites an open one without closing it (tools.js:697, channel.js:691-697). Answering the old card afterwards fails with "This question is no longer open", and any message from the user closes the open card as replied (turns.js:849-854).
The single slot makes sense, but the Bot isn't told about the replacement. The second call still returns "The card is on screen", so the Bot assumes both questions are waiting, while the user only ever sees the newer one. A tool result such as "This replaced your open question: …" would let the Bot merge both into one card, or ask in text instead.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Two small changes that would clear up most of the "card didn't show up" confusion we ran into. Behaviour and references are as of
v0.3.1(ds-bot/src/host/). Lost answers are a separate bug, reported in #1170.1. Say in
ask_user's description that it only works in the Bot's own chatask_userrefuses group Sessions (tools.js:682, "Question cards only work in your own chat…"), but its tool description (tools.js:658) and its prompt line (prompt.js:17) don't say so.show_viewsays it in both places:prompt.js:18("It only works in your own chat, not in a group") andtools.js:717(where: 'your own chat'). As a result, a Bot in a group chat callsask_user, gets refused, and the user sees no card. Adding the same sentence in both places, asshow_viewhas it, would fix this.A related question: #1118 reads as if question cards are expected in group chats and only fail to reach IM, while
tools.js:682refuses them. Which behaviour is intended?2. Tell the Bot when a new card replaces one that is still open
Each chat has one card slot. A new card overwrites an open one without closing it (
tools.js:697,channel.js:691-697). Answering the old card afterwards fails with "This question is no longer open", and any message from the user closes the open card as replied (turns.js:849-854).The single slot makes sense, but the Bot isn't told about the replacement. The second call still returns "The card is on screen", so the Bot assumes both questions are waiting, while the user only ever sees the newer one. A tool result such as "This replaced your open question: …" would let the Bot merge both into one card, or ask in text instead.
All reactions