Skip to content

Commit 141dd96

Browse files
committed
Fix the any requirement
1 parent 76eba6e commit 141dd96

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Core/Sources/ChatPlugins/ChatPlugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Core/Sources/ChatPlugins/TerminalChatPlugin.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

Core/Sources/ChatService/ChatService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Foundation
33
import OpenAIService
44

55
public final class ChatService: ObservableObject {
6-
let chatGPTService: ChatGPTServiceType
6+
public let chatGPTService: any ChatGPTServiceType
77
let plugins = registerPlugins(
88
TerminalChatPlugin.self
99
)

0 commit comments

Comments
 (0)