Skip to content

Commit 87898c2

Browse files
committed
Merge tag '0.4.0' into develop
2 parents 2c15bc6 + 3c86c6f commit 87898c2

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

Copilot for Xcode.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@
695695
CODE_SIGN_ENTITLEMENTS = "Copilot for Xcode/Copilot_for_Xcode.entitlements";
696696
CODE_SIGN_STYLE = Automatic;
697697
COMBINE_HIDPI_IMAGES = YES;
698-
CURRENT_PROJECT_VERSION = 11;
698+
CURRENT_PROJECT_VERSION = 13;
699699
DEVELOPMENT_ASSET_PATHS = "\"Copilot for Xcode/Preview Content\"";
700700
DEVELOPMENT_TEAM = 5YKZ4Y3DAW;
701701
ENABLE_HARDENED_RUNTIME = YES;
@@ -709,7 +709,7 @@
709709
"@executable_path/../Frameworks",
710710
);
711711
MACOSX_DEPLOYMENT_TARGET = 12.0;
712-
MARKETING_VERSION = 0.3.1;
712+
MARKETING_VERSION = 0.4.0;
713713
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE)";
714714
PRODUCT_MODULE_NAME = Copilot_for_Xcode;
715715
PRODUCT_NAME = "Copilot for Xcode Dev";
@@ -727,7 +727,7 @@
727727
CODE_SIGN_ENTITLEMENTS = "Copilot for Xcode/Copilot_for_Xcode.entitlements";
728728
CODE_SIGN_STYLE = Automatic;
729729
COMBINE_HIDPI_IMAGES = YES;
730-
CURRENT_PROJECT_VERSION = 11;
730+
CURRENT_PROJECT_VERSION = 13;
731731
DEVELOPMENT_ASSET_PATHS = "\"Copilot for Xcode/Preview Content\"";
732732
DEVELOPMENT_TEAM = 5YKZ4Y3DAW;
733733
ENABLE_HARDENED_RUNTIME = YES;
@@ -741,7 +741,7 @@
741741
"@executable_path/../Frameworks",
742742
);
743743
MACOSX_DEPLOYMENT_TARGET = 12.0;
744-
MARKETING_VERSION = 0.3.1;
744+
MARKETING_VERSION = 0.4.0;
745745
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE)";
746746
PRODUCT_NAME = "Copilot for Xcode";
747747
SWIFT_EMIT_LOC_STRINGS = YES;

Core/Sources/Service/AutoTrigger.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ actor AutoTrigger {
4343
}
4444

4545
triggerTask = Task { @ServiceActor in
46-
try? await Task.sleep(nanoseconds: 2_500_000_000)
46+
try? await Task.sleep(nanoseconds: 3_000_000_000)
4747
if Task.isCancelled { return }
4848
let fileURL = try? await Environment.fetchCurrentFileURL()
4949
guard let folderURL = try? await Environment.fetchCurrentProjectRootURL(fileURL),
5050
let workspace = workspaces[folderURL],
5151
workspace.isRealtimeSuggestionEnabled
5252
else { return }
53+
if Task.isCancelled { return }
5354
try? await Environment.triggerAction("Real-time Suggestions")
5455
}
5556
}

Core/Tests/ServiceTests/AcceptSuggestionTests.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,8 @@ final class AcceptSuggestionTests: XCTestCase {
7979
tabSize: 1,
8080
indentSize: 1,
8181
usesTabsForIndentation: false
82-
))!
83-
84-
let result3Lines = lines.applying(result3.modifications)
82+
))
8583

86-
XCTAssertEqual(result3Lines, lines, "Deleting the code and accept again does nothing")
87-
XCTAssertEqual(result3.content, result3Lines.joined())
88-
XCTAssertEqual(result3.newCursor, nil)
84+
XCTAssertNil(result3, "Deleting the code and accept again does nothing")
8985
}
9086
}

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![ScreenRecording](/ScreenRecording.gif)
44

5-
Copilot for Xcode is an Xcode Source Editor Extension that provides Github Copilot support for Xcode. It uses the LSP provided through [Copilot.vim](https://github.com/github/copilot.vim/tree/release/copilot/dist).
5+
Copilot for Xcode is an Xcode Source Editor Extension that provides Github Copilot support for Xcode. It uses the LSP provided through [Copilot.vim](https://github.com/github/copilot.vim/tree/release/copilot/dist) to generate suggestions and displays them as comments.
66

77
Thanks to [LSP-copilot](https://github.com/TerminalFi/LSP-copilot) for showing the way to interact with Copilot. And thanks to [LanguageClient](https://github.com/ChimeHQ/LanguageClient) for the Language Server Protocol support in Swift.
88

@@ -46,14 +46,10 @@ The first time the actions run, the extension will ask for 2 types of permission
4646

4747
The implementation won't feel as smooth as that of VSCode.
4848

49-
The magic behind it is that it will keep calling the action from the menu when you are not typing, clicking or moving your mouse. So it will have to listen to those events, I am not sure if people like it.
49+
The magic behind it is that it will keep calling the action from the menu when you are not typing, or clicking mouse. So it will have to listen to those events, I am not sure if people like it.
5050

5151
Hope that next year, Apple can spend some time on Xcode Extensions.
5252

53-
Known Issues:
54-
55-
- If a real-time suggestions request is triggered, it will block your editor until the result is return.
56-
5753
## Prevent Suggestions Being Committed
5854

5955
Since the suggestions are presented as comments, they are in your code. If you are not careful enough, they can be committed to your git repo. To avoid that, I would recommend adding a pre-commit git hook to prevent this from happening. Maybe later I will add an action for that.

0 commit comments

Comments
 (0)