From 8ec53d43b53e4939e22748e2199de024ac0ec722 Mon Sep 17 00:00:00 2001 From: EdgeMLHacker <126883848+Apageoflove@users.noreply.github.com> Date: Mon, 2 Nov 2026 09:59:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(minimax-bot):=20=E5=85=A8=E8=A7=92=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=B3=95=E4=B8=8E=E6=B3=B0=E8=80=81=E6=9F=AC=E7=BC=85?= =?UTF-8?q?=E6=96=87=E7=B4=A7=E8=B4=B4=E7=9D=80=20@=20=E6=97=B6=E4=B9=9F?= =?UTF-8?q?=E7=82=B9=E5=BE=97=E5=88=B0=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../minimax-bot/.minimax-plugin/plugin.json | 2 +- plugins/minimax-ai/minimax-bot/README.md | 4 ++++ .../minimax-ai/minimax-bot/miniapp/node/engine.mjs | 6 ++++-- .../minimax-ai/minimax-bot/miniapp/node/mcp.mjs | 2 +- plugins/minimax-ai/minimax-bot/package.json | 2 +- .../minimax-bot/tests/mention-nonascii.test.mjs | 14 ++++++++++++++ 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json b/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json index 95c15d0..b914bff 100644 --- a/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json +++ b/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "name": "minimax-bot", "displayName": "MiniMax Bot", - "version": "0.7.16", + "version": "0.7.19", "description": "Turn MiniMax Code into an always-on team of Bots. A Chief Bot helps you build the team; in group chats the admin answers and @mentions hand work to other members. Every Bot has its own octopus avatar and memory, with scheduled tasks and usage stats.", "author": "MiniMax Code", "icon": "icon.png", diff --git a/plugins/minimax-ai/minimax-bot/README.md b/plugins/minimax-ai/minimax-bot/README.md index 8934bda..91b5cc8 100644 --- a/plugins/minimax-ai/minimax-bot/README.md +++ b/plugins/minimax-ai/minimax-bot/README.md @@ -61,6 +61,10 @@ An avatar may come from the avatar library or from an image uploaded in the page - A background job is an Agent turn like any other, so the usage panel counts it. Before, the panel showed fewer turns than the model actually ran: the job's own turn never reached the ledger, only the turn that relayed its report back. - The job's row carries the time it took, the tools it called and the reply it produced, and it says how the job ended: a job that failed is an error, one that was stopped or cut off is aborted. +## 0.7.19 The mention rule, read by the script that writes the word + +0.7.16 started to read the character in front of the `@` as a word of any script, so a letter of a script that writes with spaces (`josé@alice`) makes an address and calls nobody. This release completes that: a full-width IME writes full-width letters and digits (`OK@某人`), and Thai, Lao, Khmer and Myanmar write a word right up against the `@` as Chinese does, so those characters do not swallow the mention either. + ## 0.7.13 A mention that reads like Chinese, and marks that stay out - A mention works right after a Chinese word. The character in front of the `@` used to end the mention whenever it was a letter of any script, and Chinese has no spaces between words, so `请@某人` and `好的@某人` reached nobody. Any letter, digit, underscore or combining mark in front of the `@` ends it now, in every script that writes with spaces: `josé@alice` and `Привет@alice` reach nobody, the way `mail@alice.com` does. Chinese, Japanese and Korean write a word right against the `@`, so their characters do not swallow the mention and `请@某人` still calls that member. A name that runs into more words (`@Alicex`) still is not a mention either, and English is unchanged: `mail@alice.com` and `ok@alice` reach nobody, while `@alice`, `@alice.` and `@Alice Smith` do. diff --git a/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs b/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs index 2f43222..e918e00 100644 --- a/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs +++ b/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs @@ -1180,9 +1180,11 @@ export class Engine { const isWord = (value) => Boolean(value && /[\p{L}\p{N}\p{M}_]/u.test(value)); // Chinese, Japanese kana and Korean write a word right up against the '@' without a space // ("请@某人"), so a character of those scripts does not belong to an address and must not - // swallow the mention. Any other word character in front of the '@' does belong to one + // swallow the mention. Thai, Lao, Khmer and Myanmar write the same way. The full-width and + // half-width forms are what a full-width IME produces ("OK@某人"), and they stand in the + // same place. Any other word character in front of the '@' does belong to an address // ("mail@alice.com", "josé@alice"). - const isSpaceless = (value) => Boolean(value && /[\p{Script_Extensions=Han}\p{Script_Extensions=Hiragana}\p{Script_Extensions=Katakana}\p{Script_Extensions=Hangul}]/u.test(value)); + const isSpaceless = (value) => Boolean(value && /[\p{Script_Extensions=Han}\p{Script_Extensions=Hiragana}\p{Script_Extensions=Katakana}\p{Script_Extensions=Hangul}\p{Script_Extensions=Thai}\p{Script_Extensions=Lao}\p{Script_Extensions=Khmer}\p{Script_Extensions=Myanmar}\uFF00-\uFFEF]/u.test(value)); const isAddressChar = (value) => isWord(value) && !isSpaceless(value); const found = []; for (let index = lower.indexOf('@'); index >= 0; index = lower.indexOf('@', index + 1)) { diff --git a/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs b/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs index f91de64..be20894 100644 --- a/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs +++ b/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs @@ -662,7 +662,7 @@ export function createMcpHandler({ team, engine }) { result = { protocolVersion: PROTOCOL_VERSIONS.includes(requested) ? requested : PROTOCOL_VERSIONS[0], capabilities: { tools: { listChanged: false } }, - serverInfo: { name: 'minimax-bot', version: '0.7.16' }, + serverInfo: { name: 'minimax-bot', version: '0.7.19' }, instructions: t('mcp.instructions'), }; break; diff --git a/plugins/minimax-ai/minimax-bot/package.json b/plugins/minimax-ai/minimax-bot/package.json index 0675509..ba8ce2b 100644 --- a/plugins/minimax-ai/minimax-bot/package.json +++ b/plugins/minimax-ai/minimax-bot/package.json @@ -1,6 +1,6 @@ { "name": "minimax-bot", - "version": "0.7.16", + "version": "0.7.19", "private": true, "type": "module", "mcode": { diff --git a/plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs b/plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs index f0668db..3275e39 100644 --- a/plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs +++ b/plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs @@ -50,6 +50,20 @@ test('a letter of a script that writes with spaces makes an address, not a menti assert.deepEqual(engine.mentionsIn('josé@alice @bob', group), ['bob']); }); +test('a full-width IME and the scripts that write up against the "@" still reach the member', async (t) => { + const { engine, group } = await fixture(t); + // A full-width IME writes full-width letters and digits. + assert.deepEqual(engine.mentionsIn('OK@alice', group), ['alice']); + assert.deepEqual(engine.mentionsIn('第2@alice', group), ['alice']); + // Thai, Lao, Khmer and Myanmar write a word right up against the "@" as well. + assert.deepEqual(engine.mentionsIn('\u0e02\u0e2d\u0e1a\u0e38\u0e19@alice', group), ['alice']); + assert.deepEqual(engine.mentionsIn('\u0e82\u0eb2\u0e99@alice', group), ['alice']); + assert.deepEqual(engine.mentionsIn('\u17e1\u179c\u17b7@alice', group), ['alice']); + assert.deepEqual(engine.mentionsIn('\u1000\u103b\u102c\u1019\u1038@alice', group), ['alice']); + // A letter of a script that writes with spaces still makes an address. + assert.deepEqual(engine.mentionsIn('josé@alice', group), []); +}); + test('Chinese, Japanese and Korean write up against the "@" and still reach the member', async (t) => { const { engine, group } = await fixture(t); assert.deepEqual(engine.mentionsIn('请@alice', group), ['alice']);