Pre-release 0.43.140 · Seilo/CopilotForXcode@75aa71a · GitHub
Skip to content

Commit 75aa71a

Browse files
committed
Pre-release 0.43.140
1 parent 4381034 commit 75aa71a

50 files changed

Lines changed: 1122 additions & 355 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

‎Copilot-for-Xcode-Info.plist‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@
3030
<string>$(TeamIdentifierPrefix)</string>
3131
<key>STANDARD_TELEMETRY_CHANNEL_KEY</key>
3232
<string>$(STANDARD_TELEMETRY_CHANNEL_KEY)</string>
33+
<key>GITHUB_APP_ID</key>
34+
<string>$(GITHUB_APP_ID)</string>
3335
</dict>
3436
</plist>

‎Core/Sources/ConversationTab/ChatPanel.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public struct ChatPanel: View {
5858
}
5959
.padding(.leading, 16)
6060
.padding(.bottom, 16)
61-
.background(Color(nsColor: .windowBackgroundColor))
61+
.background(.ultraThinMaterial)
6262
.onAppear {
6363
chat.send(.appear)
6464
}
@@ -686,7 +686,7 @@ struct ChatPanelInputArea: View {
686686
}
687687
.overlay {
688688
RoundedRectangle(cornerRadius: 6)
689-
.stroke(Color(nsColor: .controlColor), lineWidth: 1)
689+
.stroke(Color(nsColor: .separatorColor), lineWidth: 1)
690690
}
691691
.background {
692692
Button(action: {

‎Core/Sources/ConversationTab/ModelPicker/ModelPicker.swift‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ struct ModelPicker: View {
2323
@State private var agentScopeCache: ScopeCache = ScopeCache()
2424

2525
@State var isMCPFFEnabled: Bool
26+
@State var isBYOKFFEnabled: Bool
2627
@State private var cancellables = Set<AnyCancellable>()
2728

2829
@StateObject private var fontScaleManager = FontScaleManager.shared
@@ -47,12 +48,14 @@ struct ModelPicker: View {
4748
CopilotModelManager.getDefaultChatModel()
4849
self._selectedModel = State(initialValue: initialModel)
4950
self.isMCPFFEnabled = FeatureFlagNotifierImpl.shared.featureFlags.mcp
51+
self.isBYOKFFEnabled = FeatureFlagNotifierImpl.shared.featureFlags.byok
5052
updateAgentPicker()
5153
}
5254

5355
private func subscribeToFeatureFlagsDidChangeEvent() {
5456
FeatureFlagNotifierImpl.shared.featureFlagsDidChange.sink(receiveValue: { featureFlags in
5557
isMCPFFEnabled = featureFlags.mcp
58+
isBYOKFFEnabled = featureFlags.byok
5659
})
5760
.store(in: &cancellables)
5861
}
@@ -142,7 +145,10 @@ struct ModelPicker: View {
142145

143146
func updateCurrentModel() {
144147
let currentModel = AppState.shared.getSelectedModel()
145-
let allAvailableModels = copilotModels + byokModels
148+
var allAvailableModels = copilotModels
149+
if isBYOKFFEnabled {
150+
allAvailableModels += byokModels
151+
}
146152

147153
// Check if current model exists in available models for current scope using model comparison
148154
let modelExists = allAvailableModels.contains { model in
@@ -207,11 +213,13 @@ struct ModelPicker: View {
207213
// Display premium models section if available
208214
modelSection(title: "Premium Models", models: premiumModels)
209215

210-
// Display byok models section if available
211-
modelSection(title: "Other Models", models: byokModels)
212-
213-
Button("Manage Models...") {
214-
try? launchHostAppBYOKSettings()
216+
if isBYOKFFEnabled {
217+
// Display byok models section if available
218+
modelSection(title: "Other Models", models: byokModels)
219+
220+
Button("Manage Models...") {
221+
try? launchHostAppBYOKSettings()
222+
}
215223
}
216224

217225
if standardModels.isEmpty {
@@ -342,6 +350,9 @@ struct ModelPicker: View {
342350
.onChange(of: chatMode) { _ in
343351
updateCurrentModel()
344352
}
353+
.onChange(of: isBYOKFFEnabled) { _ in
354+
updateCurrentModel()
355+
}
345356
.onReceive(NotificationCenter.default.publisher(for: .gitHubCopilotSelectedModelDidChange)) { _ in
346357
updateCurrentModel()
347358
}

‎Core/Sources/ConversationTab/TerminalViews/RunInTerminalToolView.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct RunInTerminalToolView: View {
7474
.scaledFrame(width: 16, height: 16)
7575

7676
Text(self.title)
77-
.scaledFont(.system(size: chatFontSize, weight: .semibold))
77+
.scaledFont(size: chatFontSize, weight: .semibold)
7878
.foregroundStyle(.primary)
7979
.background(Color.clear)
8080
.frame(maxWidth: .infinity, alignment: .leading)
@@ -122,7 +122,7 @@ struct RunInTerminalToolView: View {
122122

123123
Text(command!)
124124
.textSelection(.enabled)
125-
.scaledFont(.system(size: chatFontSize, design: .monospaced))
125+
.scaledFont(size: chatFontSize, design: .monospaced)
126126
.padding(8)
127127
.frame(maxWidth: .infinity, alignment: .leading)
128128
.foregroundStyle(codeForegroundColor)

‎Core/Sources/ConversationTab/Views/WorkingSetView.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct FileEditView: View {
139139
switch imageType {
140140
case .system(let name):
141141
Image(systemName: name)
142-
.scaledFont(.system(size: 15, weight: .regular))
142+
.scaledFont(size: 15, weight: .regular)
143143
case .asset(let name):
144144
Image(name)
145145
.renderingMode(.template)

‎Core/Sources/HostApp/AdvancedSettings/ChatSection.swift‎

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import SwiftUI
44
import Toast
55
import XcodeInspector
66
import SharedUIComponents
7+
import Logger
78

89
struct ChatSection: View {
910
@AppStorage(\.autoAttachChatToXcode) var autoAttachChatToXcode
1011
@AppStorage(\.enableFixError) var enableFixError
12+
@State private var isEditorPreviewEnabled: Bool = false
1113

1214
var body: some View {
1315
SettingsSection(title: "Chat Settings") {
@@ -23,11 +25,13 @@ struct ChatSection: View {
2325

2426
Divider()
2527

26-
// Custom Prompts - .github/prompts/*.prompt.md
27-
PromptFileSetting(promptType: .prompt)
28-
.padding(SettingsToggle.defaultPadding)
29-
30-
Divider()
28+
if isEditorPreviewEnabled {
29+
// Custom Prompts - .github/prompts/*.prompt.md
30+
PromptFileSetting(promptType: .prompt)
31+
.padding(SettingsToggle.defaultPadding)
32+
33+
Divider()
34+
}
3135

3236
// Auto Attach toggle
3337
SettingsToggle(
@@ -55,6 +59,28 @@ struct ChatSection: View {
5559
FontSizeSetting()
5660
.padding(SettingsToggle.defaultPadding)
5761
}
62+
.onAppear {
63+
Task {
64+
await updateEditorPreviewFeatureFlag()
65+
}
66+
}
67+
.onReceive(DistributedNotificationCenter.default()
68+
.publisher(for: .gitHubCopilotFeatureFlagsDidChange)) { _ in
69+
Task {
70+
await updateEditorPreviewFeatureFlag()
71+
}
72+
}
73+
}
74+
75+
private func updateEditorPreviewFeatureFlag() async {
76+
do {
77+
let service = try getService()
78+
if let featureFlags = try await service.getCopilotFeatureFlags() {
79+
isEditorPreviewEnabled = featureFlags.editorPreviewFeatures
80+
}
81+
} catch {
82+
Logger.client.error("Failed to get copilot feature flags: \(error)")
83+
}
5884
}
5985
}
6086

@@ -112,7 +138,7 @@ struct ResponseLanguageSetting: View {
112138
Text(option.displayName).tag(option.localeCode)
113139
}
114140
}
115-
.frame(maxWidth: 200, alignment: .leading)
141+
.frame(maxWidth: 200, alignment: .trailing)
116142
}
117143
}
118144
}
@@ -198,7 +224,7 @@ struct FontSizeSetting: View {
198224
}
199225
}
200226
)
201-
.padding(.leading, calculateDefaultMarkerXPosition() + 2)
227+
.padding(.leading, calculateDefaultMarkerXPosition() + 6)
202228
.onHover {
203229
if $0 {
204230
NSCursor.pointingHand.push()

‎Core/Sources/HostApp/BYOKConfigView.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public struct BYOKConfigView: View {
2222

2323
private func expansionBinding(for provider: BYOKProvider) -> Binding<Bool> {
2424
Binding(
25-
get: { expansionStates[provider] ?? true },
25+
get: { expansionStates[provider] ?? false },
2626
set: { expansionStates[provider] = $0 }
2727
)
2828
}

‎Core/Sources/HostApp/BYOKSettings/ProviderConfigView.swift‎

Lines changed: 41 additions & 60 deletions

0 commit comments

Comments
 (0)