AI Positron - I am not able to import chat

Oxygen general issues.
Subathra
Posts: 8
Joined: Tue Apr 22, 2025 4:35 pm

AI Positron - I am not able to import chat

Post by Subathra »

Hi,
Whenever I try to import any JSON file for AI Positron custom actions, I always get the following error. Can anyone help me?

Screenshot 2025-04-22 at 7.08.48 PM.png
An example of JSON code that I tried uploading (I have tried with many files though):

[ {
"id" : "replace.bold.with.uicontrol",
"title" : "Replace bold with uicontrol",
"input-type" : "markup",
"type" : "replace-selection-with-fragment",
"context" : "Find where the bold element (<b>) has been used to mark up UI elements and change those instances by replacing the bold element with the uicontrol element (<uicontrol>). If you find some other content marked up with bold element, content that does not define UI elements, leave it unchanged. Also keep any other content unaltered.",
"examples" : [ {
"prompt" : "<b>Run</b>",
"completion" : "<uicontrol>Run</uicontrol>"
},
{
"prompt" : "text1 <b>Run</b> text2",
"completion" : "text1 <uicontrol>Run</uicontrol> text2"
}]
} ]
You do not have the required permissions to view the files attached to this post.
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: AI Positron - I am not able to import chat

Post by Radu »

Hi,
There are two actions "Export chat" and "Import chat":
https://www.oxygenxml.com/doc/ug-addons ... xport_chat
So if you export a chat as a JSON file, you can later import it.

But in your case the JSON actually contains an AI action, not an exported chat.
https://www.oxygenxml.com/doc/ug-addons ... xport_chat

So in your case you should save the AI action in a folder somewhere on your disk and then go to the Oxygen Preferences->"Plugins / Oxygen AI Positron Assistant" page and it has an "Additional actions folder" where you can specify the folder from which AI Positron should load extra JSON files containing action definitions. After this, the custom AI actions should appear in the AI Positron Assistant chat view and you can call them from there.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Subathra
Posts: 8
Joined: Tue Apr 22, 2025 4:35 pm

Re: AI Positron - I am not able to import chat

Post by Subathra »

I updated the preferences with the folder where I stored the JSON files. Yet, it is not listed in the AI Positron Assistant. Please help.
Subathra
Posts: 8
Joined: Tue Apr 22, 2025 4:35 pm

Re: AI Positron - I am not able to import chat

Post by Subathra »

Thank you, Radu. After a restart and quitting Oxygen twice, and restarted the Positron, it fetched the file. Also, one thing that I learnt was I exported a chat and used the same file for placing my actions by replacing the existing chat. Because creating JSON file on my own did not work.
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: AI Positron - I am not able to import chat

Post by Radu »

Hi,
About this remark:
Because creating JSON file on my own did not work.
Usually our recommended procedure to create new AI actions is to use the main menu "File->New" and in the New dialog wizard which shows up search for "AI Positron Custom Action" and you should find a new template for that.
https://www.oxygenxml.com/doc/ug-addons ... ly_wp4_wxb

Some sample AI actions for experimenting can also be found here:
https://github.com/oxygenxml-incubator/ ... %20Actions

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Subathra
Posts: 8
Joined: Tue Apr 22, 2025 4:35 pm

Re: AI Positron - I am not able to import chat

Post by Subathra »

Thank you.
Post Reply