Skip to content

fix(minimax-bot): 全角输入法与泰老柬缅文紧贴着 @ 时也点得到人 - #102

Merged
MyPrototypeWhat merged 3 commits into
MiniMax-AI:mainfrom
Apageoflove:fix/minimax-bot-mention-spacing
Nov 3, 2026
Merged

MyPrototypeWhat merged 3 commits into
MiniMax-AI:mainfrom
Apageoflove:fix/minimax-bot-mention-spacing

Conversation

@Apageoflove

@Apageoflove Apageoflove commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

上一条 PR(#96)把 @ 前面的那个字按书写系统来判:拉丁、希腊、西里尔这些用空格分词的文字,它挡在 @ 前面就说明那是一个地址,点不到人;中文、日文、韩文紧贴着 @ 写词,所以它们不算。评审里指出还有两类同样紧贴着 @ 写的字没算进去:全角输入法打出来的全角字母和数字,以及泰语、老挝语、高棉语、缅甸文——这四种文字也都不用空格分词。
这一版把这两类加进「不算地址」的那一组:全角输入法写出来的全角字母和数字紧贴着 @ 时,现在还能点到人;那四种文字紧贴着 @ 时也还能点到人。而一个用空格分词的文字(带重音的拉丁字母、希腊字母、西里尔字母)接在 @ 前面时,仍然点不到人,它是一个地址。全角与半角形式是 U+FF00 到 U+FFEF 这一段。
README 也补了一段:0.7.16 那次是改了规则(一个用空格分词的文字接在 @ 前面,在 0.7.15 会点到人、0.7.16 起不会),上一版只改写了 0.7.13 那一段,读者看不出规则变过,现在补一段把这件事记下来。
新加的用例在未改的上游代码上是红的,在这版上是绿的;插件自带套件 344 条全过,上游 npm run check 两半也过。
这一版只补齐「哪些文字紧贴着 @ 写词」的判断,不改 @ 前面是别的文字时的行为;名字后面紧跟中文的边界维持上游原有的语义,没有动。这之外还有没有别的紧贴着写词的文字,需要确认之后再补。


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@MyPrototypeWhat MyPrototypeWhat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up on #96. Approving.

The change is small, and so is the risk:

  • Thai, Lao, Khmer and Myanmar now join the scripts that write right up against the @, so ขอบคุณ@alice reaches Alice.
  • Latin, Greek and Cyrillic in front of the @ still make an address (josé@alice, mail@alice.com).
  • Full-width letters and digits typed with an IME (OK@alice, 第2@alice) now reach the member too.
  • The \uFF00-\uFFEF range also covers full-width punctuation, which is harmless: isAddressChar only applies to word characters, so punctuation before the @ was never treated as part of an address.
  • Half-width katakana (カナ@alice) was already covered under Katakana and still works.

Verified

  • I spot-checked a few extra cases locally. ,@alice and 、@alice mention, and abc@alice doesn't.
  • mail@alice.com now counts as a mention. That's fine with me, since nobody types a real address in full-width.
  • CI passes, and npm run check passes locally.
  • Plugin tests pass at 341/344, including the new test. The 3 failures are the emoji picker tests, which fail on main in my environment too.
  • The version is 0.7.19 in package.json, plugin.json, serverInfo in mcp.mjs, and the README.

Optional

  • The full-width at sign @ (U+FF20) isn't recognized as a mention, because the scan only looks for the ASCII @. That was true before this PR too. If full-width IME users matter here, a later PR could handle it.
  • The new README section sits between 0.7.12 and 0.7.13. Moving it next to the other recent entries would make it easier to find.

Heads-up: this PR touches the same version lines as #97 (0.7.17) and #98 (0.7.18). Since 0.7.19 comes after both, it should merge last of the three and will need a small rebase on the version lines and the README changelog.

@MyPrototypeWhat
MyPrototypeWhat merged commit 53364ee into MiniMax-AI:main Nov 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants