Skip to content

Commit c3cfecd

Browse files
committed
Merge branch 'release/0.3.0'
2 parents e8474ce + 08d4785 commit c3cfecd

48 files changed

Lines changed: 1192 additions & 575 deletions

Some content is hidden

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

Config.debug.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
BUNDLE_IDENTIFIER_BASE = dev.com.intii.CopilotForXcode
2+
EXTENSION_BUNDLE_NAME = Copilot Dev

Config.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
BUNDLE_IDENTIFIER_BASE = com.intii.CopilotForXcode
2+
EXTENSION_BUNDLE_NAME = Copilot

Copilot for Xcode.xcodeproj/project.pbxproj

Lines changed: 35 additions & 224 deletions
Large diffs are not rendered by default.

Copilot for Xcode/CopilotView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import AppKit
2+
import Client
23
import CopilotModel
34
import SwiftUI
45

Copilot for Xcode/InstructionView.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ Text("""
2121
7. Restart Xcode, the Copilot commands should be available in the menu bar.
2222
""")
2323

24-
Text("Permissions Requirement")
25-
.font(.title3)
26-
27-
Text("""
28-
- The extension will ask for Accessibility API permission the first time it runs.
29-
- The extension may ask for folder access permission when it runs.
30-
""")
31-
3224
Text("Disable Extension")
3325
.font(.title3)
3426

Copilot for Xcode/LaunchAgentManager.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ struct LaunchAgentManager {
5858
launchctl("unload", launchAgentPath)
5959
try FileManager.default.removeItem(atPath: launchAgentPath)
6060
}
61+
62+
func restartLaunchAgent() {
63+
launchctl("unload", launchAgentPath)
64+
launchctl("load", launchAgentPath)
65+
}
6166
}
6267

6368
private func launchctl(_ args: String...) {

Copilot for Xcode/LaunchAgentView.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ struct LaunchAgentView: View {
44
@State var errorMessage: String?
55
@State var isDidRemoveLaunchAgentAlertPresented = false
66
@State var isDidSetupLaunchAgentAlertPresented = false
7-
7+
@State var isDidRestartLaunchAgentAlertPresented = false
8+
89
var body: some View {
910
Section {
1011
HStack {
@@ -45,6 +46,18 @@ struct LaunchAgentView: View {
4546
)
4647
}
4748

49+
Button(action: {
50+
LaunchAgentManager().restartLaunchAgent()
51+
isDidRestartLaunchAgentAlertPresented = true
52+
}) {
53+
Text("Restart XPC Service")
54+
}.alert(isPresented: $isDidRestartLaunchAgentAlertPresented) {
55+
.init(
56+
title: Text("Launch Agent Restarted"),
57+
dismissButton: .default(Text("OK"))
58+
)
59+
}
60+
4861
EmptyView()
4962
.alert(isPresented: .init(
5063
get: { errorMessage != nil },

Copilot-for-Xcode-Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
<dict>
55
<key>BUNDLE_IDENTIFIER_BASE</key>
66
<string>$(BUNDLE_IDENTIFIER_BASE)</string>
7+
<key>EXTENSION_BUNDLE_NAME</key>
8+
<string>$(EXTENSION_BUNDLE_NAME)</string>
79
</dict>
810
</plist>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1410"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "Service"
18+
BuildableName = "Service"
19+
BlueprintName = "Service"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "ServiceTests"
36+
BuildableName = "ServiceTests"
37+
BlueprintName = "ServiceTests"
38+
ReferencedContainer = "container:">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
</TestAction>
43+
<LaunchAction
44+
buildConfiguration = "Debug"
45+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47+
launchStyle = "0"
48+
useCustomWorkingDirectory = "NO"
49+
ignoresPersistentStateOnLaunch = "NO"
50+
debugDocumentVersioning = "YES"
51+
debugServiceExtension = "internal"
52+
allowLocationSimulation = "YES">
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<MacroExpansion>
61+
<BuildableReference
62+
BuildableIdentifier = "primary"
63+
BlueprintIdentifier = "Service"
64+
BuildableName = "Service"
65+
BlueprintName = "Service"
66+
ReferencedContainer = "container:">
67+
</BuildableReference>
68+
</MacroExpansion>
69+
</ProfileAction>
70+
<AnalyzeAction
71+
buildConfiguration = "Debug">
72+
</AnalyzeAction>
73+
<ArchiveAction
74+
buildConfiguration = "Release"
75+
revealArchiveInOrganizer = "YES">
76+
</ArchiveAction>
77+
</Scheme>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1410"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "ServiceTests"
20+
BuildableName = "ServiceTests"
21+
BlueprintName = "ServiceTests"
22+
ReferencedContainer = "container:">
23+
</BuildableReference>
24+
</TestableReference>
25+
</Testables>
26+
</TestAction>
27+
<LaunchAction
28+
buildConfiguration = "Debug"
29+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
30+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
31+
launchStyle = "0"
32+
useCustomWorkingDirectory = "NO"
33+
ignoresPersistentStateOnLaunch = "NO"
34+
debugDocumentVersioning = "YES"
35+
debugServiceExtension = "internal"
36+
allowLocationSimulation = "YES">
37+
</LaunchAction>
38+
<ProfileAction
39+
buildConfiguration = "Release"
40+
shouldUseLaunchSchemeArgsEnv = "YES"
41+
savedToolIdentifier = ""
42+
useCustomWorkingDirectory = "NO"
43+
debugDocumentVersioning = "YES">
44+
</ProfileAction>
45+
<AnalyzeAction
46+
buildConfiguration = "Debug">
47+
</AnalyzeAction>
48+
<ArchiveAction
49+
buildConfiguration = "Release"
50+
revealArchiveInOrganizer = "YES">
51+
</ArchiveAction>
52+
</Scheme>

0 commit comments

Comments
 (0)