Skip to content
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
77b2c02
Pre-release 0.34.118
actions-user May 16, 2025
82d3232
Release 0.35.0
actions-user May 19, 2025
f04ddbe
Pre-release 0.35.120
actions-user Jun 3, 2025
041a898
Pre-release 0.35.121
actions-user Jun 4, 2025
2e8e989
Release 0.36.0
actions-user Jun 4, 2025
d3cd006
Pre-release 0.36.123
actions-user Jun 13, 2025
fabc66e
Pre-release 0.36.124
actions-user Jun 17, 2025
64a0691
Release 0.37.0
actions-user Jun 18, 2025
81fc588
Pre-release 0.37.126
actions-user Jun 24, 2025
9788b5c
Pre-release 0.37.127
actions-user Jun 27, 2025
d1f7de3
Release 0.38.0
actions-user Jun 30, 2025
e7fd64d
Pre-release 0.38.129
actions-user Jul 9, 2025
c862f92
Create swift.yml
smoku8282 Jul 22, 2025
afbbdad
Release 0.39.0
actions-user Jul 23, 2025
9d1d42f
Release 0.40.0
actions-user Jul 24, 2025
0517f3b
Pre-release 0.40.132
actions-user Aug 1, 2025
c6e9a07
Pre-release 0.40.133
actions-user Aug 12, 2025
3a67130
Release 0.41.0
actions-user Aug 14, 2025
1339ef7
Pre-release 0.41.135
actions-user Aug 27, 2025
65dc134
Pre-release 0.41.136
actions-user Sep 2, 2025
be64a90
Release 0.42.0
actions-user Sep 3, 2025
b3fe4dd
Release 0.43.0
actions-user Sep 4, 2025
4381034
Pre-release 0.43.139
actions-user Sep 15, 2025
079132f
Create launch.json
smoku8282 Sep 19, 2025
aa450c1
Merge branch 'main' of https://github.com/smoku8282/CopilotForXcode
smoku8282 Sep 19, 2025
dee1fd1
Create copilot-instructions.md
smoku8282 Sep 19, 2025
75aa71a
Pre-release 0.43.140
actions-user Sep 19, 2025
1978c49
Merge branch 'github:main' into main
smoku8282 Sep 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create copilot-instructions.md
  • Loading branch information
smoku8282 committed Sep 19, 2025
commit dee1fd1d2b14665fdc0d9769de98cafcac4e9df2
46 changes: 46 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copilot Agent Instructions for GitHub Copilot for Xcode

## Project Overview
- **Purpose:** This project is an Xcode extension and companion app that brings GitHub Copilot's AI code suggestions and chat to Xcode, with deep integration for inline completions, chat, and agent-driven codebase modifications.
- **Architecture:**
- **Core/**: Swift Package containing main business logic, services, and UI components. Organized by feature (e.g., `ChatService`, `SuggestionService`, `PromptToCodeService`).
- **EditorExtension/**: Implements Xcode Source Editor Extension commands (e.g., Accept/Reject Suggestion, Open Chat, etc.).
- **CommunicationBridge/**: Handles XPC communication between the main app and extension services.
- **ExtensionService/**: Manages the lifecycle and UI of the extension's background service.
- **Server/**: Node.js backend for advanced features (optional, rarely modified).
- **Docs/**: Images and documentation assets.

## Key Workflows
- **Build & Run:**
- Open `Copilot for Xcode.xcworkspace` in Xcode.
- Build the `GitHub Copilot for Xcode` app target for macOS 12+.
- The extension is enabled via System Preferences > Extensions > Xcode Source Editor.
- **Testing:**
- Run Swift Package tests from the `Core/` directory using Xcode or `swift test`.
- **Debugging:**
- Use the `CommunicationBridge` and `ExtensionService` logs for troubleshooting XPC and extension issues.
- See `TROUBLESHOOTING.md` for permission and integration issues.

## Project Conventions
- **Feature Folders:** Each major feature in `Core/Sources/` is a separate folder with its own logic and tests.
- **Dependency Injection:** Uses [swift-dependencies](https://github.com/pointfreeco/swift-dependencies) and [Composable Architecture](https://github.com/pointfreeco/swift-composable-architecture) for state and effect management.
- **XPC Communication:** All cross-process calls use protocols in `Tool/` and are implemented in `CommunicationBridge/` and `ExtensionService/`.
- **Permissions:** Requires `Accessibility`, `Background`, and `Xcode Source Editor Extension` permissions. See `TROUBLESHOOTING.md` for details.
- **External Packages:** Managed in `Core/Package.swift`. Do not add dependencies directly to Xcode project files.

## Integration Points
- **Xcode Extension:** Commands in `EditorExtension/` are registered in `Info.plist` and invoked via the Xcode Editor menu.
- **App ↔ Extension:** Communication via XPC, with protocols defined in `Tool/` and implemented in `CommunicationBridge/ServiceDelegate.swift`.
- **Updates:** Uses [Sparkle](https://sparkle-project.org/) for in-app updates.

## Examples
- To add a new chat feature: create a folder in `Core/Sources/`, add logic, register in `Package.swift`, and connect via the appropriate service.
- To add a new editor command: implement in `EditorExtension/`, update `Info.plist`, and test in Xcode.

## References
- See `README.md` for user setup and onboarding.
- See `TROUBLESHOOTING.md` for common integration and permission issues.
- See `Core/Package.swift` for dependency and target structure.

---
For questions about unclear patterns or missing documentation, ask for clarification or check the latest onboarding docs in `Docs/`.