You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6df2365
Browse filesBrowse the repository at this point in the historyBrowse files
dazhi
committed
feat(minimax-pet): 0.7.0 回复按 Markdown 渲染
- 新增 markdown.mjs:把任务最近回复的 mdast 转成 DOM 节点,覆盖标题、强调、
行内代码、围栏代码块、列表与任务清单、表格、引用、分隔线、链接;
通知卡片与提醒预览使用压平后的纯文本。
- 原始 HTML 只作为文本显示,链接只显示可读地址、不打开,图片不发起请求。
渲染全程使用 createElement/createTextNode,不拼 HTML 字符串。
- vendor/markdown.mjs 由 tools/build-markdown.mjs 打包 unified 11.0.5 +
remark-parse 11.0.0 + remark-gfm 4.0.1(esbuild 0.25.12),并生成
markdown.LICENSE.txt(59 个 MIT 包);npm run build:markdown 可逐字节重建。
- 面板详情、桌面卡片详情按同一套 --mcode-* 变量排版,窄卡片降一档字号。
- 新增 dev/markdown.test.mjs,补充桌面卡片与面板接线测试,更新 README(中英)、
DEVELOPMENT、PROVENANCE 与根 README 表格。
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ The MiniMax Code Agent communicates through the host MCP client. Business reques
84
84
|[AI Node Canvas](plugins/antianqi/ai-node-canvas/)| An infinite-canvas node graph for MiniMax Code: wire text, image, video and audio runs into a graph, let each result flow downstream, and run media tools on any result |[antianqi](https://github.com/antianqi)|
85
85
|[Agent Flow](plugins/huixin615/agent-flow/)| Import this plugin's Hook event file to inspect native task calls and sub-agent lifecycles, with exact task-to-child links when IDs are available. Choose a recorded chat or the latest imported record; no Host session files are opened. Requires MiniMax Code 3.1.4 or later |[Huixin615](https://github.com/Huixin615)|
86
86
|[蹬王之王 · Expiry Guardian](plugins/hylouis233/expiry-guardian/)| Track credit and reset-card expiry from a local ledger you maintain, and get a "spend the card or let the credits burn first" recommendation with the reasoning spelled out |[Hylouis](https://github.com/Hylouis233)|
87
-
|[MiniMax Pet](plugins/minimax-ai/minimax-pet/)| A lightweight companion with appearance, task and settings tabs, visible-session activity, answer-needed reminders, a one-click jump to a task's conversation (3.1.11 or later) and a transparent desktop pet. Requires MiniMax Code 3.1.6 or later |[MiniMax](https://github.com/MiniMax-AI)|
87
+
|[MiniMax Pet](plugins/minimax-ai/minimax-pet/)| A lightweight companion with appearance, task and settings tabs, visible-session activity, answer-needed reminders, Markdown-rendered replies, a one-click jump to a task's conversation (3.1.11 or later) and a transparent desktop pet. Requires MiniMax Code 3.1.6 or later |[MiniMax](https://github.com/MiniMax-AI)|
88
88
|[MCP OAuth Console](plugins/microbiosis/mcp-oauth-console/)| Sign in to MCP servers that require OAuth: device-code or authorization-code + PKCE flow, the `Authorization` header written into the MCP configuration, and an opt-in refresh before expiry |[Microbiosis](https://github.com/Microbiosis)|
89
89
|[本机大盘 · Local Market Board](plugins/jzlikewei/kurumi-monitor/)| Watch your own machine as a stock terminal: CPU, GPU, temperature, memory, disk, network and every running process become listed stocks with live candlesticks, moving averages, a watchlist, a leaderboard and a trade tape, on macOS and Windows. Requires minimax Code 3.1.2 or later |[jzlikewei](https://github.com/jzlikewei)|
Copy file name to clipboardExpand all lines: plugins/minimax-ai/minimax-pet/PROVENANCE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Source and distribution
2
2
3
-
Author: MiniMax ([MiniMax-AI](https://github.com/MiniMax-AI)). This is the 0.6.0 open-source edition of the MiniMax Pet MiniApp. It uses public MiniApp page APIs and contains no Host implementation. Public documentation, dependency URLs, and license notices have been prepared for this repository; private development references and acceptance records are not part of the package.
3
+
Author: MiniMax ([MiniMax-AI](https://github.com/MiniMax-AI)). This is the 0.7.0 open-source edition of the MiniMax Pet MiniApp. It uses public MiniApp page APIs and contains no Host implementation. Public documentation, dependency URLs, and license notices have been prepared for this repository; private development references and acceptance records are not part of the package.
4
4
5
5
## Layout
6
6
@@ -27,7 +27,7 @@ The root `npm run check` validates package contracts through the repository's ex
27
27
28
28
## Dependencies and artwork
29
29
30
-
Production JavaScript uses relative modules and Node built-ins. `jsdom` 24.1.3 is used only for DOM tests; the lockfile pins public npm registry URLs and integrity values. No dependency install or build step is required by the installed plugin.
30
+
Production JavaScript uses relative modules and Node built-ins, plus the vendored `miniapp/client/vendor/markdown.mjs` (unified 11.0.5, remark-parse 11.0.0, remark-gfm 4.0.1 and their MIT dependency tree, built with esbuild 0.25.12). `npm run build:markdown` reproduces it from the pinned dev dependencies; the output is byte-stable, so `npm run check:package` compares it like any other file. Its notices live in `miniapp/client/vendor/markdown.LICENSE.txt`, generated from the same build. `jsdom` 24.1.3 is used only for DOM tests; the lockfile pins public npm registry URLs and integrity values. No dependency install or build step is required by the installed plugin.
31
31
32
32
The bundled mint robot atlas is original geometric artwork generated by `scripts/generate-pet-art.mjs` from Node built-ins. `npm run generate:art` reproduces the atlas without external images or fonts and preserves `icon.png`. The purple octopus icon is a separate transparent PNG generated with OpenAI imagegen from a user-provided visual reference; model generation is not deterministic, and that reference image is not bundled. The `minimax-tako` octopus girl atlas was generated with MiniMax image generation from user-provided visual references and assembled by a local script; it is not reproducible from a command, and the reference images are not bundled. These assets use the same MiniMax [MIT License](LICENSE) as the original code and documentation; see [ARTWORK.md](ARTWORK.md). The `mmx-octopus` MMX octopus girl atlas was generated with a locally hosted open-weight diffusion model and assembled by a local script from source videos that are not shipped; it is not reproducible from a command. Its character and artwork are contributed by antianqi under the [MIT License](LICENSE); see [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled.
Copy file name to clipboardExpand all lines: plugins/minimax-ai/minimax-pet/README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,16 @@ A lightweight desktop companion for MiniMax Code, by **MiniMax**. It shows visib
7
7
## Features
8
8
9
9
-**Appearance:** preview and select pets, import compatible pet JSON and spritesheets, and remove imported pets.
10
-
-**Tasks:** recent reminders, visible user conversations, and a scrollable latest reply. Desktop cards preview up to five lines. Clicking a card keeps the pet visible; observed `ask_user` calls show “需要你回答” (needs your answer).
10
+
-**Tasks:** recent reminders, visible user conversations, and a scrollable latest reply rendered as Markdown. Desktop cards preview up to five lines. Clicking a card keeps the pet visible; observed `ask_user` calls show “需要你回答” (needs your answer).
11
11
-**Open the conversation:** on MiniMax Code 3.1.11 or later, a task's detail, in the panel and on the desktop, has a **打开对话** (open conversation) button, labelled **去回答** (go answer) while the task needs an answer. It brings the MiniMax Code main window forward on that conversation. Older clients do not show the button.
12
12
-**Settings:** pet size, page-local reminder dismissal and mute, connection status, and reconnect.
13
13
-**Desktop window:** a draggable transparent pet with compact notification cards. Return it to the main panel to use the three tabs.
14
14
-**Theme:** on MiniMax Code 3.1.11 or later the panel and desktop cards follow the client's light or dark theme; older clients follow the system setting.
15
15
16
16
The pet does not run Agent turns, create independent chats, write to chat inputs, comment on every session, stop tasks, or answer questionnaires. Selecting a task only reads its details; the main window switches only when you click **打开对话** or **去回答**.
17
17
18
+
Version **0.7.0** renders each task's latest reply as Markdown: headings, emphasis, lists, task lists, fenced code, tables, quotes and links, with raw HTML shown as inert text and images as a label instead of a remote request. Notification cards and reminder previews stay plain text. Parsing uses a vendored bundle of unified, remark-parse and remark-gfm (MIT) built by `npm run build:markdown`; the page never builds an HTML string from model output. The bundle makes no network request and runs entirely in the page.
19
+
18
20
Version **0.6.0** removes the **打招呼** (wave) and **跳一下** (jump) actions from the menu and the appearance page, and removes the original-chat draft with its voice input; the package no longer requests the microphone. It adds **打开对话** / **去回答** and the client theme. The supported baseline stays MiniMax Code 3.1.6: both additions are feature-detected and need no new access.
19
21
20
22
## Install and open
@@ -43,6 +45,7 @@ Earlier local prototypes use a different plugin ID. The Host gives `minimax-pet`
43
45
-**Observations:** one global observer aggregates visible task lifecycle events. Up to three detailed observers follow active tasks and detect new ask tool events. A completed/removed task releases its detailed slot; another task enters only after the previous subscription settles. The initial snapshot contains up to 50 recent visible conversations; observed tasks remain while the Host confirms visibility.
44
46
-**Coverage limits:** observers are tail-only. They cannot reconstruct questionnaires opened before subscribing or during a disconnect. More than three active tasks means only three receive detailed ask coverage. No observed ask does not prove no pending question. Historical idle tasks are not presented as newly completed.
45
47
-**Local files:** the Node service serves packaged assets and stores preferences and user-imported JSON/WebP/PNG spritesheets under opaque `context.dataDir`. Imports, replacement recovery and deletion are limited to that plugin data. Browser storage is used only to migrate old view preferences.
48
+
-**Rendered replies:** the latest reply is parsed as Markdown by the vendored parser and rebuilt as DOM nodes under the page's own stylesheet. Raw HTML in a reply is displayed as literal text, never executed or inserted as markup; links show their target on hover and are not opened; images are not fetched and appear as a text label.
46
49
-**Host navigation:** only when you click **打开对话** or **去回答**, the page calls `host.navigation.open({ id: 'session', sessionId, source: 'local' })` for a conversation it already lists through `session.read`. It does not declare `hostAccess` and never reads which page of MiniMax Code you are on. It writes nothing to chat inputs and sends no message.
47
50
-**Display preferences:**`host.ui.subscribe` reports the client theme, which the page applies; the reported language is ignored. No grant is involved.
48
51
-**Network:** the plugin has no hard-coded external runtime endpoint; its own HTTP requests use its assigned loopback origin.
@@ -66,3 +69,5 @@ The complete editable source is at `sources/minimax-ai/minimax-pet/`. The instal
66
69
## License
67
70
68
71
Original code, documentation, the robot, minimax-tako pet and icon: [MIT](LICENSE), Copyright 2026 MiniMax. Maiyatang artwork: MIT, Copyright 2026 Fectivnfy112357. The minimax-tako atlas was generated with MiniMax image generation. The default atlas is generated from editable geometric drawing code; the octopus icon and Maiyatang were generated with imagegen from supplied visual references. See [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. User-imported artwork keeps its own license.
72
+
73
+
`miniapp/client/vendor/markdown.mjs` bundles 59 MIT-licensed packages from the unified, remark-parse and remark-gfm dependency trees. Each package keeps its own copyright notice in `miniapp/client/vendor/markdown.LICENSE.txt`, which `npm run build:markdown` regenerates from the packages esbuild actually includes.
0 commit comments