File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments