Answer#
Each message goes to the provider as a request over HTTPS to the base URL in the provider entry. These parts can be in it:
- Your question and the earlier turns of the chat. Earlier questions are sent as you typed them.
- The context toggles under the chat. Current file adds the full text of the file open in the editor; Problems adds up to 25 entries from the Problems list for that file, each as line number, the first line of the message and error or warning.
- A selection. If text is selected in the editor, the selected lines are included with the file name and line range.
- Files you name with
@. Type@src/main.rsin the question and that file is attached. Only files inside the project folder are attached; a path that leads outside it is ignored. - A project summary and a fixed instruction. The summary names the folder or solution and its projects, up to 40 dependency names found in the project's manifests, and the Rust toolchain version. The instruction tells the model that it is the assistant in Ruststudio and asks for complete files in code blocks marked with the file path.
Only the newest question carries its attachments; older questions are re-sent as typed, without the file text.
Limits#
- A file or selection longer than 60,000 characters is cut off, with a note saying how many characters were left out.
- A file named with
@is skipped if it is larger than 2 MiB or looks binary. - Each attachment shows under your message ("attached: ..."), so you can see what was sent.
What it does not do#
It does not scan the project folder or read files you did not toggle on or name. The response only changes your files when you press Apply (see the thread on applying code).
What to do if code must not leave your machine#
Turn off the context toggles, deselect text in the editor, do not name files with @ and do not paste code, or use a local model (see the thread on Ollama, LM Studio and llama.cpp). Keys and settings are covered by the thread on keeping the API key safe.