Do not include the css and js from the component generation agent in the textual response to speed up generation
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3543504. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !44 !1486 >>> <h3 id="overview">Overview</h3> <p>Currently the response is overly verbose, unless this is on purpose. This means that the tokens that is needed for generating css and js are generated 3 times:</p> <ul> <li>One time when the tools are being used.</li> <li>One time when the component agent is generating its response to the orchestration agent.</li> <li>One time when the orchestration agent is generating its response to the end user.</li> </ul> <p>The only one of those that needs to be filled out is the tools, since they are used to fill out the form inside XB. The rest will create more costs and take more time.</p> <p>I did a check on the following prompt using OpenAI:</p> <blockquote><p>Create a hero component with a title, subtitle and two buttons. Call it herosection</p></blockquote> <p>Over ten calls the average e2e time with the current output over 10 tries was 22.521.</p> <p>With changes to not add this to the textual output it was 15.801</p> <p>This is very unscientific, since it generates different tokens each time, and token generation on external apis are not consistent in time, but it will be faster: <a href="https://docs.google.com/spreadsheets/d/17UDhqo9UxKKuCOLNlxBw9ekjR88fFdIeqn5BBNj_Ifs/edit?usp=sharing">https://docs.google.com/spreadsheets/d/17UDhqo9UxKKuCOLNlxBw9ekjR88fFdIeqn5BBNj_Ifs/edit?usp=sharing</a></p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>Add to the component generation agent how to write out a textual response, when it has generated or edited a component</p>
issue