Goal: Use Agent Mode to make changes across multiple files automatically.
Scenario: Update the favorite indicator throughout the app to use heart icons.
- Open LandmarkList.swift
Path:
Landmarks/Views/Landmarks/LandmarkList.swift - Open the Preview Canvas to see the current UI (Cmd + Option + Enter)
- Switch to Agent mode in the Copilot Chat panel
- Enter this prompt:
Update all favorite buttons to use heart-shaped icons (filled heart for favorited,
outline heart for not favorited) across all views in the project.
- Copilot will analyze the codebase and propose changes to multiple files
- Review the proposed changes in the diff view
- Check the Preview Canvas to see the updated UI
- Agent Mode identified all files with favorite functionality
- It updated icons consistently across
LandmarkRow,LandmarkDetail, and other views - Changes were made simultaneously across multiple files
Add a rating system (1-5 stars) to landmarks with mock dataImplement a dark mode toggle in the settings viewAdd categories filter chips at the top of the landmark list
You've learned how to:
- Use Agent Mode for multi-file refactoring
- Review proposed changes in the diff view
- Verify changes with the Preview Canvas