Read/Write API for Xojo IDE Code Editor to enable AI Integration

Hint:

Just save a project you have to xml format and then provide it to AI (the latest chatGPT4 o4 is fantastic for code).
No need to add any text. It will give you full report of the project. Including things you could improve, optimise or do differently - including code to do so.
Even suggestions to add features (and of course can provide code for this too).

Yes, it sometimes mixes API1 and 2 but this is easy to fix (even by asking it).

It’s all copy/paste/create UI controls/… now. It would be fantastic if this implemented in the IDE.
Just take a look at how it is implemented in Xcode! :smirking_face:

With Copilot on Github, I can give the AI ​​the path to a file (even a private one) in my repos and limit analyses to those files.

Let’s see who’s the first to shout, “I’m not giving my code to any AI!!!” PS: That’s your decision… :laughing:

Indeed. :joy:

FWW .. an example of a full project that was written fro about 80% with AI (including GUI layouts etc..) is a small app I made:

https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://apps.apple.com/be/app/metadata-lab-exif-editor/id6740704659%3Fmt%3D12&ved=2ahUKEwij-OX0_cWNAxUtVKQEHeYLHyYQFnoECCEQAQ&usg=AOvVaw2UjBz1x6_AGvu7_LnITXX9

BTW for this app I asked AI to use MBSPlugins too (almost all controls are macOS Native including NSTableView). Made this is in 3-4 days. :slight_smile:

2 Likes

Well, it wouldn’t be the first time I was wrong about something.

Nevertheless, I’ll hang onto my critical thinking skills for as long as I’m capable and hope that if Xojo Inc. does incorporate direct AI features into the IDE - that it has an “off” switch. Otherwise, it’s adiós mis amigos.

Good luck :slightly_smiling_face:

1 Like

ah yes i was thinking about too, i’ll host an MCP server too soon
MPCs are the new APIs ?

1 Like

I really want the ability to turn GPT or other models loose on my entire code base if I choose. I want to be able to ask AI about a bug in particular source code without the need to export that source code and take it to an external web page to use AI. I want to be able to ask questions of AI about my code base and the AI have all the context it needs because it has access to the source. This is already possible and works incredibly well on certain tasks in other IDE’s. It currently makes my mandatory-work time in Xojo feel antiquated when I switch over from VSCode or Cursor.. I definitely vote in favor of bringing AI into Xojo in meaningful ways, not just auto completers’..

1 Like

I’m really surprised that no one has done this with IDE automation yet. You can easily get the source of the current editor and set it later. The IDE Communicator socket would be an easy way to connect.

I have great respect for you and don’t mean to sound rude, but perhaps it’s because no one here is convinced that the current capabilities of the Xojo IDE API offer what would be necessary to even come close to what, for example, the Xcode Editor offers. And the Xcode Editor only offers the bare minimum when it comes to predictive coding.

:person_shrugging:

2 Likes

Didn’t say that it was. But you could make your own editor that does predictive code which pulls code from the ide and puts it back when you’re done.

Hacking something that should be a basic functionality is kind of a waste of time, it is easier to use that time porting to another tool. Also, a hack can be broken on the very next release

1 Like

Dear all…

… I use React / Flutter / Dart, more than Xojo, and I can not underline enough how important it is, to integrate AI into the development tools.

If not… r.i.p.

10 Likes

I am very interested in this.

I’ve done nothing with IDE communication before but I’m a little fed up of copy and pasting code from the IDE into Claude’s web interface. You can create a Claude project and include Xojo files in it but you have to remember to update them every time you touch code in the IDE.

Is there much example code out there for IDE communication? I would be willing to give this a crack…

2 Likes

AI integration is extremely important and urgently needed to keep up with all other coding tools.
The attempt that Xojo Inc is currently making with Jane is disappointing, and they would be better off using their resources for bug fixes and keeping up with all the changes in macOS (and to a lesser extent Windows). There is no need to reinvent the wheel here so just get rid of Jane and do not release Xojo with it. Don’t waste valuable resources.
Xojo simply needs an API so that existing external AI tools such as Cursor can communicate with Xojo itself. That’s all that’s needed.

3 Likes

Claude Code and this :

1 Like

Look at IDE Scripting in the LR every IDE specific command is in there. Otherwise it’s just xojoscript.

The things I think you’re going to be most interested in have to do with “location” and “text” in the project commands. Location lets you select a project item and text allows you to set and get the contents of the code editor.

There’s an example project for IDE Communicator v2. (V1 requires you to reconnect after every command, v2 does not)

2 Likes

Hello Jean-Yves, is this an example of what you would like, or is it an app that already works?

this is an app I made and use for a few months now, and that works fine

2 Likes

Gemini have been updated for Xojo (apparently) in the previous some days.

I used it minutes ago for a Xojo question and see the difference: hudge. Even for a simple question.

1 Like