forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatPlugin.swift
More file actions
21 lines (18 loc) · 717 Bytes
/
ChatPlugin.swift
File metadata and controls
21 lines (18 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Foundation
import OpenAIService
public protocol ChatPlugin: AnyObject {
/// Should be [a-zA-Z0-9]+
static var command: String { get }
var name: String { get }
init(inside chatGPTService: any ChatGPTServiceType, delegate: ChatPluginDelegate)
func send(content: String, originalMessage: String) async
func cancel() async
func stopResponding() async
}
public protocol ChatPluginDelegate: AnyObject {
func pluginDidStart(_ plugin: ChatPlugin)
func pluginDidEnd(_ plugin: ChatPlugin)
func pluginDidStartResponding(_ plugin: ChatPlugin)
func pluginDidEndResponding(_ plugin: ChatPlugin)
func shouldStartAnotherPlugin(_ type: ChatPlugin.Type, withContent: String)
}