Skip to content

Commit d76757f

Browse files
committed
Pre-release 0.44.148
1 parent e445012 commit d76757f

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

Core/Sources/HostApp/ToolsSettings/MCPManualInstallView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ struct MCPManualInstallView: View {
1010
VStack(spacing: 0) {
1111
DisclosureSettingsRow(
1212
isExpanded: $isExpanded,
13-
accessibilityLabel: { $0 ? "Collapse manual install section" : "Expand manual install section" },
14-
title: { Text("Manual Install").font(.headline) },
13+
accessibilityLabel: { $0 ? "Collapse MCP configuration section" : "Expand MCP configuration section" },
14+
title: { Text("MCP Configuration").font(.headline) },
1515
subtitle: { Text("Add MCP Servers to power AI with tools for files, databases, and external APIs.") },
1616
actions: {
1717
HStack(spacing: 8) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ struct MCPRegistryURLSheet: View {
4242
Button("Cancel", role: .cancel) { dismiss() }
4343
Button("Update") {
4444
// Check if URL changed before updating
45+
originalMcpRegistryURL = originalMcpRegistryURL.trimmingCharacters(in: .whitespacesAndNewlines)
4546
if originalMcpRegistryURL != mcpRegistryURL {
4647
mcpRegistryURL = originalMcpRegistryURL
4748
onURLUpdated?()

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ struct MCPRegistryURLView: View {
8080
},
8181
onCommit: {
8282
// Update mcpRegistryURL when user presses Enter
83+
tempURLText = tempURLText.trimmingCharacters(in: .whitespacesAndNewlines)
8384
if tempURLText != mcpRegistryURL {
8485
mcpRegistryURL = tempURLText
8586
}
@@ -128,6 +129,7 @@ struct MCPRegistryURLView: View {
128129

129130
private func loadMCPServers() async {
130131
// Update mcpRegistryURL with current tempURLText before loading
132+
tempURLText = tempURLText.trimmingCharacters(in: .whitespacesAndNewlines)
131133
if tempURLText != mcpRegistryURL {
132134
mcpRegistryURL = tempURLText
133135
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ final class MCPServerGalleryViewModel: ObservableObject {
3131
@Published private(set) var lastError: Error?
3232

3333
@AppStorage(\.mcpRegistryURL) var mcpRegistryURL
34+
@AppStorage(\.mcpRegistryURLHistory) private var mcpRegistryURLHistory
3435

3536
// Service integration
3637
private let registryService = MCPRegistryService.shared
@@ -253,6 +254,8 @@ final class MCPServerGalleryViewModel: ObservableObject {
253254
servers.append(contentsOf: serverList?.servers ?? [])
254255
registryMetadata = serverList?.metadata
255256
}
257+
258+
mcpRegistryURLHistory.addToHistory(mcpRegistryURL)
256259

257260
return nil
258261
} catch {

0 commit comments

Comments
 (0)