Store the context source file or URL when using document loader
<!-- Please search existing work items before filing to avoid duplicates. --> <!-- Also check open feature request work items to avoid duplicating existing proposals. --> ## Summary <!-- Briefly describe the feature or improvement you are proposing. --> Follow-up to: - #3569310+s - #3586275+s We can load context content from files and URLs now. We still would like to track the source document for reference. ## Problem <!-- Describe the problem this feature would solve. What is currently difficult, missing, or frustrating? Who would benefit, and how? Be specific — "site builders who configure LLM providers" is more useful than "users". --> We don't track the source document when loading context content via document loader (mdxeditor load document button). ## Proposed solution *(optional)* <!-- If you have an idea of how this could work, describe it here. You do not need a technical solution; workflow or UX ideas are also helpful. --> Document loader doesn't currently have a way of grabbing this information. A new hook would be needed. Then we'd use that to store this information for reference. ## Workaround *(optional)* <!-- Describe any workaround you are currently using, or state that none exists. This helps maintainers assess priority. --> For files, the user actually uploads the file, so the file is in the system unless they delete it. For URLs, that's not the case though. ## Affected functional areas *(optional)* <!-- List the areas or sub-modules of the AI Context module this request relates to. Examples: context items, scope plugins, context selection, subcontext, admin UI --> - Context items - ai_context_document_loader submodule <!-- If this issue description was significantly AI-generated (entire sections, not autocomplete), please note it in a comment below. See https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquette/policy-on-the-use-of-ai-when-contributing-to-drupal --> > [!note] > Check the one that best describes your usage, or leave all unchecked if AI was not significantly used. > > * [ ] AI **Assisted Issue** \ > _Mainly written by a human; AI used for partial generation under full human supervision._ > > * [ ] AI **Generated Issue** \ > _Mainly generated by AI, reviewed and approved by a human before this issue was created._
issue