Skip to content

Commit 02351b7

Browse files
committed
Pre-release 0.46.159
1 parent 5b3a5b8 commit 02351b7

File tree

3 files changed

+48
-36
lines changed

3 files changed

+48
-36
lines changed

Core/Sources/HostApp/ToolsSettings/MCPRegistry/MCPServerDetailSheet.swift

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
@available(macOS 13.0, *)
88
struct MCPServerDetailSheet: View {
99
let server: MCPRegistryServerDetail
10-
let meta: ServerMeta
10+
let meta: ServerMeta?
1111
@State private var selectedTab = TabType.Packages
1212
@State private var expandedPackages: Set<Int> = []
1313
@State private var expandedRemotes: Set<Int> = []
@@ -101,8 +101,8 @@ struct MCPServerDetailSheet: View {
101101
Text(server.title ?? server.name)
102102
.font(.system(size: 18, weight: .semibold))
103103

104-
if meta.official.status == .deprecated {
105-
statusBadge(meta.official.status)
104+
if let status = meta?.official?.status, status == .deprecated {
105+
statusBadge(status)
106106
}
107107

108108
Spacer()
@@ -115,10 +115,14 @@ struct MCPServerDetailSheet: View {
115115
}
116116
.font(.system(size: 12, design: .monospaced))
117117
.foregroundColor(.secondary)
118-
119-
dateMetadataTag(title: "Published ", dateString: meta.official.publishedAt, image: "clock.arrow.trianglehead.counterclockwise.rotate.90")
120118

121-
dateMetadataTag(title: "Updated ", dateString: meta.official.updatedAt, image: "icloud.and.arrow.up")
119+
if let publishedAt = meta?.official?.publishedAt {
120+
dateMetadataTag(title: "Published ", dateString: publishedAt, image: "clock.arrow.trianglehead.counterclockwise.rotate.90")
121+
}
122+
123+
if let updatedAt = meta?.official?.updatedAt {
124+
dateMetadataTag(title: "Updated ", dateString: updatedAt, image: "icloud.and.arrow.up")
125+
}
122126

123127
if let repo = server.repository, !repo.url.isEmpty, !repo.source.isEmpty {
124128
if let repoURL = URL(string: repo.url) {
@@ -175,8 +179,10 @@ struct MCPServerDetailSheet: View {
175179
.tag(TabType.Packages)
176180
Text("Remotes (\(server.remotes?.count ?? 0))")
177181
.tag(TabType.Remotes)
178-
Text("Metadata")
179-
.tag(TabType.Metadata)
182+
if meta?.official != nil {
183+
Text("Metadata")
184+
.tag(TabType.Metadata)
185+
}
180186
}
181187
.pickerStyle(.segmented)
182188
}
@@ -292,7 +298,9 @@ struct MCPServerDetailSheet: View {
292298

293299
private var metadataTab: some View {
294300
VStack(alignment: .leading, spacing: 16) {
295-
officialMetadataSection(meta.official)
301+
if let officialMeta = meta?.official {
302+
officialMetadataSection(officialMeta)
303+
}
296304
}
297305
}
298306

@@ -304,18 +312,23 @@ struct MCPServerDetailSheet: View {
304312
}
305313

306314
VStack(alignment: .leading, spacing: 8) {
307-
metadataRow(
308-
label: "Published",
309-
value: parseDate(official.publishedAt) != nil ? formatExactDate(
310-
parseDate(official.publishedAt)!
311-
) : official.publishedAt
312-
)
313-
metadataRow(
314-
label: "Updated",
315-
value: parseDate(official.updatedAt) != nil ? formatExactDate(
316-
parseDate(official.updatedAt)!
317-
) : official.updatedAt
318-
)
315+
if let publishedAt = official.publishedAt {
316+
metadataRow(
317+
label: "Published",
318+
value: parseDate(publishedAt) != nil ? formatExactDate(
319+
parseDate(publishedAt)!
320+
) : publishedAt
321+
)
322+
}
323+
324+
if let updatedAt = official.updatedAt {
325+
metadataRow(
326+
label: "Updated",
327+
value: parseDate(updatedAt) != nil ? formatExactDate(
328+
parseDate(updatedAt)!
329+
) : updatedAt
330+
)
331+
}
319332
}
320333
}
321334
.padding(16)

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# <img align="center" height="70" src="./Docs/Images/AppIcon.png"/> GitHub Copilot for Xcode
22

3-
[GitHub Copilot](https://github.com/features/copilot) for Xcode is the leading AI coding assistant for Xcode developers, helping you code faster and smarter. Stay in flow with **inline completions** and get instant help through **chat support**—explaining code, answering questions, and suggesting improvements. When you need more, Copilot scales with advanced features like **Agent Mode, MCP Registry, Copilot Vision, Code Review, Custom Instructions, and more**, making your Xcode workflow more efficient and intelligent.
4-
3+
[GitHub Copilot](https://github.com/features/copilot) for Xcode is the leading AI coding assistant for Swift, Objective-C and iOS/macOS development. It delivers intelligent Completions, Chat, and Code Review—plus advanced features like Agent Mode, Next Edit Suggestions, MCP Registry, and Copilot Vision to make Xcode development faster and smarter.
54

65
## Chat
76

@@ -29,7 +28,7 @@ You can receive auto-complete type suggestions from GitHub Copilot either by sta
2928

3029
- macOS 12+
3130
- Xcode 8+
32-
- A GitHub Copilot subscription. To learn more, visit [https://github.com/features/copilot](https://github.com/features/copilot).
31+
- A GitHub account
3332

3433
## Getting Started
3534

Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequestTypes/MCPRegistry.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -506,16 +506,16 @@ public enum ServerStatus: String, Codable {
506506
}
507507

508508
public struct OfficialMeta: Codable {
509-
public let status: ServerStatus
510-
public let publishedAt: String
511-
public let updatedAt: String
512-
public let isLatest: Bool
509+
public let status: ServerStatus?
510+
public let publishedAt: String?
511+
public let updatedAt: String?
512+
public let isLatest: Bool?
513513

514514
public init(
515-
status: ServerStatus,
516-
publishedAt: String,
517-
updatedAt: String,
518-
isLatest: Bool
515+
status: ServerStatus? = nil,
516+
publishedAt: String? = nil,
517+
updatedAt: String? = nil,
518+
isLatest: Bool? = nil
519519
) {
520520
self.status = status
521521
self.publishedAt = publishedAt
@@ -566,15 +566,15 @@ public struct MCPRegistryExtensionMeta: Codable {
566566
}
567567

568568
public struct ServerMeta: Codable {
569-
public let official: OfficialMeta
569+
public let official: OfficialMeta?
570570
private let additionalProperties: [String: AnyCodable]?
571571

572572
enum CodingKeys: String, CodingKey {
573573
case official = "io.modelcontextprotocol.registry/official"
574574
}
575575

576576
public init(
577-
official: OfficialMeta,
577+
official: OfficialMeta? = nil,
578578
additionalProperties: [String: AnyCodable]? = nil
579579
) {
580580
self.official = official
@@ -688,9 +688,9 @@ public struct MCPRegistryServerDetail: Codable {
688688

689689
public struct MCPRegistryServerResponse : Codable {
690690
public let server: MCPRegistryServerDetail
691-
public let meta: ServerMeta
691+
public let meta: ServerMeta?
692692

693-
public init(server: MCPRegistryServerDetail, meta: ServerMeta) {
693+
public init(server: MCPRegistryServerDetail, meta: ServerMeta? = nil) {
694694
self.server = server
695695
self.meta = meta
696696
}

0 commit comments

Comments
 (0)