Fix DeepChatFormBlock defaultConfiguration() sets invalid style_file key, preventing toolbar.yml from being used as default
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3572096. --> Reported by: [ahmad khader](https://www.drupal.org/user/3727855) Related to !1168 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Short Description: </strong>[One-line issue summary for stakeholders]<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h2>Problem/Motivation</h2> <p>In <code>DeepChatFormBlock::defaultConfiguration()</code>, the <code>style_file</code> default value is set using:</p> <pre>'style_file' =&gt; $module_path . ':' . 'toolbar.yml',</pre><p>This produces a value like <code>modules/contrib/ai/modules/ai_chatbot:toolbar.yml</code>, which does not match the expected <code>module:ai_chatbot:toolbar.yml</code> format used by <code>getStyleParameters()</code> and <code>getStyles()</code>.</p> <p>Because this invalid key doesn't match any option in the style select list, the form defaults to the first available option (e.g., <code>bard.yml</code>), meaning new chatbot blocks never get the intended <code>toolbar.yml</code> style by default.</p> <h2>Steps to reproduce</h2> <ol> <li>Place a new <strong>AI DeepChat Chatbot</strong> block</li> <li>Set placement to <strong>Toolbar</strong></li> <li>Save the block without changing the style</li> <li>Inspect the saved block configuration &mdash; <code>style_file</code> will be <code>module:ai_chatbot:bard.yml</code> instead of <code>module:ai_chatbot:toolbar.yml</code></li> <li>The toolbar-specific <code>auxiliaryStyle</code> CSS (chat header, loading avatar, input styles, etc.) is not applied</li> </ol> <h2>Proposed resolution</h2> <p>Change the default value in <code>defaultConfiguration()</code> from:</p> <pre>'style_file' =&gt; 'toolbar.yml',</pre><p>to:</p> <pre>'style_file' =&gt; 'module:ai_chatbot:toolbar.yml',</pre><p>This matches the key format generated by <code>getStyles()</code> &rarr; <code>getStylesFromPath()</code>, which uses <code>$prefix . ':' . $file</code> where prefix is <code>module:ai_chatbot</code>.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3>
issue