Refactor to CanvasBuilder further to make prompt logging easier
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3556264. --> Reported by: [tedbow](https://www.drupal.org/user/240860) Related to !297 >>> <h3 id="overview">Overview</h3> <p>I don't have all the context this but we looking at prompt logging. Everything current runs through <code>\Drupal\canvas_ai\Controller\CanvasBuilder::render</code> which currently 242 lines after <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3555464" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3555464</a></span> this will a bit shorter but it still does a ton. </p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>Simplify <code>\Drupal\canvas_ai\Controller\CanvasBuilder::render</code><br> Start with 1 MR to clean up what is there so adapting it for logging will be easier</p> <h3 id="ui-changes">User interface changes</h3> <p>None</p>
issue