@minimax-ai/code 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/CHANGELOG.zh-CN.md +21 -0
  3. package/README.md +14 -0
  4. package/README.zh-CN.md +22 -13
  5. package/chunks/{application-AG6XR6TH.js → application-2DVWZRSC.js} +1 -1
  6. package/chunks/{auth-command-MIT2ROTA.js → auth-command-M34DRUOJ.js} +1 -1
  7. package/chunks/{chunk-T7V3D5XQ.js → chunk-2LLMI3OF.js} +1 -1
  8. package/chunks/{chunk-F33I4QSG.js → chunk-4ODJYYGY.js} +351 -337
  9. package/chunks/{chunk-L2BHZE4F.js → chunk-AQSBE25I.js} +586 -586
  10. package/chunks/{chunk-FO5IMY26.js → chunk-D3NBJEJ2.js} +1 -1
  11. package/chunks/{chunk-YRXRNL2F.js → chunk-EFJXTS5E.js} +1 -1
  12. package/chunks/chunk-IEL7EQIF.js +5 -0
  13. package/chunks/{chunk-IBEXP44J.js → chunk-LTIHXDFE.js} +1 -1
  14. package/chunks/{chunk-AOZUEPXI.js → chunk-OYVCWRBD.js} +6 -6
  15. package/chunks/{chunk-NF23WB7F.js → chunk-TYJKJAGQ.js} +1 -1
  16. package/chunks/chunk-YKYKYGJQ.js +2 -0
  17. package/chunks/{data-dir-335LYS7R.js → data-dir-4HGM3ZJQ.js} +1 -1
  18. package/chunks/launcher-BZUOAHBT.js +244 -0
  19. package/chunks/{lifecycle-O4VWU5MP.js → lifecycle-7R7AUB6A.js} +1 -1
  20. package/chunks/main-LHJR7CNP.js +29 -0
  21. package/chunks/{plugin-command-T6LW4ONC.js → plugin-command-JY34MFAX.js} +1 -1
  22. package/chunks/{provider-command-2JVOUOBS.js → provider-command-ARZDXCQA.js} +1 -1
  23. package/chunks/{run-acp-command-DWPL6R6W.js → run-acp-command-ETB7QAFT.js} +2 -2
  24. package/chunks/{run-exec-command-5UZ7WFH4.js → run-exec-command-OO3TJOSC.js} +1 -1
  25. package/chunks/{update-J2OGG3ZH.js → update-N3TZCYN3.js} +1 -1
  26. package/cli.js +2 -1
  27. package/package.json +1 -1
  28. package/chunks/chunk-77VGHMFO.js +0 -5
  29. package/chunks/chunk-VTJC5EVO.js +0 -2
  30. package/chunks/launcher-P2FIIDHG.js +0 -244
  31. package/chunks/main-PUHNEWJZ.js +0 -29
package/CHANGELOG.md CHANGED
@@ -7,6 +7,32 @@ This changelog covers important changes that directly affect MCode TUI users. It
7
7
 
8
8
  Internal refactors, test-only changes, and changes limited to other product surfaces are excluded.
9
9
 
10
+ ## 0.3.2 · 2026-09-04
11
+
12
+ ### Added
13
+
14
+ - Added `/btw [question]` and `/side [question]` to ask follow-up questions in a temporary side
15
+ conversation while the main task keeps running. Use `Ctrl+/` to switch views, `/parent` to return
16
+ to the main view, or `Ctrl+C` in an empty side Composer to discard the side conversation.
17
+ - Side conversations inherit the main conversation's committed context and show its current task
18
+ status. Tools that can modify data require explicit confirmation in every permission mode.
19
+ - Internal packages support a global `--env test|staging|prod` option for the current launch, with
20
+ `pre` as an alias for `staging`. The selection survives login and update restarts without changing
21
+ saved configuration or the package's update channel. Public packages do not expose this option.
22
+
23
+ ### Improved
24
+
25
+ - Markdown headings, inline code, and links have clearer visual distinctions, with more readable
26
+ syntax highlighting in terminals limited to 16 colors.
27
+
28
+ ### Fixed
29
+
30
+ - Fixed input-method candidate window positioning in side conversations.
31
+ - Queue hints now follow custom keyboard shortcuts, including multiple or unbound shortcuts.
32
+ - Markdown links preserve nested formatting and restore the surrounding text style correctly.
33
+ - PR and MR links are now associated with the Session's actual workspace, avoiding links from
34
+ another checkout.
35
+
10
36
  ## 0.3.1 · 2026-09-04
