-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update command results to be the result cards of command executions #1947
Update command results to be the result cards of command executions #1947
Conversation
lukemelia
commented
Dec 17, 2024
•
edited
Loading
edited
- Change how command results are stored in Matrix: old way: ReactionEvent + optional CommandResultEvent; new way: CommandResultEvent with optional data.content.cardEventId property that can point to a matrix-stored result card
- Update aibot to read new result event
- Update apply button state to read new result event
- Replace special casing of search command result with rendering result card in embedded format in AI panel
- Introduce CopyCard host command and refactor "copy to workspace" and other copy features to use it
…b) added as a card to the room, and c) references by eventID in the reaction event created once a command runs aibot will need to be updated to read from this Message model and room-message will need to updated to display the result card
…ly-display-return-value
998f06d
to
ce4ffb2
Compare
ce4ffb2
to
4d942c1
Compare
…ly-display-return-value
…ly-display-return-value
626b891
to
504856a
Compare
@@ -2,6 +2,7 @@ export const APP_BOXEL_CARDFRAGMENT_MSGTYPE = 'app.boxel.cardFragment'; | |||
export const APP_BOXEL_MESSAGE_MSGTYPE = 'app.boxel.message'; | |||
export const APP_BOXEL_COMMAND_MSGTYPE = 'app.boxel.command'; | |||
export const APP_BOXEL_CARD_FORMAT = 'app.boxel.card'; | |||
export const APP_BOXEL_COMMAND_RESULT_EVENT_TYPE = 'app.boxel.commandResult'; | |||
export const APP_BOXEL_COMMAND_RESULT_MSGTYPE = 'app.boxel.commandResult'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need a msgtype?
If we do, should we use this to distinguish between filled and undefined results? The event type says it's a command result, but the msgtype could be how to parse that (e.g. linked card or nothing). Notably we don't seem to use the msgtype on the bot side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Updated this.
I like that responses with undefined don't trigger a response, that seems like a reasonable way to control some of this. I failed to get this working with a command that returns a card defined in the same file. It's not known to the loader, and not in "localIdentities" so it fails: Code https://gist.github.com/IanCal/78191aa82bfb51af2e88b81ca50b7234 |
Hopefully will be fixed for cases where the command result card type is exported by this: #2004. We should still improve the error message for cases where there is a missing export. |
…ly-display-return-value
4b7794a
to
ad7ee27
Compare
…ut not previously loaded
- now used to identify results with a result card vs those without