Eugene, OR
Account created on 20 July 2010, about 15 years ago
#

Merge Requests

More

Recent comments

🇺🇸United States dmundra Eugene, OR

Looking good @majorrobot. Approved and merged.

🇺🇸United States dmundra Eugene, OR

We mob-programmed on this PR so credited all the folks. Thank you!

🇺🇸United States dmundra Eugene, OR

For the HTML and other content type issues that can be handled in future issues like <#3539369>

🇺🇸United States dmundra Eugene, OR

@majorrobot migration working well. Noticed that the example content-type didn't display fields on node view or edit so after enabling those I can see the values. I will share comparing AI response with what is being migrated.

🇺🇸United States dmundra Eugene, OR

No worries @majorrobot. Reviewing now

🇺🇸United States dmundra Eugene, OR

Ran into some bugs trying to enable the example module after re-doing my local site.

🇺🇸United States dmundra Eugene, OR

This solution https://www.drupal.org/project/ai/issues/3528549 Allow tool calling in streamed chat Active might make this redundant so something to watch as well.

🇺🇸United States dmundra Eugene, OR

I submitted a commit that captures the output of the function call if it is an instance of ExecutableFunctionCallInterface. Attaching new patch and inter diff.

🇺🇸United States dmundra Eugene, OR

Thank you @swirt. Looks good.

🇺🇸United States dmundra Eugene, OR

I have this script that I am testing with drush and it calls the function but doesn't generate an output. I left a comment on the MR

<?php

use Drupal\ai\OperationType\Chat\ChatInput;
use Drupal\ai\OperationType\Chat\ChatMessage;
use Drupal\ai\OperationType\Chat\Tools\ToolsInput;

$messages = new ChatInput([
  new ChatMessage('user', 'What is 20 * (4 + 3)?'),
]);
$provider =  \Drupal::service('ai.provider')->createInstance('gemini');

// Set a function call.
$functions = [];
$function_instances = [];
$function_call = \Drupal::service("plugin.manager.ai.function_calls")->createInstance('ai:calculator');
$function_instances[$function_call->getFunctionName()] = $function_call;
$functions[] = $function_call->normalize();

// Set chat tool.
$messages->setChatTools(new ToolsInput($functions));

/** @var \Drupal\ai\OperationType\Chat\ChatOutput $response */
$response = $provider->chat($messages, 'gemini-2.5-flash', ['my-custom-call']);
/** @var \Drupal\ai\OperationType\Chat\ChatMessage $return_message */
$return_message = $response->getNormalized();
echo $return_message->getText() . "\n";
// Returns something like "140"
🇺🇸United States dmundra Eugene, OR

Actually the signature has not changed between version 1 and 2, here is version 1 line https://github.com/google-gemini-php/client/blob/1.0.15/src/Data/Generat... (still an ?int)

🇺🇸United States dmundra Eugene, OR

An update, after enabling AI agents module and seeing that I can reference other tools like 'Calculator', I tried /admin/config/ai/explorers/chat_generator once again with xdebug and I can see that the code from the MR is calling the Calculator code it is just not outputting it to the screen as tool output. Maybe that is missing?

🇺🇸United States dmundra Eugene, OR

Trying to test this with /admin/config/ai/explorers/chat_generator and the existing HtmlToMarkdown function. I ran into an error with the generator not supporting the 'Top K' being a float. Here is the error

TypeError: Gemini\Data\GenerationConfig::__construct(): Argument #6 ($topK) must be of type ?int, float given, called in /var/www/html/web/modules/custom/gemini_provider/src/Plugin/AiProvider/GeminiProvider.php on line 260 in Gemini\Data\GenerationConfig->__construct() (line 39 of /var/www/html/vendor/google-gemini-php/client/src/Data/GenerationConfig.php)

Switching that argument type, I was able to generate code but not execute the function. I will continue to try to test but if someone has a better approach please do share.

🇺🇸United States dmundra Eugene, OR

Attaching a patch file for the current MR to test with.

🇺🇸United States dmundra Eugene, OR

Thank you @jibla for linking the issue. I can try to test that.

🇺🇸United States dmundra Eugene, OR

Content-type looks good. Thank you majorrobot

🇺🇸United States dmundra Eugene, OR

Looking good @majorrobot. Thank you for the details and it makes sense.

🇺🇸United States dmundra Eugene, OR

Looking good @majorrobot and thank you for the easy to follow documentation. Left a few comments and here my tests:

Working URL:

dmundra in ~/workspace/community/ai_migration on branch 3537651-confirm-minimal-ai > ddev drush php-eval "print_r(\Drupal::service('ai_migration.ai_migrator')->convert('https://ndhurandhar.art/art/2025-06/artist-impression-rex'));"
```json
{
  "title": "Artist impression of Rex"
}
```%

Non-existent URL:

dmundra in ~/workspace/community/ai_migration on branch 3537651-confirm-minimal-ai > ddev drush php-eval "print_r(\Drupal::service('ai_migration.ai_migrator')->convert('https://ndhurandhar.com'));"
 [error]  Failed to fetch content from URL https://ndhurandhar.com: cURL error 6: Could not resolve host: ndhurandhar.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://ndhurandhar.com
