# AI (Code Editor)

CodeNull Copilot is an AI-powered code editor that enhances the development experience by providing intelligent code completion and assistance. Integrated seamlessly into hooks, custom functions, and other code-editing environments, CodeNull Copilot analyzes the context of your code and offers suggestions, examples, and guidance based on your current task. This documentation provides an overview of how to use CodeNull Copilot effectively within your development workflow.

### Prerequisites

Before using CodeNull Copilot, ensure that your site is enabled to utilize AI features. If you're unsure about the availability of AI capabilities on your site, please consult with the CodeNull administrator to verify and enable access.

### Getting Started

To begin using CodeNull Copilot, follow these steps:

* **Access the Code Editor**: Open the code editor environment where you intend to utilize CodeNull Copilot. This could be within your IDE, text editor, or integrated development environment.
* **Enable CodeNull Copilot**: Once inside the code editor, enable CodeNull Copilot by entering the following command:

```javascript
// q: Enter your question here
Then Press Control + Shift

```

* **Ask Questions**: After enabling CodeNull Copilot, you can start asking questions or seeking assistance regarding your code. Simply enter your question after "// q:", and then press Control + Shift. CodeNull Copilot will analyze your query and provide relevant suggestions and examples based on the context of your code.

### Examples

Here are a few examples of how you can utilize CodeNull Copilot:

#### Creating Jobs

Suppose you need to create a new job within your application. You can use CodeNull Copilot to generate the necessary code snippet based on your requirements. For example:

```javascript
// q: How to sort an array of objects by a specific property?
Then Press Control + Shift

// CodeNull Copilot generates:
/*
const sortedArray = array.sort((a, b) => (a.property > b.property) ? 1 : -1);
*/
```

Feel free to explore the capabilities of CodeNull Copilot further within your development projects. If you have any questions or need assistance, don't hesitate to consult this documentation or reach out to our support team.


---

# Agent Instructions: 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:

```
GET https://codenull.gitbook.io/dev/configurations/feature/ai-code-editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
