Skip to content

Commit 4381034

Browse files
committed
Pre-release 0.43.139
1 parent b3fe4dd commit 4381034

File tree

75 files changed

+1688
-287
lines changed

Some content is hidden

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

75 files changed

+1688
-287
lines changed

Copilot for Xcode.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@
188188
/* End PBXCopyFilesBuildPhase section */
189189

190190
/* Begin PBXFileReference section */
191-
3ABBEA282C8B9FE100C61D61 /* copilot-language-server */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "copilot-language-server"; path = "Server/node_modules/@github/copilot-language-server/native/darwin-x64/copilot-language-server"; sourceTree = SOURCE_ROOT; };
192-
3ABBEA2A2C8BA00300C61D61 /* copilot-language-server-arm64 */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "copilot-language-server-arm64"; path = "Server/node_modules/@github/copilot-language-server/native/darwin-arm64/copilot-language-server-arm64"; sourceTree = SOURCE_ROOT; };
191+
3ABBEA282C8B9FE100C61D61 /* copilot-language-server */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "copilot-language-server"; path = "Server/node_modules/@github/copilot-language-server-darwin-x64/copilot-language-server"; sourceTree = SOURCE_ROOT; };
192+
3ABBEA2A2C8BA00300C61D61 /* copilot-language-server-arm64 */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "copilot-language-server-arm64"; path = "Server/node_modules/@github/copilot-language-server-darwin-arm64/copilot-language-server-arm64"; sourceTree = SOURCE_ROOT; };
193193
3E5DB74F2D6B88EE00418952 /* ReleaseNotes.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = ReleaseNotes.md; sourceTree = "<group>"; };
194194
424ACA202CA4697200FA20F2 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
195195
427C63272C6E868B000E557C /* OpenSettingsCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenSettingsCommand.swift; sourceTree = "<group>"; };
@@ -719,7 +719,7 @@
719719
);
720720
runOnlyForDeploymentPostprocessing = 0;
721721
shellPath = /bin/sh;
722-
shellScript = "export PATH=/usr/local/bin:/opt/homebrew/bin:$PATH\n\nnpm -C Server install\ncp Server/node_modules/@github/copilot-language-server/native/darwin-arm64/copilot-language-server Server/node_modules/@github/copilot-language-server/native/darwin-arm64/copilot-language-server-arm64\n\necho \"Build and copy webview js/html files as the bundle resources\"\nnpm -C Server run build\nmkdir -p \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources/webViewDist\"\ncp -R Server/dist/* \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources/webViewDist/\"\n";
722+
shellScript = "export PATH=/usr/local/bin:/opt/homebrew/bin:$PATH\n\nnpm -C Server install --force\ncp Server/node_modules/@github/copilot-language-server-darwin-arm64/copilot-language-server Server/node_modules/@github/copilot-language-server-darwin-arm64/copilot-language-server-arm64\n\necho \"Build and copy webview js/html files as the bundle resources\"\nnpm -C Server run build\nmkdir -p \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources/webViewDist\"\ncp -R Server/dist/* \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources/webViewDist/\"\n";
723723
};
724724
/* End PBXShellScriptBuildPhase section */
725725

Copilot for Xcode/App.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
2020
enum LaunchMode {
2121
case chat
2222
case settings
23-
case mcp
23+
case tools
2424
case byok
2525
}
2626

@@ -49,8 +49,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
4949
let launchArgs = CommandLine.arguments
5050
if launchArgs.contains("--settings") {
5151
return .settings
52-
} else if launchArgs.contains("--mcp") {
53-
return .mcp
52+
} else if launchArgs.contains("--tools") {
53+
return .tools
5454
} else if launchArgs.contains("--byok") {
5555
return .byok
5656
} else {
@@ -62,8 +62,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
6262
switch mode {
6363
case .settings:
6464
openSettings()
65-
case .mcp:
66-
openMCPSettings()
65+
case .tools:
66+
openToolsSettings()
6767
case .byok:
6868
openBYOKSettings()
6969
case .chat:
@@ -86,10 +86,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
8686
}
8787
}
8888

