Working in Plangku
The code assistant
Chat with Plangku AI inside the code editor. It explains your files and proposes complete changes that you review before saving.
What it is
The code assistant is a chat panel in the code editor, laid out like the chat in VS Code. It knows how Plangku themes work: the Plang language, the schema format, the filters, the platform snippets and the rules about what is allowed on a page.
Open it with the sparkle icon in the left bar, or press ⌘I. The shortcut opens the chat and puts the cursor in the message box. Click + at the top of the chat to start a new conversation.
You need the Theme code permission. The assistant also needs the server to have an AI key set up. If it is not, the panel says so and the message box does not work.
What it can do
- Explain what a file does, line by line if you want.
- Find out why a section shows nothing, using the problems the editor reports.
- Write a new section, snippet, stylesheet or theme-settings file.
- Change an existing file: a new layout, softer cards, a different heading, a new setting.
- Answer questions about the language, in Indonesian or English. It answers in the language you wrote in.
Try asking:
- "Explain what this file does"
- "Add a 'Promo hari ini' section with a badge and a WhatsApp button"
- "Make this section look more premium: bigger heading, softer cards, more spacing"
- "Why does my section show nothing?"
Four starter questions like these are shown in an empty chat. Click one to send it.
What it can see
The assistant does not see your whole theme. It sees only what you send with each message.
| Sent with your question | Details |
|---|---|
| The website's name | Always |
| The open file | Included by default. It is the text in the editor, including unsaved edits |
| Your selection | If you have text selected in the open file, up to 8,000 characters of it |
| Files you add | Click Add context and pick files. Up to 10 files per message |
| The editor's problems | The first 20 errors and warnings from the Problems panel |
The open file shows as a chip under the message box. Click it to leave the file out of the next question. Each file is cut off after 60,000 characters. Image files cannot be added.
It does not see the preview, the live website, your collections' data or any file you did not add. If it needs another file, add it as context and ask again.
A conversation keeps up to the last 40 messages and about 150,000 characters. After that you see "This conversation is too long. Start a new chat."
Proposals come back as complete files
When the assistant wants to change or create a file, it writes the complete new file in a code block labelled with the file's path, such as sections/promo.plang. It never gives half a file. You review it, and then you decide.
Each code block has these buttons:
| Button | What it does |
|---|---|
| Apply | Opens a comparison between your file and the proposal. Only on blocks labelled with a file path |
| Insert at cursor | Types the block into the open file at the cursor |
| Copy | Copies the block |
The steps for a change:
- Click Apply. A tab opens with your file on one side and the proposal on the other.
- Read the differences.
- Click Accept to put the proposal into the editor, or Discard to throw it away.
- If you accepted, press ⌘S to save.
Nothing is saved until you save. Accepting only changes the text in the editor, like typing it yourself. You can undo it with the usual undo. A proposal with errors cannot be saved, the same as your own code. See Saving, history and publishing.
For a file that does not exist yet, the comparison shows the whole file as new. Accepting it opens the file in the editor, and saving creates it.
If a reply is cut off because it is too long, the chat tells you. Ask for one file at a time.
Limits
You can send up to 150 messages per person in any 24 hours. The counter at the top of the chat shows how many you have used, such as "12/150 today". The allowance comes back gradually, as old messages pass the 24-hour mark.
The limit is the AI_CHAT_DAILY_LIMIT setting of the server. 150 is the default, and whoever runs the server can change it. It counts messages to the code assistant only. It is separate from the daily limit for Create with AI sections in the visual editor, so using one does not use up the other.
If you go over, you see a message saying you have sent all your messages for today.
What it cannot do
- It cannot add JavaScript. Customer websites run without it, and the page cleaner removes
<script>andon...attributes anyway. Ask for the closest option instead: CSS,<details>,:targetor thepopoverattribute. If you ask for something that needs JavaScript, it says so and offers an alternative. - It cannot save, publish or delete anything. Only you can, by accepting a change and saving.
- It cannot run your theme or look at the result. Check the preview yourself.
- It can be wrong. Read the comparison before you accept, and check the preview after you save.