Canvas AI: Allow "verbose_context_for_orchestrator" to be passed in user input
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3582390. -->
Reported by: [akhil babu](https://www.drupal.org/user/3632866)
Related to !957
>>>
<h3 id="overview">Overview</h3>
<p><code>CanvasAiPageBuilderHelper::generateVerboseContextForOrchestrator()</code> generates a message for the orchestrator agent by combining the current entity type (Canvas page), page title, and page description. This is currently added to the orchestrator agent as a token in its system prompt. Instead, it should be passed through the user input</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<ul>
<li>Remove the [canvas_ai:verbose_context_for_orchestrator] token</li>
<li>Get the user input and output of <code>CanvasAiPageBuilderHelper::generateVerboseContextForOrchestrator</code> and construct a single message in the format</li>
</ul><pre><system_context><br> {context_data}<br> </system_context><br> <user_input><br> {user_input}<br> </user_input></pre>
<ul>
<li>Set that as input to the orchestrator agent</li>
<li>Generate comprehensive tests to validate that the orchestrator calls the correct sub agent depending on the task</li>
</ul>
<h3 id="ui-changes">User interface changes</h3>
> Related issue: [Issue #3579471](https://www.drupal.org/node/3579471)
issue