Skip to content

Commit a59fb49

Browse files
committed
Rename ChatPlugin to LegacyChatPlugin
1 parent 93215bf commit a59fb49

File tree

18 files changed

+95
-261
lines changed

18 files changed

+95
-261
lines changed

Core/Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ let package = Package(
171171
.target(
172172
name: "ChatService",
173173
dependencies: [
174-
"ChatPlugin",
174+
"LegacyChatPlugin",
175175

176176
// plugins
177177
"MathChatPlugin",
@@ -195,7 +195,7 @@ let package = Package(
195195
),
196196
.testTarget(name: "ChatServiceTests", dependencies: ["ChatService"]),
197197
.target(
198-
name: "ChatPlugin",
198+
name: "LegacyChatPlugin",
199199
dependencies: [
200200
.product(name: "AppMonitoring", package: "Tool"),
201201
.product(name: "OpenAIService", package: "Tool"),
@@ -279,7 +279,7 @@ let package = Package(
279279
.target(
280280
name: "MathChatPlugin",
281281
dependencies: [
282-
"ChatPlugin",
282+
"LegacyChatPlugin",
283283
.product(name: "OpenAIService", package: "Tool"),
284284
.product(name: "LangChain", package: "Tool"),
285285
],
@@ -289,7 +289,7 @@ let package = Package(
289289
.target(
290290
name: "SearchChatPlugin",
291291
dependencies: [
292-
"ChatPlugin",
292+
"LegacyChatPlugin",
293293
.product(name: "OpenAIService", package: "Tool"),
294294
.product(name: "LangChain", package: "Tool"),
295295
.product(name: "ExternalServices", package: "Tool"),
@@ -300,7 +300,7 @@ let package = Package(
300300
.target(
301301
name: "ShortcutChatPlugin",
302302
dependencies: [
303-
"ChatPlugin",
303+
"LegacyChatPlugin",
304304
.product(name: "Parsing", package: "swift-parsing"),
305305
.product(name: "Terminal", package: "Tool"),
306306
],

Core/Sources/ChatPlugin/AITerminalChatPlugin.swift

Lines changed: 0 additions & 196 deletions
This file was deleted.

Core/Sources/ChatPlugin/ChatPlugin.swift

Lines changed: 0 additions & 21 deletions
This file was deleted.

Core/Sources/ChatPlugins/MathChatPlugin/MathChatPlugin.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import ChatPlugin
1+
import LegacyChatPlugin
22
import Foundation
33
import OpenAIService
44

55
/// Use Python to solve math problems.
6-
public actor MathChatPlugin: ChatPlugin {
6+
public actor MathChatPlugin: LegacyChatPlugin {
77
public static var command: String { "math" }
88
public nonisolated var name: String { "Math" }
99

1010
let chatGPTService: any LegacyChatGPTServiceType
1111
var isCancelled = false
12-
weak var delegate: ChatPluginDelegate?
12+
weak var delegate: LegacyChatPluginDelegate?
1313

14-
public init(inside chatGPTService: any LegacyChatGPTServiceType, delegate: ChatPluginDelegate) {
14+
public init(inside chatGPTService: any LegacyChatGPTServiceType, delegate: LegacyChatPluginDelegate) {
1515
self.chatGPTService = chatGPTService
1616
self.delegate = delegate
1717
}

Core/Sources/ChatPlugins/MathChatPlugin/SolveMathProblem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ChatPlugin
1+
import LegacyChatPlugin
22
import Foundation
33
import LangChain
44
import Logger

Core/Sources/ChatPlugins/SearchChatPlugin/SearchChatPlugin.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import ChatPlugin
1+
import LegacyChatPlugin
22
import Foundation
33
import OpenAIService
44

5-
public actor SearchChatPlugin: ChatPlugin {
5+
public actor SearchChatPlugin: LegacyChatPlugin {
66
public static var command: String { "search" }
77
public nonisolated var name: String { "Search" }
88

99
let chatGPTService: any LegacyChatGPTServiceType
1010
var isCancelled = false
11-
weak var delegate: ChatPluginDelegate?
11+
weak var delegate: LegacyChatPluginDelegate?
1212

13-
public init(inside chatGPTService: any LegacyChatGPTServiceType, delegate: ChatPluginDelegate) {
13+
public init(inside chatGPTService: any LegacyChatGPTServiceType, delegate: LegacyChatPluginDelegate) {
1414
self.chatGPTService = chatGPTService
1515
self.delegate = delegate
1616
}

Core/Sources/ChatPlugins/ShortcutChatPlugin/ShortcutChatPlugin.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
import ChatPlugin
21
import Foundation
2+
import LegacyChatPlugin
33
import OpenAIService
44
import Parsing
55
import Terminal
66

7-
public actor ShortcutChatPlugin: ChatPlugin {
7+
public actor ShortcutChatPlugin: LegacyChatPlugin {
88
public static var command: String { "shortcut" }
99
public nonisolated var name: String { "Shortcut" }
1010

1111
let chatGPTService: any LegacyChatGPTServiceType
1212
var terminal: TerminalType = Terminal()
1313
var isCancelled = false
14-
weak var delegate: ChatPluginDelegate?
14+
weak var delegate: LegacyChatPluginDelegate?
1515

16-
public init(inside chatGPTService: any LegacyChatGPTServiceType, delegate: ChatPluginDelegate) {
16+
public init(
17+
inside chatGPTService: any LegacyChatGPTServiceType,
18+
delegate: LegacyChatPluginDelegate
19+
) {
1720
self.chatGPTService = chatGPTService
1821
self.delegate = delegate
1922
}

Core/Sources/ChatPlugins/ShortcutChatPlugin/ShortcutInputChatPlugin.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import ChatPlugin
1+
import LegacyChatPlugin
22
import Foundation
33
import OpenAIService
44
import Parsing
55
import Terminal
66

7-
public actor ShortcutInputChatPlugin: ChatPlugin {
7+
public actor ShortcutInputChatPlugin: LegacyChatPlugin {
88
public static var command: String { "shortcutInput" }
99
public nonisolated var name: String { "Shortcut Input" }
1010

1111
let chatGPTService: any LegacyChatGPTServiceType
1212
var terminal: TerminalType = Terminal()
1313
var isCancelled = false
14-
weak var delegate: ChatPluginDelegate?
14+
weak var delegate: LegacyChatPluginDelegate?
1515

16-
public init(inside chatGPTService: any LegacyChatGPTServiceType, delegate: ChatPluginDelegate) {
16+
public init(inside chatGPTService: any LegacyChatGPTServiceType, delegate: LegacyChatPluginDelegate) {
1717
self.chatGPTService = chatGPTService
1818
self.delegate = delegate
1919
}

Core/Sources/ChatService/AllPlugins.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import ChatPlugin
1+
import LegacyChatPlugin
22
import MathChatPlugin
33
import SearchChatPlugin
44
import ShortcutChatPlugin
55

6-
let allPlugins: [ChatPlugin.Type] = [
6+
let allPlugins: [LegacyChatPlugin.Type] = [
77
TerminalChatPlugin.self,
8-
AITerminalChatPlugin.self,
98
MathChatPlugin.self,
109
SearchChatPlugin.self,
1110
ShortcutChatPlugin.self,

0 commit comments

Comments
 (0)