feat: 为命令前缀( : )支持中文符号

This commit is contained in:
frostime
2024-08-02 22:27:45 +08:00
parent a8c65e3d27
commit deb140de73
2 changed files with 9 additions and 6 deletions

View File

@@ -811,7 +811,7 @@ function _Chat() {
// clear search results
if (n === 0) {
setPromptHints([]);
} else if (text.startsWith(ChatCommandPrefix)) {
} else if (text.match(ChatCommandPrefix)) {
setPromptHints(chatCommands.search(text));
} else if (!config.disablePromptHint && n < SEARCH_TEXT_LIMIT) {
// check if need to trigger auto completion