Component agent should be aware of imports possible
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3543592. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !45 !1491 >>> <h3 id="overview">Overview</h3> <p>Currently there is no restrictions in what imports that the model is trained on that it might use - for me its constantly trying to import <a href="https://nextjs.org/docs/pages/api-reference/components/link">next/link</a>.</p> <p>See screenshots:</p> <p><a href="https://www.drupal.org/files/issues/2025-08-28/Screenshot%20from%202025-08-28%2015-44-59.png"><img src="https://www.drupal.org/files/issues/2025-08-28/Screenshot%20from%202025-08-28%2015-44-59.png"></a></p> <p><a href="https://www.drupal.org/files/issues/2025-08-28/Screenshot%20from%202025-08-28%2015-45-09.png"><img src="https://www.drupal.org/files/issues/2025-08-28/Screenshot%20from%202025-08-28%2015-45-09.png"></a></p> <p>I'm guessing this is due to the following one-shot snippet:</p> <pre>Example:<br>&nbsp; import Image from 'next-image-standalone';<br>&nbsp; export default function MyComponent({ photo }) {<br>&nbsp;&nbsp;&nbsp; return &lt;Image src={src} alt={alt} width={width} height={height} /&gt; // Use ONLY &lt;Image&gt;.<br>&nbsp; }</pre><p>The <a href="https://github.com/balintbrews/next-image-standalone">next-image-standalone</a> is a specific import, outside of the Next.js library, but it inforces that it has access to Next.js libraries/compnents.</p> <p>We might need a follow up issue to actually fix a tool that can list possible imports and how to use them, but this fixes the initial bug, by prompting.</p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>Make sure that the system knows that next-image-standalone is an exception and that it does not have access to Next.js components.</p>
issue