feat: suppress initial message from action #1444
Merged
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.
Relates to:
feature: Suppressing initial response messages for specific actions in direct client
I would like to also extend the twitter client to include this kind of functionality. Right now there is a lot of assumptions about agent behavior such as sending an initial message before an action is processed. Ideally during the upgrade to v2 some of these hard coded behaviors can be addressed. The design should be more conducive to plugin-defined emergent behavior. Maybe there's a discussion to be had at how we can go about this at a lower level rather than going client-by-client to implement this behavior. I'm still relatively new to Eliza community if anyone has groups or public discussions on this.
Risks
Low - Changes only affect the direct client's message handling logic.
Background
What does this PR do?
Adds support for suppressing initial response messages in the direct client when actions have
suppressInitialMessage
flag set to true. Some actions might not want to send a message until after the action is completed. Now the action will have to manually send a follow up message with the callback.What kind of change is this?
Improvements (changes to existing message handling features)
Documentation changes needed?
New property in the
Action
documentation.Testing
Where should a reviewer start?
packages/client-direct/src/index.ts
- Check the modified message handling logic. I've changedimageGeneration
action to includesuppressInitialMessage
to true for testing.Detailed testing steps
suppressInitialMessage: true
Key test cases:
suppressInitialMessage: true
should only send callback messagesuppressInitialMessage: false
or undefined should send both initial and callback messagesCode changes:
The changes ensure that when an action has
suppressInitialMessage
set to true: