> ## Documentation Index
> Fetch the complete documentation index at: https://trytracely.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Context Handling

Tracely sends your project state to the AI so it can work with your scene, scripts, and assets. You control this in two ways: **Context Options** (what’s included by default and how much) and **attaching scripts and assets** (adding specific files to a message with **@**).

***

## **Context Options**

Open **Context Options** from the sidebar (the cube/layers icon). These settings control how much project context is sent with each request: scene structure, script contents, and size limits. Your **Processing Mode** (Fast / Extended / Thinking) also applies default limits; the panel shows the current mode and those defaults.

| Option                      | What it does                                                                                    | When to adjust                                                                                                                                                                     |
| :-------------------------- | :---------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Scene Max Depth**         | How deep the hierarchy is included (1–10 levels, or **Unlimited**).                             | **Lower (1–3)** for simple scenes or faster, smaller requests. **Higher or Unlimited** when the AI needs to see nested objects (e.g. deep UI or complex prefab hierarchies).       |
| **Max Script Bytes**        | Total size cap for script *content* sent (slider + presets: 64KB, 200KB, 512KB).                | **Lower (e.g. 64KB)** for quick questions or to reduce tokens. **Higher (200KB–512KB)** when you need the AI to read many or large scripts (e.g. “refactor all movement scripts”). |
| **Include Scene Summary**   | Sends scene name, path, object count, root names.                                               | Leave **on** for most tasks so the AI knows which scene and scale. Turn **off** only if you want to minimize context and don’t need scene identity.                                |
| **Include Scene Hierarchy** | Sends the full GameObject hierarchy (names, paths, parents, components) within the depth limit. | **On** for creating/editing objects, UI, or anything scene-related. **Off** only for pure script-only questions where hierarchy doesn’t matter.                                    |
| **Include Scripts Content** | Sends the text of scripts (up to Max Script Bytes).                                             |                                                                                                                                                                                    |

**Benefits of tuning**

* **Faster / cheaper:** Reduce **Scene Max Depth**, **Max Script Bytes**, or turn off **Include Scripts Content** or **Include Scene Hierarchy** when the task doesn’t need them.
* **More accurate:** Increase depth or script size, or turn on hierarchy/scripts, when the AI needs to see structure and code (e.g. “wire the button to the manager in the scene”).
* **Processing Mode:** Fast uses smaller defaults (depth 2, 64KB scripts); Extended and Thinking use larger ones. Use Fast for quick iterations; use Extended or Thinking when you need more context in one go.

***

## **Attaching scripts and assets (@)**

To give the AI **specific** scripts or assets for a message (full script content or asset path/type), use **@** in the chat input.

**How to use it**

1. In the message box, type **@**.
2. A dropdown appears with:

* **Suggestions**: Scripts and assets from your Unity or Godot project, filtered by what you type after @ (e.g. @Player). Use **↑/↓** to move, **Enter** or **Tab** to select.
* **“Add script…”** / **“Add asset…”**: opens the full script or asset selector (same as the sidebar buttons).

1. Selected items appear as **tags** above the input (e.g. @PlayerMovement, @MainMenu). Remove a tag if you don’t want it attached.
2. Send the message as usual. The attached scripts (with content) and assets (path + type) are sent with that message so the AI can reference them directly.

**When it helps**

* **Scripts:** “Change the logic in @PlayerMovement to add double jump” or “Add a method to `@GameManager` that resets the level.” Attaching the script ensures the AI has that file’s content even if it’s not in the default context.
* **Assets:** “Use the `@MainMenu` prefab for the button” or “Apply `@GrassMaterial` to the terrain.” The AI gets the exact path and type.
* **Combined:** Attach the scripts and assets that matter for the task so the AI doesn’t have to guess or rely only on automatic context.

**Other ways to attach**

* Sidebar **Add Scripts** and **Add Assets** open the full selectors; chosen items are also attached to the next message and show as tags. The **@** dropdown is a shortcut from the composer area without leaving the keyboard.
