[20260414][feat] add fuzzy command tips - #205
Open
PunChen wants to merge 13 commits into
Open
Conversation
…aster_add_fuzzy_command
…aster_add_fuzzy_command # Conflicts: # gsuid_core/handler.py
Contributor
|
你的类型标注有很大的问题 以及 以及列表推导式存在不良实践(列表推导式不应该使用append) 以及可能的性能问题: # 修改前:只有被触发的命令才会加入字典
if trigger.check_command(message):
valid_event[trigger] = priority
# 修改后:无论是否触发,直接全都无条件塞入字典并进行模糊匹配
normal_match, fuzzy_match = trigger.check_command(message)
valid_event[trigger] = {"priority": priority, "normal_match": normal_match, "fuzzy_match": fuzzy_match}另外缺少这么做的必要性(并且会引来不小的性能降级), 建议补充一下实际案例,来表达引入模糊匹配的必要性 |
Contributor
|
好眼熟的功能 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
添加中文命令模糊匹配