11
37
 
12
38
  ### Added
@@ -8,6 +8,27 @@ TUI 正式版中用户能直接感知的重要变化。收录范围以 TUI 用
8
8
 
9
9
  仅内部重构、测试调整,或只影响其他产品界面且不改变 TUI 行为的变化不记录。
10
10
 
11
+ ## 0.3.2 · 2026-09-04
12
+
13
+ ### 新增功能
14
+
15
+ - 新增 `/btw [问题]` 和 `/side [问题]`,可在主任务继续运行时开启临时侧会话提问。按 `Ctrl+/`
16
+ 切换视图,使用 `/parent` 返回主视图,或在侧会话的空 Composer 中按 `Ctrl+C` 丢弃侧会话。
17
+ - 侧会话继承主会话已提交的上下文,并显示主任务当前状态;具备修改能力的工具在任何权限模式下都需明确确认后执行。
18
+ - 内网包支持全局参数 `--env test|staging|prod` 覆盖本次启动环境,`pre` 是 `staging`
19
+ 的别名。登录和更新重启后保留本次选择,不修改已保存配置或包的更新通道;公网包不提供该参数。
20
+
21
+ ### 体验改进
22
+
23
+ - Markdown 标题、行内代码和链接的视觉区分更加清晰,16 色终端中的代码语法高亮更易阅读。
24
+
25
+ ### 问题修复
26
+
27
+ - 修复侧会话中输入法候选窗的位置偏移。
28
+ - 排队提示现在跟随自定义快捷键同步更新,支持多组绑定和未绑定状态。
29
+ - Markdown 链接正确保留嵌套格式,并在链接结束后恢复周围正文样式。
30
+ - PR 和 MR 链接按 Session 实际工作目录记录,避免关联到其他 checkout。
31
+
11
32
  ## 0.3.1 · 2026-09-04
12
33
 
13
34
  ### 新增功能
package/README.md CHANGED
@@ -77,6 +77,20 @@ confirmation flow. While a response is running, history remains browse-only.
77
77
 
78
78
  Inside the TUI, use `/export` to save the current Session as Markdown.
79
79
 
80
+ Use `/btw [question]` (or `/side [question]`) to fork a temporary side conversation from the latest
81
+ committed conversation boundary without interrupting a running main task. The side conversation
82
+ inherits the main conversation's history as read-only context, keeps normal tool permissions, and is
83
+ asked not to modify anything unless you explicitly request it; a mutation-capable tool additionally
84
+ asks for confirmation before running in a side conversation, regardless of the current permission
85
+ mode. Press `Ctrl+/` to switch between the
86
+ side and main views without ending either (`/parent` also returns from the side view); the Composer
87
+ footer mirrors the main task's state (for example `main needs approval` or `main finished`) while
88
+ you are on the side view.
89
+ Press `Ctrl+C` on an empty Composer to close and discard the side conversation. Starting `/btw`
90
+ again from the main view replaces the previous side conversation with a fresh fork. Side
91
+ conversations are ephemeral: they never appear in `/sessions` or `/resume`, and navigating to
92
+ another Session discards them.
93
+
80
94
  A no-argument TUI slash command runs only when no message text follows its name (trailing whitespace
81
95
  is allowed). If text follows, the entire line is sent as a regular prompt. Commands that accept
82
96
  arguments continue to run as commands.
package/README.zh-CN.md CHANGED
@@ -52,9 +52,9 @@ mcode
52
52
  mcode "解释这个项目的架构,并指出最值得先处理的技术债。"
