Skip to content

Commit 344a281

Browse files
authored
Merge pull request #4 from smoku8282/main
X code
2 parents 12fbb8f + 1978c49 commit 344a281

308 files changed

Lines changed: 20856 additions & 3663 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actions/set-xcode-version/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
Xcode version to use, in semver(ish)-style matching the format on the Actions runner image.
77
See available versions at https://github.com/actions/runner-images/blame/main/images/macos/macos-14-Readme.md#xcode
88
required: false
9-
default: '16.2'
9+
default: '26.0'
1010
outputs:
1111
xcode-path:
1212
description: "Path to current Xcode version"

‎.github/copilot-instructions.md‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copilot Agent Instructions for GitHub Copilot for Xcode
2+
3+
## Project Overview
4+
- **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.
5+
- **Architecture:**
6+
- **Core/**: Swift Package containing main business logic, services, and UI components. Organized by feature (e.g., `ChatService`, `SuggestionService`, `PromptToCodeService`).
7+
- **EditorExtension/**: Implements Xcode Source Editor Extension commands (e.g., Accept/Reject Suggestion, Open Chat, etc.).
8+
- **CommunicationBridge/**: Handles XPC communication between the main app and extension services.
9+
- **ExtensionService/**: Manages the lifecycle and UI of the extension's background service.
10+
- **Server/**: Node.js backend for advanced features (optional, rarely modified).
11+
- **Docs/**: Images and documentation assets.
12+
13+
## Key Workflows
14+
- **Build & Run:**
15+
- Open `Copilot for Xcode.xcworkspace` in Xcode.
16+
- Build the `GitHub Copilot for Xcode` app target for macOS 12+.
17+
- The extension is enabled via System Preferences > Extensions > Xcode Source Editor.
18+
- **Testing:**
19+
- Run Swift Package tests from the `Core/` directory using Xcode or `swift test`.
20+
- **Debugging:**
21+
- Use the `CommunicationBridge` and `ExtensionService` logs for troubleshooting XPC and extension issues.
22+
- See `TROUBLESHOOTING.md` for permission and integration issues.
23+
24+
## Project Conventions
25+
- **Feature Folders:** Each major feature in `Core/Sources/` is a separate folder with its own logic and tests.
26+
- **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.
27+
- **XPC Communication:** All cross-process calls use protocols in `Tool/` and are implemented in `CommunicationBridge/` and `ExtensionService/`.
28+
- **Permissions:** Requires `Accessibility`, `Background`, and `Xcode Source Editor Extension` permissions. See `TROUBLESHOOTING.md` for details.
29+
- **External Packages:** Managed in `Core/Package.swift`. Do not add dependencies directly to Xcode project files.
30+
31+
## Integration Points
32+
- **Xcode Extension:** Commands in `EditorExtension/` are registered in `Info.plist` and invoked via the Xcode Editor menu.
33+
- **App ↔ Extension:** Communication via XPC, with protocols defined in `Tool/` and implemented in `CommunicationBridge/ServiceDelegate.swift`.
34+
- **Updates:** Uses [Sparkle](https://sparkle-project.org/) for in-app updates.
35+
36+
## Examples
37+
- To add a new chat feature: create a folder in `Core/Sources/`, add logic, register in `Package.swift`, and connect via the appropriate service.
38+
- To add a new editor command: implement in `EditorExtension/`, update `Info.plist`, and test in Xcode.
39+
40+
## References
41+
- See `README.md` for user setup and onboarding.
42+
- See `TROUBLESHOOTING.md` for common integration and permission issues.
43+
- See `Core/Package.swift` for dependency and target structure.
44+
45+
---
46+
For questions about unclear patterns or missing documentation, ask for clarification or check the latest onboarding docs in `Docs/`.

‎.github/workflows/swift.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow will build a Swift project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
3+
4+
name: Swift
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: macos-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Build
20+
run: swift build -v
21+
- name: Run tests
22+
run: swift test -v

‎.vscode/launch.json‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch Edge",
9+
"request": "launch",
10+
"type": "msedge",
11+
"url": "http://localhost:8080",
12+
"webRoot": "${workspaceFolder}"
13+
},
14+
{
15+
"name": "Launch Chrome",
16+
"request": "launch",
17+
"type": "chrome",
18+
"url": "http://localhost:8080",
19+
"webRoot": "${workspaceFolder}"
20+
},
21+
{
22+
"name": "Launch Edge",
23+
"request": "launch",
24+
"type": "msedge",
25+
"url": "http://localhost:8080",
26+
"webRoot": "${workspaceFolder}"
27+
},
28+
{
29+
"name": "Launch Chrome",
30+
"request": "launch",
31+
"type": "chrome",
32+
"url": "http://localhost:8080",
33+
"webRoot": "${workspaceFolder}"
34+
},
35+
{
36+
"type": "chrome",
37+
"request": "launch",
38+
"name": "Launch Chrome against localhost",
39+
"url": "http://localhost:8080",
40+
"webRoot": "${workspaceFolder}"
41+
}
42+
]
43+
}

‎CHANGELOG.md‎

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,109 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.43.0 - September 4, 2025
9+
### Fixed
10+
- Cannot type non-Latin characters in the chat input field.
11+
12+
## 0.42.0 - September 3, 2025
13+
### Added
14+
- 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).
15+
- Use the current selection as chat context.
16+
- Add folders as chat context.
17+
- Shortcut to quickly fix errors in Xcode.
18+
- 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).
19+
- Support for prompt files at `.github/prompts/*.prompt.md`. See [PromptFiles.md](https://github.com/github/CopilotForXcode/blob/0.42.0/Docs/PromptFiles.md).
20+
- Use ↑/↓ keys to reuse previous chat context in the chat view.
21+
22+
### Changed
23+
- Default chat mode is now set to “Agent”.
24+
25+
### Fixed
26+
- Cannot copy url from Safari browser to chat view.
27+
28+
## 0.41.0 - August 14, 2025
29+
### Added
30+
- Code review feature.
31+
- Chat: Support for new model GPT-5.
32+
- Agent mode: Added support for new tool to read web URL contents.
33+
- Support disabling MCP when it's disabled by policy.
34+
- Support for opening MCP logs directly from the MCP settings page.
35+
- OAuth support for remote GitHub MCP server.
36+
37+
### Changed
38+
- Performance: Improved instant-apply speed for edit_file tool.
39+
40+
### Fixed
41+
- Chat Agent repeatedly reverts its own changes when editing the same file.
42+
- Performance: Avoid chat panel being stuck when sending a large text for chat.
43+
44+
## 0.40.0 - July 24, 2025
45+
### Added
46+
- Support disabling Agent mode when it's disabled by policy.
47+
48+
## 0.39.0 - July 23, 2025
49+
### Fixed
50+
- Performance: Fixed a freezing issue in 'Add Context' view when opening large projects.
51+
- Login failed due to insufficient permissions on the .config folder.
52+
- Fixed an issue that setting changes like proxy config did not take effect.
53+
- Increased the timeout for ask mode to prevent response failures due to timeout.
54+
55+
## 0.38.0 - June 30, 2025
56+
### Added
57+
- Support for Claude 4 in Chat.
58+
- Support for Copilot Vision (image attachments).
59+
- Support for remote MCP servers.
60+
61+
### Changed
62+
- Automatically suggests a title for conversations created in agent mode.
63+
- Improved restoration of MCP tool status after Copilot restarts.
64+
- Reduced duplication of MCP server instances.
65+
66+
### Fixed
67+
- Switching accounts now correctly refreshes the auth token and models.
68+
- Fixed file create/edit issues in agent mode.
69+
70+
## 0.37.0 - June 18, 2025
71+
### Added
72+
- **Advanced** settings: Added option to configure **Custom Instructions** for GitHub Copilot during chat sessions.
73+
- **Advanced** settings: Added option to keep the chat window automatically attached to Xcode.
74+
75+
### Changed
76+
- Enabled support for dragging-and-dropping files into the chat panel to provide context.
77+
78+
### Fixed
79+
- "Add Context" menu didn’t show files in workspaces organized with Xcode’s group feature.
80+
- Chat didn’t respond when the workspace was in a system folder (like Desktop, Downloads, or Documents) and access permission hadn’t been granted.
81+
82+
## 0.36.0 - June 4, 2025
83+
### Added
84+
- Introduced a new chat setting "**Response Language**" under **Advanced** settings to customize the natural language used in chat replies.
85+
- Enabled support for custom instructions defined in _.github/copilot-instructions.md_ within your workspace.
86+
- Added support for premium request handling.
87+
88+
### Fixed
89+
- Performance: Improved UI responsiveness by lazily restoring chat history.
90+
- Performance: Fixed lagging issue when pasting large text into the chat input.
91+
- Performance: Improved project indexing performance.
92+
- Don't trigger / (slash) commands when pasting a file path into the chat input.
93+
- Adjusted terminal text styling to align with Xcode’s theme.
94+
95+
## 0.35.0 - May 19, 2025
96+
### Added
97+
- Launched Agent Mode. Copilot will automatically use multiple requests to edit files, run terminal commands, and fix errors.
98+
- Introduced Model Context Protocol (MCP) support in Agent Mode, allowing you to configure MCP tools to extend capabilities.
99+
100+
### Changed
101+
- Added a button to enable/disable referencing current file in conversations
102+
- Added an animated progress icon in the response section
103+
- Refined onboarding experience with updated instruction screens and welcome views
104+
- Improved conversation reliability with extended timeout limits for agent requests
105+
106+
### Fixed
107+
- Addressed critical error handling issues in core functionality
108+
- Resolved UI inconsistencies with chat interface padding adjustments
109+
- Implemented custom certificate handling using system environment variables `NODE_EXTRA_CA_CERTS` and `NODE_TLS_REJECT_UNAUTHORIZED`, fixing network access issues
110+
8111
## 0.34.0 - April 29, 2025
9112
### Added
10113
- Added support for new models in Chat: OpenAI GPT-4.1, o3 and o4-mini, Gemini 2.5 Pro

‎Copilot for Xcode.xcodeproj/project.pbxproj‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@
188188
/* End PBXCopyFilesBuildPhase section */
189189

