Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 8 additions & 4 deletions Core/Sources/HostApp/DebugView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ final class DebugSettings: ObservableObject {
@AppStorage(\.alwaysAcceptSuggestionWithAccessibilityAPI)
var alwaysAcceptSuggestionWithAccessibilityAPI
@AppStorage(\.enableXcodeInspectorDebugMenu) var enableXcodeInspectorDebugMenu
@AppStorage(\.disableFunctionCalling) var disableFunctionCalling
init() {}
}

Expand All @@ -21,13 +22,13 @@ struct DebugSettingsView: View {
ScrollView {
Form {
Toggle(isOn: $settings.animationACrashSuggestion) {
Text("Enable Animation A")
Text("Enable animation A")
}
Toggle(isOn: $settings.animationBCrashSuggestion) {
Text("Enable Animation B")
Text("Enable animation B")
}
Toggle(isOn: $settings.animationCCrashSuggestion) {
Text("Enable Widget Breathing Animation")
Text("Enable widget breathing animation")
}
Toggle(isOn: $settings.preCacheOnFileOpen) {
Text("Cache editor information on file open")
Expand All @@ -39,11 +40,14 @@ struct DebugSettingsView: View {
Text("Trigger command with AccessibilityAPI")
}
Toggle(isOn: $settings.alwaysAcceptSuggestionWithAccessibilityAPI) {
Text("Always accept suggestion with AccessibilityAPI")
Text("Always accept suggestion with Accessibility API")
}
Toggle(isOn: $settings.enableXcodeInspectorDebugMenu) {
Text("Enable Xcode inspector debug menu")
}
Toggle(isOn: $settings.disableFunctionCalling) {
Text("Disable function calling for chat feature")
}
}
.padding()
}
Expand Down
9 changes: 7 additions & 2 deletions Tool/Sources/OpenAIService/CompletionStreamAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ struct CompletionRequestBody: Encodable, Equatable {
self.frequency_penalty = frequency_penalty
self.logit_bias = logit_bias
self.user = user
self.function_call = function_call
self.functions = functions.isEmpty ? nil : functions
if UserDefaults.shared.value(for: \.disableFunctionCalling) {
self.function_call = nil
self.functions = nil
} else {
self.function_call = function_call
self.functions = functions.isEmpty ? nil : functions
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions Tool/Sources/Preferences/Keys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -401,5 +401,9 @@ public extension UserDefaultPreferenceKeys {
var enableXcodeInspectorDebugMenu: FeatureFlag {
.init(defaultValue: false, key: "FeatureFlag-EnableXcodeInspectorDebugMenu")
}

var disableFunctionCalling: FeatureFlag {
.init(defaultValue: false, key: "FeatureFlag-DisableFunctionCalling")
}
}

4 changes: 2 additions & 2 deletions Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
APP_VERSION = 0.21.1
APP_BUILD = 221
APP_VERSION = 0.21.2
APP_BUILD = 222
12 changes: 12 additions & 0 deletions appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
<channel>
<title>Copilot for Xcode</title>

<item>
<title>0.21.2</title>
<pubDate>Mon, 14 Aug 2023 21:20:30 +0800</pubDate>
<sparkle:version>222</sparkle:version>
<sparkle:shortVersionString>0.21.2</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
<sparkle:releaseNotesLink>
https://github.com/intitni/CopilotForXcode/releases/tag/0.21.2
</sparkle:releaseNotesLink>
<enclosure url="https://github.com/intitni/CopilotForXcode/releases/download/0.21.2/Copilot.for.Xcode.app.zip" length="31115476" type="application/octet-stream" sparkle:edSignature="2ZK39qQ7jugxrTCZpfb0X9Exg0Qr+y5LimsKG7gn0lsoCmSqCkRz39rYJ11i5/qTkGD7yZSOA1RawIddL3PdAg=="/>
</item>

<item>
<title>0.21.1</title>
<pubDate>Sun, 13 Aug 2023 17:02:38 +0800</pubDate>
Expand Down