53
53
  ```
54
54
 
55
- MiniMax Code 工作时,按 `Enter` 将输入内容 steer 给当前 Turn;按 `Alt+Enter` 会把后续任务放进 Queue,留给
56
- 下一 Turn。已经排队的最新消息可用 `Option+↑`(其他平台显示为 `Alt+↑`)或 `Shift+←` 召回 Composer,
57
- 再按 `Enter` steer。
55
+ MiniMax Code 工作时,按 `Enter` 将输入内容 steer 给当前 Turn;按 `Alt+Enter`
56
+ 会把后续任务放进 Queue,留给下一 Turn。已经排队的最新消息可用 `Option+↑`(其他平台显示为 `Alt+↑`)或
57
+ `Shift+←` 召回 Composer,再按 `Enter` steer。
58
58
 
59
59
  常用 Session 命令:
60
60
 
@@ -67,19 +67,28 @@ mcode --session
67
67
  mcode --session <session-id>
68
68
  ```
69
69
 
70
- 在 TUI 中,`/sessions` 会打开 Session Center,统一浏览最近/已归档 Session、切换当前 workspace/全部范围、
71
- 重命名、归档/恢复和搜索。搜索既支持普通文本,也支持 `id:`、`path:`、`type:`、`status:`、`model:` 筛选。
72
- `/history` 会打开当前 Session 的输入历史,可以先预览影响范围,再通过现有确认流程创建分支、编辑历史输入、
73
- 仅回退会话,或同时回退会话与文件。回复运行期间,历史记录保持只读浏览。
70
+ 在 TUI 中,`/sessions` 会打开 Session
71
+ Center,统一浏览最近/已归档 Session、切换当前 workspace/全部范围、重命名、归档/恢复和搜索。搜索既支持普通文本,也支持
72
+ `id:`、`path:`、`type:`、`status:`、`model:` 筛选。 `/history`
73
+ 会打开当前 Session 的输入历史,可以先预览影响范围,再通过现有确认流程创建分支、编辑历史输入、仅回退会话,或同时回退会话与文件。回复运行期间,历史记录保持只读浏览。
74
74
 
75
75
  在 TUI 中使用 `/export`,可以把当前 Session 导出为 Markdown。
76
76
 
77
- 无参数的 TUI slash 命令只在命令名后没有正文时执行(允许尾随空白);如果继续输入正文,整句会作为普通
78
- 提示词发送。接受参数的命令仍按命令处理。
79
-
80
- Composer 会把当前输入标记为 `Prompt`、`Command` 或 `Skill`,并同步提示按下 Enter 后是发送、执行还是调用。
81
- 例如,`/context` 是命令,`/context 解释这个项目` 是普通提示词;`/docs 解释 API` 这类 Skill 输入则会显示为
82
- 带 instructions 的 Skill 调用。
77
+ 使用 `/btw [问题]`(或
78
+ `/side [问题]`),可以从最近一个已提交的会话边界 fork 出一个临时侧会话,主任务继续运行且不会被中断。侧会话以只读上下文继承主会话历史,工具权限保持与当前会话一致,并被要求除非你明确请求,否则不做任何修改;具备写能力的工具在侧会话中执行前必须经你确认,无论当前权限模式是什么。按
79
+ `Ctrl+/` 可在侧会话与主会话视图之间来回切换而不结束任何一方(在侧会话中执行 `/parent`
80
+ 也会回到主视图);处于侧会话视图时,Composer
81
+ 底部会同步主任务状态(例如 `main needs approval`、`main finished`)。在空 Composer 中按
82
+ `Ctrl+C` 会关闭并丢弃侧会话。回到主视图后再次执行 `/btw`,会丢弃旧侧会话并从当前边界重新
83
+ fork。侧会话是临时的:不会出现在 `/sessions` 或 `/resume` 中,切换到其他 Session 时会被自动清理。
84
+
85
+ 无参数的 TUI
86
+ slash 命令只在命令名后没有正文时执行(允许尾随空白);如果继续输入正文,整句会作为普通提示词发送。接受参数的命令仍按命令处理。
87
+
88
+ Composer 会把当前输入标记为 `Prompt`、`Command` 或
89
+ `Skill`,并同步提示按下 Enter 后是发送、执行还是调用。例如,`/context`
90
+ 是命令,`/context 解释这个项目` 是普通提示词;`/docs 解释 API`
91
+ 这类 Skill 输入则会显示为带 instructions 的 Skill 调用。
83
92
 
