Refactoring Eleventy with Swisscom MyAI
Reading Time: 3 minutesTable of ContentsYesterday afternoon I decided to experiment with MyAI and Eleventy because I was getting an error message. The issue is that when I refactored my Eleventy files with Gemini it removed code that broke the build process. I asked MyAI for help and it went beyond what I asked of it. Specifically, not only did it help me to fix the bug but it also helped me go from a build time of 35+ seconds, down to 25 seconds, and eventually down to 15 seconds. When you’re running build for each blog post that soon saves a lot of time.
A testament to MyAI’s Improvement
When I started playing with MyAI several months ago it felt quite limited, but yesterday the opposite is true. Today it feels as though MyAI could be serious competition for the US based AI options.
Early Adopter with Pro
It’s worth noting that because I signed up for MyAI Pro as an early adopter I was included within the MyAI Pro free of charge until 31.12.2026. When I was about to unsubscribe from pro I noticed the “free” opportunity and grabbed it.
It’s worth noting that I was using the fast bunny mode, not the “thoughtful pro” mode.
Asking for Clarity
I like that the model didn’t seem to hallucinate. I especially like that it asked for file A, and when it saw references to file B and C it asked for those, to understand the context of the code I was working with. As a result it kept things tidy and within scope.
It noticed loops that were called thousands of times, wastefully, and it refactored and optimised them with a minimum of effort.
When Gemini saw the legacy code in Latin-8 it wanted to create to go through all of the blog posts on each build. As a human I thought “let’s do this just once”, but not Gemini. MyAI created a file, and within a few iterations it had fixed all of the errors. In one case we used a SED command for a single exception.
The result was clean markdown, and a far more efficient build process.
When it noticed that reading time was called several thousand times it refactored the code so that it was mapped, and thus called half as often.
AI As Micromanager
Working with AI is quite ironic. Last night, when I was pair coding with MyAI there was a moment when I thought, “It’s behaving like a boss with it’s ‘now change this, and that, and then these two things’.” We could almost say that MyAI was micromanaging me. In the end, when we had fixed the reading time problem I told MyAI “It’s 18:57, I’m calling it a day” and MyAI said “See you tomorrow — the ‘image’ shortcode is next.”
MyAI personal Summary
Great progress today:
? Fixed encoding in 443+ source files
? Cleaned up filters.js with proper memoization
? Moved excerpt to computed data
? Eliminated the O(n2)O(n^2)O(n2) related posts loop
? Removed redundant readingTime from base.njkSelf-Perception
When asked whether we had refactored its response was:
Performance Refactoring
Moving expensive operations out of render loops
Precomputing data at build time instead of runtime
Memoizing repeated filter callsData Quality Refactoring
Fixing encoding at the source rather than patching it at render timeThe classic definition applies perfectly here:
“Improving the internal structure of code without changing its external behaviour”And Finally
This was a positive experience for me. The character of the AI agent didn’t get on my nerves like Gemini often does, and I didn’t hit the token wall like I do with Euria, Claude and other solutions and that does make a difference, when you can make real progress. It’s also worth noting that I was using the fast, which I assume is the free option, rather than the “thoughtful pro” model.
What I saw yesterday afternoon, into the evening, leads me to believe that MyAI will be a useful companion for AI related tasks.
#AI #eleventy #myai #refactoring #swisscom




