Ok ... is there some more information? ... I assume you coded it, so, can it use my API keys from any provider (Gemini, Claude, ChatGPT)?
How does it work? .. does it insert automatically the generated code? .. how is it better than just copying and pasting?
Best Regards
When you first use the application, It used to be that you had to mark your code but I made an update to the application whereby it automatically marks your code for you.
Let's say you have a module called B4XMainPage and that it has 1,000 lines of code.
When you run my application from the directory that contains B4XMainPage.bas, The new version should analyze your code and ask you if you wish to place the markers. If you say yes it will delineate your code with specific markers in comment form in your code.
For example let's say your code has 1000 lines of code in the file B4XMainPage.bas.
The application should automatically create markers that are at the beginning and end of your code, at about every 300 lines, that look like this:
'\\<START-B4XMainPage-S01>
1 - ~333 lines of code
'\\<END-B4XMainPage-S01>
'\\<START-B4XMainPage-S02>
~334 - ~666 lines of code
'\\<END-B4XMainPage-S02>
'\\<START-B4XMainPage-S03>
~664 - 1000 lines of code
'\\<END-B4XMainPage-S03>
It's programmed pretty much to break your code up into distinct separate sections for every 300 lines of code.
This makes your code more manageable for the AI that you're working with especially ones with limited context windows.
Now you must upload to your AI agent both of the files included:
AI Code Injector.py
And
And AI PROMPT.txt
AI Code Injector.py Is the source code for this application and it gives a complete knowledge to your AI agent how the code It will present to you must be formatted so that you can utilize this application.
The file AI prompt.txt makes it so that there's no question that your AI understands exactly how to program with you using this application and will only present code to you that you can utilize going forward in conjunction with this application.
Once those files are uploaded, whenever your AI agent supplies you edited code, It will be the complete section from Marker to Marker including the edit.
Then all you need to do, Is copy the code and click the button on the application. It will find the right *.bas file and the right section to edit It will select the entirety of the section from Marker to Marker and overwrite that section with the edited code you got from your AI.
Now the application also has an automatic mode by long pressing the injection button and this is the functionality that I personally use most often. Once that is engaged, if you're using an AI agent, let's say Geminii as an example, you upload B4XMainPage to your AI agent and explain what changes you want to make...
And it in return supplies you with code complete with the appropriate header and footer markers.
You select the copy button on the code and the application I wrote will automatically discover that there is code on your clipboard that contains proper markers, give a 5 second countdown to give you the opportunity to cancel if you copied the code in error to your clipboard, and begin the process of finding your source code file, the correct section to place the code, and placing the code over the section that existed, all with autonomy and without any interaction from you. All you did was copy the code to your clipboard and it does the rest.
With any luck when you get focused on your IDE and click in the code window, It will reload to show you the changes however this is not a guarantee or something that happens 100% of the time.
There is a forthcoming feature upgrade to B4A that will allow you to force a IDE reload after external edit of the code, But it has not been yet implemented. This being the case, you want to make certain that the IDE is reflecting the changes that my application has made, because if you run the application without it updating to the most recent code that was edited externally, it automatically saves the code that's on the screen, and if it is your former code prior to the changes that you just made externally with my application, and it hasn't been updated within the IDE, it will save the code you have prior to the update that's currently on your screen as your current code, thus overriding whatever it is you just pasted in from your AI agent using my application.
While the standard mode of my application makes things safer and easier, the automatic injection mode is a whole other level of efficiency and is pretty much the only feature I use.
Again, that mode is achieved by long pressing the injection button.
I hope you get as much use out of this application as I do.