Een hart voor de Drupal Community

Bij make it fly geloven we sterk in Drupal en Open Source software in het algemeen. We maken dagelijks gebruik van vele open source componenten en de vele Drupal modules die beschikbaar zijn. We dragen actief ons steentje bij aan de community door zelf patches, modules en documentatie te voorzien, daarnaast zijn enkele teamleden ook actief in de Drupal User Group vzw.

Een overzicht van onze bijdragen aan de Drupal community vind je terug op onze Drupal.org pagina. Naast het actief meerwerken aan de Drupal community, zetten we ook andere ontwikkelaars op weg door vragen te beantwoorden op Drupal Answers.

  1. Allow the Provider Configuration section to be closed by default

    Sven Decabooter

    I added a MR to add this functionality. Whether or not the Provider Configuration fieldset is open by default or not, is managed via config. The default setting for this config is to remain open, to keep backwards compatibility.

  2. Add AJAX functionality to dynamically update fields based on provider and model

    Sven Decabooter

    Tested with OpenAI, and getting the following errors:

    Warning: Undefined array key "fids" in Drupal\media_library\Form\FileUploadForm->validateUploadElement() (line 212 of /var/www/html/web/core/modules/media_library/src/Form/FileUploadForm.php)

    ypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in count() (line 212 of /var/www/html/web/core/modules/media_library/src/Form/FileUploadForm.php).

    Haven't investigated the root cause yet...

  3. sourceEditing plugin no longer gets enabled automatically in 1.1.x

    Sven Decabooter

    Problem/Motivation

    Issue #3499702: AI CKEditor requires the Source CKEditor button added logic to automatically enable the CKEditor5 'sourceEditing' plugin, in the response text textarea, since this is needed for the Completion plugin to work.

    However, in branch 1.1.x most of the logic is still there, except the flag to enable this functionality on the response_text text_format form element. This seems to be missing, probably because this is now handled in the generic AiCKEditorPluginBase class.

    Steps to reproduce

    - Use AI module 1.1.x - Enable the AI CKeditor module - Enable the Completion ("Generate with AI") plugin - Do NOT add the source code button to your CKEditor5 toolbar by default - Try using the Completion plugin in your CKEditor5-powered text area - this will fail (as described in #3499702: AI CKEditor requires the Source CKEditor button).

    Proposed resolution

    - Re-add the logic from #3499702: AI CKEditor requires the Source CKEditor button to active this for the Completion plugin.

  4. Site Settings Domain

    Randal

    This module provides domain context to site setting entities. (Via the domain-module)

    You can add a "fallback" (no domain context), meaning that if no site setting with a more specific domain context exists, there's always some value to show. You can also choose to not add a fallback, then only the site setting specific to that domain will be returned via the site setting loaders with domain context.

    On that note, it's important to choose the correct site setting loader (one with domain context enabled), and also use the newly created site setting blocks with domain context instead of the default site setting loaders and blocks.

    If the domain access module is enabled, then editor access is also checked.

    Important note This module is still in alpha, not all functionality has been thoroughly tested and bugs certainly will come up, feel free to let me know about them and I'll try to fix it all ASAP.

  5. PostStreamingResponseEvent never gets triggered

    Sven Decabooter

    @sarvjeetsingh:

    I'm not sure if that would work - I'm still tipping my toes into how all of this works...

    It would be something like this, in the ChatOutput constructor?:

        if ($normalized instanceof StreamedChatMessageIteratorInterface) {
          $normalized->triggerEvent();
        }
    

    In my initial testing, that doesn't seem to work. I then get the same error as in the tests: TypeError: Drupal\ai\Event\PostStreamingResponseEvent::__construct(): Argument #1 ($request_thread_id) must be of type string, null given

    Not sure if that's something that also needs to be fixed, or if this means this approach is not workable...

  6. Add provider_id context to PostStreamingResponseEvent

    Sven Decabooter

    Problem/Motivation

    Currently, the PostStreamingResponseEvent only contains some basic data regarding output and metadata. It does not store information about which provider ID the post streaming response is coming from, in contrary to \Drupal\ai\Event\PostGenerateResponseEvent, which does provide a getProviderId method.

    For the AI Usage Limits module, and probably others reacting to this event as well, it would be essential information to know which AI provider has triggered this event exactly.

    Proposed resolution

    - Add optional setProviderId() and getProviderId() methods to the event, and make sure implementing logic is able to provide a value for it.

  7. PostStreamingResponseEvent never gets triggered

    Sven Decabooter

    Test PromptJsonDecoderTest seems to fail now, because \Drupal\ai\Event\PostStreamingResponseEvent::__construct doesn't receive a request_thread_id string in its constructor. Not sure if this value is NULL in this test by design, or by accident. If by design, then the PostStreamingResponseEvent $request_thread_id parameter should be allowed to be nullable?

Sven Decabooter - Drupal Developer

"Onze teamleden bouwen zelf ook mee aan ons geliefde Drupal, en daar zijn we trots op"

Sven Decabooter
Drupal developer

Betrouwbare technologie, naadloze prestaties. Dat zijn onze Drupal-oplossingen.