It does not work if I do this:
const OpenAI = require('openai'); const openai = new OpenAI({ apiKey: [[CHATGPTAPIKEY]] }); async function main() { const completion = await openai.chat.completions.create({ model: [[MODEL]], messages: [ {"role": "system", "content": "You are a "+[[COMMENTSTYLE]]+" assistant."}, {"role": "user", "content": [[SAVED_TEXT]]} ], temperature: [[TEMPERATURE2]], max_tokens: 150, stop: ["\n", "User:"], n: 1 }); [[OUTPUT]] = completion.choices[0]; } main();How to rename all variables at once in the project
-
Hello, I have a huge project and I have a global variable that bothers me because I have changed the way it works.
If I have to rename it manually, I'm in for the day.
So I tried with the script directly that works however in the bottom display I still have the old variable that is displayed because if I understand correctly
the /*Dat:eyJzIjoiY3VzdG9tIiwidiI6... contains the data that bas displaysDo you have a solution for renaming variables without using the editor? Thanks
-
@pronokush said in How to rename all variables at once in the project:
Do you have a solution for renaming variables without using the editor?
BAS doesn't have any tools for refactoring; every programmer must create them for themselves. That's our reality.
I believe you need a script that parses the XML file of the BAS project and changes:
- the base64 code that displays the code in the BAS IDE
- the code that changes the logic of code execution
-
@pronokush said in How to rename all variables at once in the project:
Hello, I have a huge project and I have a global variable that bothers me because I have changed the way it works.
If I have to rename it manually, I'm in for the day.
So I tried with the script directly that works however in the bottom display I still have the old variable that is displayed because if I understand correctly
the /*Dat:eyJzIjoiY3VzdG9tIiwidiI6... contains the data that bas displaysDo you have a solution for renaming variables without using the editor? Thanks
There is no such tool yet, but it is in development plans. Now you can write a script that changes the names of variables in the base64-encoded line of the technical description of the action, and then use the automatic actions update tool so that changes are applied to the action code following the interface