Skip to content

Chat Feature

You can use the chat panel to chat with information from Xcode and the project.

Configurations

You can configure the chat feature in the two places:

  1. Feature -> Chat section in the host app.
  2. The context menu of the chat window tab.

Contexts

You can add contexts by

  • Clicking the + button next to the input field.
  • Typing @context in the chat input, the app will show the context list as you type.
  • Pasting the link in the chat input, the app will show the webpage context.
  • And there will be some hidden contexts that are not shown in the context list.
    • Xcode information
    • Selected code

To configure each context, you can click the context name in the context list.

The available contexts are:

ContextsDescription
FileInclude the file content as context.
SymbolInclude the symbol content or interface as context. In the completion panel, you can hold option to add it as full content.
ActiveDocuemntInclude the active document content as context.
GitStatusInclude the git status and diff as context.
GitLogInclude the git log as context.
DebugAreaInclude the debug area content as context.
ClipboardInclude the webpage content as context.
WebUse search results as context.
ProjectInclude the project content as context. (keyword search based at the moment)
SenseInclude relevant symbol information as context.
TopicAppend extra rules into the system prompt.
Code SnippetInclude the a code snippet as context.
Web PageInclude the webpage content as context by typing the url in the text field.

Pinned Contexts

If you add a context by clicking the + button next to the input field, the context will be persisted across the chat sessions. You can also delete the context by clicking the x button in the context list.

Temporary Contexts

If you add a context by typing @context in the chat input, the context will be a temporary context. A temporary context will be removed after you send a message.

You can also pin the context by clicking the pin button in the context list.

Recipients

You can add recipients to the chat by typing @recipient in the chat input, the app will show the recipient list as you type. You can use the following built-in recipients:

RecipientDescription
@casualThe casual conversation. It can only access @web and @topic contexts.

Commands

You can add a command to the chat by typing /command in the chat input, the app will show the command list as you type. Here are the commands you can use:

CommandDescription
/runRun a shell command
/shortcut(name)Run a shortcut that you have in the Shortcuts app

Code Blocks

When the agent sends you a code block in the markdown format, it will be rendered in the chat.

Copy Button

You can copy the code block by clicking the copy button in the code block. You can also drag the copy button to the file tree in Xcode to create a new file with the code block content.

Apply/Create Button

You can use the apply button to apply the code block to the current file. When the button is clicked, the app will open the modification panel and apply the code block to the file.

If the agent is able to detect the file path, the app will automatically apply the code block to the file by default. But you can also choose where to apply the code block.

If the agent is able to detect the file path, but the file doesn’t exist, the app will show the create button. When the button is clicked, the app will open the creation panel and create a new file with the code block content.

Run Button

If the code block is a shell command or AppleScript, you can click the run button to run the command or script.