|
| 1 | +--- |
| 2 | +title: AI Chat |
| 3 | +--- |
| 4 | + |
| 5 | +Phoenix Code comes with a built-in AI assistant powered by Claude Code. You can ask it to write code, fix bugs, explain files, and more. The AI can read and edit your project files, run terminal commands, take screenshots of your Live Preview, and work alongside you as you code. |
| 6 | + |
| 7 | +> AI Chat is available only in desktop apps. Free users get a daily and monthly chat limit. [Upgrade to Phoenix Code Pro](https://phcode.io/pricing) for unlimited access. |
| 8 | +
|
| 9 | +<!-- Add an image here showing the AI Chat panel in the sidebar with a conversation --> |
| 10 | + |
| 11 | +## Getting Started |
| 12 | + |
| 13 | +AI Chat requires the Claude Code CLI to be installed on your machine. If it's not installed, Phoenix Code shows a setup screen with the install command for your platform. |
| 14 | + |
| 15 | +Once installed, click **Set up Claude Code** to log in. Phoenix Code detects when the login is complete and opens the chat panel automatically. |
| 16 | + |
| 17 | +<!-- Add an image here showing the setup/install screen --> |
| 18 | + |
| 19 | +## Opening the AI Panel |
| 20 | + |
| 21 | +Click the **AI tab** *(sparkle icon)* in the sidebar to open the chat panel. |
| 22 | + |
| 23 | +<!-- Add an image here showing the AI tab in the sidebar --> |
| 24 | + |
| 25 | +## Sending Messages |
| 26 | + |
| 27 | +Type your message in the input box at the bottom and press `Enter` to send. Press `Shift + Enter` to add a new line. |
| 28 | + |
| 29 | +While the AI is working, you can type your next message. It shows up as a queued message and gets sent automatically once the AI finishes its current response. |
| 30 | + |
| 31 | +### Context |
| 32 | + |
| 33 | +Phoenix Code automatically provides context about what you're working on. Small chips appear above the input box showing: |
| 34 | + |
| 35 | +- **Selection** - the file and line range you have selected in the editor |
| 36 | +- **Cursor** - your current line and file |
| 37 | +- **Live Preview** - if the Live Preview panel is open |
| 38 | + |
| 39 | +You can dismiss any of these by clicking the **x** button on the chip. |
| 40 | + |
| 41 | +## Attachments and Screenshots |
| 42 | + |
| 43 | +Click the **paperclip button** to attach files from your project. You can attach images (PNG, JPG, GIF, WebP, SVG) and other files like code or documents. |
| 44 | + |
| 45 | +Click the **camera button** to take a screenshot and attach it. The dropdown lets you choose what to capture: |
| 46 | + |
| 47 | +- **Live Preview** - your Live Preview panel (if open) |
| 48 | +- **Selected Element** - the currently selected element in Live Preview |
| 49 | +- **Full Editor** - the entire editor window |
| 50 | +- **Area** - a custom region you select with a crop tool |
| 51 | + |
| 52 | +## Permission Modes |
| 53 | + |
| 54 | +The AI has three permission levels that control how much it can do on its own. Click the **permission label** at the bottom of the panel to cycle between them. |
| 55 | + |
| 56 | +- **Plan** - the AI proposes a plan first. You review it and click **Approve** to proceed or **Revise** to give feedback. Good for complex tasks where you want to stay in control. |
| 57 | +- **Edit** (default) - the AI can read and edit files on its own, but asks for your approval before running terminal commands. |
| 58 | +- **Full Auto** - the AI works through everything without pausing. Terminal commands still ask for confirmation. |
| 59 | + |
| 60 | +<!-- Add an image here showing the permission mode selector --> |
| 61 | + |
| 62 | +## Session History |
| 63 | + |
| 64 | +Every conversation is saved automatically. Click the **history dropdown** at the top of the panel to see your recent sessions and switch between them. |
| 65 | + |
| 66 | +Sessions are saved per project, so each project has its own chat history. |
| 67 | + |
| 68 | +## Undo and Restore |
| 69 | + |
| 70 | +Before the AI makes any edits, Phoenix Code creates a **restore point**. If you don't like the changes, click **Undo** on the edit summary card to revert all the files back to how they were. |
| 71 | + |
| 72 | +If the AI made changes across multiple responses, you can click **Restore to this point** on any earlier edit summary to go back to that state. |
| 73 | + |
| 74 | +<!-- Add an image here showing an edit summary card with the Undo button and file change stats --> |
| 75 | + |
| 76 | +## Settings |
| 77 | + |
| 78 | +Click the **gear icon** in the chat panel to open AI settings. Here you can: |
| 79 | + |
| 80 | +- Switch between AI providers |
| 81 | +- Add a custom API provider with your own API key and endpoint |
| 82 | +- Set a custom API timeout |
| 83 | + |
| 84 | +<!-- Add an image here showing the AI settings dialog with provider configuration --> |
| 85 | + |
| 86 | +## Keyboard Shortcuts |
| 87 | + |
| 88 | +| Action | Shortcut | |
| 89 | +|--------|----------| |
| 90 | +| Send message | `Enter` | |
| 91 | +| New line | `Shift + Enter` | |
| 92 | +| Cycle permission mode | `Shift + Tab` | |
| 93 | +| Cancel or clear input | `Escape` | |
0 commit comments