- Issue created by @laurentb
- 🇵🇫French Polynesia laurentb Tahiti
Attached patch adds a new Symfony event (AiAssistantPrePromptContextEvent) to allow modules to alter the pre-prompt context before token replacement. This improves extensibility by allowing dynamic tokens.
Testing instructions:
- Apply the patch.
- Implement an event subscriber to inject custom tokens.
- Verify that new tokens are available and replaced correctly in the AI Assistant prompts.
- First commit to issue fork.
- 🇬🇧United Kingdom MrDaleSmith
Patch doesn't cleanly apply to the fork branch, so will need reworking so that it does to allow testing. It might be worth considering if we need all these separate events or whether they can be consolidated into a single one, possibly in consideration with https://www.drupal.org/project/ai/issues/3506391 ✨ Alter PreGenerateResponseEvent response Active .