Page 1 of 1

AI Positron - I am not able to import chat

Posted: Tue Apr 22, 2025 4:40 pm
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"
}]
} ]

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

Posted: Wed Apr 23, 2025 8:12 am
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

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

Posted: Thu Apr 24, 2025 4:21 pm
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.

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

Posted: Tue Apr 29, 2025 6:57 pm
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.

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

Posted: Wed Apr 30, 2025 6:31 am
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

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

Posted: Wed Apr 30, 2025 10:20 am
by Subathra
Thank you.