Source code editor
The source code editor is the main interface where you can write bot scripts.
You can also create bot scripts using the J-Graph visual editor.
To open the source code editor, select a project and go to Editor > Code on the control panel. The editor consists of several zones:
Files
The Search tab displays the whole file structure of the project. On this tab, you can:
Create a file Create a folder Search for a file or folder
Right-click the necessary file or folder and you will see the following options:
- New file
- New folder
- Cut
- Copy
- Paste (if you have used the Cut option)
- Rename
- Delete
You can also cut and paste a file or folder. For that, drag and drop it into the necessary directory.
Cross search
On the Search tab, you can find the necessary sequence of characters in all project files. Cross search is also available by using the Ctrl + Shift + F keyboard shortcut (Cmd + Shift + F for macOS).
Click to configure additional parameters, such as case sensitivity or extensions of the files where the characters will be searched for. If you want to replace the specified character sequence with another one, click .
Only the first 100 entries are shown in the search results.
The search query should contain from 3 to 20 characters.
Dependencies
If you reuse the same script fragments across many projects, consider moving them to a separate folder or a Git repository and importing them as dependencies.
You can also use system modules as dependencies. They contain a number of ready-made named patterns, functions, etc., which can be imported into JAICP projects without any extra setup.
On the Dependencies panel under the file tree, you can view the contents of zb-common
and zfl-common
system modules,
as well as all external dependencies connected to the project.
After declaring a new dependency in chatbot.yaml
or updating an existing one,
click to load and display its contents in the editor.
All dependency files are read-only.
Main editor window
To open the main editor window, create a file or click on the existing one. Here you can create and edit all the project files.
The following additional actions are also available:
Use the code editor for creating script files. Switch to the J-Graph visual editor. Save the script version. Roll back the project to the previous version. Set up the editor window. Search for the text you need in the chosen file.
You can switch between files using tabs located above the main editor window.
Server logs
To monitor the bot performance in real time, click on the Logs tab under the main editor window.