- Issue created by @Akhil Babu
- First commit to issue fork.
- 🇮🇳India annmarysruthy
I was able to replicate the issue as described. I tested the solution suggested in the proposed resolution by manually replacing the [agent_instructions] token using str_replace(), and it resolved the problem in my testing.
Alternatively, another viable approach would be to formally declare the [agent_instructions] token via hook_token_info() and implement its replacement logic in hook_tokens().
It would be great to hear other thoughts
- 🇩🇪Germany marcus_johansson
I could replicate this issue as well on a clean D11, weirdly enough it worked when using Drupal CMS and upgrading the agents.
I think tt would be nicer to add the actual token, since we have so we show the graphical token tree link already if you have the Token module enabled. But then the change should also include that token in the tree.
WDYT?
- Merge request !124Issue #3523523:fix [agent_instructions] token not getting updated → (Merged) created by annmarysruthy
- 🇩🇪Germany marcus_johansson
Looking great and working well - I added two minor things missing still, could you review them?
Added the field to the two other agents that exists on the system.
Added an update hook, to update any [agent_instructions] to [ai_agent:agent_instructions], for the ones that might have been auto set in beta1. - 🇮🇳India Akhil Babu Chengannur
I have tested the changes in https://git.drupalcode.org/project/ai_agents/-/merge_requests/124/diffs?... and https://git.drupalcode.org/project/ai_agents/-/merge_requests/124/diffs?... and its working fine.
[ai_agent:agent_instructions]
token is properly added for content type and taxonomy agents- The
[agent_instructions]
token is correctly updated to [ai_aent:agent_instructions]
in previously created agents, after runningdrush updb
-
marcus_johansson →
committed 6d6ef391 on 1.1.x authored by
annmarysruthy →
Issue #3523523:fix [agent_instructions] token not getting updated
-
marcus_johansson →
committed 6d6ef391 on 1.1.x authored by
annmarysruthy →