Skip to content

Commit 54183dc

Browse files
committed
Add other suggestion service tab
1 parent dccf02c commit 54183dc

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import Foundation
2+
import SwiftUI
3+
4+
struct OtherSuggestionServicesView: View {
5+
@Environment(\.openURL) var openURL
6+
var body: some View {
7+
VStack(alignment: .leading) {
8+
Text(
9+
"You can use other locally run services (Tabby, Ollma, etc.) to generate suggestions with the Custom Suggestion Service extension."
10+
)
11+
.lineLimit(nil)
12+
.multilineTextAlignment(.leading)
13+
14+
Button(action: {
15+
if let url = URL(
16+
string: "https://github.com/intitni/CustomSuggestionServiceForCopilotForXcode"
17+
) {
18+
openURL(url)
19+
}
20+
}) {
21+
Text("Get It Now")
22+
}
23+
}
24+
}
25+
}
26+
27+
#Preview {
28+
OtherSuggestionServicesView()
29+
.frame(width: 200)
30+
}
31+

Core/Sources/HostApp/ServiceView.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ struct ServiceView: View {
5353
subtitle: "Search Chat Plugin",
5454
image: "globe"
5555
)
56+
57+
ScrollView {
58+
OtherSuggestionServicesView().padding()
59+
}.sidebarItem(
60+
tag: 5,
61+
title: "Other Suggestion Services",
62+
subtitle: "Suggestion",
63+
image: "globe"
64+
)
5665
}
5766
}
5867
}

0 commit comments

Comments
 (0)