fix(app): eliminate startup white screen by replacing @iarna/toml with browser-friendly smol-toml
- chore(deps): switch TOML dependency from @iarna/toml to smol-toml and update lockfile - feat(mcp): add TOML editing/validation for Codex while keeping JSON for Claude; support auto ID extraction from TOML and JSON->TOML conversion for wizard output; add pre-submit required checks (stdio.command / http.url) - refactor(mcp): unify JSON/TOML validation errors via i18n; add formatTomlError for consistent, localized messages; consolidate state into formConfig/configError - feat(i18n): add TOML labels/placeholders and error keys (tomlConfig, tomlPlaceholder, tomlInvalid) - feat(utils): introduce tomlUtils with parse/stringify/validate/convert helpers using smol-toml; provide tomlToMcpServer, mcpServerToToml, extractIdFromToml, validateToml - build: confirm Vite no longer externalizes Node builtins during build; renderer builds without 'Module 'stream' has been externalized' warning
This commit is contained in:
@@ -285,6 +285,8 @@
|
||||
"descriptionPlaceholder": "Optional description",
|
||||
"jsonConfig": "JSON Configuration",
|
||||
"jsonPlaceholder": "{\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\"mcp-server-fetch\"]\n}",
|
||||
"tomlConfig": "TOML Configuration",
|
||||
"tomlPlaceholder": "type = \"stdio\"\ncommand = \"uvx\"\nargs = [\"mcp-server-fetch\"]",
|
||||
"useWizard": "Config Wizard"
|
||||
},
|
||||
"wizard": {
|
||||
@@ -328,6 +330,7 @@
|
||||
"idRequired": "Please enter identifier",
|
||||
"idExists": "Identifier already exists. Please choose another.",
|
||||
"jsonInvalid": "Invalid JSON format",
|
||||
"tomlInvalid": "Invalid TOML format",
|
||||
"commandRequired": "Please enter command",
|
||||
"singleServerObjectRequired": "Please paste a single MCP server object (do not include top-level mcpServers)",
|
||||
"saveFailed": "Save failed",
|
||||
|
||||
@@ -285,6 +285,8 @@
|
||||
"descriptionPlaceholder": "可选的描述信息",
|
||||
"jsonConfig": "JSON 配置",
|
||||
"jsonPlaceholder": "{\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\"mcp-server-fetch\"]\n}",
|
||||
"tomlConfig": "TOML 配置",
|
||||
"tomlPlaceholder": "type = \"stdio\"\ncommand = \"uvx\"\nargs = [\"mcp-server-fetch\"]",
|
||||
"useWizard": "配置向导"
|
||||
},
|
||||
"wizard": {
|
||||
@@ -328,6 +330,7 @@
|
||||
"idRequired": "请填写标识",
|
||||
"idExists": "该标识已存在,请更换",
|
||||
"jsonInvalid": "JSON 格式错误,请检查",
|
||||
"tomlInvalid": "TOML 格式错误,请检查",
|
||||
"commandRequired": "请填写命令",
|
||||
"singleServerObjectRequired": "此处只需单个服务器对象,请不要粘贴包含 mcpServers 的整份配置",
|
||||
"saveFailed": "保存失败",
|
||||
|
||||
Reference in New Issue
Block a user