Selecting in the preview and viewing the code
Point at parts of your site so Cortex knows what you mean, and open your site's files in Code mode.
With Select you show Cortex exactly which part of your site you want to change. With Code you see and edit your site's files, with the chat beside them.
Selecting a part of your site
Turn on Select
In the preview bar, press Select. As you move the mouse, the part underneath gets highlighted.
Click what you want to change
That part is attached to your message, in the chat box. You can add up to 5 parts.
Write your request
For example: "make this button bigger" or "swap this photo for one of bread". Cortex knows which file and line each part is on.
To leave Select, press Esc. To remove an attached part, press its Remove.
Select saves explaining
"This title" with the title selected is clearer than describing it in words. Cortex gets it right more often and is usually quicker.
Code mode
Press Code at the top of Studio. You'll see:
- the file explorer on the left,
- tabs for your open files and the editor in the middle,
- the conversation with Cortex on the right, on wide screens.
Handy shortcuts: ⌘S saves, ⌘P opens a file by typing its name and ⌘F searches. The bar at the bottom tells you if anything is unsaved.
If you'd rather have more room for the code, press Hide the chat.
Code and Cortex together
If you ask Cortex for something from Code, Berse saves what you wrote first. That way Cortex starts from your version.
While Cortex works, the editor is read-only: you'll see "Cortex is working: read-only". When it's done, its changes show up in the editor on their own.
In Cortex's reply, the Files it changed list shows how many lines it added and removed in each file. Tap one to open it in Code.
If you work with other people
If someone else has the same file open, you'll see a dot in their colour next to it. When someone saves, their version reaches you on its own. See Inviting people and roles.
Something not working? See When something doesn't work.
