With AI models now providing strong coding support (successor models to OpenAI Codex), I’d like to propose a feature that could significantly speed up development inside the B4X ecosystem:
project-aware AI assistance directly in the IDE.
Why this matters
AI is extremely effective when it has context about a project—names of modules, types, public subs, how components interact, and common patterns. Right now, using AI with B4A or B4i requires constantly copying and pasting individual modules into an external tool. That works, but it's nowhere near as powerful or fluid as having the IDE feed the AI what it needs.
Core idea
Have the B4X IDE optionally generate
summaries of every module and routine in a project, then expose those summaries to an AI assistant. That way, when the user asks the AI to implement a new feature, the model already knows:
- which modules exist
- which globals/types exist
- what each routine does
- how the project is structured
- common patterns used across the codebase
These summaries can be extremely compact—just “signatures + short description”—which avoids the problem of trying to upload an entire project (something that would easily exceed the model’s token limits) while still giving the AI enough context to understand the project structure and available routines.
Possible Architecture (Simple and IDE-Friendly)
1. Project Scan
The IDE performs a “Project AI Scan” that produces:
- List of all modules/routines/types
- 1–3 sentence summaries of each (AI-generated once, then cached)
- Signatures and brief descriptions
- Dependency references (which subs call which)
This could be stored as a lightweight project.aiinfo file. (and if a routine is changed in the future, the IDE can automatically resubmit the new changes to the AI (in the background) so it can generate a new summary for that routine and update this summary file so it is always kept accurate)
2. User Workflow
Inside the IDE:
- User highlights a sub or writes an instruction (e.g., “Create a routine that handles voice-to-voice streaming using my existing network layer.”)
- IDE sends:
- The request
- The summaries
- The current module or selected block
- Any relevant modules (based on dependency graph)
The AI returns:
- New code
- Updated code
- Optional explanations
The IDE inserts or previews the result.
3. Implementation Options
A) Minimal: Provide an IDE extension point where developers can configure their own API key and backend.
B) Ideal: A built-in panel similar to the Logs/Designer tabs, dedicated to AI.
C) Advanced: Inline suggestions (like modern IDEs), but even the minimal option would be a huge upgrade.
Why not leave this to external tools?
External tools don’t have access to:
- Project structure
- Module relationships
- Scope/context
- Existing patterns (e.g., how globals/state are managed)
With proper IDE integration, the AI becomes
project-aware rather than “stateless clipboard AI”.
Benefit to the B4X community
- Faster prototyping
- Faster debugging
- Faster onboarding for new B4X developers
- Ability to quickly refactor or extend legacy projects
- Modern feature parity with other ecosystems adding AI assistance
This would keep B4X competitive and dramatically increase development velocity.
Closing
This feature doesn’t need to be large or intrusive. Even a basic API integration plus project summaries would unlock huge benefits.
Thanks for considering it!