@minimax-ai/code 0.4.0 → 0.4.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.
- package/CHANGELOG.md +93 -48
- package/CHANGELOG.zh-CN.md +51 -12
- package/README.md +11 -1
- package/README.zh-CN.md +39 -2
- package/chunks/{azure-openai-responses-OAPIGHCQ.js → azure-openai-responses-HOJR5DNA.js} +1 -1
- package/chunks/{chunk-3CBMWQ6F.js → chunk-BEBFQY6O.js} +1 -1
- package/chunks/{chunk-WYU2W43S.js → chunk-BEUVALD2.js} +612 -603
- package/chunks/{chunk-WSVP72I3.js → chunk-HEAI577S.js} +1 -1
- package/chunks/chunk-JCDDI4WJ.js +2 -0
- package/chunks/{chunk-ORVAHBJL.js → chunk-OJA2IAQ6.js} +2 -2
- package/chunks/chunk-SD6SJL3L.js +11 -0
- package/chunks/{chunk-TOORQIFW.js → chunk-VFMQBQ74.js} +442 -442
- package/chunks/{dist-UYNXCH7Y.js → dist-QF3JV3LN.js} +1 -1
- package/chunks/{launcher-A64GFJG2.js → launcher-TUY2TFYJ.js} +154 -154
- package/chunks/{lifecycle-D5KSTWZI.js → lifecycle-6JTTIEH2.js} +1 -1
- package/chunks/{main-BATWFEJC.js → main-RHDM3DSB.js} +1 -1
- package/chunks/{openai-codex-responses-OKBVUABU.js → openai-codex-responses-5BJTY4II.js} +1 -1
- package/chunks/{openai-responses-4ZH3D54Q.js → openai-responses-FRXGNXAR.js} +1 -1
- package/chunks/{plugin-command-524JANV6.js → plugin-command-34BQGAX4.js} +1 -1
- package/chunks/{provider-command-HHC2RGTN.js → provider-command-XOI6VZ4Z.js} +1 -1
- package/chunks/{run-acp-command-GF7NFIY7.js → run-acp-command-BH3V7PS6.js} +3 -3
- package/chunks/{run-exec-command-PV4LGXQY.js → run-exec-command-FMHHG5HZ.js} +1 -1
- package/cli.js +1 -1
- package/package.json +1 -1
- package/chunks/chunk-IHFSGO5Y.js +0 -2
- package/chunks/chunk-ZA4WKJYS.js +0 -13
|
@@ -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
|
-
function n(e){return{schemaVersion:1,type:"exec.result",sessionId:e.sessionId,turnId:e.turnId,status:e.status==="awaiting-user-continuation"?"blocked":e.status,answer:e.answer??null,...e.model?{model:{...e.model}}:{},...e.error?{error:{...e.error}}:{},durationMs:e.durationMs}}function o(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e,r=t.model===void 0||typeof t.model=="object"&&t.model!==null&&typeof t.model.providerId=="string"&&typeof t.model.modelId=="string"&&(t.model.variant===void 0||typeof t.model.variant=="string");return t.schemaVersion===1&&t.type==="exec.result"&&typeof t.sessionId=="string"&&typeof t.turnId=="string"&&typeof t.durationMs=="number"&&r&&(t.status==="succeeded"||t.status==="failed"||t.status==="blocked"||t.status==="timeout"||t.status==="cancelled"||t.status==="limit_exceeded")}function u(e){return e.coordinator.execute(e.request,t=>{e.isActive()&&e.onSessionEvent(t)},e.onRunAccepted,e.onResult?t=>e.onResult?.(n(t)):void 0)}var c={help:{name:"help",description:"Show available commands"},new:{name:"new",description:"Start a fresh session in the current workspace"},model:{name:"model",description:"Choose a model"},status:{name:"status",description:"Show account and model status"},doctor:{name:"doctor",description:"Check the local config file"},context:{name:"context",description:"Show the Runtime-owned context snapshot"},skills:{name:"skills",description:"List built-in and user Skills"},mcp:{name:"mcp",description:"Inspect
|
|
2
|
+
function n(e){return{schemaVersion:1,type:"exec.result",sessionId:e.sessionId,turnId:e.turnId,status:e.status==="awaiting-user-continuation"?"blocked":e.status,answer:e.answer??null,...e.model?{model:{...e.model}}:{},...e.error?{error:{...e.error}}:{},durationMs:e.durationMs}}function o(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e,r=t.model===void 0||typeof t.model=="object"&&t.model!==null&&typeof t.model.providerId=="string"&&typeof t.model.modelId=="string"&&(t.model.variant===void 0||typeof t.model.variant=="string");return t.schemaVersion===1&&t.type==="exec.result"&&typeof t.sessionId=="string"&&typeof t.turnId=="string"&&typeof t.durationMs=="number"&&r&&(t.status==="succeeded"||t.status==="failed"||t.status==="blocked"||t.status==="timeout"||t.status==="cancelled"||t.status==="limit_exceeded")}function u(e){return e.coordinator.execute(e.request,t=>{e.isActive()&&e.onSessionEvent(t)},e.onRunAccepted,e.onResult?t=>e.onResult?.(n(t)):void 0)}var c={help:{name:"help",description:"Show available commands"},new:{name:"new",description:"Start a fresh session in the current workspace"},model:{name:"model",description:"Choose a model"},status:{name:"status",description:"Show account and model status"},doctor:{name:"doctor",description:"Check the local config file"},context:{name:"context",description:"Show the Runtime-owned context snapshot"},skills:{name:"skills",description:"List built-in and user Skills"},mcp:{name:"mcp",description:"Inspect MCP capabilities and project configuration"},usage:{name:"usage",description:"Show session usage"},compact:{name:"compact",description:"Shorten the active conversation"},export:{name:"export",description:"Export the current Session as Markdown"}};export{c as a,o as b,u as c};
|
|
@@ -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{b as u}from"./chunk-I3GV76MP.js";var l=class{constructor(e){this.port=e}async snapshot(e={}){let[o,s,r,a]=await Promise.all([this.port.listUserModelProviders(),this.port.getMiniMaxApiKeyStatus(),this.port.getMiniMaxModelSource(),e.includeCodexOAuth?this.port.getCodexOAuthStatus():void 0]);return{minimaxModelSource:r,providers:[...!a||a.state==="hidden"?[]:[m(a)],{providerId:"minimax_oauth",name:"MiniMax OAuth",kind:"minimax-oauth",active:r==="token_plan",enabled:!0,readOnly:!0,hasApiKey:!1,models:[]},{providerId:"minimax_api",name:"MiniMax API Key",kind:"minimax-api-key",active:r==="minimax_api_key",enabled:!0,readOnly:!1,hasApiKey:s.hasApiKey,...s.maskedApiKey?{maskedApiKey:s.maskedApiKey}:{},...s.cachedStatus?{status:s.cachedStatus}:{},models:[]},...o.map(M)]}}setMiniMaxSource(e){return this.port.setMiniMaxModelSource(e)}connectCodexOAuth(e){return this.port.startCodexOAuthLogin(e)}getCodexOAuthStatus(){return this.port.getCodexOAuthStatus()}cancelCodexOAuthLogin(e){return this.port.cancelCodexOAuthLogin(e)}async setMiniMaxApiKey(e,o=!0){await this.port.upsertMiniMaxApiKey({apiKey:e,saveAndUse:o})}async create(e){await this.port.createUserModelProvider(e)}saveCandidate(e){return this.port.saveUserModelProviderCandidate(e)}async refreshModels(e){if(e.kind!=="custom"||e.readOnly||!e.baseUrl||!e.configRevision)throw new Error("Reopen /provider and select an editable connection.");let o={providerId:e.providerId,expectedRevision:e.configRevision,baseUrl:e.baseUrl},s=await this.port.discoverUserModelsCandidate(o),r=new Set(e.models.map(({modelId:i})=>i)),a=s.map(({modelId:i,displayName:c})=>({modelId:i.trim(),...c?{displayName:c}:{}})).filter(({modelId:i})=>!i||r.has(i)?!1:(r.add(i),!0)),d=a[0];if(!d)return 0;let n=await this.port.saveUserModelProviderCandidate({...o,models:[...e.models.map(({modelId:i})=>({modelId:i})),...a.map(i=>({...i,configurationSource:"discovered"}))],modelId:d.modelId,skipConnectionTest:!0,saveAndUse:!1});if(!n.success)throw new Error(n.status?.lastErrorMessage??"Could not save refreshed models.");return a.length}async update(e){await this.port.updateUserModelProvider(e)}async remove(e){await this.port.deleteUserModelProvider(e)}test(e,o){return o?this.port.testUserModel(e,o):this.port.testUserModelProvider(e)}};function m(t){return{providerId:t.providerId,name:"OpenAI Codex",kind:"codex-oauth",active:!1,enabled:!0,readOnly:!0,hasApiKey:!1,models:[],status:{state:t.state,...t.error?{lastErrorMessage:t.error}:{}}}}function M(t){let e=u(t.apiFormat)?t.apiFormat:void 0;return{providerId:t.providerId,name:t.name?.trim()||t.providerId,kind:"custom",active:!!(t.enabled!==!1&&t.models?.some(o=>"selected"in o&&o.selected)),enabled:t.enabled!==!1,readOnly:t.kind==="oauth",...t.configRevision?{configRevision:t.configRevision}:{},...e?{apiFormat:e}:{},...t.baseUrl?{baseUrl:t.baseUrl}:{},hasApiKey:!!t.hasApiKey,...t.maskedApiKey?{maskedApiKey:t.maskedApiKey}:{},models:(t.models??[]).map(o=>({modelId:o.modelId,...o.displayName?{displayName:o.displayName}:{},...o.selected!==void 0?{selected:o.selected}:{},...o.status?{status:o.status}:{}})),...t.status?{status:t.status}:{}}}export{l as a};
|