@minimax-ai/code 0.3.7 → 0.3.9
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.
- package/CHANGELOG.md +25 -0
- package/CHANGELOG.zh-CN.md +19 -0
- package/README.md +2 -3
- package/README.zh-CN.md +14 -1
- package/chunks/auth-command-ZGB3QKMA.js +9 -0
- package/chunks/chunk-4S3IXX3N.js +2 -0
- package/chunks/{chunk-E3Y7YZFG.js → chunk-BJMNDLWT.js} +1 -1
- package/chunks/{chunk-RTN2VVTR.js → chunk-CTHP2I62.js} +403 -403
- package/chunks/{chunk-MQKRH5EW.js → chunk-U2NOFGEC.js} +452 -452
- package/chunks/{launcher-N4XF6G4T.js → launcher-CRWDSPMP.js} +140 -139
- package/chunks/{lifecycle-2Z6U4ZFY.js → lifecycle-53YARWA5.js} +1 -1
- package/chunks/{main-LM42U7RA.js → main-I2GTN2NG.js} +1 -1
- package/chunks/{plugin-command-ENLMEUEV.js → plugin-command-AKGMERKZ.js} +1 -1
- package/chunks/{provider-command-SHDAR5N3.js → provider-command-DKDOT7OP.js} +1 -1
- package/chunks/{run-acp-command-IIRG3KK2.js → run-acp-command-IRGYH5GM.js} +1 -1
- package/chunks/{run-exec-command-CWJBGPN7.js → run-exec-command-WKCMWDQS.js} +1 -1
- package/cli.js +1 -1
- package/package.json +1 -1
- package/chunks/auth-command-ZZXFBWOS.js +0 -6
- package/chunks/chunk-RXHPXCVW.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,31 @@ 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.9 · 2026-09-07
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `/btw` and `/side` sessions now follow the parent session permission mode without an extra
|
|
15
|
+
confirmation step. Full access needs no additional approval; other modes retain their normal checks.
|
|
16
|
+
- Draft recovery cleanup skips missing files, preventing repeated no-op deletions from exhausting
|
|
17
|
+
the safety budget and disrupting later operations.
|
|
18
|
+
|
|
19
|
+
## 0.3.8 · 2026-09-07
|
|
20
|
+
|
|
21
|
+
### Improved
|
|
22
|
+
|
|
23
|
+
- `/status` now shows the running version, account and plan, instruction file sources,
|
|
24
|
+
Default/Plan mode transitions, and remaining 5-hour and weekly quotas with reset countdowns.
|
|
25
|
+
- The compact status panel wraps long paths and keeps local configuration visible while account
|
|
26
|
+
details load or when the account request fails.
|
|
27
|
+
- `/logout` and `mcode logout` print a complete browser sign-out link and open the page for the
|
|
28
|
+
current account region and environment. On remote or headless machines, copy the link to your
|
|
29
|
+
browser; command completion does not wait for the browser or page result.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Fixed authentication when uploading automatic error reports from a signed-in account.
|
|
34
|
+
|
|
10
35
|
## 0.3.7 · 2026-09-07
|
|
11
36
|
|
|
12
37
|
### Improved
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -8,6 +8,25 @@ TUI 正式版中用户能直接感知的重要变化。收录范围以 TUI 用
|
|
|
8
8
|
|
|
9
9
|
仅内部重构、测试调整,或只影响其他产品界面且不改变 TUI 行为的变化不记录。
|
|
10
10
|
|
|
11
|
+
## 0.3.9 · 2026-09-07
|
|
12
|
+
|
|
13
|
+
### 问题修复
|
|
14
|
+
|
|
15
|
+
- `/btw` 和 `/side` 侧会话沿用主会话的当前权限模式,不再追加独立确认;Full access 下无需额外确认,其他模式仍按正常权限规则处理。
|
|
16
|
+
- 草稿恢复清理会跳过不存在的文件,避免反复无效删除耗尽安全预算、干扰后续操作。
|
|
17
|
+
|
|
18
|
+
## 0.3.8 · 2026-09-07
|
|
19
|
+
|
|
20
|
+
### 体验改进
|
|
21
|
+
|
|
22
|
+
- `/status` 补齐运行版本、账号与套餐、指令文件来源、Default/Plan 切换状态,以及 5 小时和每周额度的剩余比例与重置倒计时。
|
|
23
|
+
- 状态面板采用紧凑布局,长路径自动换行;账号信息加载中或查询失败时,仍可查看本地配置。
|
|
24
|
+
- `/logout` 和 `mcode logout` 会打印完整的浏览器登出链接,并打开当前地区和环境对应的登出页。开发机或无图形界面环境可复制链接手动打开,命令完成无需等待浏览器或页面结果。
|
|
25
|
+
|
|
26
|
+
### 问题修复
|
|
27
|
+
|
|
28
|
+
- 修复已登录账号自动上报错误报告时的鉴权问题。
|
|
29
|
+
|
|
11
30
|
## 0.3.7 · 2026-09-07
|
|
12
31
|
|
|
13
32
|
### 改进
|
package/README.md
CHANGED
|
@@ -80,9 +80,8 @@ Inside the TUI, use `/export` to save the current Session as Markdown.
|
|
|
80
80
|
Use `/btw [question]` (or `/side [question]`) to fork a temporary side conversation from the latest
|
|
81
81
|
committed conversation boundary without interrupting a running main task. The side conversation
|
|
82
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;
|
|
84
|
-
|
|
85
|
-
mode. Press `Ctrl+/` to switch between the
|
|
83
|
+
asked not to modify anything unless you explicitly request it; it follows the main session's current permission mode without an additional confirmation step.
|
|
84
|
+
Full access does not prompt; other modes continue to apply their normal permission rules. Press `Ctrl+/` to switch between the
|
|
86
85
|
side and main views without ending either (`/parent` also returns from the side view); the Composer
|
|
87
86
|
footer mirrors the main task's state (for example `main needs approval` or `main finished`) while
|
|
88
87
|
you are on the side view.
|
package/README.zh-CN.md
CHANGED
|
@@ -75,7 +75,7 @@ Center,统一浏览最近/已归档 Session、切换当前 workspace/全部范
|
|
|
75
75
|
在 TUI 中使用 `/export`,可以把当前 Session 导出为 Markdown。
|
|
76
76
|
|
|
77
77
|
使用 `/btw [问题]`(或
|
|
78
|
-
`/side [问题]`),可以从最近一个已提交的会话边界 fork
|
|
78
|
+
`/side [问题]`),可以从最近一个已提交的会话边界 fork 出一个临时侧会话,主任务继续运行且不会被中断。侧会话以只读上下文继承主会话历史,工具权限保持与当前会话一致,并被要求除非你明确请求,否则不做任何修改;侧会话沿用主会话的当前权限模式,不追加独立确认;Full access 下无需额外确认,其他模式仍按正常权限规则处理。按
|
|
79
79
|
`Ctrl+/` 可在侧会话与主会话视图之间来回切换而不结束任何一方(在侧会话中执行 `/parent`
|
|
80
80
|
也会回到主视图);处于侧会话视图时,Composer
|
|
81
81
|
底部会同步主任务状态(例如 `main needs approval`、`main finished`)。在空 Composer 中按
|
|
@@ -133,6 +133,11 @@ mcode acp
|
|
|
133
133
|
mcode login
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
+
使用 TUI 的 `/logout` 或命令行 `mcode logout` 退出当前地区的共享账号。退出后会显示完整的浏览器登出链接,
|
|
137
|
+
并尝试打开默认浏览器;在开发机、SSH 或无图形界面环境中,可复制链接到自己的浏览器完成网页登出。
|
|
138
|
+
账号登出完成后,发起浏览器打开请求即返回,完整链接会保留在终端中供手动打开。
|
|
139
|
+
链接按当前地区及运行环境选择,与桌面端的登出页保持一致。
|
|
140
|
+
|
|
136
141
|
安装 `@minimax-ai/code` 时会同时安装 `mcode` 和 `mcode-tools` 两个命令;无需先启动 TUI,`mcode-tools`
|
|
137
142
|
就会出现在 `PATH` 上。
|
|
138
143
|
|
|
@@ -181,6 +186,14 @@ Plan Mode 允许你在修改代码前先审阅实现计划。权限模式用于
|
|
|
181
186
|
|
|
182
187
|
## 命令速查
|
|
183
188
|
|
|
189
|
+
`/status` 查看运行版本、模型和思考配置、目录与 Git 信息、权限、工作模式、Session、MiniMax 账号与套餐,
|
|
190
|
+
以及 5 小时和每周额度的剩余比例与重置倒计时。账号信息异步加载,查询失败时仍可查看本地配置。
|
|
191
|
+
Default / Plan 切换会标明当前模式和下一条消息的切换意图。
|
|
192
|
+
|
|
193
|
+
指令来源列出 Runtime 按当前文件内容选用的全局、项目规则文件路径;它遵循与 Turn 装配相同的优先级和大小限制,
|
|
194
|
+
不展示正文,也不代表历史 Turn 的快照。`/usage` 提供套餐到期、Credits、视频额度及 Session 用量等明细。
|
|
195
|
+
查看面板可滚动,按 `Esc` 关闭,内容不会写入会话历史。
|
|
196
|
+
|
|
184
197
|
| 命令 | 用途 |
|
|
185
198
|
| ------------------------ | ---------------------------------- |
|
|
186
199
|
| `mcode [prompt]` | 启动交互式 TUI |
|
|
@@ -0,0 +1,9 @@
|
|
|
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 l,c as u}from"./chunk-4S3IXX3N.js";import"./chunk-ACTS7L64.js";import{d as p}from"./chunk-5MDJKLXG.js";import"./chunk-SEVVS6ZS.js";import"./chunk-XO2KLR35.js";import"./chunk-ZITT4GJK.js";import"./chunk-MMRA4VD2.js";import"./chunk-CWWDVX6C.js";import"./chunk-D76SO2ME.js";async function A(r={}){let a=r.createApplication?r.createApplication(r.region):await c(r.region,r.prepareDataDir),t=r.writeError??(e=>process.stderr.write(e));return(await a.login(e=>{let n=l(e.verificationUriComplete??e.verificationUri);if(t(`Open: ${n}
|
|
3
|
+
Code: ${e.userCode}
|
|
4
|
+
Waiting for authorization\u2026
|
|
5
|
+
`),r.openBrowser===!1)return;(r.openExternalTarget??o(process.cwd()))(n).catch(()=>{t(`Couldn't open the default browser. Open the authorization URL above manually.
|
|
6
|
+
`)})})).message}async function h(r={}){let t=await(r.createApplication?r.createApplication(r.region):await c(r.region,r.prepareDataDir)).logout();if(t.logoutUrl){let i=r.writeError??(e=>process.stderr.write(e));if(i(`Finish signing out in your browser:
|
|
7
|
+
${t.logoutUrl}
|
|
8
|
+
`),r.openBrowser!==!1){let e=()=>i(`Couldn't open the default browser. Open the sign-out URL above manually.
|
|
9
|
+
`);try{(r.openExternalTarget??o(process.cwd()))(t.logoutUrl).catch(e)}catch{e()}}}return t.message}async function c(r,a=p){return u({dataDir:await a(),...r?{region:r}:{}})}export{A as runTuiLogin,h as runTuiLogout};
|
|
@@ -0,0 +1,2 @@
|
|
|
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 p}from"./chunk-ACTS7L64.js";import{e as g,j as d,l as h}from"./chunk-SEVVS6ZS.js";import{isAbsolute as f,resolve as A}from"node:path";import{spawn as E}from"node:child_process";import{fileURLToPath as y}from"node:url";function T(e){return t=>R(t,e)}function R(e,t){let i=S(e,t),[o,r]=process.platform==="darwin"?["open",[i]]:process.platform==="win32"?["rundll32",["url.dll,FileProtocolHandler",i]]:["xdg-open",[i]];return new Promise((s,u)=>{let n=E(o,r,{detached:!0,stdio:"ignore",windowsHide:!0});n.once("error",u),n.once("spawn",()=>{n.unref(),s()})})}function S(e,t){return/^https?:\/\//iu.test(e)?e:/^file:\/\//iu.test(e)?y(e):f(e)?e:A(t,e)}var x="mcode-internal";function k(e){try{let t=new URL(e);return t.searchParams.set("client_surface","tui"),t.searchParams.set("download_source",x),t.toString()}catch{return e}}var w={cn:{dev:"https://agent.minimaxi.com",test:"https://agent.minimaxi.com",staging:"https://agent.minimaxi.com",prod:"https://agent.minimax.cn"},en:{dev:"https://agent.minimax.io",test:"https://agent.minimax.io",staging:"https://agent.minimax.io",prod:"https://agent.minimax.io"}};function m(e){let t=w[e.region][e.buildEnv];return`${t}/auth/logout?logout_redirect_uri=${encodeURIComponent(t)}`}var c=class{constructor(t){this.options=t;let i=d({runtimeRegion:process.env.MAVIS_REGION==="en"?"en":"cn"});this.scope={region:t.region??i.region,buildEnv:t.buildEnv??i.buildEnv}}scope;async login(t,i=this.scope.region){this.track("login_click",{hailuo_user_id:this.hailuoUserId()});try{let o={...this.scope,region:i},r=!P(o,this.scope),s=this.options.sharedAuthCore;if(r){if(!this.options.resolveSharedAuthCore)throw new Error(C(this.scope,o));s=this.options.resolveSharedAuthCore(i)}let u=(await s.getStatus()).status==="authenticated",n=!1;await s.login({onDeviceAuthorization:M=>{n=!0,t?.({state:"device-authorization",...M})}}),this.persistRegionPreference(o);let l=u&&!n,v={state:l?"already-authenticated":"authenticated",message:l?r?`Already signed in with ${a(o.region)}.`:"Already signed in with MiniMax.":r?`Signed in with ${a(o.region)}.`:"Signed in with MiniMax.",...r?{restartRequired:!0}:{}};return this.trackLoginResult("1",""),v}catch(o){throw this.trackLoginResult("2",b(o)),o}}async logout(){this.track("logout_click",{hailuo_user_id:this.hailuoUserId()});let t=await this.options.sharedAuthCore.getStatus(),i=await this.options.sharedAuthCore.logout({revoke:!0}),o=m(this.scope);return t.status==="anonymous"&&i.status==="anonymous"?{state:"already-signed-out",message:"Already signed out of MiniMax.",logoutUrl:o}:{state:"signed-out",logoutUrl:o,message:i.status==="logout_pending"?`Signed out locally from ${a(this.scope.region)} across MCode. Server revocation is pending until the network recovers.`:`Signed out of ${a(this.scope.region)} on Desktop, CLI/TUI, and embedded mcode-tools.`}}trackLoginResult(t,i){this.track("login_result",{hailuo_user_id:this.hailuoUserId(),source:this.options.telemetrySource??"mcode_cli",result_type:t,fail_reason:i,login_type:"minimax_oauth"})}persistRegionPreference(t){try{this.options.writeRegionPreference?.(this.options.dataDir,t)}catch{}}hailuoUserId(){try{return this.options.hailuoUserId?.()?.trim()??""}catch{return""}}track(t,i){try{this.options.telemetry?.track(t,i)}catch{}}};function b(e){let t=e instanceof Error?e.message:String(e);return/cancel/iu.test(t)?"3":/network|offline|fetch|ECONN|ENOTFOUND|ETIMEDOUT/iu.test(t)?"2":/oauth|authorization|login failed|invalid login state/iu.test(t)?"5":/server|HTTP 5\d\d/iu.test(t)?"1":"4"}function P(e,t){return e.region===t.region&&e.buildEnv===t.buildEnv}function C(e,t){return e.region!==t.region?`Signed in to ${a(e.region)}. Run \`mcode logout\` before signing in to ${a(t.region)}.`:`Signed in to another MiniMax ${e.buildEnv} environment. Run \`mcode logout\` before signing in to ${t.buildEnv}.`}function a(e){return e==="cn"?"MiniMax China":"MiniMax Global"}function j(e){let t=d({runtimeRegion:e.region,runtimeBuildEnv:e.buildEnv}),i=e.region??t.region,o=e.buildEnv??t.buildEnv,r={dataDir:e.dataDir,region:i,buildEnv:o,...e.telemetry?{telemetry:e.telemetry}:{},...e.telemetrySource?{telemetrySource:e.telemetrySource}:{},...e.hailuoUserId?{hailuoUserId:e.hailuoUserId}:{},writeRegionPreference:e.writeRegionPreference??h},s=n=>(e.createSharedSession??p)({dataDir:e.dataDir,region:n,buildEnv:o,oauthEndpoints:g(e.oauthEndpointEnvironment??process.env,{buildEnv:o,region:n})}),u=e.sharedAuthCore??s(i);return new c({...r,sharedAuthCore:u,resolveSharedAuthCore:s})}export{T as a,k as b,j as c};
|
|
@@ -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-
|
|
2
|
+
import{c as d,i as f}from"./chunk-U2NOFGEC.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(/"/gu,'"').replace(/'|'/gu,"'").replace(/</gu,"<").replace(/>/gu,">").replace(/&/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
|
|