File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ public protocol ChatPlugin {
66 static var command : String { get }
77 var name : String { get }
88
9- init ( inside chatGPTService: ChatGPTServiceType , delegate: ChatPluginDelegate )
9+ init ( inside chatGPTService: any ChatGPTServiceType , delegate: ChatPluginDelegate )
1010 func send( content: String ) async
1111 func cancel( ) async
1212 func stopResponding( ) async
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ public actor TerminalChatPlugin: ChatPlugin {
77 public static var command : String { " run " }
88 public nonisolated var name : String { " Terminal " }
99
10- let chatGPTService : ChatGPTServiceType
10+ let chatGPTService : any ChatGPTServiceType
1111 var terminal : TerminalType = Terminal ( )
1212 var isCancelled = false
1313 weak var delegate : ChatPluginDelegate ?
1414
15- public init ( inside chatGPTService: ChatGPTServiceType , delegate: ChatPluginDelegate ) {
15+ public init ( inside chatGPTService: any ChatGPTServiceType , delegate: ChatPluginDelegate ) {
1616 self . chatGPTService = chatGPTService
1717 self . delegate = delegate
1818 }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Foundation
33import OpenAIService
44
55public final class ChatService : ObservableObject {
6- let chatGPTService : ChatGPTServiceType
6+ public let chatGPTService : any ChatGPTServiceType
77 let plugins = registerPlugins (
88 TerminalChatPlugin . self
99 )
You can’t perform that action at this time.
0 commit comments