89-
private func openMCPSettings() {
89+
private func openToolsSettings() {
9090
DispatchQueue.main.async {
9191
activateAndOpenSettings()
92-
hostAppStore.send(.setActiveTab(.mcp))
92+
hostAppStore.send(.setActiveTab(.tools))
9393
}
9494
}
9595

@@ -193,13 +193,13 @@ struct CopilotForXcodeApp: App {
193193
}
194194

195195
DistributedNotificationCenter.default().addObserver(
196-
forName: .openMCPSettingsWindowRequest,
196+
forName: .openToolsSettingsWindowRequest,
197197
object: nil,
198198
queue: .main
199199
) { _ in
200200
DispatchQueue.main.async {
201201
activateAndOpenSettings()
202-
hostAppStore.send(.setActiveTab(.mcp))
202+
hostAppStore.send(.setActiveTab(.tools))
203203
}
204204
}
205205

Core/Sources/ConversationTab/ChatContextMenu.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ struct ChatContextMenu: View {
7979
store.send(.customCommandButtonTapped(command))
8080
}) {
8181
Text(command.name)
82+
.scaledFont(.body)
8283
}
8384
}
8485
}

Core/Sources/ConversationTab/ChatPanel.swift

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ struct ChatPanelMessages: View {
271271
}
272272
}) {
273273
Image(systemName: "chevron.down")
274+
.scaledFrame(width: 14, height: 14)
274275
.padding(8)
275276
.background {
276277
Circle()
@@ -420,10 +421,11 @@ struct ChatFollowUp: View {
420421
}) {
421422
HStack(spacing: 4) {
422423
Image(systemName: "sparkles")
424+
.scaledFont(.body)
423425
.foregroundColor(.blue)
424426

425427
Text(followUp.message)
426-
.font(.system(size: chatFontSize))
428+
.scaledFont(size: chatFontSize)
427429
.foregroundColor(.blue)
428430
}
429431
}
@@ -490,8 +492,10 @@ struct ChatPanelInputArea: View {
490492
Group {
491493
if #available(macOS 13.0, *) {
492494
Image(systemName: "eraser.line.dashed.fill")
495+
.scaledFont(.body)
493496
} else {
494497
Image(systemName: "trash.fill")
498+
.scaledFont(.body)
495499
}
496500
}
497501
.padding(6)
@@ -527,6 +531,12 @@ struct ChatPanelInputArea: View {
527531
@State private var isCCRFFEnabled: Bool
528532
@State private var cancellables = Set<AnyCancellable>()
529533

534+
@StateObject private var fontScaleManager = FontScaleManager.shared
535+
536+
var fontScale: Double {
537+
fontScaleManager.currentScale
538+
}
539+
530540
init(
531541
chat: StoreOf<Chat>,
532542
focusedField: FocusState<Chat.State.Field?>.Binding
@@ -588,7 +598,7 @@ struct ChatPanelInputArea: View {
588598
Text("Edit files in your workspace in agent mode") :
589599
Text("Ask Copilot or type / for commands")
590600
}
591-
.font(.system(size: 14))
601+
.scaledFont(size: 14)
592602
.foregroundColor(Color(nsColor: .placeholderTextColor))
593603
.padding(8)
594604
.padding(.horizontal, 4)
@@ -597,7 +607,7 @@ struct ChatPanelInputArea: View {
597607
HStack(spacing: 0) {
598608
AutoresizingCustomTextEditor(
599609
text: $chat.typedMessage,
600-
font: .systemFont(ofSize: 14),
610+
font: .systemFont(ofSize: 14 * fontScale),
601611
isEditable: true,
602612
maxHeight: 400,
603613
onSubmit: {
@@ -750,6 +760,7 @@ struct ChatPanelInputArea: View {
750760
submitChatMessage()
751761
}) {
752762
Image(systemName: "paperplane.fill")
763+
.scaledFont(.body)
753764
.padding(4)
754765
}
755766
.keyboardShortcut(KeyEquivalent.return, modifiers: [])
@@ -761,6 +772,7 @@ struct ChatPanelInputArea: View {
761772
chat.send(.stopRespondingButtonTapped)
762773
}) {
763774
Image(systemName: "stop.circle")
775+
.scaledFont(.body)
764776
.padding(4)
765777
}
766778
}
@@ -781,6 +793,9 @@ struct ChatPanelInputArea: View {
781793

782794
var codeReviewIcon: some View {
783795
Image("codeReview")
796+
.resizable()
797+
.scaledToFit()
798+
.scaledFrame(width: 14, height: 14)
784799
.padding(6)
785800
}
786801

@@ -809,6 +824,7 @@ struct ChatPanelInputArea: View {
809824
} label: {
810825
codeReviewIcon
811826
}
827+
.scaledFont(.body)
812828
.opacity(isRequestingCodeReview ? 0 : 1)
813829
.help("Code Review")
814830
}
@@ -882,14 +898,14 @@ struct ChatPanelInputArea: View {
882898
focusedField.wrappedValue = .textField
883899
}
884900
}
885-
}) {
901+
}) {
886902
Image(systemName: "paperclip")
887903
.resizable()
888904
.aspectRatio(contentMode: .fill)
889-
.frame(width: 16, height: 16)
890-
.padding(4)
905+
.scaledFrame(width: 16, height: 16)
906+
.scaledPadding(4)
891907
.foregroundColor(.primary.opacity(0.85))
892-
.font(Font.system(size: 11, weight: .semibold))
908+
.scaledFont(size: 11, weight: .semibold)
893909
}
894910
.buttonStyle(HoverButtonStyle(padding: 0))
895911
.help("Add Context")
@@ -929,7 +945,7 @@ struct ChatPanelInputArea: View {
929945
Button(action: { chat.send(.removeReference(ref)) }) {
930946
Image(systemName: "xmark")
931947
.resizable()
932-
.frame(width: 8, height: 8)
948+
.scaledFrame(width: 8, height: 8)
933949
.foregroundColor(.primary.opacity(0.85))
934950
.padding(4)
935951
}
@@ -948,7 +964,7 @@ struct ChatPanelInputArea: View {
948964
drawFileIcon(url, isDirectory: isDirectory)
949965
.resizable()
950966
.scaledToFit()
951-
.frame(width: 16, height: 16)
967+
.scaledFrame(width: 16, height: 16)
952968
.foregroundColor(.primary.opacity(0.85))
953969
.padding(4)
954970
.opacity(isCurrentEditor && !isCurrentEditorContextEnabled ? 0.4 : 1.0)
@@ -976,7 +992,7 @@ struct ChatPanelInputArea: View {
976992
? .secondary
977993
: .primary.opacity(0.85)
978994
)
979-
.font(.body)
995+
.scaledFont(.body)
980996
.opacity(isCurrentEditor && !isCurrentEditorContextEnabled ? 0.4 : 1.0)
981997
.help(url.getPathRelativeToHome())
982998
}

Core/Sources/ConversationTab/FilePicker.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public struct FilePicker: View {
1313
@State private var searchText = ""
1414
@State private var selectedId: Int = 0
1515
@State private var localMonitor: Any? = nil
16+
@AppStorage(\.chatFontSize) var chatFontSize
1617

1718
// Only showup direct sub directories
1819
private var defaultReferencesForDisplay: [ConversationAttachedReference]? {
@@ -76,6 +77,7 @@ public struct FilePicker: View {
7677
.foregroundColor(.secondary)
7778

7879
TextField("Search files...", text: $searchText)
80+
.scaledFont(.body)
7981
.textFieldStyle(PlainTextFieldStyle())
8082
.foregroundColor(searchText.isEmpty ? Color(nsColor: .placeholderTextColor) : Color(nsColor: .textColor))
8183
.focused($isSearchBarFocused)
@@ -92,6 +94,7 @@ public struct FilePicker: View {
9294
}
9395
}) {
9496
Image(systemName: "xmark.circle.fill")
97+
.scaledFont(.body)
9598
.foregroundColor(.secondary)
9699
}
97100
.buttonStyle(HoverButtonStyle())
@@ -205,20 +208,20 @@ struct FileRowView: View {
205208
drawFileIcon(ref.url, isDirectory: ref.isDirectory)
206209
.resizable()
207210
.scaledToFit()
208-
.frame(width: 16, height: 16)
211+
.scaledFrame(width: 16, height: 16)
209212
.hoverSecondaryForeground(isHovered: selectedId == id)
210213
.padding(.leading, 4)
211214

212215
HStack(spacing: 4) {
213216
Text(ref.displayName)
214-
.font(.body)
217+
.scaledFont(.body)
215218
.hoverPrimaryForeground(isHovered: selectedId == id)
216219
.lineLimit(1)
217220
.truncationMode(.middle)
218221
.layoutPriority(1)
219222

220223
Text(ref.relativePath)
221-
.font(.caption)
224+
.scaledFont(.caption)
222225
.hoverSecondaryForeground(isHovered: selectedId == id)
223226
.lineLimit(1)
224227
.truncationMode(.middle)

Core/Sources/ConversationTab/ModelPicker/ChatModePicker.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Persist
33
import ConversationServiceProvider
44
import GitHubCopilotService
55
import Combine
6+
import SharedUIComponents
67

78
public extension Notification.Name {
89
static let gitHubCopilotChatModeDidChange = Notification
@@ -70,8 +71,8 @@ public struct ChatModePicker: View {
7071
}
7172
)
7273
}
73-
.padding(1)
74-
.frame(height: 20, alignment: .topLeading)
74+
.scaledPadding(1)
75+
.scaledFrame(height: 20, alignment: .topLeading)
7576
.background(.primary.opacity(0.1))
7677
.cornerRadius(5)
7778
.padding(4)

Core/Sources/ConversationTab/ModelPicker/ModeButton.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import SwiftUI
2+
import SharedUIComponents
23

34
public struct ModeButton: View {
45
let title: String
@@ -11,8 +12,9 @@ public struct ModeButton: View {
1112
public var body: some View {
1213
Button(action: action) {
1314
Text(title)
14-
.padding(.horizontal, 6)
15-
.padding(.vertical, 0)
15+
.scaledFont(.body)
16+
.scaledPadding(.horizontal, 6)
17+
.scaledPadding(.vertical, 0)
1618
.frame(maxHeight: .infinity, alignment: .center)
1719
.background(isSelected ? activeBackground : Color.clear)
1820
.foregroundColor(isSelected ? activeTextColor : inactiveTextColor)

Core/Sources/ConversationTab/ModelPicker/ModelPicker.swift

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ struct ModelPicker: View {
2424

2525
@State var isMCPFFEnabled: Bool
2626
@State private var cancellables = Set<AnyCancellable>()
27+
28+
@StateObject private var fontScaleManager = FontScaleManager.shared
29+
30+
var fontScale: Double {
31+
fontScaleManager.currentScale
32+
}
2733

2834
let minimumPadding: Int = 48
2935
let attributes: [NSAttributedString.Key: NSFont] = [.font: NSFont.systemFont(ofSize: NSFont.systemFontSize)]
@@ -186,7 +192,7 @@ struct ModelPicker: View {
186192

187193
// Model picker menu component
188194
private var modelPickerMenu: some View {
189-
Menu(selectedModel?.displayName ?? selectedModel?.modelName ?? "") {
195+
Menu {
190196
// Group models by premium status
191197
let premiumModels = copilotModels.filter {
192198
$0.billing?.isPremium == true
@@ -211,10 +217,14 @@ struct ModelPicker: View {
211217
if standardModels.isEmpty {
212218
Link("Add Premium Models", destination: URL(string: "https://aka.ms/github-copilot-upgrade-plan")!)
213219
}
220+
} label: {
221+
Text(selectedModel?.displayName ?? selectedModel?.modelName ?? "")
222+
// scaledFont not work here. workaround by direclty use the fontScale
223+
.font(.system(size: 13 * fontScale))
214224
}
215225
.menuStyle(BorderlessButtonMenuStyle())
216226
.frame(maxWidth: labelWidth())
217-
.padding(4)
227+
.scaledPadding(4)
218228
.background(
219229
RoundedRectangle(cornerRadius: 5)
220230
.fill(isHovered ? Color.gray.opacity(0.1) : Color.clear)
@@ -253,7 +263,7 @@ struct ModelPicker: View {
253263
Group {
254264
if isMCPFFEnabled {
255265
Button(action: {
256-
try? launchHostAppMCPSettings()
266+
try? launchHostAppToolsSettings()
257267
}) {
258268
mcpIcon.foregroundColor(.primary.opacity(0.85))
259269
}
@@ -273,7 +283,7 @@ struct ModelPicker: View {
273283
Image(systemName: "wrench.and.screwdriver")
274284
.resizable()
275285
.scaledToFit()
276-
.frame(width: 16, height: 16)
286+
.scaledFrame(width: 16, height: 16)
277287
.padding(4)
278288
.font(Font.system(size: 11, weight: .semibold))
279289
}
@@ -347,7 +357,7 @@ struct ModelPicker: View {
347357
let width = displayName.size(
348358
withAttributes: attributes
349359
).width
350-
return CGFloat(width + 20)
360+
return CGFloat(width * fontScale + 20)
351361
}
352362

353363
@MainActor

Core/Sources/ConversationTab/Styles.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ struct RoundedCorners: Shape {
183183

184184
// Chat Message Styles
185185
extension View {
186-
func chatMessageHeaderTextStyle() -> some View {
187-
// semibold -> 600
188-
font(.system(size: 13, weight: .semibold))
189-
}
190186

191187
func chatContextReferenceStyle(isCurrentEditor: Bool, r: Double) -> some View {
192188
background(

0 commit comments

Comments
 (0)