Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/actions/set-xcode-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inputs:
Xcode version to use, in semver(ish)-style matching the format on the Actions runner image.
See available versions at https://github.com/actions/runner-images/blame/main/images/macos/macos-14-Readme.md#xcode
required: false
default: '16.2'
default: '26.0'
outputs:
xcode-path:
description: "Path to current Xcode version"
Expand Down
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/`.
22 changes: 22 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: Swift

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
43 changes: 43 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Edge",
"request": "launch",
"type": "msedge",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"name": "Launch Chrome",
"request": "launch",
"type": "chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"name": "Launch Edge",
"request": "launch",
"type": "msedge",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"name": "Launch Chrome",
"request": "launch",
"type": "chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
103 changes: 103 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,109 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.43.0 - September 4, 2025
### Fixed
- Cannot type non-Latin characters in the chat input field.

## 0.42.0 - September 3, 2025
### Added
- Support for Bring Your Own Keys (BYOK) with model providers including Azure, OpenAI, Anthropic, Gemini, Groq, and OpenRouter. See [BYOK.md](https://github.com/github/CopilotForXcode/blob/0.42.0/Docs/BYOK.md).
- Use the current selection as chat context.
- Add folders as chat context.
- Shortcut to quickly fix errors in Xcode.
- Support for custom instruction files at `.github/instructions/*.instructions.md`. See [CustomInstructions.md](https://github.com/github/CopilotForXcode/blob/0.42.0/Docs/CustomInstructions.md).
- Support for prompt files at `.github/prompts/*.prompt.md`. See [PromptFiles.md](https://github.com/github/CopilotForXcode/blob/0.42.0/Docs/PromptFiles.md).
- Use ↑/↓ keys to reuse previous chat context in the chat view.

### Changed
- Default chat mode is now set to “Agent”.

### Fixed
- Cannot copy url from Safari browser to chat view.

## 0.41.0 - August 14, 2025
### Added
- Code review feature.
- Chat: Support for new model GPT-5.
- Agent mode: Added support for new tool to read web URL contents.
- Support disabling MCP when it's disabled by policy.
- Support for opening MCP logs directly from the MCP settings page.
- OAuth support for remote GitHub MCP server.

### Changed
- Performance: Improved instant-apply speed for edit_file tool.

### Fixed
- Chat Agent repeatedly reverts its own changes when editing the same file.
- Performance: Avoid chat panel being stuck when sending a large text for chat.

## 0.40.0 - July 24, 2025
### Added
- Support disabling Agent mode when it's disabled by policy.

## 0.39.0 - July 23, 2025
### Fixed
- Performance: Fixed a freezing issue in 'Add Context' view when opening large projects.
- Login failed due to insufficient permissions on the .config folder.
- Fixed an issue that setting changes like proxy config did not take effect.
- Increased the timeout for ask mode to prevent response failures due to timeout.

## 0.38.0 - June 30, 2025
### Added
- Support for Claude 4 in Chat.
- Support for Copilot Vision (image attachments).
- Support for remote MCP servers.

### Changed
- Automatically suggests a title for conversations created in agent mode.
- Improved restoration of MCP tool status after Copilot restarts.
- Reduced duplication of MCP server instances.

### Fixed
- Switching accounts now correctly refreshes the auth token and models.
- Fixed file create/edit issues in agent mode.

## 0.37.0 - June 18, 2025
### Added
- **Advanced** settings: Added option to configure **Custom Instructions** for GitHub Copilot during chat sessions.
- **Advanced** settings: Added option to keep the chat window automatically attached to Xcode.

### Changed
- Enabled support for dragging-and-dropping files into the chat panel to provide context.

### Fixed
- "Add Context" menu didn’t show files in workspaces organized with Xcode’s group feature.
- Chat didn’t respond when the workspace was in a system folder (like Desktop, Downloads, or Documents) and access permission hadn’t been granted.

## 0.36.0 - June 4, 2025
### Added
- Introduced a new chat setting "**Response Language**" under **Advanced** settings to customize the natural language used in chat replies.
- Enabled support for custom instructions defined in _.github/copilot-instructions.md_ within your workspace.
- Added support for premium request handling.

### Fixed
- Performance: Improved UI responsiveness by lazily restoring chat history.
- Performance: Fixed lagging issue when pasting large text into the chat input.
- Performance: Improved project indexing performance.
- Don't trigger / (slash) commands when pasting a file path into the chat input.
- Adjusted terminal text styling to align with Xcode’s theme.

## 0.35.0 - May 19, 2025
### Added
- Launched Agent Mode. Copilot will automatically use multiple requests to edit files, run terminal commands, and fix errors.
- Introduced Model Context Protocol (MCP) support in Agent Mode, allowing you to configure MCP tools to extend capabilities.

### Changed
- Added a button to enable/disable referencing current file in conversations
- Added an animated progress icon in the response section
- Refined onboarding experience with updated instruction screens and welcome views
- Improved conversation reliability with extended timeout limits for agent requests

### Fixed
- Addressed critical error handling issues in core functionality
- Resolved UI inconsistencies with chat interface padding adjustments
- Implemented custom certificate handling using system environment variables `NODE_EXTRA_CA_CERTS` and `NODE_TLS_REJECT_UNAUTHORIZED`, fixing network access issues

## 0.34.0 - April 29, 2025
### Added
- Added support for new models in Chat: OpenAI GPT-4.1, o3 and o4-mini, Gemini 2.5 Pro
Expand Down
6 changes: 3 additions & 3 deletions Copilot for Xcode.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
3ABBEA282C8B9FE100C61D61 /* copilot-language-server */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "copilot-language-server"; path = "Server/node_modules/@github/copilot-language-server/native/darwin-x64/copilot-language-server"; sourceTree = SOURCE_ROOT; };
3ABBEA2A2C8BA00300C61D61 /* copilot-language-server-arm64 */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "copilot-language-server-arm64"; path = "Server/node_modules/@github/copilot-language-server/native/darwin-arm64/copilot-language-server-arm64"; sourceTree = SOURCE_ROOT; };
3ABBEA282C8B9FE100C61D61 /* copilot-language-server */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "copilot-language-server"; path = "Server/node_modules/@github/copilot-language-server-darwin-x64/copilot-language-server"; sourceTree = SOURCE_ROOT; };
3ABBEA2A2C8BA00300C61D61 /* copilot-language-server-arm64 */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "copilot-language-server-arm64"; path = "Server/node_modules/@github/copilot-language-server-darwin-arm64/copilot-language-server-arm64"; sourceTree = SOURCE_ROOT; };
3E5DB74F2D6B88EE00418952 /* ReleaseNotes.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = ReleaseNotes.md; sourceTree = "<group>"; };
424ACA202CA4697200FA20F2 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
427C63272C6E868B000E557C /* OpenSettingsCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenSettingsCommand.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -719,7 +719,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export PATH=/usr/local/bin:/opt/homebrew/bin:$PATH\n\nnpm -C Server install\ncp Server/node_modules/@github/copilot-language-server/native/darwin-arm64/copilot-language-server Server/node_modules/@github/copilot-language-server/native/darwin-arm64/copilot-language-server-arm64\n\necho \"Build and copy webview js/html files as the bundle resources\"\nnpm -C Server run build\nmkdir -p \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources/webViewDist\"\ncp -R Server/dist/* \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources/webViewDist/\"\n";
shellScript = "export PATH=/usr/local/bin:/opt/homebrew/bin:$PATH\n\nnpm -C Server install --force\ncp Server/node_modules/@github/copilot-language-server-darwin-arm64/copilot-language-server Server/node_modules/@github/copilot-language-server-darwin-arm64/copilot-language-server-arm64\n\necho \"Build and copy webview js/html files as the bundle resources\"\nnpm -C Server run build\nmkdir -p \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources/webViewDist\"\ncp -R Server/dist/* \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources/webViewDist/\"\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
reference = "container:Pro/ProTestPlan.xctestplan">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GitHelperTests"
BuildableName = "GitHelperTests"
BlueprintName = "GitHelperTests"
ReferencedContainer = "container:Tool">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
Loading