From 9dc023826800f49e716297e6d903291d99937b97 Mon Sep 17 00:00:00 2001 From: Chriswangc <93971890+Chriswangc@users.noreply.github.com> Date: Sun, 6 Dec 2026 00:38:17 +0800 Subject: [PATCH 1/3] Add vibe-learning Mini App A port of Tasihi89's MIT-licensed Vibe Learning to the MiniMax Code Agent runtime: the learning page, the question/answer flow, the Agent-drawn diagrams and the per-project data format are kept as-is, and only the upstream `claude -p` subprocess is replaced. --- README.md | 1 + README.zh-CN.md | 1 + .../vibe-learning/.minimax-plugin/plugin.json | 18 + plugins/chriswangc/vibe-learning/LICENSE | 21 + plugins/chriswangc/vibe-learning/README.md | 89 + .../chriswangc/vibe-learning/README.zh-CN.md | 52 + plugins/chriswangc/vibe-learning/icon.png | Bin 0 -> 1574 bytes .../client/LICENSE-vibe-learning-MIT.txt | 21 + .../miniapp/client/answer-spec.md | 134 + .../vibe-learning/miniapp/client/home.html | 325 +++ .../miniapp/client/template.html | 2410 +++++++++++++++++ .../miniapp/client/topic-spec.md | 21 + .../miniapp/client/vendor/README.md | 9 + .../miniapp/client/vendor/dompurify.LICENSE | 568 ++++ .../miniapp/client/vendor/katex/LICENSE | 21 + .../katex/fonts/KaTeX_AMS-Regular.woff2 | Bin 0 -> 28076 bytes .../katex/fonts/KaTeX_Caligraphic-Bold.woff2 | Bin 0 -> 6912 bytes .../fonts/KaTeX_Caligraphic-Regular.woff2 | Bin 0 -> 6908 bytes .../katex/fonts/KaTeX_Fraktur-Bold.woff2 | Bin 0 -> 11348 bytes .../katex/fonts/KaTeX_Fraktur-Regular.woff2 | Bin 0 -> 11316 bytes .../vendor/katex/fonts/KaTeX_Main-Bold.woff2 | Bin 0 -> 25324 bytes .../katex/fonts/KaTeX_Main-BoldItalic.woff2 | Bin 0 -> 16780 bytes .../katex/fonts/KaTeX_Main-Italic.woff2 | Bin 0 -> 16988 bytes .../katex/fonts/KaTeX_Main-Regular.woff2 | Bin 0 -> 26272 bytes .../katex/fonts/KaTeX_Math-BoldItalic.woff2 | Bin 0 -> 16400 bytes .../katex/fonts/KaTeX_Math-Italic.woff2 | Bin 0 -> 16440 bytes .../katex/fonts/KaTeX_SansSerif-Bold.woff2 | Bin 0 -> 12216 bytes .../katex/fonts/KaTeX_SansSerif-Italic.woff2 | Bin 0 -> 12028 bytes .../katex/fonts/KaTeX_SansSerif-Regular.woff2 | Bin 0 -> 10344 bytes .../katex/fonts/KaTeX_Script-Regular.woff2 | Bin 0 -> 9644 bytes .../katex/fonts/KaTeX_Size1-Regular.woff2 | Bin 0 -> 5468 bytes .../katex/fonts/KaTeX_Size2-Regular.woff2 | Bin 0 -> 5208 bytes .../katex/fonts/KaTeX_Size3-Regular.woff2 | Bin 0 -> 3624 bytes .../katex/fonts/KaTeX_Size4-Regular.woff2 | Bin 0 -> 4928 bytes .../fonts/KaTeX_Typewriter-Regular.woff2 | Bin 0 -> 13568 bytes .../miniapp/client/vendor/katex/katex.min.css | 1 + .../miniapp/client/vendor/katex/katex.min.js | 1 + .../miniapp/client/vendor/marked.LICENSE.md | 44 + .../miniapp/client/vendor/marked.min.js | 6 + .../miniapp/client/vendor/purify.min.js | 3 + .../vibe-learning/miniapp/miniapp.json | 35 + .../vibe-learning/miniapp/node/server.mjs | 889 ++++++ plugins/chriswangc/vibe-learning/package.json | 6 + 43 files changed, 4676 insertions(+) create mode 100644 plugins/chriswangc/vibe-learning/.minimax-plugin/plugin.json create mode 100644 plugins/chriswangc/vibe-learning/LICENSE create mode 100644 plugins/chriswangc/vibe-learning/README.md create mode 100644 plugins/chriswangc/vibe-learning/README.zh-CN.md create mode 100644 plugins/chriswangc/vibe-learning/icon.png create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/LICENSE-vibe-learning-MIT.txt create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/answer-spec.md create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/home.html create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/template.html create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/topic-spec.md create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/README.md create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/dompurify.LICENSE create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/LICENSE create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Main-Bold.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Main-Italic.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Main-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Math-Italic.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Script-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/katex.min.css create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/katex/katex.min.js create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/marked.LICENSE.md create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/marked.min.js create mode 100644 plugins/chriswangc/vibe-learning/miniapp/client/vendor/purify.min.js create mode 100644 plugins/chriswangc/vibe-learning/miniapp/miniapp.json create mode 100644 plugins/chriswangc/vibe-learning/miniapp/node/server.mjs create mode 100644 plugins/chriswangc/vibe-learning/package.json diff --git a/README.md b/README.md index a085538a..e10ed47b 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ The MiniMax Code Agent communicates through the host MCP client. Business reques | MiniApp | What it does | Author | | --- | --- | --- | +| [Vibe Learning](plugins/chriswangc/vibe-learning/) | Ask one question and the AI explains it while drawing a diagram for you, entirely on your own machine | [Chriswangc](https://github.com/Chriswangc) | | [Work Group](plugins/liuhaolin07/miniapp-af37075b-6a0d-41c1-bc4e-8817be9656b8/) | A chat-style work group where several MiniMax Code Agents reply in one thread, mention each other to hand work over, and ask you for tool approvals and answers as cards in the page | [liuhaolin07](https://github.com/liuhaolin07) | | [Prompt Enhancer](plugins/skypata/prompt-enhancer/) | Rewrite a one-line request into a complete prompt for a coding assistant; the model list and reasoning levels come from MiniMax Code's own configuration, and the rewrite runs on your signed-in account | [skypata](https://github.com/skypata) | | [Postman Lite](plugins/ssugarr/postman-lite/) | A lightweight local API request tool: build requests, send them through a local proxy that sidesteps browser CORS limits, and inspect responses, with collections kept as plain JSON | [ssugarr](https://github.com/ssugarr) | diff --git a/README.zh-CN.md b/README.zh-CN.md index 79d64bff..599955bc 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -57,6 +57,7 @@ MiniMax Code Agent 通过宿主 MCP 客户端与 MiniApp 协作。业务请求 | MiniApp | 功能 | 作者 | | --- | --- | --- | +| [Vibe Learning](plugins/chriswangc/vibe-learning/README.zh-CN.md) | 问一句,AI 边讲边画一张图讲给你听;跑在你自己这台电脑上,用你自己的 MiniMax Code | [Chriswangc](https://github.com/Chriswangc) | | [工作群](plugins/liuhaolin07/miniapp-af37075b-6a0d-41c1-bc4e-8817be9656b8/README.zh-CN.md) | 聊天式工作群:多个 MiniMax Code Agent 在同一个群里回复、互相 @ 接力,工具审批和提问以卡片形式在页面里完成 | [liuhaolin07](https://github.com/liuhaolin07) | | [提示词增强器](plugins/skypata/prompt-enhancer/) | 把一句话改写成可以直接交给编码助手的完整提示词,模型清单与推理等级取自 MiniMax Code 自己的配置,改写走你已登录的账号 | [skypata](https://github.com/skypata) | | [Postman Lite](plugins/ssugarr/postman-lite/README.zh-CN.md) | 轻量的本地 API 请求工具:构建请求、通过本地代理转发(绕过浏览器 CORS 限制)、查看响应,集合以纯 JSON 保存 | [ssugarr](https://github.com/ssugarr) | diff --git a/plugins/chriswangc/vibe-learning/.minimax-plugin/plugin.json b/plugins/chriswangc/vibe-learning/.minimax-plugin/plugin.json new file mode 100644 index 00000000..c6f10d15 --- /dev/null +++ b/plugins/chriswangc/vibe-learning/.minimax-plugin/plugin.json @@ -0,0 +1,18 @@ +{ + "schemaVersion": 1, + "name": "vibe-learning", + "displayName": "Vibe Learning", + "version": "1.0.0", + "description": "问一句,AI 边讲边画一张图讲给你听。用你自己的 MiniMax Code 跑,学习记录只存在这台电脑上。用户说「打开 Vibe Learning」「我想学 X」时,先把这个 Mini App 打开,让他在首页写下想学的东西;问题在页面里问,答案留在页面里。(移植自 MIT 协议的开源项目 Tasihi89/vibe-learning)", + "author": "Chriswangc", + "icon": "icon.png", + "category": "Other", + "exampleQueries": [ + "打开 Vibe Learning", + "我想学 Transformer 是什么", + "Vibe Learning 怎么用" + ], + "apps": [], + "mcpServers": [], + "skills": [] +} diff --git a/plugins/chriswangc/vibe-learning/LICENSE b/plugins/chriswangc/vibe-learning/LICENSE new file mode 100644 index 00000000..a8edb007 --- /dev/null +++ b/plugins/chriswangc/vibe-learning/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 chriswang64 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/chriswangc/vibe-learning/README.md b/plugins/chriswangc/vibe-learning/README.md new file mode 100644 index 00000000..edb9f6ce --- /dev/null +++ b/plugins/chriswangc/vibe-learning/README.md @@ -0,0 +1,89 @@ +# Vibe Learning + +Ask one question. The AI explains it while drawing a diagram for you. + +Vibe Learning is a Mini App for MiniMax Code. It runs entirely on your own machine and uses your own +MiniMax Code account and quota. Nothing is sent to a third-party service by the Mini App itself. + +## What it does + +- **Home** — write one sentence about what you want to understand. It creates a learning project. +- **Background research** — while the first answer is being written, the Agent looks the topic up and + prepares a title, a scope, a briefing document, and a few questions you could ask next. The page + picks the new title up without a reload. +- **Learning page** — every answer is prose plus a diagram the Agent drew itself as SVG. A diagram + that describes a sequence lights up one step per page, and the sentence for each step is written + next to it. +- **Ask about a passage** — select a passage you did not get, press **Ask AI**, and the follow-up + answer arrives in a narrow note card attached to that passage. You can keep asking in the card. +- **Retell** — open the retell icon on an answer and say the model back in your own words. The Agent + draws the model you described, compares it with the correct one, and corrects it. Corrected + diagrams can be collected under **Mental models** on the home page. +- **Local only** — your questions, answers, and saved material stay in this machine's Mini App data + directory. + +The interface and the answer format are Chinese. + +## Install and open + +1. Install the plugin from the Mini App list in MiniMax Code. +2. Open it from the plugin list, or ask the Agent to open Vibe Learning. +3. On the home page, write what you want to learn and press **Start**. The learning page starts + answering on its own. + +Answers take a while — the Agent thinks at length before it writes, and the page shows a timer while +it does. + +## Ported from Vibe Learning + +This Mini App is a port of [Vibe Learning](https://github.com/Tasihi89/vibe-learning) by Tasihi89, +MIT licensed. The original is a standalone macOS app that drives `claude -p`. This port keeps the +interface, the answer format, the diagram rules, and the on-disk data format, and replaces that one +seam with the MiniMax Code Agent (`context.agent.run`). + +The original's MIT license is kept at +[`miniapp/client/LICENSE-vibe-learning-MIT.txt`](miniapp/client/LICENSE-vibe-learning-MIT.txt). The +bundled browser libraries (`marked`, `DOMPurify`, `KaTeX`) keep their own licenses under +[`miniapp/client/vendor/`](miniapp/client/vendor/). + +## Tested environment + +- MiniMax Code 3.1.23 (build 3.1.23.238) on macOS 27.3 (Apple Silicon, arm64). The manifest + requires `>=3.1.20`, because the package uses the `permissions` manifest field and + `context.agent`. +- Node.js 24.16.0 was used to exercise the Node runtime locally. +- Client acceptance covered: the home page (empty and with projects), creating a project from the + home page, the background topic-preparation round trip, a full answer with a diagram, paging + through a stepped diagram, selecting a passage and asking about it in a note card, cancelling an + answer in flight, and the data surviving a runtime restart. +- Not verified: the Agent-driven questionnaire path (the Mini App skips such a questionnaire so a + turn cannot hang), the retell flow, and a live tool-approval round trip — this Host's permission + mode approves tools on its own, so no request was raised during the session. The approval card's + layout was checked in the real page, and the request/decision round trip was checked against the + Node service directly. + +## Data & access + +- **Files written** — everything under the Host-provided Mini App data directory + (`/projects//`): `topic.json`, `data/qa/.json`, `files/` for material + the Agent saved, plus `settings.json` and `profile.json` at the data directory root. A deleted + project is moved to `_deleted/` instead of being erased. +- **Files read** — the Mini App's own bundled assets, and the files inside the current project + folder. The Agent may read the paths a topic lists as its sources. +- **Network** — the Mini App makes no outbound request of its own. The Agent may use the Host's own + web search and web fetch tools when it researches a topic; those requests go through the Host. +- **Spawned processes** — none. The Node entry is a single `node:http` server. +- **Agent turns** — one Agent turn per question, each in a fresh Agent session, plus one background + turn per new project that prepares the topic. +- **Conversations read** — none. The package declares no session access. +- **Tools called** — `context.agent.run`, `context.agent.answer` (only to skip a questionnaire the + Agent raised), and `context.agent.reply` (to answer a tool-permission request). +- **Microphone, camera, notifications** — not used. +- **Host navigation read** — not used. +- **Browser storage** — `localStorage` keeps per-project view state only. +- **Permission handling** — every tool-permission request the Host raises is shown in the page as a + card with the tool, the reason, and the arguments. The Mini App sends `allowOnce` only after the + user presses **Allow once**, and sends `deny` when the user presses **Deny**; nothing is approved + automatically. A request nobody answers within 15 minutes is denied so that a turn cannot hang. + When the Host's global permission mode approves tools on its own, no request is raised and the + user is not asked. diff --git a/plugins/chriswangc/vibe-learning/README.zh-CN.md b/plugins/chriswangc/vibe-learning/README.zh-CN.md new file mode 100644 index 00000000..be5d2f7f --- /dev/null +++ b/plugins/chriswangc/vibe-learning/README.zh-CN.md @@ -0,0 +1,52 @@ +# Vibe Learning + +问一句,AI 边讲边画一张图讲给你听。 + +Vibe Learning 是 MiniMax Code 的一个 Mini App。它完全跑在你自己这台电脑上,用你自己的 +MiniMax Code 账号和额度;Mini App 本身不往任何第三方服务发数据。 + +## 它能做什么 + +- **首页** — 写一句你想弄懂的东西,它建好一个学习项目。 +- **后台查资料** — 第一个回答还在写的时候,AI 同时去查这个题目,起好标题、写好底稿、想出几个 + 可以接着问的问题;页面不刷新就换上新标题。 +- **学习页** — 每个回答都是一段讲解加一张 AI 自己画的 SVG 图。讲的是有先后的事时,图分几页 + 亮出来,每一步的说明就写在图旁边。 +- **就着一段问** — 选中一段没看懂的地方,按「问 AI」,回答落在挂在那一段旁边的备注卡片里,还能 + 接着追问。 +- **复述** — 点回答右上角的复述图标,用自己的话把模型讲一遍,AI 把你讲的画出来、和正确的对比、 + 改正;改好的图可以收进首页的「思维模型」。 +- **只在本机** — 你的问题、回答和存的资料都在这台电脑的 Mini App 数据目录里。 + +页面和回答都是中文。 + +## 怎么装、怎么用 + +1. 在 MiniMax Code 的 Mini App 列表里安装这个插件。 +2. 从插件列表打开它,或者让 Agent 帮你打开 Vibe Learning。 +3. 在首页写下想学的东西,按「开始」;学习页会自己开始回答。 + +回答要等一会儿:AI 想得比较久,页面上会显示计时。 + +## 移植自 Vibe Learning + +这个 Mini App 移植自 Tasihi89 的开源项目 [Vibe Learning](https://github.com/Tasihi89/vibe-learning) +(MIT 协议)。原版是驱动 `claude -p` 的独立 macOS 应用;这一版保留界面、回答格式、画图规矩和 +数据格式,只把那一处换成 MiniMax Code 的 Agent(`context.agent.run`)。 + +原版的 MIT 许可证在 +[`miniapp/client/LICENSE-vibe-learning-MIT.txt`](miniapp/client/LICENSE-vibe-learning-MIT.txt); +页面用到的开源库(`marked`、`DOMPurify`、`KaTeX`)的许可证在 +[`miniapp/client/vendor/`](miniapp/client/vendor/)。 + +## Tested environment + +见英文版 README 的 `## Tested environment` 一节。 + +## Data & access + +见英文版 README 的 `## Data & access` 一节。 + +要点:AI 每要动一次手,宿主就会问一次,页面上出现一张卡片(写着要用的工具、原因、参数)。只有你点 +「允许一次」才会放行,点「拒绝」就不放行,没有任何自动批准;15 分钟没人回答就按拒绝算。宿主自己 +的全局权限模式如果直接放行,就不会问。 diff --git a/plugins/chriswangc/vibe-learning/icon.png b/plugins/chriswangc/vibe-learning/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..299a26cbf5c1427dffa9cd575cf721307d570765 GIT binary patch literal 1574 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrV7=|>;uumf=gr;N9Fb5F_7BDH zN*t40jx3m@A#jD`h{82~A;W#9hIKB=6V;QM-fp_!Iw3Du_^7z>7spdwD|5UT=(0U- z4vcs42{>&0A!&-l#UFng7Vv9zUfN`Qd~;|s@7+uz9O)JMQ;7Q z+VlNc*1f)P;(=w;neIK@5%Dq?bm#T^{r{9*@ia!gnj^~T2}4Q1*Th_Vu`>}GpIDCO z#4fN@Vt4rd)BClU(Q~fW#@QT3`o97jTK?xMOo;EM)AkEGZ>^la!>4}Tg|#orV!ID- z4G8cmi29Kul*I@Nov(+hUWIHbj*XAkN|#&6e?ev6^ZSxvcK?~yFA_-*H<;a0#(2g^ zzl72KdH~l2CW&?ibaY*)m{GcGsq4HCVQW8`+3MMAA9>%$$6x1gcEXjIh6=|UTHH*2 zPm^w)+0I})`*&FN5&Nu1Y+r6yc*L8(Sa9m$yrfKZ#~fa1&NHPdC8Y+RdyG?WF};29 zt~O0_E62oyX%mAzpJu)CiI9%EV`HT-k0aLM2a{@p^XrK&uP*%0esO=1w)UU=+zCGMvNmy= z|6P>ouW5@p2v)su`cxCfV?$ymt*7pfdX*%ncOdCuPzej4`!;F|NW(R z>9S1?D}6X`#NYh7GVkf}bgjz@`%TThovQS5e3ma}8>P8_foSNz|MS*u5I(ouy{)ZH zDAVlt_qYF?TCQcTsM{ODK6ko9)iJH7$x{Rh??u)A%=k6?)3WE!yQWM!akgaN_W!DX z-#&jmHN3X`^}*WR`-q(SpO3zY`t01fRdCqjHPcc83_B1GbPU2zNIsfpf)(T$7XRi5-O#h75#2n`^6HJMF!qC&lGw+h(&G*h? zk*k_rMVov+YqaeSTOYYZzjSt0F6+COd#ca&eqZ;_rtH&`lb%gyI!#lfHFBb5N}kls z$lZDCNY^>py$dH>z2A9YX;J*2GNpMejVH=I&vYJ{xB2|{X>r$mYq=dibJoiERAfK) zQ9W)K_T5@<--_8kB%7Wkzk0OuD!*pi4Mquhsb5FS-xaZWR zZ|9tq^y-Rf{wEFBD;u8QSW~|%f9dnxxlsofN1ZNZ>HPit!>su-YkBth3z|N4bh|s- zYxS08(KkMRy%ipDKxc+#k7En7+RrklI~Sdmo1bg6`PiN0n#CTy2vIV@izrM+Ju?Ht m|NpbhtN4MXJsYT)XJ&Z(ZtAoneFio_5e83JKbLh*2~7YK=FPVN literal 0 HcmV?d00001 diff --git a/plugins/chriswangc/vibe-learning/miniapp/client/LICENSE-vibe-learning-MIT.txt b/plugins/chriswangc/vibe-learning/miniapp/client/LICENSE-vibe-learning-MIT.txt new file mode 100644 index 00000000..a369d4ec --- /dev/null +++ b/plugins/chriswangc/vibe-learning/miniapp/client/LICENSE-vibe-learning-MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Tasihi89 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/chriswangc/vibe-learning/miniapp/client/answer-spec.md b/plugins/chriswangc/vibe-learning/miniapp/client/answer-spec.md new file mode 100644 index 00000000..1d265a6c --- /dev/null +++ b/plugins/chriswangc/vibe-learning/miniapp/client/answer-spec.md @@ -0,0 +1,134 @@ +# 回答格式 + +学习者问,你答。目标不是讲清一个知识点,而是帮他在脑子里搭起一个模型:有哪几样东西,它们怎么连,背后是哪一条规律。有了这个模型,他能自己推出答案,能预测换个情况会怎样。图是搭模型最快的办法,所以每个回答都把这个模型画出来。 + +## 先想清楚(不用写出来) + +1. 他现在脑子里大概是什么样?缺了哪块,哪里想错了?看最近的问答。 +2. 要让他懂,最少需要哪几样东西、哪一条规律?这就是这次要搭的模型。东西越少越好。再列出这一步他该学会的真术语,一个都别漏,每个想好一句大白话。 +3. 这个模型「长」什么样:东西在哪,谁包着谁,什么在动、往哪动,谁大谁小,前后怎么变。照这个样子画。 +4. 用模型推一步:「所以,如果……就会……」。能画进图里最好,比如前后两个状态并排。 +5. 和他已经有的画面接上。最近的问答里用过的比喻、画过的场景,这次接着用,在上面加东西,别每次换一套。底稿里有「画面约定」的,照它用。 + +## 输出 + +只输出 JSON 行:每行一个完整的 JSON 对象,不要代码块,不要别的文字,中途也不要说话。 + +{"t":"text","md":"一两句,直接回答,说出那条规律。"} +{"t":"view","kind":"draw","title":"这张图在看什么","alt":"一句话:画了什么、用的什么比喻","svg":"……"} +{"t":"text","md":"可选:一句「所以,如果……就会……」。"} + +- 讲的是有先后的事,或者图上要放的东西超过三四样,图换成一步步翻的、边讲边画(见下面「一步步翻」)。 +- 第一句就是答案。不绕弯,不铺垫。整个回答的文字加起来不超过四句,剩下的交给图(一步步翻的图里的话不算在里面)。 +- 文字和图分工,同一件事不讲两遍:文字说答案,图上的字讲图上那样东西。不要先写一段过程,图里再把这段话写一遍;他得读两遍、对两遍。 +- 宁可少讲几样东西,但讲的那一样要讲透:每一步为什么这样,都说出来,不留让人猜的跳跃。他想知道别的会接着问。 +- 讲真东西,用真名字。他是来学概念的:这一步涉及的真实概念和术语(比如数据包、IP 地址、路由表、默认网关)都要说出来、加粗,紧跟一句大白话解释。比喻只能帮着理解,不能顶替术语;不要为了好懂把术语藏起来。 +- 不确定的事说不确定,不编。 +- 他问到自己电脑上的情况时,才去看他的文件(读得到的话),图里用上他自己的东西(他的文件名、他的设置)。没问就讲通用的道理,不主动把话题扯到他的电脑、他在用的软件或别的学习主题上。 +- 不写出密钥、密码、UUID、公钥、服务器地址这类东西,读到了也不写。 +- 他让你存下什么(整理、速查表),用 Write 写到 files/ 下,Markdown,文件名用中文短名,再输出一行 {"t":"saved","path":"files/速查.md","note":"存了什么"}。files/ 以外只读不写。 + +## 画图(draw) + +形式不限,你来设计:场景、路线、剖面、地图、放大镜、一层套一层、按比例画大小、前后对比、一格一格的小连环画……怎么能让他一眼看出那个模型,就怎么画。不要每次用同一种样子。 + +- 图里的位置、大小、包含、箭头、颜色都要表示模型里的东西。不要把一句句文字装进一排方框,那只是换了排版的文字,不是图。 +- 图上的字要一看就懂,不要压缩成暗号。只看图上的字、不看正文,一个从零学起的人也要读得懂: + - 写成完整的句子,说清谁、做什么、为什么。写「目的 IP 不在局域网里,按默认路由交给默认网关」,不写「其他 → 路由器」。 + - 字里不用 →、/、= 这类符号表示关系,关系用图里真的箭头和位置画出来;不用「其他」「本地」这种要猜指的是什么的词。 + - 图里的东西用真名字(术语)当标签,下面跟一句大白话小注,比如「默认网关」下面写「家里路由器,往外送的第一站」。写真名「DNS 服务器」,不要只写比喻「电话簿」。 + - 图里不要突然冒出没讲过的新东西(比如一张表);要用,先在文字里说清它是什么。 + - 要讲清某样东西怎么做决定,让它「开口说话」:在它旁边画个气泡,写它心里想的那句完整的话,话里照样用真术语。 + - 标签可以是一句短话(15 个字以内),小注可以是一两句完整的话。字多一点没关系,让人猜才是问题。 + - 画完把图上每一处字单独念一遍:没学过的人能听懂吗?听不懂就改写。 +- 最重要的一处用黄色或主色点出来。 +- 一张图讲一个模型。一张确实讲不清才画第二张,最多两张。 +- title 一句话说这张图在看什么;alt 一句话写画了什么、用了什么比喻。下一个回答会读到 alt,好接着用同一套画面。 + +技术要求: + +- svg 是一个完整的 ``,写 viewBox,不写 width、height。正文里宽 720(`viewBox="0 0 720 高"`),高度按需要,一般 240 到 520。 +- 字号:标签 15 到 16,小注 14,标题性的大字 18(图在页面上会缩到八成左右,再小就看不清)。中文一个字宽约等于字号,提前算好位置:字不压字、不压线、不出边界,框要比里面的字宽。 +- SVG 不会自动换行,换行用几个 `` 或 ``。 +- 颜色用页面的颜色变量,写在 style 里,比如 `style="fill:var(--accent-soft);stroke:var(--accent)"`。可用:`--ink` 正文字 · `--ink-2` 次要字 · `--ink-3` 淡字、细线 · `--rule` 浅线 · `--sheet` 白底 · `--paper` 浅灰底 · `--code-bg` 灰块 · `--accent` 主色蓝 · `--accent-soft` 浅蓝块 · `--marker` 黄,强调 · `--ok` 绿 · `--r-causes` 橙 · `--r-contrast` 红。不写颜色的字是正文色。 +- 箭头用 ``,id 随便起,页面会自动改名,不会和别的图冲突。 +- 不能用 `