🇺🇸United States dmundra Eugene, OR

Thank you @majorrobot. Skeleton looks good and straightforward right now. Tests are passing. I left a comment about the convert function test.

🇺🇸United States dmundra Eugene, OR

Thank you @majorrobot. Approved and merged.

🇺🇸United States dmundra Eugene, OR

Thank you @kducharm. Merging.

🇺🇸United States dmundra Eugene, OR

Ready for review.

🇺🇸United States dmundra Eugene, OR

Ready for review.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

I believe the tugboat preview does work and screenshots show that. To see it on this issue you have to close and re-open the MR.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

Thank you @jaydarnell

🇺🇸United States dmundra Eugene, OR

How to QA

  1. Check out the branch from the MR
  2. Run ddev restart
  3. Run rm web/modules/custom/alt_text_validation/* to remove all symlinks
  4. Run ddev symlink-project
  5. Run ls -la web/modules/custom/alt_text_validation/
  6. Confirm the symlinks have been recreated correctly
🇺🇸United States dmundra Eugene, OR

Sounds good and ya I agree about just newer CVEs. We were just referencing an example about packages.

🇺🇸United States dmundra Eugene, OR

@greggles Dependency Track is showing both CVE now for both core and contrib but looks like the missing detail is which packages are affected. @grugnog pointed out these examples from the NIST database:

* https://nvd.nist.gov/vuln/detail/CVE-2020-13673 shows packages
* https://nvd.nist.gov/vuln/detail/CVE-2025-6676 currently does not show packages

🇺🇸United States dmundra Eugene, OR

Preview build was successful with the basic config file. Ready for review.

🇺🇸United States dmundra Eugene, OR

Ready for review. Let me know if you have any questions. Following the steps in CONTRIBUTING.md file allows one to spin up a ddev instance with the module and its dependencies.

🇺🇸United States dmundra Eugene, OR

Ready for review, there are a lot of warning but that could be worked on in another issue and then kept track with the gitlab pipeline.

🇺🇸United States dmundra Eugene, OR

Thank you @swirt for fixing it.

🇺🇸United States dmundra Eugene, OR

@swirt tried to re-run the jobs and it still failed.

🇺🇸United States dmundra Eugene, OR

Looking good merged.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

Looks good to me. I liked the improved interface.

🇺🇸United States dmundra Eugene, OR

I merged some changes from other tickets and went back trying that and I finally got it to generate styles. Not sure why it started working (also updated local to 10.5). I do see it generate a smaller image that is not encrypted.

🇺🇸United States dmundra Eugene, OR

This should follow the solution from #2946320

🇺🇸United States dmundra Eugene, OR

Fixed in #3287560

🇺🇸United States dmundra Eugene, OR

Creating a MR to see if the tests and pipeline pass.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

Thank you cmlara. I will try testing by removing the fix for scenario 1 and seeing if that makes scenario 2 happen.

🇺🇸United States dmundra Eugene, OR

Okay I fixed it following example from https://www.drupal.org/project/node_read_time/issues/3473652 🐛 Drupal 11 issue on config form, ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct() Fixed

🇺🇸United States dmundra Eugene, OR

Did get an error when trying to configure the settings

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/lib/tugboat/src/Form/ContentRemindersSettingsForm.php on line 27 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of /var/www/drupal/web/core/lib/Drupal/Core/Form/ConfigFormBase.php).
🇺🇸United States dmundra Eugene, OR

I used the tugboat site and installed upgrade_status to see if there are any updates needed other than the version upgrade and did not find any. See attached screenshot.

So this is ready for review.

🇺🇸United States dmundra Eugene, OR

dmundra created an issue.

🇺🇸United States dmundra Eugene, OR

Looks good @mkinnune. I was able to use the tugboat preview to confirm the module installs fine.

🇺🇸United States dmundra Eugene, OR

The case-insensitive check worked as well.

🇺🇸United States dmundra Eugene, OR

Looks good and tested it locally and it works.

🇺🇸United States dmundra Eugene, OR

I am not sure that image styles works at all as the Image styles process cannot read the file since it is not decrypted for it. I think that was pointed out in related issues.

For image styles to work, we would have to either a process where the image is decrypted then styles are applied and then re-encrypted. This would be issue that scenario 2 is getting at I believe. I don't see how else image styles would work. To sufficiently not cause unencrypted data at rest it would better to not sure that feature and for it to be removed.

🇺🇸United States dmundra Eugene, OR

This change was made in #3370418 so closing.

🇺🇸United States dmundra Eugene, OR

I believe I tackled the first one by essentially not catching the exception and letting it be thrown all the way up. Not ideal but avoids the file being upload in an unencrypted status.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

dmundra made their first commit to this issue’s fork.

🇺🇸United States dmundra Eugene, OR

Completed in #3526491

🇺🇸United States dmundra Eugene, OR

Added and all steps are passing.

Production build 0.71.5 2024