84
93
  Agent Team 与 Runtime 后台任务会在 Composer 上方合并为一条按严重程度排序的 `Tasks` 摘要,避免长程
85
94
  Session 因任务累积而持续挤占输入空间。使用 `/tasks` 可打开统一详情视图,查看当前完整列表和状态;按
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __mavis_cR } from "module"; import { basename as __mavis_basename, dirname as __mavis_dirname, join as __mavis_join } from "path"; import { fileURLToPath as __mavis_fileURLToPath, pathToFileURL as __mavis_pathToFileURL } from "url"; const __mavis_tuiCurrentModuleDir = __mavis_dirname(__mavis_fileURLToPath(import.meta.url)); const __mavis_tuiPackageRoot = __mavis_basename(__mavis_tuiCurrentModuleDir) === "chunks" ? __mavis_dirname(__mavis_tuiCurrentModuleDir) : __mavis_tuiCurrentModuleDir; const __mavis_tuiPackageEntryUrl = __mavis_pathToFileURL(__mavis_join(__mavis_tuiPackageRoot, "cli.js")).href; const require = __mavis_cR(__mavis_tuiPackageEntryUrl); const __dirname = __mavis_tuiPackageRoot;
2
- import{c as a}from"./chunk-NF23WB7F.js";import"./chunk-C3JRMX7L.js";import"./chunk-AOZUEPXI.js";import"./chunk-O6RIRKRN.js";import"./chunk-HQ2U4QVQ.js";import"./chunk-MMRA4VD2.js";import"./chunk-CWWDVX6C.js";import"./chunk-D76SO2ME.js";export{a as McodeUpdateApplication};
2
+ import{c as a}from"./chunk-TYJKJAGQ.js";import"./chunk-C3JRMX7L.js";import"./chunk-OYVCWRBD.js";import"./chunk-O6RIRKRN.js";import"./chunk-HQ2U4QVQ.js";import"./chunk-MMRA4VD2.js";import"./chunk-CWWDVX6C.js";import"./chunk-D76SO2ME.js";export{a as McodeUpdateApplication};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __mavis_cR } from "module"; import { basename as __mavis_basename, dirname as __mavis_dirname, join as __mavis_join } from "path"; import { fileURLToPath as __mavis_fileURLToPath, pathToFileURL as __mavis_pathToFileURL } from "url"; const __mavis_tuiCurrentModuleDir = __mavis_dirname(__mavis_fileURLToPath(import.meta.url)); const __mavis_tuiPackageRoot = __mavis_basename(__mavis_tuiCurrentModuleDir) === "chunks" ? __mavis_dirname(__mavis_tuiCurrentModuleDir) : __mavis_tuiCurrentModuleDir; const __mavis_tuiPackageEntryUrl = __mavis_pathToFileURL(__mavis_join(__mavis_tuiPackageRoot, "cli.js")).href; const require = __mavis_cR(__mavis_tuiPackageEntryUrl); const __dirname = __mavis_tuiPackageRoot;
2
- import{a as o,b as p,c as u}from"./chunk-IBEXP44J.js";import"./chunk-YRXRNL2F.js";import{d as n}from"./chunk-FO5IMY26.js";import"./chunk-77VGHMFO.js";import"./chunk-PGOU6MFH.js";import"./chunk-MMRA4VD2.js";import"./chunk-CWWDVX6C.js";import"./chunk-ZITT4GJK.js";import"./chunk-D76SO2ME.js";async function f(e={}){let t=e.createApplication?e.createApplication(e.region):await c(e.region,e.prepareDataDir),a=e.writeError??(r=>process.stderr.write(r));return(await t.login(r=>{let i=p(r.verificationUriComplete??r.verificationUri);if(a(`Open: ${i}
2
+ import{a as o,b as p,c as u}from"./chunk-LTIHXDFE.js";import"./chunk-EFJXTS5E.js";import{d as n}from"./chunk-D3NBJEJ2.js";import"./chunk-IEL7EQIF.js";import"./chunk-PGOU6MFH.js";import"./chunk-MMRA4VD2.js";import"./chunk-CWWDVX6C.js";import"./chunk-ZITT4GJK.js";import"./chunk-D76SO2ME.js";async function f(e={}){let t=e.createApplication?e.createApplication(e.region):await c(e.region,e.prepareDataDir),a=e.writeError??(r=>process.stderr.write(r));return(await t.login(r=>{let i=p(r.verificationUriComplete??r.verificationUri);if(a(`Open: ${i}
3
3
  Code: ${r.userCode}
4
4
  Waiting for authorization\u2026
5
5
  `),e.openBrowser===!1)return;(e.openExternalTarget??o(process.cwd()))(i).catch(()=>{a(`Couldn't open the default browser. Open the authorization URL above manually.
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __mavis_cR } from "module"; import { basename as __mavis_basename, dirname as __mavis_dirname, join as __mavis_join } from "path"; import { fileURLToPath as __mavis_fileURLToPath, pathToFileURL as __mavis_pathToFileURL } from "url"; const __mavis_tuiCurrentModuleDir = __mavis_dirname(__mavis_fileURLToPath(import.meta.url)); const __mavis_tuiPackageRoot = __mavis_basename(__mavis_tuiCurrentModuleDir) === "chunks" ? __mavis_dirname(__mavis_tuiCurrentModuleDir) : __mavis_tuiCurrentModuleDir; const __mavis_tuiPackageEntryUrl = __mavis_pathToFileURL(__mavis_join(__mavis_tuiPackageRoot, "cli.js")).href; const require = __mavis_cR(__mavis_tuiPackageEntryUrl); const __dirname = __mavis_tuiPackageRoot;
2
- import{c as d,i as f}from"./chunk-L2BHZE4F.js";var h=/<(?:deliver[-_]assets|media|publish[_-]artifact|preview_card|genui-|mavis-widget|mavis-thinking|mavis-progress|think|final|permission-(?:ask|response)|questionnaire-(?:ask|response))\b|^\s*preview_cards?:\s*$/imu;function L(t){let n=k(t);return n.assets.length===0?n.text:[n.text,T(n.assets)].filter(Boolean).join(`
2
+ import{c as d,i as f}from"./chunk-AQSBE25I.js";var h=/<(?:deliver[-_]assets|media|publish[_-]artifact|preview_card|genui-|mavis-widget|mavis-thinking|mavis-progress|think|final|permission-(?:ask|response)|questionnaire-(?:ask|response))\b|^\s*preview_cards?:\s*$/imu;function L(t){let n=k(t);return n.assets.length===0?n.text:[n.text,T(n.assets)].filter(Boolean).join(`
3
3
 
4
4
  `)}function k(t){if(!t||!h.test(t))return{text:t,assets:[]};let n=d(t),e=[],s=[],r="\uE000mcode-protected";for(;t.includes(r);)r+="-";let i=!1,o=n.map(a=>{if(a.type==="protected"){let c=e.push(a.content)-1;return`${r}-${c}\uE001`}return h.test(a.content)?(i=!0,A(a.content,s)):a.content}).join("");if(!i)return{text:t,assets:[]};let u=_(o);e.forEach((a,c)=>{u=u.replace(`${r}-${c}\uE001`,a)});let l=[...new Map(s.map(a=>[a.path.trim(),a])).values()];return{text:u,assets:l.map(a=>({path:a.path.trim(),...a.name?.trim()?{name:a.name.trim()}:{}}))}}function A(t,n){let e=t;return e=p(e,"mavis-thinking"),e=p(e,"think"),e=w(e,"mavis-progress"),e=p(e,"permission-ask"),e=p(e,"permission-response"),e=p(e,"questionnaire-ask"),e=p(e,"questionnaire-response"),e=e.replace(/<\/?final\b[^>]*>/giu,""),e=y(e),e=$(e),e=D(e),e=E(e),e=I(e,n),e=e.replace(/<\/?(?:deliver-assets|deliver_assets)\b[^>]*>/giu,"file attachment").replace(/<media\b[^>]*\/?>/giu,"file attachment").replace(/<media\b[^>]*$/iu,""),e}function p(t,n){let e=new RegExp(`<${n}\\b[^>]*>((?:(?!<${n}\\b)[\\s\\S])*?)<\\/${n}\\s*>`,"giu"),s=t,r=t.replace(e,"");for(;r!==s;)s=r,r=r.replace(e,"");return r}function w(t,n){let e=new RegExp(`<${n}\\b[^>]*>((?:(?!<${n}\\b)[\\s\\S])*?)<\\/${n}\\s*>`,"giu"),s=t,r=t.replace(e,(i,o)=>o.trim());for(;r!==s;)s=r,r=r.replace(e,(i,o)=>o.trim());return r}function y(t){let n=/<mavis-widget\b([^>]*)>([\s\S]*?)<\/mavis-widget\s*>/giu,e=t.replace(n,(s,r,i)=>{let o=/<mavis-fallback\b[^>]*>([\s\S]*?)<\/mavis-fallback\s*>/iu.exec(i)?.[1];return o?.trim()?o.trim():v(g(r))});return e=e.replace(/<mavis-widget\b([^>]*)>[\s\S]*$/iu,(s,r)=>v(g(r))),e.replace(/<mavis-widget\b[^>]*$/iu,"Interactive content is loading\u2026")}function v(t){let n=t.kind?.trim(),e=t.title?.trim();return n&&e?`Interactive ${n}: ${e} (open in Desktop).`:e?`Interactive content: ${e} (open in Desktop).`:"Interactive content available in Desktop."}function $(t){let n=/<genui-([\w-]+)\b([^>]*)>[\s\S]*?<\/genui-\1\s*>/giu,e=/<genui-([\w-]+)\b([^>]*?)\/\s*>/giu,s=t.replace(n,(r,i,o)=>b(i,g(o)));return s=s.replace(e,(r,i,o)=>b(i,g(o))),s.replace(/<genui-[\w-]*\b[^>]*$/iu,"Interactive content is loading\u2026")}function b(t,n){if(t.toLocaleLowerCase()==="mcp-auth"){let e=n.label?.trim()||n["server-id"]?.trim();return e?`MCP authorization required: ${e} (open in Desktop).`:"MCP authorization required (open in Desktop)."}if(t.toLocaleLowerCase()==="agent-team-recommendation"){let e=n.status?.trim().toLocaleLowerCase();return e==="accepted"?"Team recommendation accepted.":e==="skipped"?"Team recommendation skipped.":"Team recommendation available in Desktop."}return"Interactive content available in Desktop."}function g(t){let n={},e=/([\w-]+)\s*=\s*(["'])(.*?)\2/gu,s;for(;(s=e.exec(t))!==null;){let r=s[1],i=s[3];r&&i!==void 0&&(n[r]=C(i))}return n}function D(t){let n=/<(deliver-assets|deliver_assets)\b[^>]*>\s*<\/\1\s*>/giu,e=t,s=t.replace(n,"");for(;s!==e;)e=s,s=s.replace(n,"");return s}function C(t){return t.replace(/&quot;/gu,'"').replace(/&apos;|&#39;/gu,"'").replace(/&lt;/gu,"<").replace(/&gt;/gu,">").replace(/&amp;/gu,"&")}function E(t){let n=/<\/?(deliver-assets|deliver_assets)\b[^>]*>/giu,e=[],s;for(;(s=n.exec(t))!==null;)e.push({start:s.index,end:n.lastIndex,name:s[1]?.toLocaleLowerCase()??"",closing:s[0].startsWith("</")});if(e.length===0)return t;let r=[],i=new Set;if(e.forEach((l,a)=>{if(!l.closing){r.push(a);return}for(let c=r.length-1;c>=0;c-=1){let m=r[c];if(!(m===void 0||e[m]?.name!==l.name)){r.splice(c,1),i.add(m),i.add(a);return}}}),i.size===e.length)return t;let o=0,u="";return e.forEach((l,a)=>{u+=t.slice(o,l.start),u+=i.has(a)?t.slice(l.start,l.end):"file attachment",o=l.end}),u+t.slice(o)}function I(t,n){let e=t;for(let s=0;s<3;s+=1){let r=f(e),i=R(r);if(i.assets.length===0)break;n.push(...i.assets),e=i.text}return e}function R(t){let n=[],e=[];for(let s of t)s.type==="deliver-assets"||s.type==="image-gallery"?e.push(...s.items):s.content.trim()&&n.push(s.content.trim());return{text:n.join(`
5
5