> For the complete documentation index, see [llms.txt](https://purecodedocs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://purecodedocs.gitbook.io/docs/features/solving-errors.md).

# Solving Errors

{% embed url="<https://purecodestorageprod.blob.core.windows.net/component-images/docs/fix-errors-with-context>" %}

### Navigating to Error Files

**Locating Error Files**: Locate any file within your project that contains errors. PureCode AI highlights these files, making them easy to identify within your codebase.

### Utilizing Floating Options in File View

Once you've opened a file with errors, PureCode AI provides two options to assist in fixing them:​

#### 1. **Fix All Errors**

* **When to Use**: For simple, isolated issues that don't require understanding the broader context.​
* **How It Helps**: Automatically resolves straightforward errors, such as missing semicolons or incorrect variable names.​

{% hint style="success" %}
When you click **"Fix All Errors"**: The "Fix all problems" option with `@problems` is automatically sent in the chat area. This allows PureCode AI to resolve all detected issues in current file.
{% endhint %}

#### 2. **Fix All Errors with Context**

* **When to Use**: For complex errors that might be influenced by surrounding code.​
* **How It Helps**: Considers the context of the code to provide more accurate fixes, reducing the risk of introducing new issues.​

{% hint style="success" %}
When you click **'Fix All Errors with Context**' : The same `@problems` command is sent, but it includes context items that give PureCode AI the necessary information to solve the issues while keeping the surrounding code in mind.
{% endhint %}

### Addressing Terminal Errors

Terminal errors can be tricky, but PureCode AI offers tools to handle them effectively:​

* Using the `@terminal` Command
  * **How It Works**: By typing `@terminal`followed by your command in chat area, you can instruct PureCode AI to analyze and suggest fixes for terminal-related issues.​
  * **Example**: `@terminal solve all errors`

### Typing Specific Commands

* How It Works: Typing `solve all errors @codebase` addresses issues across your entire codebase. By using `@codebase`, PureCode AI automatically passes relevant context items with terminal errors, allowing it to fix issues in multiple files. Alternatively, you can click the **Codebase** option to do the same.

### Hint Section

* **Fix All Errors**: Use this for simple, isolated errors where understanding the surrounding code isn't necessary.​
* **Fix All Errors with Context**: Opt for this when dealing with complex issues that could be influenced by other parts of the code.​
* **Terminal Commands**: Employ these for global error resolution across your codebase or when you prefer a command-line interface to initiate batch processing of errors.

PureCode AI helps make your development process smoother by giving you smart tools to fix errors. Knowing when and how to use these tools can help keep your code clean and working well.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://purecodedocs.gitbook.io/docs/features/solving-errors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