190190
/* Begin PBXFileReference section */
191-
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; };
192-
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; };
191+
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; };
192+
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; };
193193
3E5DB74F2D6B88EE00418952 /* ReleaseNotes.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = ReleaseNotes.md; sourceTree = "<group>"; };
194194
424ACA202CA4697200FA20F2 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
195195
427C63272C6E868B000E557C /* OpenSettingsCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenSettingsCommand.swift; sourceTree = "<group>"; };
@@ -719,7 +719,7 @@
719719
);
720720
runOnlyForDeploymentPostprocessing = 0;
721721
shellPath = /bin/sh;
722-
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";
722+
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";
723723
};
724724
/* End PBXShellScriptBuildPhase section */
725725

‎Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/ExtensionService.xcscheme‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@
5050
reference = "container:Pro/ProTestPlan.xctestplan">
5151
</TestPlanReference>
5252
</TestPlans>
53+
<Testables>
54+
<TestableReference
55+
skipped = "NO">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "GitHelperTests"
59+
BuildableName = "GitHelperTests"
60+
BlueprintName = "GitHelperTests"
61+
ReferencedContainer = "container:Tool">
62+
</BuildableReference>
63+
</TestableReference>
64+
</Testables>
5365
</TestAction>
5466
<LaunchAction
5567
buildConfiguration = "Debug"

0 commit comments

Comments
 (0)