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. 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.

  2. 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.

  3. 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...

  4. 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.

  5. 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?

  6. Site Settings Extended

    Randal

    This module provides some different layouts/functionality to the excellent Site Settings module.

    Mainly, a complete overhaul of the layout is added.

    There are two options:

    • Single form
    • Core config pages

    Single form

    The single form layout adds all options in vertical tabs, this can however become quite a big form and is usually only recommended for smaller collections of settings.

    Core config pages

    The core config pages layout uses a page with links like a core config overview page. You can add more information by setting up the "menu_description" view mode, this will be rendered as the description (useful for "multiple" items, for example social links: "facebook", "instagram", ... labels could be rendered as the description). Then you can choose to either open settings in modals or open them in new pages.

    When opening settings forms in modals, you should definitely make use of the patch in the issue linked below, otherwise media library modals will wreck functionality. #2741877: Nested modals don't work

  7. Abstract token usage support

    Sven Decabooter

    Added related issues in AI module, that need to be fixed first, before both token usage for both regular chat and streamed chat can be captured.

  8. Add support for streaming chat token usage

    Sven Decabooter

    Problem/Motivation

    See #3524435: Add token usage to streamed chat. Token usage capturing for streamed chat is being worked on in the AI module. Allow this module to fetch that data for the usage limits.

  9. Add token usage to streamed chat

    Sven Decabooter

    Seems like the failure of PostStreamingResponseEvent not being triggered, is a separate issue. See #3526936: PostStreamingResponseEvent never gets triggered.

    The code in this MR can probably be already reviewed, but will not be functional until this other issue is fixed first.

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.