Skip to content

Commit 99f6a63

Browse files
committed
Search plugins with lowercased ids
1 parent eac0330 commit 99f6a63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Core/Sources/ChatService/ChatPluginController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ final class ChatPluginController {
1212
self.chatGPTService = chatGPTService
1313
var all = [String: ChatPlugin.Type]()
1414
for plugin in plugins {
15-
all[plugin.command] = plugin
15+
all[plugin.command.lowercased()] = plugin
1616
}
1717
self.plugins = all
1818
}
@@ -29,7 +29,7 @@ final class ChatPluginController {
2929
let regex = try NSRegularExpression(pattern: #"^\/([a-zA-Z0-9]+)"#)
3030
let matches = regex.matches(in: content, range: NSRange(content.startIndex..., in: content))
3131
if let match = matches.first {
32-
let command = String(content[Range(match.range(at: 1), in: content)!])
32+
let command = String(content[Range(match.range(at: 1), in: content)!]).lowercased()
3333
// handle exit plugin
3434
if command == "exit" {
3535
if let plugin = runningPlugin {

0 commit comments

Comments
 (0)