AI Features Manual · Chapter 5
The AI panel

- Header — Title, this month's spending / monthly limit (this PC — with the percentage past 50%, and today's spending when a daily limit is set, chapter 13) and close
X. - Mode — Ask, Plan, Work, Debug (below). Changing it starts a new conversation.
- Model and effort — The model and thinking depth for this conversation. Locked once the conversation starts.
- Conversation — Your question cards and AI answer cards. An answer card shows the tools the AI used, the answer, and cost, tokens and time.
- Input box —
Entersends,Shift+Enterstarts a new line. Drop files on it or paste a picture withCtrl+Vto attach. Type@to attach a project file, FUNCTION or STEP (below). - Buttons — [SEND], [STOP], [NEW], [PAYLOAD], [RUNS], [ATTACH], [CAPTURE], [VISION], [DIAGNOSE].
- Bottom line — Cost, requests, cache hit rate and tool calls of this conversation.
Four modes
| Mode | Use | Tools the AI can use | Default model / effort |
|---|---|---|---|
| Ask | Questions, code review, finding causes from logs (chapter 6) | Read, engine check | Sonnet · Medium |
| Plan | Reads the project and writes a plan → automatic run after approval (chapter 9) | Read, engine check, submit plan | Opus · High |
| Work | Proposes script, screen and parameter value changes, new parameters and new modules as a change set (chapter 8) | Read, read parameters, propose change, engine check, screen pictures, HTML mockups | Sonnet · High |
| Debug | After the machine stopped, finding the cause of an error or alarm — the diagnostic snapshot and the recent log are attached automatically (chapter 7) | Read, engine check, read the current machine state again (other modes too, in a conversation that sent [DIAGNOSE]) | Sonnet · High |
Changing the mode drops the current conversation and starts a new one. If there is an answered conversation or an unapplied change set, you are asked first; if a change set was already applied, you are told that its [REVERT] will no longer be available after the conversation is dropped.
Model and effort
| Model | Characteristics |
|---|---|
| Haiku | Fastest and cheapest (unit price about 1/20 of Sonnet; measured task cost about 1/10). Good for short questions and small fixes; on long sequence work it often misses part of the request. |
| Sonnet | Balanced. The default for Ask, Work and Debug modes. |
| Opus | Thinks the deepest. Its unit price is about twice Sonnet's (about 2.4× in measured hard tasks), so larger work may need a higher task limit. The default for Plan mode and commit drafts. |
- Effort (Low, Medium, High) is how deeply the model thinks. Higher can be slower and cost more.
- Model and effort are remembered per mode. They are locked during a conversation; change them with [NEW]. The commit draft model and effort are set in [Tool Options → AI].
- If a request is declined, the server may answer again with a fallback model. The line under the answer card (the status line in a commit draft) then adds "answered by fallback model …", and both attempts may be billed.
Attachments
- [ATTACH] — log and text files (.log, .txt, .xms, .xmd, .csv, .json, .xml, .ini) and pictures (.png, .jpg, .gif, .bmp, .tif, .webp). You can also drop files on the input box or press
Ctrl+V(pictures and files). - [CAPTURE] — a menu: Studio window (as it is now) · Last machine screen (the machine main window QMS kept at the moment you returned from the machine screen to the studio — dimmed if you have not returned yet; separate dialog windows are not included. When it is drawn, the dongle serial number, developer and PC names, folder paths and secrets on the screen are masked. If a screen module is excluded by
.qmsaiignoreit cannot be attached, because QMS cannot tell which screen was shown) · Screen design (a screen module drawn as designed — no machine values). The AI is used only in studio mode, so the running machine screen cannot be captured at that moment; to capture it at any time while running, useWin+Shift+Sand paste it withCtrl+V. - @references — type
@at the start of a word in the input box to list project files, FUNCTIONs and STEPs. Type more to narrow it (@Main::lists that module's FUNCTIONs and STEPs), choose with↑↓, attach withEnterorTab(or the mouse), close withEsc. The attachment becomes a chip and is sent with the file's line numbers, secrets masked, up to 60,000 characters from the start. It is read again just before sending, so later edits are sent, and a file excluded by.qmsaiignorein the meantime is not sent. Excluded files, protected files and pictures are not even listed. - [DIAGNOSE] — attaches the current machine state at once (diagnostic snapshot). A preview shows the text to be sent; it becomes a chip only after [ATTACH].
- [VISION] — the current image of a camera, or the last mark or edge image of an align. Align images are kept only when you measure after opening the align result screen.
- [HTML MOCKUP] — shown in Work mode only. Draws a screen mockup made of HTML, CSS and pictures in an isolated browser and attaches the measurements and the picture (chapter 8). In the other modes an HTML file added with [ATTACH] is attached as text only.
- Attachments appear as chips above the input box (name, size, estimated tokens, masked values). Remove one with its
x. - Text attachments up to 1 MB are sent after masking secrets and IPs, up to the last 200,000 characters. A text file over 1 MB is not sent but searched as a large log. Pictures are reduced to 2,576 px on the long side before sending (up to 40 MB and 100 million pixels per picture file).
- Limits — 8 attachments and 5 pictures per question; 20 pictures and 40 MB per conversation (pictures of earlier questions are sent again with every request).
- Drawing PDF — choosing a .pdf in [ATTACH] opens a page selection window, and only the chosen pages are attached as PDF (text + pictures) or as text only (chapter 8). Up to 20 pages at a time, and 25 pages and 20 MB of pictures and PDFs per conversation.
Large log search


When you attach a text file (log) over 1 MB, the file is not sent. QMS indexes it on this PC, and the AI finds and reads only the lines it needs with the log tools. This works for logs of hundreds of MB.
- Indexing — after attaching, the chip shows 'large log, indexing n%' and then the size and line count (a few seconds for 500 MB). Nothing is sent before indexing is done. The chip's × stops indexing and removes the log.
- Sent at first — only the file name, size, line count, time range and entries per level (error, warning and so on) — a few hundred tokens.
- Log tools — overview (GetLogOverview), search (SearchLog — text or regular expression, filtered by level, time and line range), read lines (ReadLogLines — up to 300 lines per call) and statistics (GetLogStats — entries per time interval, most frequent messages). They work in Ask, Plan, Work and Debug modes (a large recent log of Debug mode is searched with them too). Only the lines the AI finds are sent, after masking secrets (and IPs when IP addresses is set to Mask); the '▸' lines of the answer card show what it searched. Search and statistics work on the masked text — masked values (passwords and so on) cannot be searched for, and lines that differ only in a masked value are counted as one message.
- A log sent in a conversation can be searched again by later questions in it (if the question fails, the log it carried leaves the tools until it is sent again). The index is kept after [NEW] or a mode change, so attaching the same file again uses it at once without indexing. A conversation can use up to 8 large logs, including those sent with earlier questions, and the indexes of earlier conversations are kept within these 8 places, newest first. They are released when the project is closed.
- A log that is still being written can be attached. Each tool call indexes the part added since.
- Files excluded by
.qmsaiignoreand protected files are not attached as large logs either. UTF-16 logs cannot be handled as large logs and are attached by their end instead. - Each tool call splits its work so that it ends within about 3 seconds. The screen may pause briefly meanwhile, and a search of a very large log returns its results in several parts.
- The log tool definitions (about 850 tokens) are in every request of the AI panel, including automatic runs but not commit drafts, even when no log is attached (they are cached, so later requests pay less for them).
Managing conversations
- [NEW] — clears the conversation and starts a new one. The longer a conversation, the more is resent with every request and the higher the cost, so start a new conversation when the topic changes.
- [STOP] — stops the answer that is arriving. What arrived stays on screen but is not kept in the conversation, and the question is put back in the input box.
- A failed question puts its text and attachments back in the input box so you can send it again.
- If a different project is open when you send, a new conversation starts.
- Limits — 20,000 characters per question, 30 questions per conversation. Past about 150,000 tokens, [NEW] is recommended.