Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
9bb08cc
Merge tag '0.33.0' into develop
intitni May 14, 2024
e6685e9
Migrate HostApp and dependencies to new version of TCA
intitni May 14, 2024
18a7020
Fix migration
intitni May 14, 2024
68a640d
Migrate ChatTab to latest TCA
intitni May 14, 2024
2ee99d0
Update
intitni May 14, 2024
50171ac
Use an NSObject to observe changes in store
intitni May 15, 2024
6b5ac69
Migrate ChatGPTChatTab to latest TCA
intitni May 16, 2024
d95a280
Migrate HostApp to latest TCA
intitni May 16, 2024
8f71a6e
Update
intitni May 16, 2024
8e32d13
Add missing WithPerceptionTracking
intitni May 16, 2024
41e160b
Migrate to observation
intitni May 16, 2024
88cfef7
Add cancel
intitni May 16, 2024
121d173
Migrate SuggestionWidget to latest TCA
intitni May 16, 2024
653d128
Migrate Service to latest TCA
intitni May 16, 2024
4f7bf00
Update
intitni May 16, 2024
53d1445
Update
intitni May 16, 2024
420ed82
Merge branch 'feature/bump-tca' into develop
intitni May 16, 2024
da8e49e
Bump version
intitni May 16, 2024
8024f02
Add X-Title field to OpenRouter requests
intitni May 16, 2024
b120f38
Add HTTP-Referer field
intitni May 16, 2024
dde2a99
Merge branch 'feature/title-field-for-openrouter' into develop
intitni May 17, 2024
2a3c412
Fix tests
intitni May 20, 2024
7f07ebe
Fix that code was not displaying in prompt to code panel
intitni May 20, 2024
3c8a745
Fix tests
intitni May 20, 2024
8261fac
Adjust definition of SuggestionServiceProvider
intitni May 20, 2024
8a42e7a
Add new target BuiltinExtension
intitni May 20, 2024
cb901f9
Convert GitHub Copilot to a builtin extension
intitni May 20, 2024
8105b9c
Update
intitni May 20, 2024
65a07ef
Update SuggestionService to use builtin extensions
intitni May 20, 2024
edb1531
Update cleaner to handle builtin extensions
intitni May 20, 2024
11be828
Update SuggestionServiceWorkspacePlugin setup
intitni May 20, 2024
d62284f
Setup builtin extensions
intitni May 20, 2024
c3bae3c
Add CodeiumExtension
intitni May 20, 2024
f31aa63
Update
intitni May 20, 2024
94f8e7c
Add todo
intitni May 20, 2024
20c71bd
Update to check app configurations for extensions
intitni May 20, 2024
4b3e48d
Add docs
intitni May 20, 2024
2ca2473
Update
intitni May 20, 2024
9cf8a3e
Fix incorrect arguments
intitni May 20, 2024
489fab2
Add suggestion feature provider id
intitni May 20, 2024
d0b5355
Add default values
intitni May 20, 2024
d635619
Update
intitni May 20, 2024
111ebf2
Register workspace plugins
intitni May 20, 2024
25c8b6b
Prevent unused language servers from loading
intitni May 20, 2024
57b9512
Match the develop branch CopilotForXcodeKit
intitni May 20, 2024
a9a812e
Fix dependencies
intitni May 20, 2024
41256ae
Update schemes
intitni May 20, 2024
12e36e8
Merge branch 'feature/formalize-builtin-extensions-and-external-exten…
intitni May 20, 2024
b39a32b
Fix builtin extensions
intitni May 20, 2024
1cd11f3
Move open chat to PseudoCommandHandler
intitni May 20, 2024
947e787
Rename to OpenChatCommand
intitni May 20, 2024
fff67bf
Rename to openChat
intitni May 20, 2024
2a2b5df
Update open chat to change it's behavior according to settings
intitni May 20, 2024
c756ebb
Add settings for open chat mode
intitni May 21, 2024
6759c8c
Support opening chat web page in chat tab
intitni May 21, 2024
930bd2d
Merge branch 'feature/custom-open-chat' into develop
intitni May 21, 2024
9f430dd
Fix that forceDetached is not used
intitni May 21, 2024
14ebbaa
Remove duplication
intitni May 21, 2024
45c209e
Remove unused files
intitni May 21, 2024
8efa24d
Add appcast task to make file
intitni May 21, 2024
36449ca
Support self signed certificates in GitHub Copilot
intitni May 22, 2024
3c91c46
Merge branch 'feature/github-copilot-self-signed-certificate-hack' in…
intitni May 22, 2024
ad2f0cb
Bump GitHub Copilot language server to 1.32.0
intitni May 22, 2024
0db1887
Merge branch 'feature/bump-github-copilot-language-server-1.32.0' int…
intitni May 22, 2024
0b39625
Bump Codeium language server to 1.8.8
intitni May 22, 2024
7b96fd2
Merge branch 'feature/bump-codeium-language-server-1.8.8' into develop
intitni May 22, 2024
1a740ce
Move code to helper
intitni May 22, 2024
103a916
Bring back toggle realtime suggestion command
intitni May 22, 2024
ecc79e1
Rename Real-time Suggestion command to Prepare for Real-time Suggestion
intitni May 22, 2024
a4e4288
Add toast about the real-time suggestion state change
intitni May 22, 2024
82b970a
Add InlineCompletion request
intitni May 22, 2024
cbeaae6
Use InlineCompletion request instead of GetCompletionsCycling
intitni May 22, 2024
f8a2413
Add originalContent to SuggestionRequest
intitni May 22, 2024
961d9f6
Update
intitni May 22, 2024
22c9624
Update
intitni May 22, 2024
ccfa376
Fix GitHub Copilot suggestion generation
intitni May 22, 2024
4b6e846
Fix that the change text notification is not called
intitni May 22, 2024
6c3d8d7
Add version
intitni May 22, 2024
4dd291e
Adjust file url for special tabs
intitni May 22, 2024
86c076b
Update retry interval
intitni May 22, 2024
de131ed
Merge tag '0.33.1.beta' into develop
intitni May 22, 2024
373e818
Reopen document if it's not found in the language server
intitni May 23, 2024
028ed92
Fix incorrect method call
intitni May 23, 2024
cbb0221
Add evaluated content changed event to SourceEditor
intitni May 24, 2024
3257f5f
Put syntax highlighting code into a enum
intitni May 24, 2024
3bc2c86
Add CursorPositionTracker
intitni May 24, 2024
2a4c5c6
Update CodeSuggestionProvider to be a Perceptible object
intitni May 24, 2024
ffaa183
Update suggestion panel to highlight async and dim typed content
intitni May 24, 2024
e61b0ac
Merge branch 'feature/suggestion-typed-dim' into develop
intitni May 24, 2024
06cb361
Reference the function from CodeHighlighting
intitni May 24, 2024
9e49591
Update to generate non-stream response from stream reponse
intitni May 24, 2024
9162154
Support enforcing message order
intitni May 24, 2024
1a84d2f
Merge branch 'feature/hotfix-for-tabby-chat' into develop
intitni May 24, 2024
56ce715
Merge tag '0.33.1.beta.2' into develop
intitni May 24, 2024
a095415
Disable transparent background of chat panel
intitni May 25, 2024
cb33d2a
Adjust actor conformance to avoid warnings
intitni May 25, 2024
35199a3
Terminate the app in the correct way
intitni May 25, 2024
b282d95
Fix that can't bring the extension service app back to live when it q…
intitni May 26, 2024
fed9f37
Bump build number
intitni May 22, 2024
b1517b9
Update appcast.xml
intitni May 27, 2024
66c07cf
Fix make file
intitni May 27, 2024
93640be
Update appcast.xml
intitni May 27, 2024
f9f0c88
Merge branch 'release/0.33.1'
intitni May 27, 2024
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
22 changes: 20 additions & 2 deletions CommunicationBridge/ServiceDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ actor EventHandler {
reply(endpoint)
#else
if await launcher.isApplicationValid {
Logger.communicationBridge.info("Service app is still valid")
reply(endpoint)
} else {
endpoint = nil
Expand Down Expand Up @@ -116,7 +117,17 @@ actor ExtensionServiceLauncher {
var isLaunching: Bool = false
var application: NSRunningApplication?
var isApplicationValid: Bool {
if let application, !application.isTerminated { return true }
guard let application else { return false }
if application.isTerminated { return false }
let identifier = application.processIdentifier
if let application = NSWorkspace.shared.runningApplications.first(where: {
$0.processIdentifier == identifier
}) {
Logger.communicationBridge.info(
"Service app found: \(application.processIdentifier) \(String(describing: application.bundleIdentifier))"
)
return true
}
return false
}

Expand All @@ -125,9 +136,16 @@ actor ExtensionServiceLauncher {
isLaunching = true

Logger.communicationBridge.info("Launching extension service app.")

NSWorkspace.shared.openApplication(
at: appURL,
configuration: .init()
configuration: {
let configuration = NSWorkspace.OpenConfiguration()
configuration.createsNewApplicationInstance = false
configuration.addsToRecentItems = false
configuration.activates = false
return configuration
}()
) { app, error in
if let error = error {
Logger.communicationBridge.error(
Expand Down
8 changes: 4 additions & 4 deletions Copilot for Xcode.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
C882175C294187EF00A22FD3 /* Client in Frameworks */ = {isa = PBXBuildFile; productRef = C882175B294187EF00A22FD3 /* Client */; };
C89E75C32A46FB32000DD64F /* AppDelegate+Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89E75C22A46FB32000DD64F /* AppDelegate+Menu.swift */; };
C8C8B60929AFA35F00034BEE /* CopilotForXcodeExtensionService.app in Embed XPCService */ = {isa = PBXBuildFile; fileRef = C861E60E2994F6070056CB02 /* CopilotForXcodeExtensionService.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
C8DCF00029CE11D500FDDDD7 /* ChatWithSelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8DCEFFF29CE11D500FDDDD7 /* ChatWithSelection.swift */; };
C8DCF00029CE11D500FDDDD7 /* OpenChat.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8DCEFFF29CE11D500FDDDD7 /* OpenChat.swift */; };
C8DD9CB12BC673F80036641C /* CloseIdleTabsCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8DD9CB02BC673F80036641C /* CloseIdleTabsCommand.swift */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -236,7 +236,7 @@
C887BC832965D96000931567 /* DEVELOPMENT.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = DEVELOPMENT.md; sourceTree = "<group>"; };
C89E75C22A46FB32000DD64F /* AppDelegate+Menu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Menu.swift"; sourceTree = "<group>"; };
C8CD828229B88006008D044D /* TestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestPlan.xctestplan; sourceTree = "<group>"; };
C8DCEFFF29CE11D500FDDDD7 /* ChatWithSelection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatWithSelection.swift; sourceTree = "<group>"; };
C8DCEFFF29CE11D500FDDDD7 /* OpenChat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenChat.swift; sourceTree = "<group>"; };
C8DD9CB02BC673F80036641C /* CloseIdleTabsCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloseIdleTabsCommand.swift; sourceTree = "<group>"; };
C8F103292A7A365000D28F4F /* launchAgent.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = launchAgent.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -320,7 +320,7 @@
C8009C022941C576007AA7E8 /* RealtimeSuggestionCommand.swift */,
C800DBB0294C624D00B04CAC /* PrefetchSuggestionsCommand.swift */,
C8758E6F29F04BFF00D29C1C /* CustomCommand.swift */,
C8DCEFFF29CE11D500FDDDD7 /* ChatWithSelection.swift */,
C8DCEFFF29CE11D500FDDDD7 /* OpenChat.swift */,
C8DD9CB02BC673F80036641C /* CloseIdleTabsCommand.swift */,
C861A6A229E5503F005C41A3 /* PromptToCodeCommand.swift */,
C81458972939EFDC00135263 /* Info.plist */,
Expand Down Expand Up @@ -675,7 +675,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C8DCF00029CE11D500FDDDD7 /* ChatWithSelection.swift in Sources */,
C8DCF00029CE11D500FDDDD7 /* OpenChat.swift in Sources */,
C81458942939EFDC00135263 /* SourceEditorExtension.swift in Sources */,
C8DD9CB12BC673F80036641C /* CloseIdleTabsCommand.swift in Sources */,
C8758E7029F04BFF00D29C1C /* CustomCommand.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C8738B622BE4D4B900609E7F"
BuildableName = "CommunicationBridge"
BlueprintName = "CommunicationBridge"
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
viewDebuggingEnabled = "No">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C8738B622BE4D4B900609E7F"
BuildableName = "CommunicationBridge"
BlueprintName = "CommunicationBridge"
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C8738B622BE4D4B900609E7F"
BuildableName = "CommunicationBridge"
BlueprintName = "CommunicationBridge"
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C8738B772BE5363800609E7F"
BuildableName = "SandboxedClientTester.app"
BlueprintName = "SandboxedClientTester"
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C8738B772BE5363800609E7F"
BuildableName = "SandboxedClientTester.app"
BlueprintName = "SandboxedClientTester"
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C8738B772BE5363800609E7F"
BuildableName = "SandboxedClientTester.app"
BlueprintName = "SandboxedClientTester"
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand All @@ -14,9 +15,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Core"
BuildableName = "Core"
BlueprintName = "Core"
BlueprintIdentifier = "Client"
BuildableName = "Client"
BlueprintName = "Client"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
Expand Down Expand Up @@ -49,9 +50,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Core"
BuildableName = "Core"
BlueprintName = "Core"
BlueprintIdentifier = "Client"
BuildableName = "Client"
BlueprintName = "Client"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand All @@ -14,9 +15,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Tool"
BuildableName = "Tool"
BlueprintName = "Tool"
BlueprintIdentifier = "HostApp"
BuildableName = "HostApp"
BlueprintName = "HostApp"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
Expand Down Expand Up @@ -49,9 +50,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Tool"
BuildableName = "Tool"
BlueprintName = "Tool"
BlueprintIdentifier = "HostApp"
BuildableName = "HostApp"
BlueprintName = "HostApp"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
Expand Down
7 changes: 5 additions & 2 deletions Core/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ let package = Package(
.package(url: "https://github.com/gonzalezreal/swift-markdown-ui", from: "2.1.0"),
.package(url: "https://github.com/sparkle-project/Sparkle", from: "2.0.0"),
.package(url: "https://github.com/pointfreeco/swift-parsing", from: "0.12.1"),
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "0.5.1"),
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.0.0"),
.package(
url: "https://github.com/pointfreeco/swift-composable-architecture",
from: "0.55.0"
from: "1.10.4"
),
// quick hack to support custom UserDefaults
// https://github.com/sindresorhus/KeyboardShortcuts
Expand Down Expand Up @@ -126,6 +126,7 @@ let package = Package(
"PromptToCodeService",
"ServiceUpdateMigration",
"ChatGPTChatTab",
"PlusFeatureFlag",
.product(name: "XPCShared", package: "Tool"),
.product(name: "SuggestionProvider", package: "Tool"),
.product(name: "Workspace", package: "Tool"),
Expand Down Expand Up @@ -184,6 +185,8 @@ let package = Package(
.target(
name: "SuggestionService",
dependencies: [
.product(name: "UserDefaultsObserver", package: "Tool"),
.product(name: "Preferences", package: "Tool"),
.product(name: "SuggestionModel", package: "Tool"),
.product(name: "SuggestionProvider", package: "Tool")
].pro([
Expand Down
Loading