Other B4A v13.5 - integrated code bundle and more

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm happy to release a new version of B4A. The integrated code bundle tool is now available in B4A (and B4J).
Code Bundle is a tool that packs your project together with additional relevant information into a single json file, that can be provided to AI assistants for debugging, learning, refactoring and other tasks.

B4A_kf7zblfSEr.gif


The bundle is created with a click of a button (Ctrl + R). The bundle includes:

  • Project code + list of public APIs. Keys are sanitized based on heuristic templates.
  • (optional) Logs + compilation output + warnings and errors list. Compilation output is included when the dialog is visible.
  • (optional) Layouts + designer script.
  • (optional) Paths configuration.
  • List of files. Files content is not added.
  • List of libraries with additional information for each library.
  • Manifest editor.
  • Current caret location with the code around it - the AI knows where you are focused on right now.
  • Additional information about the IDE and useful links for the AI to find more information.
How to use:
- Click on Ctrl + R. A json file will be created and copied to the clipboard. Paste into the AI assistant and ask questions.

Other improvements:
  • The Starter service is being deprecated due to restrictions applied by Android, which can lead to crashes in debug mode, and it becoming less useful with B4XPages. Removing the Starter service no longer affects the behavior of unhandled exceptions.
  • New warning in B4XPages projects when the starter service is included.
  • Application_Error sub can be added to the Main module (when the Starter service is excluded).
  • B4XPages project template updated accordingly.
  • #ExcludeCodeFromBundle attribute - set to True to exclude the current module from the code bundle. Note that public sub signatures and comments (before the subs only) will still be included in the bundle.
  • New log filter:

    View attachment 171493
    Error - includes the app logs and system level error logs. Very useful when looking for ANRs, startup errors and other mysterious crashes.
  • Autocomplete in #If lines.
  • List.Sublist - Very fast method that returns a read-only sub-list.
  • Fix for String.ToLower not explicitly setting the locale. Mainly fixes the Turkish I: https://www.b4x.com/android/forum/t...ctly-for-the-turkish-language.163961/#content
  • New #Macro / comment link options: (case insensitive)
    • librariesrefresh - set to True to automatically refresh the libraries after the task runs.
    • codesync - set to True to force the IDE to synchronize the code modules with the files.
    • autosave - set to True to automatically save the project BEFORE running the task. Note that Tools - IDE Options - Auto Save should be enabled for this to have effect.
    • filessync (not new) - set to True to synchronize the Files tab after the task.
    • cleanproject (not new) - set to True to "clean project" after the task
    • %STATE1% - new variable that causes the IDE to create a temporary file with the IDE state based on the new options under Tools - IDE Options. The file path will be passed to the process. This is used by Code Bundle and can be used by other similar tools. Note that the format can be modified in the future.
    • NoTimeout - set to True to disable the default process timeout (currently not available in B4J).
    • ide://KillProcesses - new option to kill all the currently running processes. Useful when running non-ui processes with no timeout (currently not available in B4J).

      Note that starting a B4J app as an external tool is as simple as:
      B4X:
      ide://run?File=<path to jar>\App.jar&NoTimeout=True
  • B4X Map collection can now wrap Java Maps.
  • Internal libraries updated.
  • Other bug fixes and minor improvements.
Download link: https://www.b4x.com/b4a.html
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
If using B4XPages then move the code to B4XMainPage. If not, then keep the starter service.
Is the Initialize sub of the main page a good place, or there’s something to be aware of?
actually my projects assume that what is currently in the Starter service is already available when the main page is created, so the only options are the Initialize sub or the Main module, before B4XPages initialization, but I would rather not touch the Main module
 
Upvote 0

IanMc

Well-Known Member
Licensed User
Longtime User
Codex says:
Ooh, that is very relevant.

The big thing: B4A v13.5 has an integrated “Code Bundle” tool for AI assistants. You press Ctrl + R in B4A and it creates a JSON bundle with project code, public APIs, layouts, logs, warnings/errors, libraries, manifest, IDE state, and caret context. Basically: B4A can now package up exactly what Kev needs to understand/debug the project.

Also important: Erel says the Starter service is being deprecated for B4XPages projects because Android restrictions can cause debug crashes/ANRs.

Codex is the new ChatGPT (and Kev is what I call my A.I. assistant) rumour has it that ChatGPT will be folded into Codex.

Codex can control your PC you say 'make the buttons rounder' and it goes and does it.
Re-compiles and loads it on to your phone all on it's lonesome.

I'm on the mere 'plus' plan of about £18 per month but I still seem to get a goodly amount of Codex, when you click bottom left in Codex on Settings and choose 'Usage remaining' the percentages are 5h which is the amount of usage left that you're allowed to use in a 5-hour window and when it will refresh back to 99%
I expect if you hammer it really hard that might zoom down to zero but I haven't even got it to go down to 50%
Then weekly, that's the amount of codex you get in a week and when that will renew back to 99%
I've been working hard on an app idea and I've got that down to 68% here on the 8th of June and it says it will refresh back up to 99% on the 11th so three days.

Erel I don't understand how you can give all of this away to us for free. Do you have too many houses?

Because the Holy grail is, and correct me if I'm wrong but the holy grail is yep I can make an app for Android and yep I can make that same app for Apple too.
That's hireable stuff right there and if you can prove that you can do that then they're not going to look too closely at the 'how'.
(the word BASIC isn't even in their vocabulary).

Yet if you can do that why would you want to work for someone else?
Just get a good idea (look on the playstore to see what's a sellin') and make your own but better.

ian
 
Upvote 0
Top