Release 0.46.0 · Seilo/CopilotForXcode@53360f8 · GitHub
Skip to content

Commit 53360f8

Browse files
committed
Release 0.46.0
1 parent f8bea4e commit 53360f8

4 files changed

Lines changed: 55 additions & 33 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 18 additions & 0 deletions

‎Core/Sources/ConversationTab/Views/ConversationAgentProgressView/ExpandableFileListView.swift‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct ExpandableFileListView<ProgressMessage: View>: View {
6969
.scaledToFit()
7070
.padding(4)
7171
.scaledFrame(width: chevronWidth, height: chevronWidth)
72-
.scaledFont(size: 10, weight: .bold)
72+
.scaledFont(size: 10, weight: .medium)
7373
.foregroundColor(.secondary)
7474

7575
progressMessage
@@ -88,7 +88,7 @@ struct ExpandableFileListView<ProgressMessage: View>: View {
8888
// Vertical line aligned with chevron center
8989
Rectangle()
9090
.fill(Color.secondary.opacity(0.3))
91-
.frame(width: 1)
91+
.scaledFrame(width: 1)
9292
.scaledPadding(.leading, chevronWidth / 2 - 0.5)
9393

9494
// File list
@@ -168,7 +168,7 @@ struct ExpandableFileListView<ProgressMessage: View>: View {
168168
.foregroundColor(.secondary)
169169

170170
Text(displayName)
171-
.scaledFont(size: chatFontSize - 2)
171+
.scaledFont(size: chatFontSize - 1)
172172
.foregroundColor(.secondary)
173173
.lineLimit(1)
174174

‎Core/Sources/ConversationTab/Views/ConversationAgentProgressView/ToolStatusItemView.swift‎

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ struct ToolStatusItemView: View {
8989
HStack(spacing: 0) {
9090
Text(prefix)
9191
Text(query)
92-
.font(.system(size: chatFontSize - 2, weight: .regular, design: .monospaced))
92+
.scaledFont(size: chatFontSize - 1, weight: .regular, design: .monospaced)
9393
.padding(.horizontal, 4)
9494
.padding(.vertical, 1)
9595
.background(SecondarySystemFillColor)
@@ -122,7 +122,7 @@ struct ToolStatusItemView: View {
122122
let end = String(message[endRange])
123123
Text(": \(start)-\(end)")
124124
.foregroundColor(.secondary)
125-
.font(.system(size: chatFontSize - 1))
125+
.scaledFont(size: chatFontSize - 1)
126126
}
127127
}
128128
}
@@ -163,7 +163,7 @@ struct ToolStatusItemView: View {
163163
HStack(spacing: 0) {
164164
Text("Searched \(target) for ")
165165
Text(query)
166-
.font(.system(size: chatFontSize - 2, weight: .regular, design: .monospaced))
166+
.scaledFont(size: chatFontSize - 1, weight: .regular, design: .monospaced)
167167
.padding(.horizontal, 4)
168168
.padding(.vertical, 1)
169169
.background(SecondarySystemFillColor)
@@ -240,7 +240,7 @@ struct ToolStatusItemView: View {
240240
}
241241

242242
extraContent(match)
243-
.scaledPadding(.leading, -4)
243+
.padding(.leading, -4)
244244
}
245245
} else {
246246
markdownView(text: message)
@@ -268,16 +268,19 @@ struct ToolStatusItemView: View {
268268
}
269269

270270
func markdownView(text: String) -> some View {
271-
Markdown(text)
272-
.markdownTheme(.functionCall(fontSize: chatFontSize))
273-
.environment(\.openURL, OpenURLAction { url in
274-
if url.scheme == "file" || url.isFileURL {
275-
NSWorkspace.shared.open(url)
276-
return .handled
277-
} else {
278-
return .systemAction
279-
}
280-
})
271+
ThemedMarkdownText(
272+
text: text,
273+
context: .init(supportInsert: false),
274+
foregroundColor: .secondary
275+
)
276+
.environment(\.openURL, OpenURLAction { url in
277+
if url.scheme == "file" || url.isFileURL {
278+
NSWorkspace.shared.open(url)
279+
return .handled
280+
} else {
281+
return .systemAction
282+
}
283+
})
281284
}
282285

283286
var progressErrorText: some View {
@@ -473,6 +476,7 @@ private struct ToolStatusDetailsView<Title: View, Content: View>: View {
473476
var content: Content
474477

475478
@State private var isExpanded = false
479+
@AppStorage(\.fontScale) var fontScale
476480

477481
var body: some View {
478482
VStack(alignment: .leading, spacing: 6) {
@@ -490,13 +494,13 @@ private struct ToolStatusDetailsView<Title: View, Content: View>: View {
490494
.scaledToFit()
491495
.padding(4)
492496
.scaledFrame(width: 16, height: 16)
493-
.scaledFont(size: 10, weight: .bold)
497+
.scaledFont(size: 10, weight: .medium)
494498
}
495499
.contentShape(RoundedRectangle(cornerRadius: 6))
496500
}
497501
.buttonStyle(.plain)
498502
.scaledPadding(.horizontal, 6)
499-
.toolStatusStyle(withBackground: !isExpanded)
503+
.toolStatusStyle(withBackground: !isExpanded, fontScale: fontScale)
500504

501505
if isExpanded {
502506
Divider()
@@ -506,20 +510,20 @@ private struct ToolStatusDetailsView<Title: View, Content: View>: View {
506510
.scaledPadding(.horizontal, 8)
507511
}
508512
}
509-
.toolStatusStyle(withBackground: isExpanded)
513+
.toolStatusStyle(withBackground: isExpanded, fontScale: fontScale)
510514
}
511515
}
512516

513517
private extension View {
514-
func toolStatusStyle(withBackground: Bool) -> some View {
518+
func toolStatusStyle(withBackground: Bool, fontScale: CGFloat) -> some View {
515519
/// Leverage the `modify` extension to avoid refreshing of chat panel `List` view
516520
self.modify { view in
517521
if withBackground {
518522
view
519523
.scaledPadding(.vertical, 6)
520524
.background(
521525
RoundedRectangle(cornerRadius: 6)
522-
.stroke(Color.agentToolStatusOutlineColor, lineWidth: 1)
526+
.stroke(Color.agentToolStatusOutlineColor, lineWidth: 1 * fontScale)
523527
)
524528
} else {
525529
view

‎ReleaseNotes.md‎

Lines changed: 11 additions & 11 deletions

0 commit comments

Comments
 (0)