Problem/Motivation

ai_plus resolves the entity for the page the user is on and propagates it to the agent as prompt tokens (current_entity_context / current_view_mode). AI tools and skills, however, execute outside the prompt and cannot read those tokens, so they had no way to know which entity or bundle the user is viewing.

entity_blueprint provides a shared CurrentEntityContext service precisely for passing this context out-of-band to tool execution, but ai_plus was not populating it, so guidance that depends on the current page (for example bundle-specific tool guidance) could not resolve.

Proposed resolution

  • In TokenPropagationSubscriber, after capturing the current entity for the prompt tokens, also call CurrentEntityContext::set() with the entity type and bundle, so tools and skills can resolve guidance for the current page.

API changes

  • TokenPropagationSubscriber gains a CurrentEntityContext (entity_blueprint) constructor dependency, injected via autowiring. No other signature changes.

Comments

tim bozeman created an issue. See original summary.

  • tim bozeman committed 3f975df6 on 1.0.x
    task: #3595077 Propagate the current entity to entity_blueprint's...
tim bozeman’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.