@lovrabet/cli 1.3.2 → 1.3.3

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 (85) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -1
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/i18n/I18nProvider.js +1 -0
  54. package/lib/i18n/hooks.js +1 -0
  55. package/lib/i18n/index.js +1 -0
  56. package/lib/i18n/locales/en-US.js +1 -0
  57. package/lib/i18n/locales/zh-CN.js +1 -0
  58. package/lib/init/main.js +1 -1
  59. package/lib/mcp/McpInstallUI.js +1 -1
  60. package/lib/mcp/claude.js +1 -1
  61. package/lib/mcp/cursor.js +1 -1
  62. package/lib/mcp/main.js +1 -1
  63. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  64. package/lib/mcp/mcp-installer.js +1 -1
  65. package/lib/skills/SkillInstallUI.js +1 -1
  66. package/lib/skills/main.js +1 -1
  67. package/lib/skills/skill-install-non-interactive.js +1 -1
  68. package/lib/skills/skill-installer.js +1 -1
  69. package/lib/ui/IDESelector.js +1 -1
  70. package/lib/ui/useIDESelection.js +1 -1
  71. package/lib/utils/ai_config.js +1 -1
  72. package/lib/utils/cdn-config.js +1 -1
  73. package/lib/utils/check-sdk-version.js +1 -1
  74. package/lib/utils/cli-version-check.js +1 -1
  75. package/lib/utils/config.js +1 -1
  76. package/lib/utils/copy-directory.js +1 -1
  77. package/lib/utils/file-utils.js +1 -1
  78. package/lib/utils/guides-cdn.js +1 -1
  79. package/lib/utils/http-client.js +1 -1
  80. package/lib/utils/logger.js +1 -1
  81. package/lib/utils/router-updater.js +1 -1
  82. package/lib/utils/rules-cdn.js +1 -1
  83. package/lib/utils/sleep.js +1 -1
  84. package/lib/utils/template-replacer.js +1 -1
  85. package/package.json +3 -1
@@ -0,0 +1 @@
1
+ function a58_0x435c(){var _0xebbeae=['正在从\x20CDN\x20拉取开发者指南...','格式化代码','{{name}}\x20技能包安装成功','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','配置信息:','页面路径长度不能超过\x20100\x20个字符','其他\x20IDE','错误:\x20不支持的命令:\x20{{cmd}}','交互式选择并安装技能包','安装依赖','设置环境\x20(online/daily)','{{name}}\x20技能包安装失败','*\x20正在拉取\x20API\x20配置...','请输入编号选择\x20IDE:\x0a','\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并安装技能包','🌐\x20正在尝试自动打开浏览器...','✓\x20已退出登录','现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','成功获取\x20{{count}}\x20个线上菜单','拉取API配置:','取消更新','批量创建菜单完成,共\x20{{count}}\x20个','\x20*\x20页面文件已创建,可直接通过路由访问','{{count}}\x20个','\x20正在获取线上菜单资源链接...','支持的\x20IDE:','\x20\x20q.\x20取消\x0a','请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。','项目名','\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>','\x20\x20\x20\x20→\x20交互式选择\x20IDE','\x20\x20使用\x20←→\x20返回修改选择,回车确认\x20IDE','\x20Step1:\x20','请选择:\x20','*\x20正在创建项目\x20{{name}}...','是否同时配置\x20AI\x20助手?这将:','✓\x20拉取\x20{{count}}\x20个开发者指南','\x0a✓\x20{{ide}}\x20MCP\x20配置成功','复制\x20Cursor\x20Rules\x20文件失败','Cursor\x20MCP\x20配置失败','*\x20正在创建项目...','正在获取数据集列表...','配置指南:','文档生成失败:\x20{{error}}','需要先配置\x20appcode','复制项目文件','×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。','\x0a📋\x20其他\x20IDE\x20MCP\x20配置:\x0a','\x20登录中...','\x0a已取消配置\x0a','JS\x20链接无法访问','*\x20是否要先登录以便拉取\x20API\x20配置?','获取配置项','请至少选择一个\x20IDE','*\x20仅生成指定数据集的文档:\x20{{codes}}','CSS\x20链接','应用代码长度不能超过\x20100\x20个字符','登录成功','未提供配置值','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','MCP\x20和\x20Skill','\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','页面路径不合法','正在安装技能包...','✓\x20技能包安装成功!共安装\x20{{count}}\x20个目录','下一步','AppCode','创建菜单失败,HTTP状态码:\x20{{status}}','⚠️\x20部分配置需要手动完成','*\x20JS\x20链接:\x20','*\x20项目名:\x20','\x20\x20.lovrabet/skill/.shared/guides/\x20-\x20详细开发指南\x0a','显示帮助信息','请至少选择一个菜单','正在更新菜单资源链接:\x20{{label}}\x20({{path}})','未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置','169196soZSUq','√\x20配置文件已创建,应用AppCode:\x20{{appCode}}','指定输出目录','菜单资源同步成功:\x20{{label}}','目录\x20\x22{{name}}\x22\x20已存在','指定环境生成文档','⚠️\x20\x20未知的平台:\x20{{ide}},使用通用模板','重启\x20Claude\x20Code\x20后生效','*\x20生成的文档文件:','*\x20CSS\x20链接:\x20','正在初始化配置文件...','已登录','\x20命令重新登录','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','\x20\x20√\x20依赖安装跳过(非交互模式)','应用代码只能包含字母、数字、-\x20和\x20_','配置信息:\x20appcode={{appcode}},\x20env={{env}}','选择要配置的\x20IDE:','包含\x20Backend\x20Function\x20同步工作流','\x20\x20-\x20Filter\x20查询构建规范\x20(10\x20种常见错误对照)\x0a\x20\x20-\x20MCP\x20SQL\x20创建工作流\x20(5\x20步强制流程)\x0a\x20\x20-\x20AntD\x20UI\x20开发规范\x20(禁止\x20AI\x20味道)\x0a\x20\x20-\x20API\x20集成指南\x20(lovrabet\x20api\x20pull\x20流程)\x0a\x20\x20-\x20菜单管理指南\x20(menu\x20sync/update\x20流程)\x0a\x20\x20-\x20Backend\x20Function\x20脚本编写规范\x20(权限过滤、数据脱敏、业务逻辑)\x0a\x20\x20-\x20Backend\x20Function\x20同步工作流\x20(需\x20--dangerously-bff-save\x20启用)','8139805sAUMjY','上一步','应用AppCode长度不能超过\x20100\x20个字符','\x20\x20\x20耗时:\x20{{duration}}ms','获取数据集失败,HTTP状态码:\x20{{status}}','拉取API配置','🔗\x20请手动复制登录地址到浏览器:','\x20\x20(注:\x20--appcode\x20参数与配置一致,将使用默认配置)','待更新的菜单列表:','未设置','请使用\x20--appcode\x20参数,例如:','无法自动关闭窗口,请手动关闭此标签页或窗口。','请输入应用代码\x20(AppCode):','√\x20当前为有效会话,无需重新登录。','✓\x20{{scope}}环境配置已设置为:\x20{{value}}','8IbbNSQ','√\x20API\x20配置拉取完成','√\x20{{label}}:\x20','!\x20以下数据集代码不存在:\x20{{codes}}','×\x20--params\x20参数不是有效的\x20JSON\x20格式','[可选]:\x20','\x20\x20\x20\x20→\x20输入编号选择\x20IDE','成功在当前目录初始化\x20.lovrabetrc\x20文件','用法:','*\x20使用配置的应用AppCode:\x20{{appCode}}','!\x20请指定一个有效的命令。','\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Cursor','无效的命令,可用命令如下:','未提供应用AppCode,且配置中也没有默认值','[{{current}}/{{total}}]\x20正在生成:\x20{{fileName}}.md\x20({{name}})','\x20\x20--dangerously-bff-save\x20\x20\x20\x20包含\x20Backend\x20Function\x20同步工作流指南\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(需要\x20MCP\x20服务器启用相应\x20tools)','请输入有效的\x20JS\x20https\x20链接','登录认证','选项:','正在生成\x20{{fileName}}.md\x20({{current}}/{{total}})','开始配置\x20MCP','列出所有配置项','安装所有技能包','页面路径','Claude\x20Code','正在获取日常菜单列表...\x20(appCode:\x20{{appCode}})','\x20\x20\x20\x20→\x20使用\x20↑↓\x20移动光标,空格选中/取消,Enter\x20确认\x0a\x20\x20\x20\x20→\x20按\x20a\x20全选,按\x20i/r\x20反选,按\x20q\x20退出','CSS\x20链接:\x20','安装所有\x20IDE\x20技能包(包括通用模板)','正在从\x20CDN\x20拉取开发者指南(含扩展)...','*\x20请输入新的资源链接','\x20\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20直接配置\x20Cursor\x20MCP','使用示例:','更新现有\x20mcp.json\x20配置','未知错误','设置配置项','\x20\x20✗\x20安装\x20{{ide}}\x20失败:\x20{{error}}','路径不能以\x20/\x20开头或结尾','\x20\x20\x20当前\x20CLI\x20版本:\x20{{version}}','√\x20菜单创建完成','显示此帮助信息','只生成指定数据集的文档','\x0a✓\x20技能包安装成功!共安装\x20{{count}}\x20个目录\x0a','√\x20文档生成完成!成功\x20{{successCount}}\x20个','获取文档失败\x20({{datasetCode}}),HTTP状态码:\x20{{status}}','保存配置失败','!\x20当前未登录','\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择\x20IDE','其他\x20IDE\x20配置指引','配置\x20Lovrabet\x20MCP\x20服务器','\x20\x20\x20\x20→\x20直接配置\x20Cursor\x20MCP\x20(写入\x20.cursor/mcp.json)','跳过登录','获取菜单列表失败:\x20{{error}}','\x20\x20\x20升级命令:\x20{{command}}','路径中的每个段只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','启动项目:\x20','同步菜单','\x0a✗\x20{{ide}}\x20MCP\x20配置失败:\x20{{error}}','使用指定的\x20appcode','*\x20正在更新\x20package.json\x20的\x20name\x20和\x20description\x20字段','请输入有效的\x20CSS\x20https\x20链接','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','×\x20未配置\x20AppCode','!\x20请使用以下方式之一:','安装\x20Lovrabet\x20技能包\x20-\x20选择\x20IDE','指定输出目录(pull:\x20./src/api/,doc:\x20./docs)','CSS\x20链接无法访问','*\x20日志已清空','*\x20应用AppCode\x20','正在加载页面模板...','↑/↓:\x20移动\x20空格:\x20切换\x20a:\x20全选\x20q:\x20退出\x20Enter:\x20确认','*\x20正在检查登录状态...','创建\x20Cursor\x20Rules\x20文件','\x0a错误:\x20配置失败\x20-\x20{{error}}\x0a','创建技能包\x20manifest','共享技能文件复制失败','正在生成\x20{{count}}\x20个数据集的文档...','\x20\x20•\x20MCP\x20服务器:','\x20\x20\x20\x20→\x20安装技能包并包含\x20Backend\x20Function\x20同步工作流','\x20*\x20路由地址:\x20','使用指定的应用AppCode:\x20{{appCode}}','\x20\x20\x20•\x20{{name}}.ts\x20-\x20模型配置文件','2106650XurlxY','!\x20API\x20配置拉取异常,项目已创建,可稍后手动执行:\x20lovrabet\x20api\x20pull','项目名不合法','不支持的\x20IDE:\x20{{ide}}','*\x20已输入的资源资源','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','当前目录已存在\x20.lovrabetrc\x20文件','4817244rrHPyB','\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a','\x20\x20正在安装依赖...','提示:使用\x20','\x20\x20lovrabet\x20skill\x20install\x20<ide>\x20\x20\x20\x20\x20#\x20直接安装指定\x20IDE\x20的技能包','\x20\x20✓\x20创建\x20{{path}}/','拉取API配置:\x20','\x0a已取消安装\x0a','开始批量创建菜单,共\x20{{count}}\x20个','请执行以下命令配置\x20Claude\x20Code\x20MCP:','获取模板列表失败:','\x0a请选择要配置\x20MCP\x20的\x20IDE:\x0a','•\x20MCP:\x20让\x20AI\x20直接访问\x20Lovrabet\x20数据集','可用命令:','MCP\x20服务器\x20(AI\x20访问数据集)','\x20输入项目的\x20CSS\x20资源链接(https://...)','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互式选择并配置\x20MCP','Cursor\x20MCP\x20配置成功','×\x20项目创建失败:\x20{{error}}','\x0a注意:部分配置需要手动执行命令,请按照上述说明操作','项目名称','请至少选择一个配置项','响应数据格式错误\x20({{datasetCode}}):缺少\x20data.markdown\x20字段','指定要生成文档的数据集代码(多个用逗号分隔,仅\x20doc\x20命令)','↪\x20SDK\x20版本更新','✓\x20MCP\x20服务器配置完成:','✓\x20Skill\x20安装完成:','\x20输入项目的\x20JS\x20资源链接(https://...)','开发者指南位置:','×\x20--params\x20参数必须是一个有效的\x20JSON\x20对象','\x20\x20\x20详情:\x20{{details}}','应用代码不能为空','正在从服务器拉取模型列表...\x20(环境:\x20{{env}})','\x20\x20\x20时间:\x20{{time}}','未知的\x20IDE:\x20{{ide}}','全部安装','指定环境(如:daily、online)','\x0a📦\x20正在配置\x20{{name}}\x20MCP...\x0a','正在构建项目...','√\x20package.json\x20已更新:\x20name={{name}}','√\x20检测到有效登录状态','选项:','√\x20更新成功','\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Claude\x20Code','Lovrabet\x20MCP\x20-\x20MCP\x20服务器配置工具','请选择您要创建的页面模板','\x20\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20直接配置\x20Claude\x20Code\x20MCP','*\x20输出目录:\x20','\x20|\x20应用AppCode:\x20','示例:','Enter\x20默认:\x20是','\x20直接回车确认,或输入自定义路由地址','*\x20共处理\x20{{count}}\x20个数据集','*\x20暂无日志记录','直接安装指定\x20IDE\x20的技能包','✓\x20MCP\x20配置完成!','更新菜单资源失败:\x20{{error}}','*\x20正在处理\x20{{count}}\x20个数据集...','\x20\x20\x20交互式选择\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20显示\x20IDE\x20列表供选择','路径不能包含连续的\x20/','\x20*\x20页面路径:\x20','-\x20客户端实例文件','34375689wsDotL','\x20\x20$\x20lovrabet\x20mcp\x20install','\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助信息','\x20\x20重启\x20Claude\x20Code\x20后生效\x0a','lovrabet\x20api\x20-\x20API\x20相关操作','*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20{{env}})','\x20\x20√\x20package.json\x20已更新','已写入\x20.cursor/mcp.json','创建菜单失败:\x20{{error}}','*\x20同步菜单到\x20Lovrabet\x20平台','⚠️\x20以下数据集生成失败:','*\x20清理失败的项目目录:\x20{{dir}}','环境:\x20{{env}}','JS\x20链接','\x20正在获取线上菜单列表...','✓\x20成功生成:\x20{{fileName}}.md','清理项目目录失败','\x20\x20✓\x20创建\x20{{path}}','√\x20成功拉取\x20{{datasetCount}}\x20个数据集,生成\x20{{modelCount}}\x20个模型','配置值无效或过长','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','生成多个数据集的文档','\x20\x20√\x20项目模板已创建','菜单创建成功:','\x20\x20错误:\x20{{error}}','输入项目的\x20JS\x20资源链接(https://...)','技能包内容包括:','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','\x0a📦\x20正在安装\x20{{name}}...\x0a','输入\x200\x20安装所有\x20IDE,输入\x20q\x20取消\x0a','*\x20正在创建菜单...','其他\x20IDE\x20配置指引已显示','设置显示语言\x20(zh/en)','项目名长度不能超过\x2050\x20个字符','请手动执行:\x20{{command}}','*\x20正在登录,请前往浏览器完成登录...','locale\x20配置值无效,支持的值:\x20zh,\x20en,\x20zh-CN,\x20en-US','拉取并生成\x20API\x20配置文件','请选择要配置的\x20IDE:','安装技能包','\x0a没有有效的\x20IDE\x20需要安装\x0a','*\x20正在为项目\x20{{name}}\x20创建配置文件','项目名称:\x20','登录成功,请返回命令行继续操作。当前窗口将在\x20{{seconds}}\x20秒内关闭。','正在启动开发服务器...','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','🚀\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20{{env}})','\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20{{error}}','8167446eqFGsj','1256355uemSaE','复制\x20agents.md\x20文件失败','×\x20--datasetcode\x20参数不能为空','启动项目:','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','\x0a✓\x20MCP\x20配置完成\x20({{successCount}}/{{totalCount}}\x20成功)','\x20Step2:\x20','正在预览项目...','2BeOfsv','示例:','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20doc\x20--appcode\x20<app-code>','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20pull\x20--appcode\x20<app-code>','\x20\x20\x20当前版本:\x20{{package}}@{{version}}','*\x20从\x20{{total}}\x20个数据集中筛选出\x20{{count}}\x20个匹配的数据集','1.\x20配置\x20Lovrabet\x20MCP\x20和\x20Skill','📍\x20登录地址:','正在创建页面,请稍候…','配置示例:','创建\x20agents.md\x20文件','\x20\x20直接安装指定\x20IDE\x20(支持多个)\x20\x20\x20\x20\x20\x20\x20-\x20使用\x20--ide\x20标志直接安装','未找到任何数据集','清空日志','用法:','\x0a可用命令:','指定应用代码','已输入的页面路由\x20','*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...','*\x20待更新的菜单&资源链接','\x20\x20环境:\x20{{env}}','[N]\x20跳过,稍后手动配置','!\x20未检测到有效登录','配置指引已显示','*\x20创建新项目','\x20\x20\x20稳定版本:\x20{{version}}','输入项目的\x20CSS\x20资源链接(https://...)','应用AppCode','无法在当前目录创建项目,请检查目录权限','已选择页面模板\x20','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20q:\x20退出\x20Enter:\x20确认','*\x20正在为项目\x20{{name}}\x20配置应用AppCode:\x20{{appCode}}','项目名包含非法字符,不允许使用:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20及控制字符','JS\x20链接:\x20','获取菜单列表失败,HTTP状态码:\x20{{status}}','等待\x203\x20秒...\x0a','正在配置\x20MCP\x20服务器...','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','登录状态','依赖安装失败:\x20{{error}}','✗\x20配置失败','*\x20请选择要同步的菜单:','现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了','已选择菜单','\x20\x20•\x20Skill:','🔐\x20正在启动登录服务...'];a58_0x435c=function(){return _0xebbeae;};return a58_0x435c();}function a58_0x221b(_0x25e15c,_0x17f65){_0x25e15c=_0x25e15c-0x1f2;var _0x435cdb=a58_0x435c();var _0x221b27=_0x435cdb[_0x25e15c];return _0x221b27;}var a58_0x5b6f0b=a58_0x221b;(function(_0x42c138,_0x4edb9b){var _0x536ab6=a58_0x221b,_0x26f7ab=_0x42c138();while(!![]){try{var _0x4c1879=-parseInt(_0x536ab6(0x2a4))/0x1*(parseInt(_0x536ab6(0x229))/0x2)+parseInt(_0x536ab6(0x221))/0x3+parseInt(_0x536ab6(0x320))/0x4+parseInt(_0x536ab6(0x2b8))/0x5+parseInt(_0x536ab6(0x220))/0x6+parseInt(_0x536ab6(0x319))/0x7+-parseInt(_0x536ab6(0x2c7))/0x8*(parseInt(_0x536ab6(0x35f))/0x9);if(_0x4c1879===_0x4edb9b)break;else _0x26f7ab['push'](_0x26f7ab['shift']());}catch(_0xe237d5){_0x26f7ab['push'](_0x26f7ab['shift']());}}}(a58_0x435c,0xe1b73));export default{'common':{'success':'成功','error':'错误','warning':'警告','info':'信息','loading':'加载中...','cancel':'取消','confirm':'确认','next':a58_0x5b6f0b(0x299),'previous':a58_0x5b6f0b(0x2b9),'finish':'完成'},'help':{'invalidCommand':a58_0x5b6f0b(0x2d1),'usageHint':'使用','viewCommands':'查看可用命令。'},'cli':{'usage':'使用','examples':'示例','description':'描述'},'init':{'inputAppCode':a58_0x5b6f0b(0x2c4),'appCodeDesc':a58_0x5b6f0b(0x24e),'fileExists':a58_0x5b6f0b(0x31f),'creating':a58_0x5b6f0b(0x2ae),'success':a58_0x5b6f0b(0x2ce),'appCodeLabel':a58_0x5b6f0b(0x29a),'nextSteps':a58_0x5b6f0b(0x254),'validation':{'required':a58_0x5b6f0b(0x340),'tooLong':a58_0x5b6f0b(0x290),'invalidFormat':a58_0x5b6f0b(0x2b3),'invalidCode':'应用代码不合法'}},'create':{'projectNameLabel':a58_0x5b6f0b(0x335),'appCodeLabel':a58_0x5b6f0b(0x244),'validation':{'required':'项目名不能为空','invalidChars':a58_0x5b6f0b(0x249),'tooLong':'项目名过长,最多支持\x20100\x20个字符','dirExists':'项目目录\x20{{name}}\x20已存在,请使用其他项目名','noPermission':a58_0x5b6f0b(0x245),'projectName':{'tooLong':a58_0x5b6f0b(0x211),'invalidFormat':a58_0x5b6f0b(0x330),'invalid':a58_0x5b6f0b(0x31b),'dirExistsShort':a58_0x5b6f0b(0x2a8)},'appCode':{'tooLong':a58_0x5b6f0b(0x2ba),'invalidFormat':a58_0x5b6f0b(0x31e),'invalid':'应用AppCode不合法'},'ide':{'required':a58_0x5b6f0b(0x28d)}},'common':{'yes':'是','no':'否','selectHint':'\x20\x20使用\x20←→\x20选择,回车确认'},'steps':{'pullingApi':a58_0x5b6f0b(0x264),'apiPullSuccess':a58_0x5b6f0b(0x2c8),'apiPullFailed':'!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','apiPullError':a58_0x5b6f0b(0x31a),'updatingPackage':a58_0x5b6f0b(0x302),'packageUpdated':a58_0x5b6f0b(0x348),'configuringAppCode':'*\x20正在为项目\x20{{name}}\x20配置应用AppCode:\x20{{appCode}}','creatingConfig':a58_0x5b6f0b(0x219),'configCreatedWithAppCode':a58_0x5b6f0b(0x2a5),'configCreated':'√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20appcode\x20<app-code>\x27\x20配置','configuringMcp':a58_0x5b6f0b(0x23b),'mcpConfigComplete':'√\x20Lovrabet\x20MCP\x20和\x20Skill\x20配置完成','cleaningUp':a58_0x5b6f0b(0x1fb),'projectName':{'label':a58_0x5b6f0b(0x274)},'appCode':{'label':a58_0x5b6f0b(0x244),'notSet':a58_0x5b6f0b(0x2c1)},'apiPull':{'label':a58_0x5b6f0b(0x2bd)},'lovrabetSetup':{'label':a58_0x5b6f0b(0x294),'ideCount':'{{count}}\x20个\x20IDE'},'login':{'label':a58_0x5b6f0b(0x250),'loggedIn':a58_0x5b6f0b(0x2af),'failed':'登录失败','skipped':a58_0x5b6f0b(0x2fa)}},'title':a58_0x5b6f0b(0x241),'completedStep':a58_0x5b6f0b(0x2c9),'input':{'projectName':{'label':a58_0x5b6f0b(0x29e),'hint':'\x20直接回车确认,或输入自定义名称'},'appCode':{'label':a58_0x5b6f0b(0x30b),'optional':a58_0x5b6f0b(0x2cc),'hint':a58_0x5b6f0b(0x293)}},'login':{'checking':a58_0x5b6f0b(0x30e),'checkingStatus':'\x20检查中...','valid':a58_0x5b6f0b(0x349),'notDetected':a58_0x5b6f0b(0x23f),'prompt':a58_0x5b6f0b(0x28b),'inProgress':a58_0x5b6f0b(0x213),'inProgressStatus':a58_0x5b6f0b(0x288)},'apiPull':{'confirm':'*\x20是否要自动拉取\x20API\x20配置?','recommendation':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'},'lovrabetSetup':{'confirm':'*\x20是否配置\x20Lovrabet\x20MCP\x20和\x20Skill?','selectIdeHint':a58_0x5b6f0b(0x277),'selectIdeTitle':a58_0x5b6f0b(0x2b5),'keyboardShortcuts':a58_0x5b6f0b(0x25b),'inProgress':'*\x20正在配置\x20Lovrabet\x20MCP\x20和\x20Skill...','mcpCompleted':'✓\x20MCP\x20服务器配置完成:','skillCompleted':'✓\x20Skill\x20安装完成:'},'creating':a58_0x5b6f0b(0x280),'display':{'projectName':a58_0x5b6f0b(0x21a),'appCode':a58_0x5b6f0b(0x351)},'packageJson':{'updating':a58_0x5b6f0b(0x302),'updated':a58_0x5b6f0b(0x348)},'config':{'configuringAppCode':a58_0x5b6f0b(0x248),'creating':a58_0x5b6f0b(0x219),'createdWithAppCode':a58_0x5b6f0b(0x2a5),'createdWithoutAppCode':a58_0x5b6f0b(0x24f)},'cleanup':{'inProgress':a58_0x5b6f0b(0x1fb)},'results':{'mcpComplete':a58_0x5b6f0b(0x33a),'skillComplete':a58_0x5b6f0b(0x33b),'nextSteps':'🚀\x20接下来:'},'nextSteps':{'configureMcpAndSkill':a58_0x5b6f0b(0x22f),'skill':a58_0x5b6f0b(0x256),'mcp':a58_0x5b6f0b(0x314),'startProject':a58_0x5b6f0b(0x224),'pullApi':a58_0x5b6f0b(0x26b),'configAppCode':'配置AppCode:'},'errors':{'createFailed':a58_0x5b6f0b(0x333),'cleanupFailed':a58_0x5b6f0b(0x200),'depsInstallFailed':a58_0x5b6f0b(0x251)},'nonInteractive':{'creating':a58_0x5b6f0b(0x27a),'templateCreated':a58_0x5b6f0b(0x206),'packageJsonUpdated':a58_0x5b6f0b(0x1f6),'installingDeps':a58_0x5b6f0b(0x322),'depsSkipped':a58_0x5b6f0b(0x2b2),'codeFormatted':'\x20\x20√\x20代码已格式化','envConfigured':'\x20\x20√\x20环境配置完成','success':'\x0a√\x20项目\x20{{name}}\x20创建成功!'},'tasks':{'copyFiles':a58_0x5b6f0b(0x285),'formatCode':a58_0x5b6f0b(0x259),'installDependencies':a58_0x5b6f0b(0x261)},'nextStepsAlt':{'startProject':a58_0x5b6f0b(0x2fe),'pullApi':a58_0x5b6f0b(0x326),'configureLovrabet':a58_0x5b6f0b(0x22f)}},'addPage':{'title':'添加页面','pagePath':a58_0x5b6f0b(0x2de),'pageName':'页面名称','validation':{'path':{'tooLong':a58_0x5b6f0b(0x25d),'invalidStartEnd':a58_0x5b6f0b(0x2ec),'doubleSlash':a58_0x5b6f0b(0x35c),'invalidSegment':a58_0x5b6f0b(0x2fd),'exists':'页面路径\x20{{path}}\x20已存在,请使用其他路径','invalid':a58_0x5b6f0b(0x296)}},'steps':{'step1':a58_0x5b6f0b(0x278),'step2':a58_0x5b6f0b(0x227)},'input':{'route':{'label':'页面路由地址:\x20','hint':a58_0x5b6f0b(0x354)}},'display':{'templateSelected':a58_0x5b6f0b(0x246),'routeEntered':a58_0x5b6f0b(0x23a),'path':a58_0x5b6f0b(0x35d),'route':a58_0x5b6f0b(0x316)},'creating':a58_0x5b6f0b(0x231),'success':'\x20*\x20页面创建成功!','successHint':a58_0x5b6f0b(0x26e),'loading':{'templates':a58_0x5b6f0b(0x30c)},'select':{'template':{'title':a58_0x5b6f0b(0x34e)}},'error':{'templateListFailed':a58_0x5b6f0b(0x32a)}},'config':{'title':'项目配置','help':{'invalidCommand':a58_0x5b6f0b(0x2d3),'examples':a58_0x5b6f0b(0x232),'set':a58_0x5b6f0b(0x2ea),'get':a58_0x5b6f0b(0x28c),'list':a58_0x5b6f0b(0x2dc),'exampleApp':'配置当前项目的\x20App\x20Code','exampleEnv':a58_0x5b6f0b(0x262),'exampleLocale':a58_0x5b6f0b(0x210)},'validation':{'envInvalid':'环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','localeInvalid':a58_0x5b6f0b(0x214),'valueInvalid':a58_0x5b6f0b(0x203),'noValue':a58_0x5b6f0b(0x292),'saveFailed':a58_0x5b6f0b(0x2f4)},'success':{'envSet':a58_0x5b6f0b(0x2c6),'localeSet':'✓\x20{{scope}}语言配置已设置为:\x20{{value}}'},'scope':{'project':'项目','global':'全局'}},'api':{'title':'API\x20管理','pull':'拉取\x20API','doc':'生成文档','help':{'title':a58_0x5b6f0b(0x1f4),'usage':a58_0x5b6f0b(0x237),'options':a58_0x5b6f0b(0x34a),'optAppcode':a58_0x5b6f0b(0x239),'optOutput':a58_0x5b6f0b(0x308),'optEnv':a58_0x5b6f0b(0x345),'optDatasetcode':a58_0x5b6f0b(0x338),'optHelp':a58_0x5b6f0b(0x2ef),'examples':a58_0x5b6f0b(0x22a),'pullDesc':a58_0x5b6f0b(0x215),'pullAppcode':a58_0x5b6f0b(0x301),'pullOutput':a58_0x5b6f0b(0x2a6),'pullEnv':'指定环境拉取\x20API','docDesc':'生成所有数据集的文档','docAppcode':a58_0x5b6f0b(0x301),'docOutput':'指定文档输出目录','docEnv':a58_0x5b6f0b(0x2a9),'docDataset':a58_0x5b6f0b(0x2f0),'docDatasets':a58_0x5b6f0b(0x205),'unknownCommand':'未知的\x20api\x20命令','availableCommands':a58_0x5b6f0b(0x32d)},'common':{'noPositionalArgs':'❌\x20错误:不再支持位置参数方式','useAppcodeFlag':a58_0x5b6f0b(0x2c2),'noAppCode':a58_0x5b6f0b(0x305),'noAppCodeHint':a58_0x5b6f0b(0x306),'noAppCodeOption1':a58_0x5b6f0b(0x275),'noAppCodeOption2Pull':a58_0x5b6f0b(0x22c),'noAppCodeOption2Doc':a58_0x5b6f0b(0x22b),'usingConfigAppCode':a58_0x5b6f0b(0x2d0),'usingConfigAppCodeHint':a58_0x5b6f0b(0x2bf),'usingSpecifiedAppCode':a58_0x5b6f0b(0x317),'usingDefaultAppCode':'使用配置的应用AppCode:\x20{{appCode}}','noAppCodeDefault':a58_0x5b6f0b(0x2d4),'paramsInvalidJson':a58_0x5b6f0b(0x33e),'paramsNotJson':a58_0x5b6f0b(0x2cb),'paramsError':a58_0x5b6f0b(0x208),'datasetcodeEmpty':a58_0x5b6f0b(0x223),'onlyGenerateDatasets':a58_0x5b6f0b(0x28e),'authExpired':a58_0x5b6f0b(0x225),'authRetry':'重新登录后再试','unknownError':a58_0x5b6f0b(0x2e9)},'pullUI':{'fetching':a58_0x5b6f0b(0x21e),'successPull':a58_0x5b6f0b(0x202),'duplicateInfo':'!\x20原始数据集\x20{{originalCount}}\x20个,过滤重复\x20{{duplicateCount}}\x20个','generatedFiles':'*\x20已生成文件:','modelFile':'-\x20模型配置文件\x20({{count}}\x20个模型)','clientFile':a58_0x5b6f0b(0x35e),'importHint':'*\x20导入方式:','pullFailed':'拉取\x20API\x20配置失败:\x20{{error}}'},'docUI':{'fetchingDatasets':a58_0x5b6f0b(0x281),'noDatasets':a58_0x5b6f0b(0x235),'datasetsNotFound':a58_0x5b6f0b(0x2ca),'allDatasetsNotFound':'指定的数据集代码都不存在:\x20{{codes}}','filteredDatasets':a58_0x5b6f0b(0x22e),'generatingDocs':a58_0x5b6f0b(0x313),'generatingFile':a58_0x5b6f0b(0x2da),'docComplete':a58_0x5b6f0b(0x2f2),'docFailed':',\x20失败\x20{{failCount}}\x20个','processedDatasets':a58_0x5b6f0b(0x355),'outputDir':a58_0x5b6f0b(0x350),'generatedDocs':a58_0x5b6f0b(0x2ac),'failedDatasets':a58_0x5b6f0b(0x1fa),'docGenerateFailed':a58_0x5b6f0b(0x283)},'fetchModel':{'fetching':a58_0x5b6f0b(0x341),'httpError':a58_0x5b6f0b(0x2bc),'fetchError':'获取数据集失败:\x20{{error}}'},'generateFile':{'noAppCode':'请先通过\x20`lovrabet\x20config\x20set\x20app\x20<value>`\x20配置应用\x20Code'},'docBatch':{'totalDatasets':'\x0a共有\x20{{count}}\x20个数据集需要生成文档\x0a','generating':a58_0x5b6f0b(0x2d5),'success':a58_0x5b6f0b(0x1ff),'failed':'✗\x20失败:\x20{{fileName}}.md\x20-\x20{{error}}','waiting':a58_0x5b6f0b(0x24c),'docFormatError':a58_0x5b6f0b(0x337),'httpError':a58_0x5b6f0b(0x2f3)},'silent':{'invalidPrefix':a58_0x5b6f0b(0x286),'fetching':a58_0x5b6f0b(0x1f5),'generating':'*\x20开始生成\x20API\x20配置文件:','modelFileName':a58_0x5b6f0b(0x318),'clientFileName':'\x20\x20\x20•\x20{{name}}.ts\x20-\x20客户端实例文件','processing':a58_0x5b6f0b(0x35a),'success':a58_0x5b6f0b(0x202),'error':'×\x20API\x20配置拉取异常:\x20{{error}}'}},'auth':{'title':a58_0x5b6f0b(0x2d8),'login':{'success':{'title':a58_0x5b6f0b(0x291),'message':a58_0x5b6f0b(0x21b),'manualClose':a58_0x5b6f0b(0x2c3)},'successCli':'登录成功!','inProgress':'正在登录...','browserPrompt':'请前往浏览器完成登录。','pressEnter':'*\x20按回车开始登录。','pressQToExit':'按\x20“q”\x20退出。'},'session':{'valid':a58_0x5b6f0b(0x2c5)},'server':{'starting':a58_0x5b6f0b(0x257),'loginUrl':a58_0x5b6f0b(0x230),'openingBrowser':a58_0x5b6f0b(0x267),'manualOpenHint':a58_0x5b6f0b(0x20b),'browserOpened':'✅\x20浏览器已自动打开,请在浏览器中完成登录','browserOpenFailed':'⚠️\x20\x20无法自动打开浏览器','manualCopyUrl':a58_0x5b6f0b(0x2be)},'logout':{'success':a58_0x5b6f0b(0x268),'notLoggedIn':a58_0x5b6f0b(0x2f5)}},'menu':{'sync':a58_0x5b6f0b(0x2ff),'update':'更新菜单\x20CDN\x20资源'},'mcp':{'cursor':'Cursor','claude':a58_0x5b6f0b(0x2df),'error':{'unsupportedCommand':a58_0x5b6f0b(0x25f),'missingAppcode':a58_0x5b6f0b(0x2a3)},'help':{'title':a58_0x5b6f0b(0x34d),'availableCommands':'\x0a可用命令:','command':{'install':'\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并配置\x20MCP','help':a58_0x5b6f0b(0x295)},'usage':{'help':a58_0x5b6f0b(0x1f2),'install':a58_0x5b6f0b(0x331),'installCursor':a58_0x5b6f0b(0x2e6),'installClaude':a58_0x5b6f0b(0x34f)},'configMethods':'配置方式:','configMethodsInteractive':a58_0x5b6f0b(0x35b),'configMethodsInteractiveHint':a58_0x5b6f0b(0x2cd),'configMethodsDirect':'\x20\x20直接配置指定\x20IDE\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20使用\x20--ide\x20标志直接配置','configMethodsDirectCursor':a58_0x5b6f0b(0x2d2),'configMethodsDirectClaude':a58_0x5b6f0b(0x34c),'supportedIDEs':a58_0x5b6f0b(0x271),'examples':'示例:','exampleInstall':a58_0x5b6f0b(0x360),'exampleInstallHint':a58_0x5b6f0b(0x276),'exampleInstallCursor':'\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor','exampleInstallCursorHint':a58_0x5b6f0b(0x2f9),'configGuide':a58_0x5b6f0b(0x282)},'select':{'chooseIDE':a58_0x5b6f0b(0x32b),'cancel':a58_0x5b6f0b(0x272),'enterNumber':a58_0x5b6f0b(0x265),'prompt':a58_0x5b6f0b(0x279),'cancelled':a58_0x5b6f0b(0x289),'invalidChoice':'\x0a无效的选择,请输入\x201-{{count}}\x20之间的数字\x0a'},'installFlow':{'configuring':a58_0x5b6f0b(0x346),'error':'\x0a错误:\x20配置失败\x20-\x20{{error}}\x0a'},'cursorConfig':{'success':'\x0a✓\x20Cursor\x20MCP\x20配置成功!\x0a','configInfo':a58_0x5b6f0b(0x25c),'usageHint':a58_0x5b6f0b(0x269),'restartRequired':a58_0x5b6f0b(0x273),'error':'\x0a错误:\x20配置失败\x20-\x20{{error}}\x0a','rules':{'exists':'Cursor\x20Rules\x20文件已存在,跳过','created':a58_0x5b6f0b(0x30f),'copyFailed':a58_0x5b6f0b(0x27e)},'updateExisting':a58_0x5b6f0b(0x2e8),'createNew':'创建新的\x20mcp.json\x20配置','written':a58_0x5b6f0b(0x1f7)},'claudeConfig':{'error':a58_0x5b6f0b(0x310),'agents':{'exists':'agents.md\x20文件已存在,跳过','created':a58_0x5b6f0b(0x233),'copyFailed':a58_0x5b6f0b(0x222)},'manualCommand':a58_0x5b6f0b(0x329),'configInfo':a58_0x5b6f0b(0x25c),'restartRequired':a58_0x5b6f0b(0x2ab),'commandGenerated':'生成配置命令'},'other':{'configInfo':a58_0x5b6f0b(0x2b4),'configGuide':'详细配置指南:\x20https://help.yuntoo.com/mcp/config-guide','guideShown':a58_0x5b6f0b(0x20f)},'config':{'env':a58_0x5b6f0b(0x1fc)},'install':{'starting':a58_0x5b6f0b(0x2db),'unknownIDE':a58_0x5b6f0b(0x343),'otherIDE':a58_0x5b6f0b(0x25e),'success':a58_0x5b6f0b(0x27d),'failed':a58_0x5b6f0b(0x300),'completed':a58_0x5b6f0b(0x226),'manualActionRequired':a58_0x5b6f0b(0x334)},'ui':{'otherIDE':a58_0x5b6f0b(0x25e),'otherIDEDescription':a58_0x5b6f0b(0x2f7),'selectAtLeastOne':a58_0x5b6f0b(0x28d),'selectedIDE':'已选择\x20IDE','count':a58_0x5b6f0b(0x26f),'title':a58_0x5b6f0b(0x2f8),'configuring':a58_0x5b6f0b(0x24d),'completed':a58_0x5b6f0b(0x358),'partialManual':a58_0x5b6f0b(0x29c),'failed':a58_0x5b6f0b(0x252),'manualRequired':'⚠️\x20配置需要手动完成','pressAnyKeyToExit':'按任意键退出...','unsupportedIDE':a58_0x5b6f0b(0x31c)}},'aiSetup':{'error':{'missingAppcode':a58_0x5b6f0b(0x284)},'mcp':{'cursor':{'success':a58_0x5b6f0b(0x332),'written':a58_0x5b6f0b(0x1f7),'error':a58_0x5b6f0b(0x27f),'rules':{'created':a58_0x5b6f0b(0x30f),'copyFailed':a58_0x5b6f0b(0x27e)}},'claude':{'commandGenerated':'Claude\x20Code\x20MCP\x20命令已生成','manualCommand':'\x0a📋\x20请执行以下命令配置\x20Claude\x20Code\x20MCP:\x0a','configInfo':a58_0x5b6f0b(0x25c),'env':a58_0x5b6f0b(0x23d),'restartRequired':a58_0x5b6f0b(0x1f3),'manualExecute':a58_0x5b6f0b(0x212),'agents':{'created':'创建\x20agents.md\x20文件','copyFailed':a58_0x5b6f0b(0x222)}},'other':{'name':'其他','title':a58_0x5b6f0b(0x287),'guideShown':a58_0x5b6f0b(0x240)},'unsupportedIDE':'不支持的\x20MCP\x20IDE:\x20{{ide}}'},'skill':{'unknownIDE':a58_0x5b6f0b(0x343),'installSuccess':a58_0x5b6f0b(0x25a),'itemsCreated':'已创建\x20{{count}}\x20项','installFailed':a58_0x5b6f0b(0x263),'sharedCopied':'共享技能文件复制成功','sharedCopyFailed':a58_0x5b6f0b(0x312),'manifestCreated':a58_0x5b6f0b(0x311)},'ui':{'selectAtLeastOne':a58_0x5b6f0b(0x336),'confirm':{'title':a58_0x5b6f0b(0x27b),'mcpDescription':a58_0x5b6f0b(0x32c),'skillDescription':'•\x20Skill:\x20安装研发最佳实践、Backend\x20Function\x20规范','yes':'[Y]\x20是,配置\x20AI\x20助手','no':a58_0x5b6f0b(0x23e),'default':a58_0x5b6f0b(0x353)},'select':{'title':'*\x20选择要配置的\x20IDE:','mcpSection':a58_0x5b6f0b(0x32e),'skillSection':'技能包\x20(研发规范指南)','controls':a58_0x5b6f0b(0x30d)},'installing':'正在配置\x20AI\x20助手...'}},'appMenu':{'error':{'missingAppCode':a58_0x5b6f0b(0x2d4),'appCodeHint':{'title':'!\x20请使用以下方式之一:','option1':a58_0x5b6f0b(0x304),'option2':a58_0x5b6f0b(0x21d)},'authExpired':a58_0x5b6f0b(0x225),'authValidationFailed':a58_0x5b6f0b(0x204),'httpStatus':a58_0x5b6f0b(0x24b),'fetchFailed':a58_0x5b6f0b(0x2fb),'createHttpStatus':a58_0x5b6f0b(0x29b),'createFailed':a58_0x5b6f0b(0x1f8)},'info':{'emptyMenuList':'服务端返回空菜单列表'},'success':{'fetched':a58_0x5b6f0b(0x26a),'created':a58_0x5b6f0b(0x207)},'fetching':{'online':'正在获取线上菜单列表...\x20(appCode:\x20{{appCode}})','daily':a58_0x5b6f0b(0x2e0)},'creating':{'single':'正在创建菜单:\x20{{label}}\x20({{path}})','batch':{'start':a58_0x5b6f0b(0x328),'completed':a58_0x5b6f0b(0x26d)}},'sync':{'title':a58_0x5b6f0b(0x1f9),'table':{'menuName':'菜单名称','local':'本地','lovrabetPlatform':'Lovrabet平台'},'error':{'noMenuSelected':a58_0x5b6f0b(0x2a1),'invalidJsUrl':a58_0x5b6f0b(0x2d7),'jsUrlUnreachable':'JS\x20链接无法访问','invalidCssUrl':'请输入有效的\x20CSS\x20https\x20链接','cssUrlUnreachable':a58_0x5b6f0b(0x309),'createMenuFailed':'创建菜单失败','authHint':{'prefix':a58_0x5b6f0b(0x323),'suffix':a58_0x5b6f0b(0x2b0)},'noLocalPages':'!\x20未找到本地页面,请先创建页面'},'step':{'selectedMenus':a58_0x5b6f0b(0x255),'selectedMenusCount':a58_0x5b6f0b(0x26f),'jsUrl':a58_0x5b6f0b(0x1fd),'cssUrl':a58_0x5b6f0b(0x28f),'selectMenus':a58_0x5b6f0b(0x253),'creating':a58_0x5b6f0b(0x20e),'completed':a58_0x5b6f0b(0x2ee)},'operation':{'update':'更新','create':'新建'},'loading':{'fetchingMenuList':a58_0x5b6f0b(0x1fe)},'hotkeys':a58_0x5b6f0b(0x2b1),'input':{'jsUrl':{'label':a58_0x5b6f0b(0x29d),'placeholder':a58_0x5b6f0b(0x33c)},'cssUrl':{'label':a58_0x5b6f0b(0x2ad),'placeholder':a58_0x5b6f0b(0x32f)}}},'updateCdn':{'title':a58_0x5b6f0b(0x2e5),'error':{'invalidJsUrl':a58_0x5b6f0b(0x2d7),'jsUrlUnreachable':a58_0x5b6f0b(0x28a),'invalidCssUrl':a58_0x5b6f0b(0x303),'cssUrlUnreachable':'CSS\x20链接无法访问','authHint':{'prefix':a58_0x5b6f0b(0x323),'suffix':a58_0x5b6f0b(0x2b0)},'noCdnLinks':'!\x20未找到菜单资源链接','updateFailed':a58_0x5b6f0b(0x359)},'loading':{'fetching':a58_0x5b6f0b(0x270),'syncing':'\x20资源正在同步中...'},'action':{'continue':'继续更新','cancel':a58_0x5b6f0b(0x26c)},'success':{'updated':a58_0x5b6f0b(0x34b),'synced':a58_0x5b6f0b(0x2a7)},'updating':a58_0x5b6f0b(0x2a2),'preview':{'title':a58_0x5b6f0b(0x23c),'menuList':a58_0x5b6f0b(0x2c0),'resourceLinks':'待更新的资源链接:'},'input':{'title':a58_0x5b6f0b(0x31d),'jsUrl':{'label':a58_0x5b6f0b(0x24a),'placeholder':a58_0x5b6f0b(0x209)},'cssUrl':{'label':a58_0x5b6f0b(0x2e2),'placeholder':a58_0x5b6f0b(0x243)}}}},'skill':{'install':a58_0x5b6f0b(0x217),'error':{'unsupportedCommand':a58_0x5b6f0b(0x25f),'installFailed':a58_0x5b6f0b(0x2eb),'unknownPlatform':a58_0x5b6f0b(0x2aa),'unknownIDE':'\x20\x20✗\x20未知的\x20IDE:\x20{{ide}}','noValidIDE':a58_0x5b6f0b(0x218),'selectAtLeastOne':'请至少选择一个\x20IDE'},'errorHint':{'availableCommands':a58_0x5b6f0b(0x238),'installInteractive':a58_0x5b6f0b(0x266),'installDirect':a58_0x5b6f0b(0x324),'showHelp':a58_0x5b6f0b(0x321),'usageExamples':a58_0x5b6f0b(0x2e7),'exampleInteractive':a58_0x5b6f0b(0x2f6),'exampleDirect':'\x20\x20lovrabet\x20skill\x20install\x20cursor\x20\x20\x20\x20#\x20直接安装\x20Cursor\x20技能包\x0a'},'select':{'title':'\x0a请选择要安装技能包的\x20IDE\x20(可多选):\x0a','installAll':a58_0x5b6f0b(0x344),'cancel':'取消','inputFormat':'输入格式:\x20输入编号,用空格分隔\x20(例如:\x201\x203\x205)','inputHint':a58_0x5b6f0b(0x20d),'prompt':'请选择:\x20','cancelled':a58_0x5b6f0b(0x327),'noneSelected':'\x0a未选择任何\x20IDE,安装取消\x0a','selectedIDE':'已选择\x20IDE','count':a58_0x5b6f0b(0x26f)},'cdn':{'fetching':a58_0x5b6f0b(0x258),'fetchingExtend':a58_0x5b6f0b(0x2e4),'fetchSuccess':a58_0x5b6f0b(0x27c),'fetchFailed':a58_0x5b6f0b(0x21f)},'installing':{'title':a58_0x5b6f0b(0x307),'progress':a58_0x5b6f0b(0x297),'ide':a58_0x5b6f0b(0x20c),'installed':'已安装\x20{{count}}\x20个目录','created':a58_0x5b6f0b(0x201),'createdDir':a58_0x5b6f0b(0x325),'createdManifest':'✓\x20创建\x20.lovrabet/skill-manifest.json'},'done':{'success':a58_0x5b6f0b(0x2f1),'successInline':a58_0x5b6f0b(0x298),'guidesLocation':a58_0x5b6f0b(0x33d),'guidesPath':a58_0x5b6f0b(0x29f),'guidesPathInline':'开发者指南位置:\x20.lovrabet/skill/.shared/guides/','pressAnyKey':'按任意键退出...'},'generic':'通用模板','help':{'title':'Lovrabet\x20Skill\x20-\x20开发者技能包安装工具','usage':a58_0x5b6f0b(0x2cf),'showHelp':a58_0x5b6f0b(0x2a0),'installInteractive':a58_0x5b6f0b(0x260),'installDirect':a58_0x5b6f0b(0x357),'installAll':a58_0x5b6f0b(0x2dd),'installWithBff':a58_0x5b6f0b(0x2b6),'installMethods':'安装方式:','interactiveSelect':'\x20\x20交互式选择\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20显示\x20IDE\x20列表供选择,支持多选','interactiveKeys':a58_0x5b6f0b(0x2e1),'directInstall':a58_0x5b6f0b(0x234),'bffWorkflow':'\x20\x20包含\x20Backend\x20Function\x20同步工作流\x20\x20\x20-\x20使用\x20--dangerously-bff-save\x20标志','supportedIDEs':'支持的\x20IDE:','agentDesc':'其他\x20(通用模板)\x20(.agent/skills/)\x20-\x20兜底方案','allDesc':a58_0x5b6f0b(0x2e3),'options':a58_0x5b6f0b(0x2d9),'bffOption':a58_0x5b6f0b(0x2d6),'skillContents':a58_0x5b6f0b(0x20a),'skillContentsList':a58_0x5b6f0b(0x2b7),'examples':a58_0x5b6f0b(0x352),'exampleInteractive':a58_0x5b6f0b(0x276),'exampleDirectDesc':'\x20\x20\x20\x20→\x20直接安装\x20Cursor\x20和\x20claude\x20code\x20技能包','exampleBffDesc':a58_0x5b6f0b(0x315),'exampleAllDesc':'\x20\x20\x20\x20→\x20安装所有\x20IDE\x20技能包','afterInstall':'安装后会在项目中创建:','afterInstallList':'\x20\x20-\x20IDE\x20特定配置文件\x20(.cursorrules,\x20.windsurf/,\x20.claude/,\x20.cline/,\x20.codex/,\x20.opencode/,\x20.qoder/,\x20.codebuddy/,\x20.trae/)\x0a\x20\x20-\x20.lovrabet/skill/.shared/guides/\x20\x20-\x20开发者技能指南','guidesLocationTitle':'开发者指南位置:'}},'logs':{'title':'日志','view':'查看日志','clear':a58_0x5b6f0b(0x236),'noLogs':a58_0x5b6f0b(0x356),'header':'*\x20Lovrabet\x20CLI\x20日志记录:\x0a','time':a58_0x5b6f0b(0x342),'duration':a58_0x5b6f0b(0x2bb),'details':a58_0x5b6f0b(0x33f),'cleared':a58_0x5b6f0b(0x30a)},'start':{'starting':a58_0x5b6f0b(0x21c)},'build':{'building':a58_0x5b6f0b(0x347)},'preview':{'previewing':a58_0x5b6f0b(0x228),'watchMode':'监听模式'},'ui':{'ideSelector':{'title':a58_0x5b6f0b(0x216),'hotkeys':a58_0x5b6f0b(0x247)}},'upgrade':{'cli':{'title':'↪\x20新版本可用','current':a58_0x5b6f0b(0x2ed),'stable':a58_0x5b6f0b(0x242),'command':a58_0x5b6f0b(0x2fc)},'sdk':{'title':a58_0x5b6f0b(0x339),'current':a58_0x5b6f0b(0x22d),'stable':a58_0x5b6f0b(0x242),'command':a58_0x5b6f0b(0x2fc)}}};
package/lib/init/main.js CHANGED
@@ -1 +1 @@
1
- function a54_0x2b13(_0xd47a83,_0x3bf15f){_0xd47a83=_0xd47a83-0xcf;const _0x2bd2fc=a54_0x2bd2();let _0x2b1370=_0x2bd2fc[_0xd47a83];return _0x2b1370;}(function(_0x5fa100,_0x30b7cc){const _0x1253c4=a54_0x2b13,_0x5d3cae=_0x5fa100();while(!![]){try{const _0x5901b3=parseInt(_0x1253c4(0xcf))/0x1*(-parseInt(_0x1253c4(0xdd))/0x2)+parseInt(_0x1253c4(0xe6))/0x3*(parseInt(_0x1253c4(0xde))/0x4)+-parseInt(_0x1253c4(0xf6))/0x5+parseInt(_0x1253c4(0xdb))/0x6+parseInt(_0x1253c4(0xe4))/0x7+-parseInt(_0x1253c4(0xeb))/0x8+parseInt(_0x1253c4(0xfa))/0x9;if(_0x5901b3===_0x30b7cc)break;else _0x5d3cae['push'](_0x5d3cae['shift']());}catch(_0x567563){_0x5d3cae['push'](_0x5d3cae['shift']());}}}(a54_0x2bd2,0x9c538));import{jsxs as a54_0x4a3373,jsx as a54_0x5f43cb}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';function a54_0x2bd2(){const _0x4e1802=['5171296KuQCXx','version','column','应用代码不合法','error','当前目录已存在\x20.lovrabetrc\x20文件','green','AppCode:\x20','parse','创建配置文件失败','cyan','2672340bWHeuE','test','online','slice','10229184zqAdis','应用代码不能为空','red','utf8','\x20←\x20','toLocaleString','1dabOgx','message','.lovrabetrc','setLogPath','trim','init','backspace','delete','gray','创建配置文件失败:\x20','1.0.0','stringify','4465464FwCaZm','请输入应用代码\x20(AppCode):\x20','1802028vOPqow','4BXFXDg','应用代码只能包含字母、数字、-\x20和\x20_','cwd','应用代码用于标识您的项目,只能包含字母、数字、-\x20和\x20_','env','return','3806824uSnoUt','应用代码长度不能超过\x20100\x20个字符','892662FVqUNN','exit','length','package.json','info'];a54_0x2bd2=function(){return _0x4e1802;};return a54_0x2bd2();}export function Init({appcode:_0x2f42ce,env:_0x36af32}){const _0x537f1f=a54_0x2b13,[_0x14e036,_0xbb154a]=useState(null),[_0x4b2a8b,_0x1f06d1]=useState(![]),[_0x1cb47f,_0x2dab61]=useState(!_0x2f42ce),[_0x137ae6,_0x1ee4b2]=useState(''),[_0x46710f,_0x1260a1]=useState(''),[_0x4eefea,_0x2f9260]=useState(_0x2f42ce||''),[_0x4e25c0]=useState(_0x36af32);function _0x5997a8(_0x7c9d8){const _0x3d539d=a54_0x2b13;if(_0x7c9d8['length']===0x0)return{'valid':![],'message':''};if(_0x7c9d8[_0x3d539d(0xe8)]>0x64)return{'valid':![],'message':_0x3d539d(0xe5)};const _0x521fc2=/^[A-Za-z0-9_-]+$/;if(!_0x521fc2[_0x3d539d(0xf7)](_0x7c9d8))return{'valid':![],'message':_0x3d539d(0xdf)};return{'valid':!![]};}useInput((_0x4962aa,_0x4e7a15)=>{const _0x5e6049=a54_0x2b13;if(!_0x1cb47f)return;if(_0x4e7a15[_0x5e6049(0xe3)]){if(_0x46710f||!_0x137ae6[_0x5e6049(0xd3)]()){_0x1260a1(_0x5e6049(0xfb));return;}const _0x316c55=_0x137ae6[_0x5e6049(0xd3)](),{valid:_0x51e37a,message:_0x3e0e8a}=_0x5997a8(_0x316c55);if(!_0x51e37a){_0x1260a1(_0x3e0e8a||_0x5e6049(0xee));return;}_0x2f9260(_0x316c55),_0x2dab61(![]);}else{if(_0x4e7a15[_0x5e6049(0xd5)]||_0x4e7a15[_0x5e6049(0xd6)])_0x1ee4b2(_0x187f97=>{const _0x2a6592=_0x5e6049,_0x333449=_0x187f97[_0x2a6592(0xf9)](0x0,-0x1);if(_0x333449[_0x2a6592(0xe8)]===0x0)_0x1260a1('');else{const {valid:_0xb94431,message:_0x474d2a}=_0x5997a8(_0x333449);_0x1260a1(_0xb94431?'':_0x474d2a||_0x2a6592(0xee));}return _0x333449;});else _0x4e7a15['ctrl']&&_0x4962aa==='c'?process[_0x5e6049(0xe7)](0x0):_0x1ee4b2(_0x2fbca9=>{const _0x3624d8=_0x5e6049,_0x26e01c=_0x2fbca9+_0x4962aa,{valid:_0x14934d,message:_0x6e2307}=_0x5997a8(_0x26e01c);return _0x1260a1(_0x14934d?'':_0x6e2307||_0x3624d8(0xee)),_0x26e01c;});}},{'isActive':_0x1cb47f}),useEffect(()=>{const _0x2e5387=a54_0x2b13;if(!_0x4eefea||_0x1cb47f)return;const _0xa145d2=resolve(process[_0x2e5387(0xe0)](),_0x2e5387(0xd1));if(existsSync(_0xa145d2)){_0xbb154a(_0x2e5387(0xf0)),setTimeout(()=>process[_0x2e5387(0xe7)](0x1),0x64);return;}try{const _0x21a14f=fileURLToPath(import.meta.url),_0x90fba2=resolve(dirname(_0x21a14f),'../..'),_0x3b7f91=join(_0x90fba2,_0x2e5387(0xe9));let _0x37a4b8=_0x2e5387(0xd9);try{const _0x214ea1=JSON[_0x2e5387(0xf3)](readFileSync(_0x3b7f91,_0x2e5387(0xfd)));_0x37a4b8=_0x214ea1['version']||'1.0.0';}catch(_0x3ee0c2){}const _0x18eb8e=readConfig(),_0x581aff=typeof _0x18eb8e['env']==='string'?_0x18eb8e[_0x2e5387(0xe2)]:undefined,{app:_0x4aecde,appcode:_0x2ffbbd,..._0x37f06b}=_0x18eb8e,_0x3b75e1={..._0x37f06b,'appcode':_0x4eefea,'env':_0x4e25c0||_0x581aff||_0x2e5387(0xf8),'createdAt':new Date()[_0x2e5387(0xff)](),'version':_0x37a4b8};writeFileSync(_0xa145d2,JSON[_0x2e5387(0xda)](_0x3b75e1,null,0x2),{'encoding':_0x2e5387(0xfd),'mode':0x180}),logger[_0x2e5387(0xd2)](process[_0x2e5387(0xe0)]()),logger[_0x2e5387(0xea)](_0x2e5387(0xd4),'初始化项目配置文件成功',{'appcode':_0x4eefea,'env':_0x3b75e1[_0x2e5387(0xe2)],'version':_0x3b75e1[_0x2e5387(0xec)],'configPath':_0xa145d2}),_0x1f06d1(!![]),setTimeout(()=>process[_0x2e5387(0xe7)](0x0),0x64);}catch(_0x501e50){logger[_0x2e5387(0xef)](_0x2e5387(0xd4),_0x2e5387(0xf4),{'error':_0x501e50 instanceof Error?_0x501e50[_0x2e5387(0xd0)]:String(_0x501e50)}),_0xbb154a(_0x2e5387(0xd8)+(_0x501e50 instanceof Error?_0x501e50['message']:String(_0x501e50))),setTimeout(()=>process[_0x2e5387(0xe7)](0x1),0x64);}},[_0x4eefea,_0x1cb47f,_0x4e25c0]);if(_0x14e036)return a54_0x5f43cb(Box,{'flexDirection':_0x537f1f(0xed),'children':a54_0x4a3373(Text,{'color':_0x537f1f(0xfc),'children':['✗\x20',_0x14e036]})});if(_0x1cb47f)return a54_0x4a3373(Box,{'flexDirection':_0x537f1f(0xed),'children':[a54_0x4a3373(Box,{'children':[a54_0x5f43cb(Text,{'color':'cyan','children':_0x537f1f(0xdc)}),_0x137ae6?a54_0x5f43cb(Text,{'color':_0x537f1f(0xf1),'children':_0x137ae6}):a54_0x5f43cb(Text,{'color':_0x537f1f(0xd7),'children':'_'}),_0x46710f&&a54_0x4a3373(Text,{'color':_0x537f1f(0xfc),'children':[_0x537f1f(0xfe),_0x46710f]})]}),!_0x46710f&&!_0x137ae6&&a54_0x5f43cb(Box,{'children':a54_0x5f43cb(Text,{'color':'gray','children':_0x537f1f(0xe1)})})]});if(_0x4b2a8b)return a54_0x4a3373(Box,{'flexDirection':_0x537f1f(0xed),'children':[a54_0x5f43cb(Text,{'color':_0x537f1f(0xf1),'children':'✓\x20成功在当前目录初始化\x20.lovrabetrc\x20文件'}),a54_0x4a3373(Text,{'color':_0x537f1f(0xf5),'children':[_0x537f1f(0xf2),_0x4eefea]}),a54_0x5f43cb(Text,{'children':'现在您可以使用\x20lovrabet\x20api\x20doc\x20和\x20lovrabet\x20api\x20pull\x20等命令了'})]});return a54_0x5f43cb(Box,{'children':a54_0x5f43cb(Text,{'children':'正在初始化配置文件...'})});}
1
+ (function(_0x10233d,_0x189e37){const _0x16c39b=a59_0x12c1,_0x571909=_0x10233d();while(!![]){try{const _0xc42777=-parseInt(_0x16c39b(0x1bd))/0x1+parseInt(_0x16c39b(0x1a8))/0x2*(-parseInt(_0x16c39b(0x1c4))/0x3)+-parseInt(_0x16c39b(0x19d))/0x4+-parseInt(_0x16c39b(0x1b0))/0x5+parseInt(_0x16c39b(0x1b5))/0x6+parseInt(_0x16c39b(0x1c0))/0x7*(parseInt(_0x16c39b(0x1c3))/0x8)+parseInt(_0x16c39b(0x1a3))/0x9;if(_0xc42777===_0x189e37)break;else _0x571909['push'](_0x571909['shift']());}catch(_0x280fcf){_0x571909['push'](_0x571909['shift']());}}}(a59_0x4f15,0xc3c3f));import{jsxs as a59_0x340309,jsx as a59_0x1ab4cf}from'react/jsx-runtime';import{useState,useEffect}from'react';function a59_0x4f15(){const _0x17c5bd=['cyan','初始化项目配置文件成功','online','column','setLogPath','30746871GhCnfR','length','init.validation.invalidFormat','创建配置文件失败','ctrl','770930tjZcIJ','init.inputAppCode','init.validation.invalidCode','message','init.success','green','red','slice','7832390eqvFIG','init','trim','init.validation.required','delete','1115124xPQJWW','env','cwd','../..','toLocaleString','.lovrabetrc','1.0.0','backspace','2394lDyvXV','init.creating','parse','2784299hDBBem','exit','init.appCodeDesc','16kbYNwP','9VsXcJd','common.error','package.json','init.validation.tooLong','init.appCodeLabel','utf8','\x20←\x20','init.nextSteps','3482260iFNNvO'];a59_0x4f15=function(){return _0x17c5bd;};return a59_0x4f15();}import{Box,Text,useInput}from'ink';import{existsSync,writeFileSync,readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readConfig}from'../utils/config.js';function a59_0x12c1(_0x2bad8f,_0x46d102){_0x2bad8f=_0x2bad8f-0x197;const _0x4f15bc=a59_0x4f15();let _0x12c159=_0x4f15bc[_0x2bad8f];return _0x12c159;}import{useI18n}from'../i18n/hooks.js';export function Init({appcode:_0x280aec,env:_0x3a2d00}){const _0x195508=a59_0x12c1,{t:_0x174387}=useI18n(),[_0x485d95,_0x1b9ca4]=useState(null),[_0x1cec01,_0x16be5f]=useState(![]),[_0x5761b1,_0x283c28]=useState(!_0x280aec),[_0x44a5e7,_0x58919e]=useState(''),[_0xf1073,_0x49ba56]=useState(''),[_0x5d5d0a,_0x194800]=useState(_0x280aec||''),[_0x19dba3]=useState(_0x3a2d00);function _0x2ac081(_0x5595b3){const _0xb5d09=a59_0x12c1;if(_0x5595b3['length']===0x0)return{'valid':![],'message':''};if(_0x5595b3['length']>0x64)return{'valid':![],'message':_0x174387(_0xb5d09(0x198))};const _0x4d6179=/^[A-Za-z0-9_-]+$/;if(!_0x4d6179['test'](_0x5595b3))return{'valid':![],'message':_0x174387(_0xb5d09(0x1a5))};return{'valid':!![]};}useInput((_0x383a1d,_0x26ce79)=>{const _0x419652=a59_0x12c1;if(!_0x5761b1)return;if(_0x26ce79['return']){if(_0xf1073||!_0x44a5e7[_0x419652(0x1b2)]()){_0x49ba56(_0x174387(_0x419652(0x1b3)));return;}const _0x979a81=_0x44a5e7['trim'](),{valid:_0x243e8d,message:_0x48c32d}=_0x2ac081(_0x979a81);if(!_0x243e8d){_0x49ba56(_0x48c32d||_0x174387(_0x419652(0x1aa)));return;}_0x194800(_0x979a81),_0x283c28(![]);}else{if(_0x26ce79[_0x419652(0x1bc)]||_0x26ce79[_0x419652(0x1b4)])_0x58919e(_0x443274=>{const _0x178a30=_0x419652,_0x49c181=_0x443274[_0x178a30(0x1af)](0x0,-0x1);if(_0x49c181[_0x178a30(0x1a4)]===0x0)_0x49ba56('');else{const {valid:_0x2976f4,message:_0x2f148a}=_0x2ac081(_0x49c181);_0x49ba56(_0x2976f4?'':_0x2f148a||_0x174387(_0x178a30(0x1aa)));}return _0x49c181;});else _0x26ce79[_0x419652(0x1a7)]&&_0x383a1d==='c'?process['exit'](0x0):_0x58919e(_0x29fc77=>{const _0x4ec43a=_0x29fc77+_0x383a1d,{valid:_0x26a6f9,message:_0x202476}=_0x2ac081(_0x4ec43a);return _0x49ba56(_0x26a6f9?'':_0x202476||_0x174387('init.validation.invalidCode')),_0x4ec43a;});}},{'isActive':_0x5761b1}),useEffect(()=>{const _0x1b40a5=a59_0x12c1;if(!_0x5d5d0a||_0x5761b1)return;const _0x342d73=resolve(process[_0x1b40a5(0x1b7)](),_0x1b40a5(0x1ba));if(existsSync(_0x342d73)){_0x1b9ca4(_0x174387('init.fileExists')),setTimeout(()=>process[_0x1b40a5(0x1c1)](0x1),0x64);return;}try{const _0x4f47b2=fileURLToPath(import.meta.url),_0x3dd192=resolve(dirname(_0x4f47b2),_0x1b40a5(0x1b8)),_0x66f4b=join(_0x3dd192,_0x1b40a5(0x197));let _0x44d66f=_0x1b40a5(0x1bb);try{const _0x5e5646=JSON[_0x1b40a5(0x1bf)](readFileSync(_0x66f4b,'utf8'));_0x44d66f=_0x5e5646['version']||_0x1b40a5(0x1bb);}catch(_0x29b3ad){}const _0x4df11f=readConfig(),_0x398634=typeof _0x4df11f[_0x1b40a5(0x1b6)]==='string'?_0x4df11f[_0x1b40a5(0x1b6)]:undefined,{app:_0x24083e,appcode:_0x4ec0c5,..._0x469d8c}=_0x4df11f,_0x55733b={..._0x469d8c,'appcode':_0x5d5d0a,'env':_0x19dba3||_0x398634||_0x1b40a5(0x1a0),'createdAt':new Date()[_0x1b40a5(0x1b9)](),'version':_0x44d66f};writeFileSync(_0x342d73,JSON['stringify'](_0x55733b,null,0x2),{'encoding':_0x1b40a5(0x19a),'mode':0x180}),logger[_0x1b40a5(0x1a2)](process['cwd']()),logger['info'](_0x1b40a5(0x1b1),_0x1b40a5(0x19f),{'appcode':_0x5d5d0a,'env':_0x55733b[_0x1b40a5(0x1b6)],'version':_0x55733b['version'],'configPath':_0x342d73}),_0x16be5f(!![]),setTimeout(()=>process[_0x1b40a5(0x1c1)](0x0),0x64);}catch(_0x1a38cd){logger['error'](_0x1b40a5(0x1b1),_0x1b40a5(0x1a6),{'error':_0x1a38cd instanceof Error?_0x1a38cd[_0x1b40a5(0x1ab)]:String(_0x1a38cd)}),_0x1b9ca4(_0x174387(_0x1b40a5(0x1c5))+':\x20'+(_0x1a38cd instanceof Error?_0x1a38cd[_0x1b40a5(0x1ab)]:String(_0x1a38cd))),setTimeout(()=>process['exit'](0x1),0x64);}},[_0x5d5d0a,_0x5761b1,_0x19dba3]);if(_0x485d95)return a59_0x1ab4cf(Box,{'flexDirection':_0x195508(0x1a1),'children':a59_0x340309(Text,{'color':_0x195508(0x1ae),'children':['✗\x20',_0x485d95]})});if(_0x5761b1)return a59_0x340309(Box,{'flexDirection':_0x195508(0x1a1),'children':[a59_0x340309(Box,{'children':[a59_0x340309(Text,{'color':_0x195508(0x19e),'children':[_0x174387(_0x195508(0x1a9)),'\x20']}),_0x44a5e7?a59_0x1ab4cf(Text,{'color':_0x195508(0x1ad),'children':_0x44a5e7}):a59_0x1ab4cf(Text,{'color':'gray','children':'_'}),_0xf1073&&a59_0x340309(Text,{'color':_0x195508(0x1ae),'children':[_0x195508(0x19b),_0xf1073]})]}),!_0xf1073&&!_0x44a5e7&&a59_0x1ab4cf(Box,{'children':a59_0x1ab4cf(Text,{'color':'gray','children':_0x174387(_0x195508(0x1c2))})})]});if(_0x1cec01)return a59_0x340309(Box,{'flexDirection':_0x195508(0x1a1),'children':[a59_0x340309(Text,{'color':_0x195508(0x1ad),'children':['✓\x20',_0x174387(_0x195508(0x1ac))]}),a59_0x340309(Text,{'color':_0x195508(0x19e),'children':[_0x174387(_0x195508(0x199)),':\x20',_0x5d5d0a]}),a59_0x1ab4cf(Text,{'children':_0x174387(_0x195508(0x19c))})]});return a59_0x1ab4cf(Box,{'children':a59_0x1ab4cf(Text,{'children':_0x174387(_0x195508(0x1be))})});}
@@ -1 +1 @@
1
- const a55_0x33242a=a55_0x35c7;(function(_0x51d884,_0x5b2b88){const _0x28ce64=a55_0x35c7,_0x4c1fc9=_0x51d884();while(!![]){try{const _0x254f2d=parseInt(_0x28ce64(0xf7))/0x1+parseInt(_0x28ce64(0xfc))/0x2*(-parseInt(_0x28ce64(0xfe))/0x3)+-parseInt(_0x28ce64(0x10f))/0x4*(parseInt(_0x28ce64(0x114))/0x5)+-parseInt(_0x28ce64(0xe0))/0x6*(parseInt(_0x28ce64(0xed))/0x7)+parseInt(_0x28ce64(0x104))/0x8+parseInt(_0x28ce64(0x10b))/0x9*(parseInt(_0x28ce64(0xf0))/0xa)+parseInt(_0x28ce64(0xe2))/0xb*(parseInt(_0x28ce64(0xdf))/0xc);if(_0x254f2d===_0x5b2b88)break;else _0x4c1fc9['push'](_0x4c1fc9['shift']());}catch(_0x596361){_0x4c1fc9['push'](_0x4c1fc9['shift']());}}}(a55_0x283f,0x5bc98));function a55_0x283f(){const _0x35e8be=['white','✓\x20MCP\x20配置完成!','message','cyan','425584lUlQOy','label','done','ide','name','success','green','36648pgJyut','description','cwd','red','1022668gVBTki','error','setErrorMsg','other','manual','5MKyYgk','gray','push','\x20\x20⚠️','map','82956MsVTWy','187356OzJigj','status','1496jyLpuA','selectedIndexes','不支持的\x20IDE:\x20','value','yellow','every','column','请至少选择一个\x20IDE','configuring','length','\x20\x20✓','105ZMTVlw','cursor','selecting','30LMadoo','⚠️\x20部分配置需要手动完成','已选择\x20IDE','return','claude','其他\x20IDE','\x20\x20✗','190023ZKsfTo','key','handleKeyDown','配置\x20Lovrabet\x20MCP\x20服务器','from','191176xfnlJG','some','3nDMmiM','find'];a55_0x283f=function(){return _0x35e8be;};return a55_0x283f();}function a55_0x35c7(_0x40d985,_0x5d3af2){_0x40d985=_0x40d985-0xdb;const _0x283f8a=a55_0x283f();let _0x35c730=_0x283f8a[_0x40d985];return _0x35c730;}import{jsx as a55_0x3f71b2,jsxs as a55_0x34c836,Fragment as a55_0x1d077f}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';const IDE_LIST=[...Array[a55_0x33242a(0xfb)](MCP_IDES)[a55_0x33242a(0xde)](_0x18e845=>({'key':_0x18e845,'name':IDE_CONFIGS[_0x18e845][a55_0x33242a(0x108)],'description':IDE_CONFIGS[_0x18e845][a55_0x33242a(0x10c)]})),{'key':a55_0x33242a(0x112),'name':a55_0x33242a(0xf5),'description':'其他\x20IDE\x20配置指引'}];export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x58e348=a55_0x33242a,{exit:_0x4653d6}=useApp(),[_0x40a10a,_0x983f8]=useState(_0x58e348(0xef)),[_0x4a510a,_0x297670]=useState([]),[_0x1c146f,_0x330c11]=useState([]),_0x53eabc=useIDESelection({'ideList':IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x585855=_0x58e348;preselectedIDEs[_0x585855(0xeb)]>0x0&&_0x53eabc[_0x585855(0xe3)]['size']>0x0&&_0x2876a5();},[]),useInput((_0x44e870,_0x1d8182)=>{const _0x226570=_0x58e348;if(_0x40a10a===_0x226570(0xef)){if(_0x44e870==='q'||_0x44e870==='Q'){_0x4653d6();return;}if(_0x1d8182[_0x226570(0xf3)]){if(_0x53eabc[_0x226570(0xe3)]['size']===0x0){_0x53eabc[_0x226570(0x111)](_0x226570(0xe9));return;}_0x2876a5();return;}_0x53eabc[_0x226570(0xf9)](_0x44e870,_0x1d8182);}_0x40a10a===_0x226570(0x106)&&_0x4653d6();});async function _0x2876a5(){const _0x5e9b9c=_0x58e348,_0x58fdca=_0x53eabc['getSelectedIDEs']();_0x297670([{'label':_0x5e9b9c(0xf2),'value':_0x53eabc[_0x5e9b9c(0xe3)]['size']+'\x20个'}]),_0x983f8(_0x5e9b9c(0xea));const _0xb2dd38=[];for(const _0x1dba7e of _0x58fdca){try{const _0x31b473=await configureMcp(_0x1dba7e);_0xb2dd38[_0x5e9b9c(0xdc)]({'ide':IDE_LIST[_0x5e9b9c(0xff)](_0x559f3b=>_0x559f3b[_0x5e9b9c(0xf8)]===_0x1dba7e)?.[_0x5e9b9c(0x108)]||_0x1dba7e,'status':_0x31b473['needsManualAction']?'manual':_0x31b473[_0x5e9b9c(0x109)]?_0x5e9b9c(0x109):'error','message':_0x31b473[_0x5e9b9c(0x102)]});}catch(_0xd9a734){_0xb2dd38[_0x5e9b9c(0xdc)]({'ide':IDE_LIST['find'](_0x46dd41=>_0x46dd41['key']===_0x1dba7e)?.[_0x5e9b9c(0x108)]||_0x1dba7e,'status':_0x5e9b9c(0x110),'message':_0xd9a734 instanceof Error?_0xd9a734[_0x5e9b9c(0x102)]:String(_0xd9a734)});}}_0x330c11(_0xb2dd38),_0x983f8('done'),setTimeout(()=>{_0x4653d6();},0x1388);}return a55_0x34c836(Box,{'flexDirection':'column','marginTop':0x1,'children':[_0x40a10a==='selecting'&&a55_0x3f71b2(IDESelector,{'ideList':IDE_LIST,'title':_0x58e348(0xfa),'selection':_0x53eabc}),_0x40a10a===_0x58e348(0xea)&&a55_0x34c836(a55_0x1d077f,{'children':[_0x4a510a['map']((_0x447b19,_0x5a94c4)=>a55_0x34c836(Box,{'children':[a55_0x34c836(Text,{'color':'green','children':['√\x20',_0x447b19[_0x58e348(0x105)],':\x20']}),a55_0x3f71b2(Text,{'color':_0x58e348(0x103),'children':_0x447b19[_0x58e348(0xe5)]})]},_0x5a94c4)),a55_0x3f71b2(Box,{'marginTop':0x1,'children':a55_0x3f71b2(Text,{'children':'正在配置\x20MCP\x20服务器...'})})]}),_0x40a10a===_0x58e348(0x106)&&a55_0x3f71b2(DoneStep,{'configResults':_0x1c146f})]});}function DoneStep({configResults:_0x43c5a4}){const _0xc9a5b6=a55_0x33242a,_0x5b1a06=_0x43c5a4[_0xc9a5b6(0xe7)](_0x4b9fd5=>_0x4b9fd5[_0xc9a5b6(0xe1)]==='success'),_0x1ca0c6=_0x43c5a4[_0xc9a5b6(0xfd)](_0xdb669=>_0xdb669[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x113)),_0x41c072=_0x43c5a4[_0xc9a5b6(0xfd)](_0xfc8d=>_0xfc8d[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x110));return a55_0x34c836(a55_0x1d077f,{'children':[a55_0x3f71b2(Box,{'children':_0x5b1a06?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0x10a),'children':_0xc9a5b6(0x101)}):_0x1ca0c6?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0xe6),'children':_0xc9a5b6(0xf1)}):_0x41c072?a55_0x3f71b2(Text,{'color':_0xc9a5b6(0x10e),'children':'✗\x20配置失败'}):a55_0x3f71b2(Text,{'color':'yellow','children':'⚠️\x20配置需要手动完成'})}),_0x43c5a4['map']((_0x532de4,_0x2d8835)=>a55_0x34c836(Box,{'flexDirection':_0xc9a5b6(0xe8),'children':[a55_0x34c836(Text,{'color':_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?'green':_0x532de4[_0xc9a5b6(0xe1)]==='manual'?'yellow':_0xc9a5b6(0x10e),'children':[_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?_0xc9a5b6(0xec):_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x113)?_0xc9a5b6(0xdd):_0xc9a5b6(0xf6),'\x20',_0x532de4[_0xc9a5b6(0x107)],':']}),a55_0x3f71b2(Text,{'color':_0x532de4[_0xc9a5b6(0xe1)]===_0xc9a5b6(0x109)?_0xc9a5b6(0x100):_0x532de4['status']===_0xc9a5b6(0x113)?'yellow':_0xc9a5b6(0x10e),'children':_0x532de4[_0xc9a5b6(0x102)]})]},_0x2d8835)),a55_0x3f71b2(Box,{'marginTop':0x1,'children':a55_0x3f71b2(Text,{'color':_0xc9a5b6(0xdb),'children':'按任意键退出...'})})]});}async function configureMcp(_0x146189){const _0x5c2ea6=a55_0x33242a,_0x491575=process[_0x5c2ea6(0x10d)]();switch(_0x146189){case _0x5c2ea6(0xee):return configureCursorMcp(_0x491575);case _0x5c2ea6(0xf4):return configureClaudeMcp(_0x491575);case _0x5c2ea6(0x112):return showOtherMcpGuide(_0x491575);default:throw new Error(_0x5c2ea6(0xe4)+_0x146189);}}
1
+ (function(_0x128d34,_0x1af416){const _0x3ba500=a60_0x5027,_0x5e1d8b=_0x128d34();while(!![]){try{const _0x2297fb=parseInt(_0x3ba500(0xb6))/0x1*(parseInt(_0x3ba500(0xd2))/0x2)+-parseInt(_0x3ba500(0xd4))/0x3+parseInt(_0x3ba500(0xc4))/0x4+parseInt(_0x3ba500(0xaf))/0x5*(parseInt(_0x3ba500(0xbf))/0x6)+-parseInt(_0x3ba500(0xd3))/0x7+-parseInt(_0x3ba500(0xcc))/0x8*(-parseInt(_0x3ba500(0xd8))/0x9)+parseInt(_0x3ba500(0xa7))/0xa*(parseInt(_0x3ba500(0xc7))/0xb);if(_0x2297fb===_0x1af416)break;else _0x5e1d8b['push'](_0x5e1d8b['shift']());}catch(_0xad8fcb){_0x5e1d8b['push'](_0x5e1d8b['shift']());}}}(a60_0x2859,0xc90b3));import{jsx as a60_0x2e31a7,jsxs as a60_0x15c12c,Fragment as a60_0x2dfb33}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';function a60_0x5027(_0x4772d2,_0x2eee12){_0x4772d2=_0x4772d2-0xa2;const _0x2859fe=a60_0x2859();let _0x50274b=_0x2859fe[_0x4772d2];return _0x50274b;}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{useI18n}from'../i18n/hooks.js';import a60_0x19ab1d from'../i18n/index.js';function a60_0x2859(){const _0x690d97=['241925QBlsfV','mcp.ui.count','\x20\x20✓','length','push','cursor','green','1PecUHD','handleKeyDown','key','\x20\x20✗','red','selecting','setErrorMsg','needsManualAction','mcp.ui.failed','72YYuIDZ','from','done','map','mcp.ui.pressAnyKeyToExit','1763696AWuqBh','manual','error','2639747eoBbpn','mcp.ui.unsupportedIDE','some','mcp.ui.otherIDE','message','6310904LnwQth','yellow','status','gray','column','selectedIndexes','141914vhVikR','5842396LFTswP','2829576IQVBxs','cyan','\x20\x20⚠️','ide','9pjcXHf','white','claude','description','getSelectedIDEs','name','other','30hzkWtO','success','label','configuring','mcp.ui.title','size','find','mcp.ui.configuring'];a60_0x2859=function(){return _0x690d97;};return a60_0x2859();}export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0xe9de2e=a60_0x5027,{t:_0x27dc12}=useI18n(),{exit:_0x4fd9f9}=useApp(),[_0x392a52,_0x4bbfe5]=useState(_0xe9de2e(0xbb)),[_0x2389de,_0x542065]=useState([]),[_0x5e81f7,_0x211a14]=useState([]),_0x138ec0=useMemo(()=>[...Array[_0xe9de2e(0xc0)](MCP_IDES)[_0xe9de2e(0xc2)](_0x46b3ba=>({'key':_0x46b3ba,'name':IDE_CONFIGS[_0x46b3ba]['name'],'description':IDE_CONFIGS[_0x46b3ba][_0xe9de2e(0xa3)]})),{'key':_0xe9de2e(0xa6),'name':_0x27dc12(_0xe9de2e(0xca)),'description':_0x27dc12('mcp.ui.otherIDEDescription')}],[_0x27dc12]),_0x114d46=useIDESelection({'ideList':_0x138ec0,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x5be60f=_0xe9de2e;preselectedIDEs[_0x5be60f(0xb2)]>0x0&&_0x114d46[_0x5be60f(0xd1)][_0x5be60f(0xac)]>0x0&&_0x165f79();},[]),useInput((_0x35cd90,_0x32ce18)=>{const _0x54ce42=_0xe9de2e;if(_0x392a52===_0x54ce42(0xbb)){if(_0x35cd90==='q'||_0x35cd90==='Q'){_0x4fd9f9();return;}if(_0x32ce18['return']){if(_0x114d46[_0x54ce42(0xd1)]['size']===0x0){_0x114d46[_0x54ce42(0xbc)](_0x27dc12('mcp.ui.selectAtLeastOne'));return;}_0x165f79();return;}_0x114d46[_0x54ce42(0xb7)](_0x35cd90,_0x32ce18);}_0x392a52===_0x54ce42(0xc1)&&_0x4fd9f9();});async function _0x165f79(){const _0xab4216=_0xe9de2e,_0x12be02=_0x114d46[_0xab4216(0xa4)]();_0x542065([{'label':_0x27dc12('mcp.ui.selectedIDE'),'value':_0x27dc12(_0xab4216(0xb0),{'count':_0x114d46[_0xab4216(0xd1)]['size']})}]),_0x4bbfe5('configuring');const _0x3ae035=[];for(const _0x337f8e of _0x12be02){try{const _0x1461f7=await configureMcp(_0x337f8e);_0x3ae035[_0xab4216(0xb3)]({'ide':_0x138ec0[_0xab4216(0xad)](_0x52e9eb=>_0x52e9eb[_0xab4216(0xb8)]===_0x337f8e)?.[_0xab4216(0xa5)]||_0x337f8e,'status':_0x1461f7[_0xab4216(0xbd)]?_0xab4216(0xc5):_0x1461f7[_0xab4216(0xa8)]?_0xab4216(0xa8):_0xab4216(0xc6),'message':_0x1461f7[_0xab4216(0xcb)]});}catch(_0x34f9cd){_0x3ae035[_0xab4216(0xb3)]({'ide':_0x138ec0['find'](_0x4ddd7d=>_0x4ddd7d[_0xab4216(0xb8)]===_0x337f8e)?.[_0xab4216(0xa5)]||_0x337f8e,'status':'error','message':_0x34f9cd instanceof Error?_0x34f9cd[_0xab4216(0xcb)]:String(_0x34f9cd)});}}_0x211a14(_0x3ae035),_0x4bbfe5(_0xab4216(0xc1)),setTimeout(()=>{_0x4fd9f9();},0x1388);}return a60_0x15c12c(Box,{'flexDirection':_0xe9de2e(0xd0),'marginTop':0x1,'children':[_0x392a52===_0xe9de2e(0xbb)&&a60_0x2e31a7(IDESelector,{'ideList':_0x138ec0,'title':_0x27dc12(_0xe9de2e(0xab)),'selection':_0x114d46}),_0x392a52===_0xe9de2e(0xaa)&&a60_0x15c12c(a60_0x2dfb33,{'children':[_0x2389de['map']((_0x50b4c0,_0x33928c)=>a60_0x15c12c(Box,{'children':[a60_0x15c12c(Text,{'color':_0xe9de2e(0xb5),'children':['√\x20',_0x50b4c0[_0xe9de2e(0xa9)],':\x20']}),a60_0x2e31a7(Text,{'color':_0xe9de2e(0xd5),'children':_0x50b4c0['value']})]},_0x33928c)),a60_0x2e31a7(Box,{'marginTop':0x1,'children':a60_0x2e31a7(Text,{'children':_0x27dc12(_0xe9de2e(0xae))})})]}),_0x392a52===_0xe9de2e(0xc1)&&a60_0x2e31a7(DoneStep,{'configResults':_0x5e81f7})]});}function DoneStep({configResults:_0x1fafcd}){const _0x4ff6ff=a60_0x5027,{t:_0x28a6a1}=useI18n(),_0x2a8310=_0x1fafcd['every'](_0x3b0b52=>_0x3b0b52[_0x4ff6ff(0xce)]===_0x4ff6ff(0xa8)),_0xd62e2=_0x1fafcd[_0x4ff6ff(0xc9)](_0x3aa88c=>_0x3aa88c['status']==='manual'),_0x384400=_0x1fafcd[_0x4ff6ff(0xc9)](_0x3eb98a=>_0x3eb98a[_0x4ff6ff(0xce)]===_0x4ff6ff(0xc6));return a60_0x15c12c(a60_0x2dfb33,{'children':[a60_0x2e31a7(Box,{'children':_0x2a8310?a60_0x2e31a7(Text,{'color':_0x4ff6ff(0xb5),'children':_0x28a6a1('mcp.ui.completed')}):_0xd62e2?a60_0x2e31a7(Text,{'color':_0x4ff6ff(0xcd),'children':_0x28a6a1('mcp.ui.partialManual')}):_0x384400?a60_0x2e31a7(Text,{'color':'red','children':_0x28a6a1(_0x4ff6ff(0xbe))}):a60_0x2e31a7(Text,{'color':_0x4ff6ff(0xcd),'children':_0x28a6a1('mcp.ui.manualRequired')})}),_0x1fafcd[_0x4ff6ff(0xc2)]((_0x19f57f,_0x5d660a)=>a60_0x15c12c(Box,{'flexDirection':'column','children':[a60_0x15c12c(Text,{'color':_0x19f57f[_0x4ff6ff(0xce)]==='success'?'green':_0x19f57f[_0x4ff6ff(0xce)]==='manual'?_0x4ff6ff(0xcd):_0x4ff6ff(0xba),'children':[_0x19f57f[_0x4ff6ff(0xce)]===_0x4ff6ff(0xa8)?_0x4ff6ff(0xb1):_0x19f57f[_0x4ff6ff(0xce)]===_0x4ff6ff(0xc5)?_0x4ff6ff(0xd6):_0x4ff6ff(0xb9),'\x20',_0x19f57f[_0x4ff6ff(0xd7)],':']}),a60_0x2e31a7(Text,{'color':_0x19f57f[_0x4ff6ff(0xce)]===_0x4ff6ff(0xa8)?_0x4ff6ff(0xd9):_0x19f57f['status']===_0x4ff6ff(0xc5)?_0x4ff6ff(0xcd):_0x4ff6ff(0xba),'children':_0x19f57f[_0x4ff6ff(0xcb)]})]},_0x5d660a)),a60_0x2e31a7(Box,{'marginTop':0x1,'children':a60_0x2e31a7(Text,{'color':_0x4ff6ff(0xcf),'children':_0x28a6a1(_0x4ff6ff(0xc3))})})]});}async function configureMcp(_0x38da84){const _0x2b268a=a60_0x5027,_0x3eeaab=process['cwd']();switch(_0x38da84){case _0x2b268a(0xb4):return configureCursorMcp(_0x3eeaab);case _0x2b268a(0xa2):return configureClaudeMcp(_0x3eeaab);case'other':return showOtherMcpGuide(_0x3eeaab);default:throw new Error(a60_0x19ab1d['t'](_0x2b268a(0xc8),{'ide':_0x38da84}));}}
package/lib/mcp/claude.js CHANGED
@@ -1 +1 @@
1
- (function(_0x35de3f,_0x478a66){const _0x26ab21=a56_0x133a,_0x26ef81=_0x35de3f();while(!![]){try{const _0x2a1cb9=-parseInt(_0x26ab21(0x1d5))/0x1*(parseInt(_0x26ab21(0x1d7))/0x2)+-parseInt(_0x26ab21(0x1d1))/0x3*(-parseInt(_0x26ab21(0x1cf))/0x4)+-parseInt(_0x26ab21(0x1cd))/0x5+-parseInt(_0x26ab21(0x1d3))/0x6*(-parseInt(_0x26ab21(0x1da))/0x7)+-parseInt(_0x26ab21(0x1d8))/0x8+-parseInt(_0x26ab21(0x1d0))/0x9+parseInt(_0x26ab21(0x1ce))/0xa;if(_0x2a1cb9===_0x478a66)break;else _0x26ef81['push'](_0x26ef81['shift']());}catch(_0x141037){_0x26ef81['push'](_0x26ef81['shift']());}}}(a56_0x1792,0x36a77));function a56_0x133a(_0x22d94b,_0xf74a0c){_0x22d94b=_0x22d94b-0x1cd;const _0x17923d=a56_0x1792();let _0x133aad=_0x17923d[_0x22d94b];return _0x133aad;}import{configureClaudeMcp as a56_0x580a34}from'./mcp-installer.js';export async function configureClaudeMcp(){const _0x3695c3=a56_0x133a,_0x19c56c=process['cwd'](),_0x146dbf=a56_0x580a34(_0x19c56c);_0x146dbf[_0x3695c3(0x1db)]?(console[_0x3695c3(0x1d2)](_0x3695c3(0x1dc)+_0x146dbf[_0x3695c3(0x1d6)]+'\x0a'),process[_0x3695c3(0x1d4)](0x0)):(console[_0x3695c3(0x1d9)]('\x0a错误:\x20配置失败\x20-\x20'+_0x146dbf[_0x3695c3(0x1d6)]+'\x0a'),process[_0x3695c3(0x1d4)](0x1));}function a56_0x1792(){const _0x1175ae=['message','10HpYWaU','2943080RREljs','error','560245UIGJiu','success','\x0a📋\x20','940475XzPCjU','6944200VtYrbi','32792vTFcYS','2271177VAMDtn','126wQwuRJ','log','6WFGEfe','exit','17315evUyzX'];a56_0x1792=function(){return _0x1175ae;};return a56_0x1792();}
1
+ (function(_0x47e56c,_0x2e2c4a){const _0x15c890=a61_0xf4c0,_0x195a35=_0x47e56c();while(!![]){try{const _0x23db63=parseInt(_0x15c890(0x111))/0x1+-parseInt(_0x15c890(0x10d))/0x2*(-parseInt(_0x15c890(0x114))/0x3)+-parseInt(_0x15c890(0x113))/0x4+-parseInt(_0x15c890(0x10e))/0x5+parseInt(_0x15c890(0x115))/0x6+parseInt(_0x15c890(0x112))/0x7*(parseInt(_0x15c890(0x10a))/0x8)+-parseInt(_0x15c890(0x110))/0x9;if(_0x23db63===_0x2e2c4a)break;else _0x195a35['push'](_0x195a35['shift']());}catch(_0x254167){_0x195a35['push'](_0x195a35['shift']());}}}(a61_0xcfa0,0x8c42a));import{configureClaudeMcp as a61_0x4ca991}from'./mcp-installer.js';import a61_0x25ae93 from'../i18n/index.js';export async function configureClaudeMcp(){const _0x148338=a61_0xf4c0,_0x5b37e4=process[_0x148338(0x106)](),_0x1ef42e=a61_0x4ca991(_0x5b37e4);_0x1ef42e[_0x148338(0x10f)]?(console[_0x148338(0x10b)]('\x0a📋\x20'+_0x1ef42e[_0x148338(0x108)]+'\x0a'),process[_0x148338(0x10c)](0x0)):(console[_0x148338(0x109)](a61_0x25ae93['t'](_0x148338(0x107),{'error':_0x1ef42e['message']})),process['exit'](0x1));}function a61_0xf4c0(_0x5ccf61,_0x5e828c){_0x5ccf61=_0x5ccf61-0x106;const _0xcfa05f=a61_0xcfa0();let _0xf4c0ff=_0xcfa05f[_0x5ccf61];return _0xf4c0ff;}function a61_0xcfa0(){const _0x29f2e5=['13407372XXezWT','1121204jYhJAa','47705ryyfLU','46700zkvHPO','5853Vaeoyq','2242650lAOyLt','cwd','mcp.claudeConfig.error','message','error','648yYqIxi','log','exit','982HTDkmz','4645230ItGrQa','success'];a61_0xcfa0=function(){return _0x29f2e5;};return a61_0xcfa0();}
package/lib/mcp/cursor.js CHANGED
@@ -1 +1 @@
1
- function a57_0x31d3(_0x1f8e26,_0xd61d8e){_0x1f8e26=_0x1f8e26-0x1d6;const _0x3932a1=a57_0x3932();let _0x31d3b7=_0x3932a1[_0x1f8e26];return _0x31d3b7;}function a57_0x3932(){const _0x16bf2e=['5564785BcEMfc','8obxWhP','exit','success','11770398APUEgE','8pQaOhB','请重启\x20Cursor\x20以加载新的\x20MCP\x20配置。','message','1179066Vytnvk','现在您可以在\x20Cursor\x20中使用\x20Lovrabet\x20数据集\x20MCP\x20工具了。','error','1130082CMKVdC','308951lkMuaP','5702610uTTREJ','cwd','9053373gCQigI','配置信息:','\x0a✓\x20Cursor\x20MCP\x20配置成功!\x0a','log'];a57_0x3932=function(){return _0x16bf2e;};return a57_0x3932();}(function(_0x1b3c7c,_0x5e3678){const _0x436d34=a57_0x31d3,_0x1283ac=_0x1b3c7c();while(!![]){try{const _0x331ca5=parseInt(_0x436d34(0x1d6))/0x1+-parseInt(_0x436d34(0x1e5))/0x2+-parseInt(_0x436d34(0x1e8))/0x3*(-parseInt(_0x436d34(0x1de))/0x4)+parseInt(_0x436d34(0x1dd))/0x5+-parseInt(_0x436d34(0x1d7))/0x6+-parseInt(_0x436d34(0x1d9))/0x7+-parseInt(_0x436d34(0x1e2))/0x8*(-parseInt(_0x436d34(0x1e1))/0x9);if(_0x331ca5===_0x5e3678)break;else _0x1283ac['push'](_0x1283ac['shift']());}catch(_0x179c44){_0x1283ac['push'](_0x1283ac['shift']());}}}(a57_0x3932,0x9ea53));import{configureCursorMcp as a57_0x15a779}from'./mcp-installer.js';export async function configureCursorMcp(){const _0x192e4d=a57_0x31d3,_0x48c36d=process[_0x192e4d(0x1d8)](),_0x4c1331=await a57_0x15a779(_0x48c36d);_0x4c1331[_0x192e4d(0x1e0)]?(console[_0x192e4d(0x1dc)](_0x192e4d(0x1db)),console[_0x192e4d(0x1dc)](_0x192e4d(0x1da)),console[_0x192e4d(0x1dc)]('\x20\x20'+_0x4c1331[_0x192e4d(0x1e4)]+'\x0a'),console[_0x192e4d(0x1dc)](_0x192e4d(0x1e6)),console[_0x192e4d(0x1dc)](_0x192e4d(0x1e3)),process[_0x192e4d(0x1df)](0x0)):(console[_0x192e4d(0x1e7)]('\x0a错误:\x20配置失败\x20-\x20'+_0x4c1331['message']+'\x0a'),process['exit'](0x1));}
1
+ function a62_0x415d(_0xdaa75d,_0x307030){_0xdaa75d=_0xdaa75d-0x10f;const _0x991ab3=a62_0x991a();let _0x415dfb=_0x991ab3[_0xdaa75d];return _0x415dfb;}(function(_0x3a232,_0x7a3f14){const _0x606c5a=a62_0x415d,_0x59086e=_0x3a232();while(!![]){try{const _0x32d0f7=parseInt(_0x606c5a(0x113))/0x1+-parseInt(_0x606c5a(0x115))/0x2*(-parseInt(_0x606c5a(0x11b))/0x3)+-parseInt(_0x606c5a(0x111))/0x4*(-parseInt(_0x606c5a(0x116))/0x5)+-parseInt(_0x606c5a(0x114))/0x6+-parseInt(_0x606c5a(0x11d))/0x7+-parseInt(_0x606c5a(0x11e))/0x8*(-parseInt(_0x606c5a(0x119))/0x9)+-parseInt(_0x606c5a(0x11a))/0xa;if(_0x32d0f7===_0x7a3f14)break;else _0x59086e['push'](_0x59086e['shift']());}catch(_0x27148a){_0x59086e['push'](_0x59086e['shift']());}}}(a62_0x991a,0xacf6c));function a62_0x991a(){const _0xb0ae02=['mcp.cursorConfig.configInfo','cwd','message','297472jaeKmC','log','217443CAbPxR','3207012txRYUa','88670OqdTyA','10aXvugJ','mcp.cursorConfig.success','error','198eMHiqL','3735290VofafI','15UERuec','exit','1513939xuAjWI','452696cxVXPh'];a62_0x991a=function(){return _0xb0ae02;};return a62_0x991a();}import{configureCursorMcp as a62_0x1dd540}from'./mcp-installer.js';import a62_0xb5e884 from'../i18n/index.js';export async function configureCursorMcp(){const _0x4428ad=a62_0x415d,_0x12c25d=process[_0x4428ad(0x10f)](),_0x19699a=await a62_0x1dd540(_0x12c25d);_0x19699a['success']?(console[_0x4428ad(0x112)](a62_0xb5e884['t'](_0x4428ad(0x117))),console[_0x4428ad(0x112)](a62_0xb5e884['t'](_0x4428ad(0x11f))),console[_0x4428ad(0x112)]('\x20\x20'+_0x19699a[_0x4428ad(0x110)]+'\x0a'),console['log'](a62_0xb5e884['t']('mcp.cursorConfig.usageHint')),console[_0x4428ad(0x112)](a62_0xb5e884['t']('mcp.cursorConfig.restartRequired')),process[_0x4428ad(0x11c)](0x0)):(console[_0x4428ad(0x118)](a62_0xb5e884['t']('mcp.cursorConfig.error',{'error':_0x19699a['message']})),process['exit'](0x1));}
package/lib/mcp/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5605d1,_0x1f3dc6){const _0x3a40e8=a58_0x44e6,_0x33d6a7=_0x5605d1();while(!![]){try{const _0xe8b7d7=-parseInt(_0x3a40e8(0x1e5))/0x1+-parseInt(_0x3a40e8(0x1f0))/0x2+parseInt(_0x3a40e8(0x1d2))/0x3+-parseInt(_0x3a40e8(0x1eb))/0x4+parseInt(_0x3a40e8(0x1d0))/0x5+parseInt(_0x3a40e8(0x1ce))/0x6+parseInt(_0x3a40e8(0x1d1))/0x7;if(_0xe8b7d7===_0x1f3dc6)break;else _0x33d6a7['push'](_0x33d6a7['shift']());}catch(_0x1008e7){_0x33d6a7['push'](_0x33d6a7['shift']());}}}(a58_0x4db6,0x58381));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';function a58_0x44e6(_0x9f9b52,_0x49994e){_0x9f9b52=_0x9f9b52-0x1cd;const _0x4db6f3=a58_0x4db6();let _0x44e674=_0x4db6f3[_0x9f9b52];return _0x44e674;}function a58_0x4db6(){const _0x3b9497=['has','\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20交互式选择\x20IDE\x0a\x0a\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x0a\x20\x20\x20\x20→\x20直接配置\x20Cursor\x20MCP\x20(写入\x20.cursor/mcp.json)\x0a\x0a配置指南:\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','不支持的命令:\x20','\x0a📦\x20正在配置\x20','请输入编号选择\x20IDE:\x0a','length','1787898ZGxmds','description','1865175UCQYxe','2036629IftuUA','795903NpxYzx','exit','(空)','from','\x0a已取消配置\x0a','\x0aLovrabet\x20MCP\x20-\x20MCP\x20服务器配置工具\x0a\x0a用法:\x0a\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助信息\x0a\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互式选择并配置\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20直接配置\x20Cursor\x20MCP\x0a\x20\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20直接配置\x20Claude\x20Code\x20MCP\x0a\x0a配置方式:\x0a\x20\x20\x20交互式选择\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20显示\x20IDE\x20列表供选择\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20输入编号选择\x20IDE\x0a\x0a\x20\x20直接配置指定\x20IDE\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20使用\x20--ide\x20标志直接配置\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Cursor\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x20--claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20配置\x20Claude\x20Code\x0a\x0a支持的\x20IDE:\x0a','error','help','\x0a请选择要配置\x20MCP\x20的\x20IDE:\x0a','mcp-install','mcpClaude','\x20之间的数字\x0a','claude','join','stdin','stdout','message','请选择:\x20','quit','219577OnPbWj','forEach','cursor','close','配置失败','name','1355148BtksrB','错误:\x20不支持的命令:\x20','toLowerCase','log','cwd','615114MwCdqp','trim','mcp','question','install','map','\x20-\x20','--help'];a58_0x4db6=function(){return _0x3b9497;};return a58_0x4db6();}import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x2ed278,_0xf3b409,_0x2fcab8){const _0x51fd1e=a58_0x44e6;logger['setLogPath'](process[_0x51fd1e(0x1ef)]());if(_0x2fcab8?.[_0x51fd1e(0x1d9)]||_0x2ed278===_0x51fd1e(0x1f7)){showHelp();return;}_0x2ed278!==_0x51fd1e(0x1f4)&&(console[_0x51fd1e(0x1d8)](_0x51fd1e(0x1ec)+(_0x2ed278||_0x51fd1e(0x1d4))),console[_0x51fd1e(0x1ee)]('\x0a可用命令:'),console[_0x51fd1e(0x1ee)]('\x20\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20交互式选择并配置\x20MCP'),console['log']('\x20\x20lovrabet\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20显示帮助信息\x0a'),logger[_0x51fd1e(0x1d8)](_0x51fd1e(0x1f2),_0x51fd1e(0x1fa)+_0x2ed278),process[_0x51fd1e(0x1d3)](0x1));let _0x2b2e15;if(_0x2fcab8?.['mcpCursor'])_0x2b2e15='cursor';else{if(_0x2fcab8?.[_0x51fd1e(0x1dc)])_0x2b2e15=_0x51fd1e(0x1de);else{if(_0xf3b409?.[0x0]){const _0x2a83d1=_0xf3b409[0x0][_0x51fd1e(0x1ed)]();MCP_IDES[_0x51fd1e(0x1f8)](_0x2a83d1)&&(_0x2b2e15=_0x2a83d1);}}}await installMcp(_0x2b2e15);}function showHelp(){const _0x3c2d9f=a58_0x44e6;console['log'](_0x3c2d9f(0x1d7)+Array[_0x3c2d9f(0x1d5)](MCP_IDES)[_0x3c2d9f(0x1f5)]((_0x5abcd5,_0x570baa)=>'\x20\x20'+(_0x570baa+0x1)+'.\x20'+IDE_CONFIGS[_0x5abcd5][_0x3c2d9f(0x1ea)]+_0x3c2d9f(0x1f6)+IDE_CONFIGS[_0x5abcd5][_0x3c2d9f(0x1cf)])[_0x3c2d9f(0x1df)]('\x0a')+_0x3c2d9f(0x1f9));}async function selectIDE(){const _0x40543b=a58_0x44e6;console[_0x40543b(0x1ee)](_0x40543b(0x1da));const _0x3bf265=Array[_0x40543b(0x1d5)](MCP_IDES);return _0x3bf265[_0x40543b(0x1e6)]((_0xd5fab6,_0x26bd18)=>{const _0x468d3d=_0x40543b;console[_0x468d3d(0x1ee)]('\x20\x20'+(_0x26bd18+0x1)+'.\x20'+IDE_CONFIGS[_0xd5fab6]['name']+_0x468d3d(0x1f6)+IDE_CONFIGS[_0xd5fab6]['description']);}),console[_0x40543b(0x1ee)]('\x20\x20q.\x20取消\x0a'),console[_0x40543b(0x1ee)](_0x40543b(0x1fc)),new Promise(_0x3bed1e=>{const _0x351c33=_0x40543b,_0x16653f=createInterface({'input':process[_0x351c33(0x1e0)],'output':process[_0x351c33(0x1e1)]});_0x16653f[_0x351c33(0x1f3)](_0x351c33(0x1e3),_0x43677e=>{const _0x1737c9=_0x351c33;_0x16653f[_0x1737c9(0x1e8)]();const _0x1eda65=_0x43677e[_0x1737c9(0x1f1)]()['toLowerCase']();(_0x1eda65==='q'||_0x1eda65===_0x1737c9(0x1e4)||_0x1eda65===_0x1737c9(0x1d3))&&(console['log'](_0x1737c9(0x1d6)),process[_0x1737c9(0x1d3)](0x0));const _0xa2b32e=parseInt(_0x1eda65,0xa);if(!isNaN(_0xa2b32e)&&_0xa2b32e>=0x1&&_0xa2b32e<=_0x3bf265['length']){const _0x5bae03=_0x3bf265[_0xa2b32e-0x1];_0x5bae03&&_0x3bed1e(_0x5bae03);return;}console[_0x1737c9(0x1ee)]('\x0a无效的选择,请输入\x201-'+_0x3bf265[_0x1737c9(0x1cd)]+_0x1737c9(0x1dd)),process[_0x1737c9(0x1d3)](0x1);});});}async function installMcp(_0x5aaa63){const _0x44a620=a58_0x44e6;let _0x1d620e;!_0x5aaa63?_0x1d620e=await selectIDE():_0x1d620e=_0x5aaa63;try{const _0xeb878a=IDE_CONFIGS[_0x1d620e];console[_0x44a620(0x1ee)](_0x44a620(0x1fb)+_0xeb878a[_0x44a620(0x1ea)]+'\x20MCP...\x0a');switch(_0x1d620e){case _0x44a620(0x1e7):await configureCursorMcp();break;case _0x44a620(0x1de):await configureClaudeMcp();break;}}catch(_0x21aacb){logger[_0x44a620(0x1d8)](_0x44a620(0x1db),_0x44a620(0x1e9),{'error':_0x21aacb instanceof Error?_0x21aacb[_0x44a620(0x1e2)]:String(_0x21aacb)}),console[_0x44a620(0x1d8)]('\x0a错误:\x20配置失败\x20-\x20'+(_0x21aacb instanceof Error?_0x21aacb['message']:String(_0x21aacb))+'\x0a'),process[_0x44a620(0x1d3)](0x1);}}
1
+ (function(_0x4cabcc,_0x33721){const _0x1b8ead=a63_0x5440,_0x30b71f=_0x4cabcc();while(!![]){try{const _0x4150cb=parseInt(_0x1b8ead(0xc3))/0x1+-parseInt(_0x1b8ead(0xab))/0x2+parseInt(_0x1b8ead(0xc6))/0x3*(-parseInt(_0x1b8ead(0xaf))/0x4)+parseInt(_0x1b8ead(0x8e))/0x5+-parseInt(_0x1b8ead(0xb6))/0x6*(-parseInt(_0x1b8ead(0x92))/0x7)+-parseInt(_0x1b8ead(0x93))/0x8*(-parseInt(_0x1b8ead(0xa4))/0x9)+parseInt(_0x1b8ead(0xb0))/0xa*(-parseInt(_0x1b8ead(0xbe))/0xb);if(_0x4150cb===_0x33721)break;else _0x30b71f['push'](_0x30b71f['shift']());}catch(_0x373b){_0x30b71f['push'](_0x30b71f['shift']());}}}(a63_0x5d28,0x750cb));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import a63_0x42ab86 from'../i18n/index.js';export async function mcpCommand(_0x536bf1,_0x3f5101,_0x2100bc){const _0x12429f=a63_0x5440;logger[_0x12429f(0x8b)](process[_0x12429f(0xa7)]());if(_0x2100bc?.[_0x12429f(0xc7)]||_0x536bf1===_0x12429f(0xa3)){showHelp();return;}_0x536bf1!==_0x12429f(0xb9)&&(console[_0x12429f(0xb7)](a63_0x42ab86['t'](_0x12429f(0xc1),{'cmd':_0x536bf1||'-'})),console[_0x12429f(0x9d)](a63_0x42ab86['t'](_0x12429f(0xbb))),console['log'](a63_0x42ab86['t'](_0x12429f(0xb4))),console[_0x12429f(0x9d)](a63_0x42ab86['t'](_0x12429f(0xbd))),logger[_0x12429f(0xb7)](_0x12429f(0x9e),a63_0x42ab86['t']('mcp.error.unsupportedCommand',{'cmd':_0x536bf1||'-'})),process[_0x12429f(0xb1)](0x1));let _0x46758c;if(_0x2100bc?.['mcpCursor'])_0x46758c=_0x12429f(0x87);else{if(_0x2100bc?.[_0x12429f(0xc8)])_0x46758c=_0x12429f(0x8d);else{if(_0x3f5101?.[0x0]){const _0x29099e=_0x3f5101[0x0][_0x12429f(0xa1)]();MCP_IDES[_0x12429f(0x95)](_0x29099e)&&(_0x46758c=_0x29099e);}}}await installMcp(_0x46758c);}function a63_0x5440(_0x326ef8,_0x318242){_0x326ef8=_0x326ef8-0x86;const _0x5d28ad=a63_0x5d28();let _0x54408a=_0x5d28ad[_0x326ef8];return _0x54408a;}function showHelp(){const _0x50b3a0=a63_0x5440;console[_0x50b3a0(0x9d)]('\x0a'+a63_0x42ab86['t']('mcp.help.title')+'\x0a\x0a'+a63_0x42ab86['t']('mcp.help.usage.help')+'\x0a'+a63_0x42ab86['t']('mcp.help.usage.install')+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xa6))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x8f))+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x96))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xb3))+_0x50b3a0(0xa2)+a63_0x42ab86['t']('mcp.help.configMethodsInteractiveHint')+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xad))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x8c))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xae))+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x94))+'\x0a'+Array[_0x50b3a0(0xa5)](MCP_IDES)[_0x50b3a0(0x9a)]((_0x4af04d,_0x214ecc)=>'\x20\x20'+(_0x214ecc+0x1)+'.\x20'+IDE_CONFIGS[_0x4af04d]['name']+_0x50b3a0(0xc2)+IDE_CONFIGS[_0x4af04d][_0x50b3a0(0x9c)])[_0x50b3a0(0xb8)]('\x0a')+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xc0))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x89))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xaa))+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xbf))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x8a))+'\x0a\x0a'+a63_0x42ab86['t']('mcp.help.configGuide')+_0x50b3a0(0x97));}async function selectIDE(){const _0x2c932c=a63_0x5440;console['log'](a63_0x42ab86['t']('mcp.select.chooseIDE'));const _0x3ce2be=Array[_0x2c932c(0xa5)](MCP_IDES);return _0x3ce2be[_0x2c932c(0x91)]((_0x63ab80,_0x2e29ee)=>{const _0x4e1358=_0x2c932c;console['log']('\x20\x20'+(_0x2e29ee+0x1)+'.\x20'+IDE_CONFIGS[_0x63ab80]['name']+'\x20-\x20'+IDE_CONFIGS[_0x63ab80][_0x4e1358(0x9c)]);}),console[_0x2c932c(0x9d)](a63_0x42ab86['t'](_0x2c932c(0xa0))),console['log'](a63_0x42ab86['t'](_0x2c932c(0xa9))),new Promise(_0x4f0c35=>{const _0x28a45f=_0x2c932c,_0x4ea6d9=createInterface({'input':process[_0x28a45f(0xbc)],'output':process[_0x28a45f(0xba)]});_0x4ea6d9[_0x28a45f(0x86)](a63_0x42ab86['t'](_0x28a45f(0xb2)),_0xdad3a3=>{const _0x2e7dc6=_0x28a45f;_0x4ea6d9[_0x2e7dc6(0xac)]();const _0x335578=_0xdad3a3[_0x2e7dc6(0x9b)]()[_0x2e7dc6(0xa1)]();(_0x335578==='q'||_0x335578===_0x2e7dc6(0x88)||_0x335578===_0x2e7dc6(0xb1))&&(console[_0x2e7dc6(0x9d)](a63_0x42ab86['t'](_0x2e7dc6(0xb5))),process[_0x2e7dc6(0xb1)](0x0));const _0x433c0c=parseInt(_0x335578,0xa);if(!isNaN(_0x433c0c)&&_0x433c0c>=0x1&&_0x433c0c<=_0x3ce2be[_0x2e7dc6(0x9f)]){const _0x2a75f1=_0x3ce2be[_0x433c0c-0x1];_0x2a75f1&&_0x4f0c35(_0x2a75f1);return;}console[_0x2e7dc6(0x9d)](a63_0x42ab86['t'](_0x2e7dc6(0x98),{'count':_0x3ce2be[_0x2e7dc6(0x9f)]})),process[_0x2e7dc6(0xb1)](0x1);});});}async function installMcp(_0x17ba3b){const _0x250a51=a63_0x5440;let _0x1095a6;!_0x17ba3b?_0x1095a6=await selectIDE():_0x1095a6=_0x17ba3b;try{const _0x20c016=IDE_CONFIGS[_0x1095a6];console[_0x250a51(0x9d)](a63_0x42ab86['t'](_0x250a51(0xc4),{'name':_0x20c016[_0x250a51(0x99)]}));switch(_0x1095a6){case _0x250a51(0x87):await configureCursorMcp();break;case'claude':await configureClaudeMcp();break;}}catch(_0x3fde3e){logger[_0x250a51(0xb7)](_0x250a51(0xa8),a63_0x42ab86['t'](_0x250a51(0xc5),{'error':_0x3fde3e instanceof Error?_0x3fde3e[_0x250a51(0x90)]:String(_0x3fde3e)}),{'error':_0x3fde3e instanceof Error?_0x3fde3e[_0x250a51(0x90)]:String(_0x3fde3e)}),console[_0x250a51(0xb7)](a63_0x42ab86['t'](_0x250a51(0xc5),{'error':_0x3fde3e instanceof Error?_0x3fde3e[_0x250a51(0x90)]:String(_0x3fde3e)})),process[_0x250a51(0xb1)](0x1);}}function a63_0x5d28(){const _0x5a1b4e=['toLowerCase','\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a','--help','1513611ijgTRo','from','mcp.help.usage.installCursor','cwd','mcp-install','mcp.select.enterNumber','mcp.help.exampleInstallHint','1237514TutowF','close','mcp.help.configMethodsDirect','mcp.help.configMethodsDirectClaude','1380SqVYmE','10YkHJDh','exit','mcp.select.prompt','mcp.help.configMethodsInteractive','mcp.help.command.install','mcp.select.cancelled','294JTfbyL','error','join','install','stdout','mcp.help.availableCommands','stdin','mcp.help.command.help','2694054LtLAmN','mcp.help.exampleInstallCursor','mcp.help.examples','mcp.error.unsupportedCommand','\x20-\x20','625626xZjaJn','mcp.installFlow.configuring','mcp.installFlow.error','5145pgLHBJ','help','mcpClaude','question','cursor','quit','mcp.help.exampleInstall','mcp.help.exampleInstallCursorHint','setLogPath','mcp.help.configMethodsDirectCursor','claude','3748555VngTwD','mcp.help.usage.installClaude','message','forEach','55895COtTPn','8zIRwce','mcp.help.supportedIDEs','has','mcp.help.configMethods','\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','mcp.select.invalidChoice','name','map','trim','description','log','mcp','length','mcp.select.cancel'];a63_0x5d28=function(){return _0x5a1b4e;};return a63_0x5d28();}
@@ -1 +1 @@
1
- (function(_0x29cac8,_0x1b3bac){const _0x39ce64=a59_0x4fea,_0xc5df02=_0x29cac8();while(!![]){try{const _0x5d83e6=-parseInt(_0x39ce64(0xa4))/0x1*(-parseInt(_0x39ce64(0xa8))/0x2)+parseInt(_0x39ce64(0xa5))/0x3+-parseInt(_0x39ce64(0xa7))/0x4+parseInt(_0x39ce64(0x9e))/0x5*(-parseInt(_0x39ce64(0x97))/0x6)+parseInt(_0x39ce64(0xa2))/0x7*(-parseInt(_0x39ce64(0x9d))/0x8)+parseInt(_0x39ce64(0x99))/0x9+-parseInt(_0x39ce64(0xa6))/0xa*(-parseInt(_0x39ce64(0x9b))/0xb);if(_0x5d83e6===_0x1b3bac)break;else _0xc5df02['push'](_0xc5df02['shift']());}catch(_0x953745){_0xc5df02['push'](_0xc5df02['shift']());}}}(a59_0x784c,0x2bb04));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';function a59_0x784c(){const _0x5d7dba=['\x20成功)','setLogPath','35TVHVSQ','message','2wOexdM','460980FGvKom','190AUuibf','427424DJtRbD','169256SJQtIW','length','info','其他\x20IDE','needsManualAction','\x20MCP\x20配置成功','error','success','other','some','\x0a✗\x20','\x0a✓\x20','\x20MCP\x20配置失败:\x20','33438QzBuQL','cursor','481599eVqmOf','filter','249238flsYeo','mcp-install-non-interactive','387960brXyYn','250FJruId','log'];a59_0x784c=function(){return _0x5d7dba;};return a59_0x784c();}function a59_0x4fea(_0x353005,_0x4d4a7e){_0x353005=_0x353005-0x91;const _0x784c5f=a59_0x784c();let _0x4fea50=_0x784c5f[_0x353005];return _0x4fea50;}export async function installMcpNonInteractive(_0x4d0972,_0x3f04e6=process['cwd']()){const _0x147331=a59_0x4fea;logger[_0x147331(0xa1)](_0x3f04e6),logger[_0x147331(0xaa)](_0x147331(0x9c),'开始配置\x20MCP',{'ides':_0x4d0972});const _0x2682eb=[];for(const _0x509da4 of _0x4d0972){try{let _0x236ce6;switch(_0x509da4){case'cursor':_0x236ce6=await configureCursorMcp(_0x3f04e6);break;case'claude':_0x236ce6=configureClaudeMcp(_0x3f04e6);break;case _0x147331(0x92):_0x236ce6=showOtherMcpGuide(_0x3f04e6);break;default:_0x236ce6={'success':![],'message':'未知的\x20IDE:\x20'+_0x509da4};}_0x2682eb['push'](_0x236ce6);if(_0x236ce6[_0x147331(0x91)]){const _0x1386f8=_0x509da4===_0x147331(0x98)?'Cursor':_0x509da4==='claude'?'Claude\x20Code':_0x147331(0xab);console[_0x147331(0x9f)](_0x147331(0x95)+_0x1386f8+_0x147331(0xad)),console['log']('\x20\x20'+_0x236ce6[_0x147331(0xa3)]);}else console[_0x147331(0xae)]('\x0a✗\x20'+_0x509da4+_0x147331(0x96)+_0x236ce6[_0x147331(0xa3)]);}catch(_0x5ee7c6){console[_0x147331(0xae)](_0x147331(0x94)+_0x509da4+_0x147331(0x96)+(_0x5ee7c6 instanceof Error?_0x5ee7c6[_0x147331(0xa3)]:String(_0x5ee7c6)));}}const _0x4d8db1=_0x2682eb[_0x147331(0x9a)](_0x1a2da5=>_0x1a2da5['success'])[_0x147331(0xa9)],_0xe05d6c=_0x2682eb[_0x147331(0xa9)];console['log']('\x0a✓\x20MCP\x20配置完成\x20('+_0x4d8db1+'/'+_0xe05d6c+_0x147331(0xa0));const _0x5bfc37=_0x2682eb[_0x147331(0x93)](_0x1acfae=>_0x1acfae[_0x147331(0xac)]);_0x5bfc37&&console[_0x147331(0x9f)]('\x0a注意:部分配置需要手动执行命令,请按照上述说明操作');}
1
+ const a64_0x266d90=a64_0x220b;(function(_0x143a1b,_0x54d964){const _0x5b09e4=a64_0x220b,_0x1473aa=_0x143a1b();while(!![]){try{const _0x49abb0=-parseInt(_0x5b09e4(0x1e1))/0x1+parseInt(_0x5b09e4(0x1d5))/0x2+parseInt(_0x5b09e4(0x1d7))/0x3*(parseInt(_0x5b09e4(0x1eb))/0x4)+-parseInt(_0x5b09e4(0x1e8))/0x5*(-parseInt(_0x5b09e4(0x1d3))/0x6)+-parseInt(_0x5b09e4(0x1d9))/0x7*(-parseInt(_0x5b09e4(0x1de))/0x8)+-parseInt(_0x5b09e4(0x1e9))/0x9+parseInt(_0x5b09e4(0x1d6))/0xa;if(_0x49abb0===_0x54d964)break;else _0x1473aa['push'](_0x1473aa['shift']());}catch(_0x304e19){_0x1473aa['push'](_0x1473aa['shift']());}}}(a64_0x26e4,0x1e02a));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';function a64_0x26e4(){const _0x1e2e8b=['69pThyDD','success','126ogRQgb','claude','log','mcp.install.otherIDE','cwd','13016oAIFTC','mcp-install-non-interactive','length','232296QRpTcB','mcp.claude','filter','mcp.install.success','message','error','mcp.cursor','350VRBria','1860480NLCpbd','mcp.install.failed','18412wblLPt','info','needsManualAction','mcp.install.manualActionRequired','mcp.install.unknownIDE','other','mcp.install.completed','setLogPath','1128EbzgOX','cursor','130044EFiYIh','3486010JAqblW'];a64_0x26e4=function(){return _0x1e2e8b;};return a64_0x26e4();}function a64_0x220b(_0x59516d,_0x46135e){_0x59516d=_0x59516d-0x1cd;const _0x26e47d=a64_0x26e4();let _0x220b61=_0x26e47d[_0x59516d];return _0x220b61;}import a64_0x472424 from'../i18n/index.js';export async function installMcpNonInteractive(_0x82a139,_0x51cc2f=process[a64_0x266d90(0x1dd)]()){const _0x271644=a64_0x266d90;logger[_0x271644(0x1d2)](_0x51cc2f),logger[_0x271644(0x1ec)](_0x271644(0x1df),a64_0x472424['t']('mcp.install.starting'),{'ides':_0x82a139});const _0x2800a2=[];for(const _0xd0392c of _0x82a139){try{let _0x4a934d;switch(_0xd0392c){case _0x271644(0x1d4):_0x4a934d=await configureCursorMcp(_0x51cc2f);break;case'claude':_0x4a934d=configureClaudeMcp(_0x51cc2f);break;case _0x271644(0x1d0):_0x4a934d=showOtherMcpGuide(_0x51cc2f);break;default:_0x4a934d={'success':![],'message':a64_0x472424['t'](_0x271644(0x1cf),{'ide':_0xd0392c})};}_0x2800a2['push'](_0x4a934d);if(_0x4a934d[_0x271644(0x1d8)]){const _0x5831fa=_0xd0392c==='cursor'?a64_0x472424['t'](_0x271644(0x1e7)):_0xd0392c===_0x271644(0x1da)?a64_0x472424['t'](_0x271644(0x1e2)):a64_0x472424['t'](_0x271644(0x1dc));console[_0x271644(0x1db)](a64_0x472424['t'](_0x271644(0x1e4),{'ide':_0x5831fa})),console[_0x271644(0x1db)]('\x20\x20'+_0x4a934d[_0x271644(0x1e5)]);}else console[_0x271644(0x1e6)](a64_0x472424['t']('mcp.install.failed',{'ide':_0xd0392c===_0x271644(0x1d4)?a64_0x472424['t'](_0x271644(0x1e7)):_0xd0392c===_0x271644(0x1da)?a64_0x472424['t']('mcp.claude'):a64_0x472424['t'](_0x271644(0x1dc)),'error':_0x4a934d[_0x271644(0x1e5)]}));}catch(_0x294dd6){console[_0x271644(0x1e6)](a64_0x472424['t'](_0x271644(0x1ea),{'ide':_0xd0392c==='cursor'?a64_0x472424['t'](_0x271644(0x1e7)):_0xd0392c==='claude'?a64_0x472424['t'](_0x271644(0x1e2)):a64_0x472424['t'](_0x271644(0x1dc)),'error':_0x294dd6 instanceof Error?_0x294dd6[_0x271644(0x1e5)]:String(_0x294dd6)}));}}const _0x59b43e=_0x2800a2[_0x271644(0x1e3)](_0x42901e=>_0x42901e[_0x271644(0x1d8)])['length'],_0x3f61c3=_0x2800a2[_0x271644(0x1e0)];console['log'](a64_0x472424['t'](_0x271644(0x1d1),{'successCount':_0x59b43e,'totalCount':_0x3f61c3}));const _0xb5fbf1=_0x2800a2['some'](_0x1f3d00=>_0x1f3d00[_0x271644(0x1cd)]);_0xb5fbf1&&console[_0x271644(0x1db)](a64_0x472424['t'](_0x271644(0x1ce)));}
@@ -1 +1 @@
1
- const a60_0x39c62e=a60_0x1c5e;(function(_0x39c6eb,_0x1f01df){const _0x98e136=a60_0x1c5e,_0x6f1a29=_0x39c6eb();while(!![]){try{const _0x1f834c=parseInt(_0x98e136(0x119))/0x1*(parseInt(_0x98e136(0x11d))/0x2)+parseInt(_0x98e136(0x12b))/0x3*(-parseInt(_0x98e136(0x11e))/0x4)+-parseInt(_0x98e136(0x107))/0x5*(parseInt(_0x98e136(0x132))/0x6)+parseInt(_0x98e136(0x123))/0x7*(-parseInt(_0x98e136(0x117))/0x8)+parseInt(_0x98e136(0x111))/0x9*(-parseInt(_0x98e136(0x125))/0xa)+parseInt(_0x98e136(0x103))/0xb*(-parseInt(_0x98e136(0x106))/0xc)+parseInt(_0x98e136(0x10d))/0xd;if(_0x1f834c===_0x1f01df)break;else _0x6f1a29['push'](_0x6f1a29['shift']());}catch(_0x2d9b94){_0x6f1a29['push'](_0x6f1a29['shift']());}}}(a60_0x5167,0x70fa5));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';function a60_0x5167(){const _0x3808ab=['utf8','mcpServers','721uMcfTZ','其他\x20IDE\x20配置指引已显示','90gikNcn','\x20\x20\x20\x20}','复制\x20agents.md\x20文件失败','\x0a\x20\x20','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','join','95754GoxvSz','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','app','已创建\x20Cursor\x20Rules\x20文件','Cursor\x20Rules\x20文件已存在,跳过','更新现有\x20mcp.json\x20配置','\x20\x20\x22mcpServers\x22:\x20{','5204334LbycCl','\x20-e\x20LOVRABET_ENV=','message','配置信息:\x20appcode=','\x22LOVRABET_APP_CODE\x22:\x20\x22','.cursor','env','agents.md\x20文件已存在,跳过','mcp-install','复制\x20Cursor\x20Rules\x20文件失败','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','已写入\x20.cursor/mcp.json','创建新的\x20mcp.json\x20配置','\x20\x20\x20\x20\x20\x20\x20\x20','rules','utf-8','4088381dYtLWv','lovrabet_rules.mdc','详细配置指南:\x20https://help.yuntoo.com/mcp/config-guide','12iEweFS','5YqJWxw','agents.md','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','claude\x20mcp\x20add\x20','appcode','AppCode:\x20','37268660kbUtlj','mcp.json','npx','环境:\x20','452331qOkaPh','配置失败','info','mcp-claude','push','\x20-e\x20LOVRABET_APP_CODE=','29816jxjBax',',\x20env=','41AhkOCt','error','配置\x20Cursor\x20MCP\x20失败','mcp-cursor','10430gpzrOp','68aqiKzu','online','请执行以下命令配置\x20Claude\x20Code\x20MCP:'];a60_0x5167=function(){return _0x3808ab;};return a60_0x5167();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME='lovrabet-dataset';function a60_0x1c5e(_0x218fe9,_0x30b849){_0x218fe9=_0x218fe9-0xfa;const _0x51671f=a60_0x5167();let _0x1c5e38=_0x51671f[_0x218fe9];return _0x1c5e38;}export const MCP_COMMAND=a60_0x39c62e(0x10f);export const MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];export function getAppConfig(){const _0x13f190=a60_0x39c62e,_0x256516=readConfig(),_0x3089b4=_0x256516[_0x13f190(0x10b)]||_0x256516[_0x13f190(0x12d)],_0x744c47=_0x256516[_0x13f190(0x138)]||'online';if(!_0x3089b4)throw new Error('未找到\x20appcode\x20配置,请先运行\x20\x27lovrabet\x20init\x27\x20初始化项目配置');return{'appcode':String(_0x3089b4),'env':_0x744c47};}export function buildMcpEnv(_0x26343f,_0x4037dd){const _0x5e58c0={'LOVRABET_APP_CODE':_0x26343f};return _0x4037dd!=='online'&&(_0x5e58c0['LOVRABET_ENV']=_0x4037dd),_0x5e58c0;}export function buildMcpServerConfig(_0x15a309,_0x286f4a){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x15a309,_0x286f4a)};}export function buildClaudeMcpCommand(_0x78bad3,_0x261442){const _0x46e023=a60_0x39c62e,_0xcffc91=_0x46e023(0x10a)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x46e023(0x12a)]('\x20')+_0x46e023(0x116)+_0x78bad3,_0x52d4e3=_0x261442!==_0x46e023(0x11f)?_0x46e023(0x133)+_0x261442:'';return''+_0xcffc91+_0x52d4e3;}export async function copyCursorRules(_0x37afee){const _0x296e31=a60_0x39c62e,_0x595e30=join(_0x37afee,_0x296e31(0x137)),_0x594a60=join(_0x595e30,_0x296e31(0x101)),_0x2bd88a=join(_0x594a60,_0x296e31(0x104));if(existsSync(_0x2bd88a))return logger['info']('mcp-install',_0x296e31(0x12f),{'path':_0x2bd88a}),![];try{ensureDir(_0x594a60);const _0x4f6869=await getRulesContent();return writeFileSync(_0x2bd88a,_0x4f6869,_0x296e31(0x102)),logger['info'](_0x296e31(0xfb),'创建\x20Cursor\x20Rules\x20文件',{'to':_0x2bd88a}),!![];}catch(_0x45ed93){return logger[_0x296e31(0x11a)](_0x296e31(0xfb),_0x296e31(0xfc),{'error':_0x45ed93 instanceof Error?_0x45ed93[_0x296e31(0x134)]:String(_0x45ed93)}),![];}}export async function copyAgentsMd(_0x262af6){const _0x4298a9=a60_0x39c62e,_0x289ea2=join(_0x262af6,_0x4298a9(0x108));if(existsSync(_0x289ea2))return logger[_0x4298a9(0x113)](_0x4298a9(0xfb),_0x4298a9(0xfa),{'path':_0x289ea2}),![];try{const _0x468d8f=await getRulesContent();return writeFileSync(_0x289ea2,_0x468d8f,'utf-8'),logger[_0x4298a9(0x113)](_0x4298a9(0xfb),'创建\x20agents.md\x20文件',{'to':_0x289ea2}),!![];}catch(_0x5e2968){return logger['error'](_0x4298a9(0xfb),_0x4298a9(0x127),{'error':_0x5e2968 instanceof Error?_0x5e2968[_0x4298a9(0x134)]:String(_0x5e2968)}),![];}}export async function configureCursorMcp(_0x26138a){const _0x5b2a11=a60_0x39c62e;try{const {appcode:_0x55cc66,env:_0x5070ab}=getAppConfig(),_0x2e36c8=join(_0x26138a,_0x5b2a11(0x137)),_0x4f254c=join(_0x2e36c8,_0x5b2a11(0x10e));ensureDir(_0x2e36c8);const _0x5b4735=buildMcpServerConfig(_0x55cc66,_0x5070ab);let _0xbe7f3c;if(existsSync(_0x4f254c)){const _0xac5abe=readFileSync(_0x4f254c,_0x5b2a11(0x121));_0xbe7f3c=JSON['parse'](_0xac5abe),!_0xbe7f3c['mcpServers']&&(_0xbe7f3c['mcpServers']={}),logger[_0x5b2a11(0x113)]('mcp-cursor',_0x5b2a11(0x130),{'path':_0x4f254c,'appcode':_0x55cc66,'env':_0x5070ab});}else _0xbe7f3c={'mcpServers':{}},logger[_0x5b2a11(0x113)](_0x5b2a11(0x11c),_0x5b2a11(0xff),{'path':_0x4f254c,'appcode':_0x55cc66,'env':_0x5070ab});_0xbe7f3c[_0x5b2a11(0x122)][MCP_SERVER_NAME]=_0x5b4735,writeFileSync(_0x4f254c,JSON['stringify'](_0xbe7f3c,null,0x2),{'encoding':_0x5b2a11(0x121)});const _0x2aebf7=await copyCursorRules(_0x26138a),_0x2077a2=[_0x5b2a11(0xfe),_0x5b2a11(0x10c)+_0x55cc66];return _0x5070ab!==_0x5b2a11(0x11f)&&_0x2077a2['push'](_0x5b2a11(0x110)+_0x5070ab),_0x2077a2[_0x5b2a11(0x115)]('重启\x20Cursor\x20后生效'),_0x2aebf7&&_0x2077a2[_0x5b2a11(0x115)](_0x5b2a11(0x12e)),logger[_0x5b2a11(0x113)](_0x5b2a11(0x11c),'配置\x20Cursor\x20MCP\x20成功',{'appcode':_0x55cc66,'env':_0x5070ab,'configPath':_0x4f254c}),{'success':!![],'message':_0x2077a2[_0x5b2a11(0x12a)]('\x0a\x20\x20')};}catch(_0x125d79){return logger[_0x5b2a11(0x11a)](_0x5b2a11(0x11c),_0x5b2a11(0x11b),{'error':_0x125d79 instanceof Error?_0x125d79['message']:String(_0x125d79)}),{'success':![],'message':_0x125d79 instanceof Error?_0x125d79[_0x5b2a11(0x134)]:String(_0x125d79)};}}export function configureClaudeMcp(_0x35f0ad){const _0x5404a6=a60_0x39c62e;try{const {appcode:_0x88befe,env:_0x9d7f3}=getAppConfig();copyAgentsMd(_0x35f0ad);const _0x141fa2=buildClaudeMcpCommand(_0x88befe,_0x9d7f3),_0x56fd2a=[_0x5404a6(0x120),''+_0x141fa2,'配置信息:','AppCode:\x20'+_0x88befe];return _0x9d7f3!==_0x5404a6(0x11f)&&_0x56fd2a['push']('环境:\x20'+_0x9d7f3),_0x56fd2a['push']('重启\x20Claude\x20Code\x20后生效'),logger['info']('mcp-claude','生成配置命令',{'appcode':_0x88befe,'env':_0x9d7f3,'command':_0x141fa2}),{'success':!![],'message':_0x56fd2a['join'](_0x5404a6(0x128)),'needsManualAction':!![]};}catch(_0x3eae69){return logger['error'](_0x5404a6(0x114),_0x5404a6(0x112),{'error':_0x3eae69 instanceof Error?_0x3eae69[_0x5404a6(0x134)]:String(_0x3eae69)}),{'success':![],'message':_0x3eae69 instanceof Error?_0x3eae69['message']:String(_0x3eae69)};}}export function showOtherMcpGuide(_0x81a842){const _0xea0604=a60_0x39c62e;try{const {appcode:_0x575315,env:_0x17899d}=getAppConfig(),_0x4ccc08=buildMcpServerConfig(_0x575315,_0x17899d),_0x4b4183=[_0xea0604(0x136)+_0x575315+'\x22'];_0x17899d!==_0xea0604(0x11f)&&_0x4b4183[_0xea0604(0x115)]('\x22LOVRABET_ENV\x22:\x20\x22'+_0x17899d+'\x22');const _0x46bd4f=[_0xea0604(0x135)+_0x575315+_0xea0604(0x118)+_0x17899d,'{',_0xea0604(0x131),_0xea0604(0x12c),_0xea0604(0xfd),_0xea0604(0x109),_0xea0604(0x129),..._0x4b4183['map'](_0x29cce1=>_0xea0604(0x100)+_0x29cce1+','),'\x20\x20\x20\x20\x20\x20}',_0xea0604(0x126),'\x20\x20}','}',_0xea0604(0x105)];return logger[_0xea0604(0x113)](_0xea0604(0xfb),_0xea0604(0x124),{'appcode':_0x575315,'env':_0x17899d}),{'success':!![],'message':_0x46bd4f[_0xea0604(0x12a)]('\x0a'),'needsManualAction':!![]};}catch(_0x4f4af3){return{'success':![],'message':_0x4f4af3 instanceof Error?_0x4f4af3[_0xea0604(0x134)]:String(_0x4f4af3)};}}function ensureDir(_0x119d5a){!existsSync(_0x119d5a)&&mkdirSync(_0x119d5a,{'recursive':!![]});}
1
+ (function(_0x23a76b,_0x36f445){const _0x2ebc84=a65_0x2daf,_0x163311=_0x23a76b();while(!![]){try{const _0x56e36d=-parseInt(_0x2ebc84(0x14f))/0x1*(parseInt(_0x2ebc84(0x162))/0x2)+parseInt(_0x2ebc84(0x174))/0x3+parseInt(_0x2ebc84(0x145))/0x4+parseInt(_0x2ebc84(0x152))/0x5*(parseInt(_0x2ebc84(0x15a))/0x6)+parseInt(_0x2ebc84(0x170))/0x7+parseInt(_0x2ebc84(0x159))/0x8*(-parseInt(_0x2ebc84(0x144))/0x9)+parseInt(_0x2ebc84(0x149))/0xa*(-parseInt(_0x2ebc84(0x175))/0xb);if(_0x56e36d===_0x36f445)break;else _0x163311['push'](_0x163311['shift']());}catch(_0x10eae2){_0x163311['push'](_0x163311['shift']());}}}(a65_0x314d,0xe0b9d));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';import a65_0x5d59df from'../i18n/index.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME='lovrabet-dataset';export const MCP_COMMAND='npx';export const MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];export function getAppConfig(){const _0x567682=a65_0x2daf,_0x38d722=readConfig(),_0x4953b0=_0x38d722[_0x567682(0x155)]||_0x38d722[_0x567682(0x13c)],_0x432b34=_0x38d722[_0x567682(0x143)]||_0x567682(0x15d);if(!_0x4953b0)throw new Error(a65_0x5d59df['t'](_0x567682(0x16e)));return{'appcode':String(_0x4953b0),'env':_0x432b34};}export function buildMcpEnv(_0x54f39d,_0x317963){const _0x37fd21=a65_0x2daf,_0x25c7db={'LOVRABET_APP_CODE':_0x54f39d};return _0x317963!=='online'&&(_0x25c7db[_0x37fd21(0x14c)]=_0x317963),_0x25c7db;}export function buildMcpServerConfig(_0x3ae782,_0x42403b){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x3ae782,_0x42403b)};}export function buildClaudeMcpCommand(_0x2bee73,_0x144cee){const _0x495ccd=a65_0x2daf,_0x25654d=_0x495ccd(0x134)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x495ccd(0x169)]('\x20')+_0x495ccd(0x135)+_0x2bee73,_0x3bfe2a=_0x144cee!==_0x495ccd(0x15d)?_0x495ccd(0x140)+_0x144cee:'';return''+_0x25654d+_0x3bfe2a;}export async function copyCursorRules(_0x3c15a7){const _0x4c1cae=a65_0x2daf,_0x417c2b=join(_0x3c15a7,_0x4c1cae(0x14d)),_0x48de9c=join(_0x417c2b,_0x4c1cae(0x153)),_0x53a87d=join(_0x48de9c,_0x4c1cae(0x171));if(existsSync(_0x53a87d))return logger[_0x4c1cae(0x13f)](_0x4c1cae(0x13e),a65_0x5d59df['t']('mcp.cursorConfig.rules.exists'),{'path':_0x53a87d}),![];try{ensureDir(_0x48de9c);const _0x20b466=await getRulesContent();return writeFileSync(_0x53a87d,_0x20b466,_0x4c1cae(0x168)),logger['info'](_0x4c1cae(0x13e),a65_0x5d59df['t']('mcp.cursorConfig.rules.created'),{'to':_0x53a87d}),!![];}catch(_0x1412a2){return logger[_0x4c1cae(0x157)](_0x4c1cae(0x13e),a65_0x5d59df['t'](_0x4c1cae(0x156)),{'error':_0x1412a2 instanceof Error?_0x1412a2[_0x4c1cae(0x15e)]:String(_0x1412a2)}),![];}}export async function copyAgentsMd(_0x37536f){const _0x255d04=a65_0x2daf,_0x374d2c=join(_0x37536f,_0x255d04(0x142));if(existsSync(_0x374d2c))return logger['info'](_0x255d04(0x13e),a65_0x5d59df['t'](_0x255d04(0x137)),{'path':_0x374d2c}),![];try{const _0x5a11c2=await getRulesContent();return writeFileSync(_0x374d2c,_0x5a11c2,'utf-8'),logger[_0x255d04(0x13f)](_0x255d04(0x13e),a65_0x5d59df['t'](_0x255d04(0x167)),{'to':_0x374d2c}),!![];}catch(_0x596d0a){return logger[_0x255d04(0x157)]('mcp-install',a65_0x5d59df['t'](_0x255d04(0x16a)),{'error':_0x596d0a instanceof Error?_0x596d0a[_0x255d04(0x15e)]:String(_0x596d0a)}),![];}}function a65_0x2daf(_0x45c406,_0xf52861){_0x45c406=_0x45c406-0x134;const _0x314d7c=a65_0x314d();let _0x2daf72=_0x314d7c[_0x45c406];return _0x2daf72;}export async function configureCursorMcp(_0x41e3a2){const _0x266f5a=a65_0x2daf;try{const {appcode:_0x5414cd,env:_0x5051e7}=getAppConfig(),_0x3ea29e=join(_0x41e3a2,'.cursor'),_0x55b44d=join(_0x3ea29e,_0x266f5a(0x151));ensureDir(_0x3ea29e);const _0x325579=buildMcpServerConfig(_0x5414cd,_0x5051e7);let _0x2c009b;if(existsSync(_0x55b44d)){const _0x2ea81a=readFileSync(_0x55b44d,_0x266f5a(0x16f));_0x2c009b=JSON[_0x266f5a(0x158)](_0x2ea81a),!_0x2c009b[_0x266f5a(0x16b)]&&(_0x2c009b[_0x266f5a(0x16b)]={}),logger['info']('mcp-cursor',a65_0x5d59df['t'](_0x266f5a(0x146)),{'path':_0x55b44d,'appcode':_0x5414cd,'env':_0x5051e7});}else _0x2c009b={'mcpServers':{}},logger[_0x266f5a(0x13f)](_0x266f5a(0x161),a65_0x5d59df['t'](_0x266f5a(0x163)),{'path':_0x55b44d,'appcode':_0x5414cd,'env':_0x5051e7});_0x2c009b[_0x266f5a(0x16b)][MCP_SERVER_NAME]=_0x325579,writeFileSync(_0x55b44d,JSON[_0x266f5a(0x16d)](_0x2c009b,null,0x2),{'encoding':'utf8'});const _0x4039e9=await copyCursorRules(_0x41e3a2),_0x35dd79=[a65_0x5d59df['t'](_0x266f5a(0x172)),_0x266f5a(0x13b)+_0x5414cd];return _0x5051e7!==_0x266f5a(0x15d)&&_0x35dd79[_0x266f5a(0x166)](a65_0x5d59df['t'](_0x266f5a(0x173),{'env':_0x5051e7})),_0x35dd79['push'](a65_0x5d59df['t'](_0x266f5a(0x160))),_0x4039e9&&_0x35dd79[_0x266f5a(0x166)](a65_0x5d59df['t'](_0x266f5a(0x15b))),logger['info'](_0x266f5a(0x161),a65_0x5d59df['t'](_0x266f5a(0x139)),{'appcode':_0x5414cd,'env':_0x5051e7,'configPath':_0x55b44d}),{'success':!![],'message':_0x35dd79[_0x266f5a(0x169)](_0x266f5a(0x16c))};}catch(_0x3975ed){return logger[_0x266f5a(0x157)](_0x266f5a(0x161),a65_0x5d59df['t']('mcp.cursorConfig.error',{'error':_0x3975ed instanceof Error?_0x3975ed['message']:String(_0x3975ed)}),{'error':_0x3975ed instanceof Error?_0x3975ed['message']:String(_0x3975ed)}),{'success':![],'message':_0x3975ed instanceof Error?_0x3975ed[_0x266f5a(0x15e)]:String(_0x3975ed)};}}export function configureClaudeMcp(_0x18c563){const _0x139125=a65_0x2daf;try{const {appcode:_0x5cca93,env:_0x5f55b0}=getAppConfig();copyAgentsMd(_0x18c563);const _0x144170=buildClaudeMcpCommand(_0x5cca93,_0x5f55b0),_0x27de32=[a65_0x5d59df['t'](_0x139125(0x14a)),''+_0x144170,a65_0x5d59df['t'](_0x139125(0x13a)),_0x139125(0x13b)+_0x5cca93];return _0x5f55b0!==_0x139125(0x15d)&&_0x27de32[_0x139125(0x166)](a65_0x5d59df['t']('mcp.config.env',{'env':_0x5f55b0})),_0x27de32['push'](a65_0x5d59df['t'](_0x139125(0x164))),logger[_0x139125(0x13f)](_0x139125(0x141),a65_0x5d59df['t'](_0x139125(0x154)),{'appcode':_0x5cca93,'env':_0x5f55b0,'command':_0x144170}),{'success':!![],'message':_0x27de32[_0x139125(0x169)]('\x0a\x20\x20'),'needsManualAction':!![]};}catch(_0x210499){return logger[_0x139125(0x157)](_0x139125(0x141),a65_0x5d59df['t'](_0x139125(0x15f),{'error':_0x210499 instanceof Error?_0x210499[_0x139125(0x15e)]:String(_0x210499)}),{'error':_0x210499 instanceof Error?_0x210499[_0x139125(0x15e)]:String(_0x210499)}),{'success':![],'message':_0x210499 instanceof Error?_0x210499['message']:String(_0x210499)};}}function a65_0x314d(){const _0x54420c=['push','mcp.claudeConfig.agents.created','utf-8','join','mcp.claudeConfig.agents.copyFailed','mcpServers','\x0a\x20\x20','stringify','mcp.error.missingAppcode','utf8','9937893pMyJio','lovrabet_rules.mdc','mcp.cursorConfig.written','mcp.config.env','4936950cizKwv','20603FAAsjD','claude\x20mcp\x20add\x20','\x20-e\x20LOVRABET_APP_CODE=','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','mcp.claudeConfig.agents.exists','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','mcp.cursorConfig.success','mcp.claudeConfig.configInfo','AppCode:\x20','app','mcp.other.configInfo','mcp-install','info','\x20-e\x20LOVRABET_ENV=','mcp-claude','agents.md','env','697482ozeyYt','2729408rwvtzT','mcp.cursorConfig.updateExisting','mcp.other.configGuide','\x22LOVRABET_ENV\x22:\x20\x22','19230KslaBP','mcp.claudeConfig.manualCommand','map','LOVRABET_ENV','.cursor','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','410819XhWODh','\x20\x20}','mcp.json','130autJYb','rules','mcp.claudeConfig.commandGenerated','appcode','mcp.cursorConfig.rules.copyFailed','error','parse','8nohdLt','291432btSCJx','mcp.cursorConfig.rules.created','mcp.other.guideShown','online','message','mcp.claudeConfig.error','mcp.cursorConfig.restartRequired','mcp-cursor','2fuzYHp','mcp.cursorConfig.createNew','mcp.claudeConfig.restartRequired','\x20\x20\x20\x20\x20\x20}'];a65_0x314d=function(){return _0x54420c;};return a65_0x314d();}export function showOtherMcpGuide(_0x1e2170){const _0x198a98=a65_0x2daf;try{const {appcode:_0x59b6eb,env:_0x2da441}=getAppConfig(),_0x41df22=buildMcpServerConfig(_0x59b6eb,_0x2da441),_0x6fd14a=['\x22LOVRABET_APP_CODE\x22:\x20\x22'+_0x59b6eb+'\x22'];_0x2da441!==_0x198a98(0x15d)&&_0x6fd14a[_0x198a98(0x166)](_0x198a98(0x148)+_0x2da441+'\x22');const _0x1cb281=[a65_0x5d59df['t'](_0x198a98(0x13d),{'appcode':_0x59b6eb,'env':_0x2da441}),'{','\x20\x20\x22mcpServers\x22:\x20{','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{',_0x198a98(0x138),_0x198a98(0x14e),_0x198a98(0x136),..._0x6fd14a[_0x198a98(0x14b)](_0x497f3c=>'\x20\x20\x20\x20\x20\x20\x20\x20'+_0x497f3c+','),_0x198a98(0x165),'\x20\x20\x20\x20}',_0x198a98(0x150),'}',a65_0x5d59df['t'](_0x198a98(0x147))];return logger[_0x198a98(0x13f)](_0x198a98(0x13e),a65_0x5d59df['t'](_0x198a98(0x15c)),{'appcode':_0x59b6eb,'env':_0x2da441}),{'success':!![],'message':_0x1cb281[_0x198a98(0x169)]('\x0a'),'needsManualAction':!![]};}catch(_0x1a78ab){return{'success':![],'message':_0x1a78ab instanceof Error?_0x1a78ab[_0x198a98(0x15e)]:String(_0x1a78ab)};}}function ensureDir(_0x45cadd){!existsSync(_0x45cadd)&&mkdirSync(_0x45cadd,{'recursive':!![]});}
@@ -1 +1 @@
1
- const a61_0x417cd5=a61_0x4150;(function(_0x3bce8e,_0x503835){const _0x47fbf0=a61_0x4150,_0x499c19=_0x3bce8e();while(!![]){try{const _0x53bd04=-parseInt(_0x47fbf0(0x120))/0x1+parseInt(_0x47fbf0(0xf3))/0x2*(-parseInt(_0x47fbf0(0x10a))/0x3)+parseInt(_0x47fbf0(0x113))/0x4+-parseInt(_0x47fbf0(0x110))/0x5*(parseInt(_0x47fbf0(0x114))/0x6)+parseInt(_0x47fbf0(0x11f))/0x7+-parseInt(_0x47fbf0(0x115))/0x8+parseInt(_0x47fbf0(0x11c))/0x9;if(_0x53bd04===_0x503835)break;else _0x499c19['push'](_0x499c19['shift']());}catch(_0x334791){_0x499c19['push'](_0x499c19['shift']());}}}(a61_0x2977,0xb6f3b));import{jsx as a61_0x1aba55,jsxs as a61_0x5a98d9,Fragment as a61_0x28546c}from'react/jsx-runtime';import{useState,useEffect}from'react';function a61_0x4150(_0xb03a02,_0xb09aea){_0xb03a02=_0xb03a02-0xf1;const _0x297712=a61_0x2977();let _0x4150b6=_0x297712[_0xb03a02];return _0x4150b6;}import{Text,Box,useInput,useApp}from'ink';import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';function a61_0x2977(){const _0x4efbc1=['\x20\x20✓\x20','cyan','正在安装技能包...','24263271PIPpvG','\x20个目录','已选择\x20IDE','1515549HQTflO','1186087GyCavA','installing','stringify','toISOString','.lovrabet','name','message','getSelectedIDEs','26oEtfdK','selectedIndexes','green','../../cdn-source/skills','keys','已安装\x20','size','安装\x20Lovrabet\x20技能包\x20-\x20选择\x20IDE','请至少选择一个\x20IDE','\x20个开发者指南','description','info','done','...','selecting','gray','\x20\x20!\x20CDN\x20拉取失败,跳过指南安装:\x20','✓\x20拉取\x20','\x20失败:\x20','✓\x20技能包安装成功!共安装\x20','map','label','handleKeyDown','170937wPYLhI','length','正在从\x20CDN\x20拉取开发者指南','warn','setLogPath','setErrorMsg','20xgTrRi','cwd','column','3729952Eyqunn','1494618UZNLup','1378536sbeXfA','log','开发者指南位置:\x20.lovrabet/skill/.shared/guides/','guides'];a61_0x2977=function(){return _0x4efbc1;};return a61_0x2977();}import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST[a61_0x417cd5(0x107)](_0x58219d=>({'key':_0x58219d,'name':IDE_CONFIGS[_0x58219d][a61_0x417cd5(0x125)],'description':IDE_CONFIGS[_0x58219d][a61_0x417cd5(0xfd)]}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x39d683}){const _0x2d94c2=a61_0x417cd5,{exit:_0x1f2e0e}=useApp(),[_0x5466a1,_0x46750a]=useState(_0x2d94c2(0x101)),[_0x590eef,_0x4634b2]=useState([]),[_0x15ccb7,_0x312863]=useState([]),[_0x578787,_0x64a928]=useState(0x0),_0x219158=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x5bf022=_0x2d94c2;preselectedIDEs['length']>0x0&&_0x219158[_0x5bf022(0xf4)][_0x5bf022(0xf9)]>0x0&&_0x4c2c0f();},[]),useInput((_0x44c1cb,_0x6bc9e2)=>{const _0x39b6fe=_0x2d94c2;if(_0x5466a1===_0x39b6fe(0x101)){if(_0x44c1cb==='q'||_0x44c1cb==='Q'){_0x1f2e0e();return;}if(_0x6bc9e2['return']){if(_0x219158[_0x39b6fe(0xf4)][_0x39b6fe(0xf9)]===0x0){_0x219158[_0x39b6fe(0x10f)](_0x39b6fe(0xfb));return;}_0x4c2c0f();return;}_0x219158[_0x39b6fe(0x109)](_0x44c1cb,_0x6bc9e2);}_0x5466a1==='done'&&_0x1f2e0e();});async function _0x4c2c0f(){const _0x13f72b=_0x2d94c2,_0x443abc=_0x219158[_0x13f72b(0xf2)]();_0x312863(_0x443abc),_0x4634b2([{'label':_0x13f72b(0x11e),'value':_0x219158['selectedIndexes']['size']+'\x20个'}]),_0x46750a(_0x13f72b(0x121)),await _0x94fec7(_0x443abc);}async function _0x94fec7(_0x14eb30){const _0x2e71c0=_0x2d94c2,_0x53ff3f=process[_0x2e71c0(0x111)](),_0x4fabc7=resolve(__dirname,_0x2e71c0(0xf6));logger[_0x2e71c0(0x10e)](_0x53ff3f);const _0x388277=_0x39d683&&_0x39d683[_0x2e71c0(0x10b)]>0x0;console['log'](_0x2e71c0(0x10c)+(_0x388277?'(含扩展)':'')+_0x2e71c0(0x100));let _0x3b87c6;try{_0x3b87c6=await fetchGuidesFromCDN(_0x388277),console[_0x2e71c0(0x116)](_0x2e71c0(0x104)+Object[_0x2e71c0(0xf7)](_0x3b87c6[_0x2e71c0(0x118)])[_0x2e71c0(0x10b)]+_0x2e71c0(0xfc));}catch(_0x40ada2){console[_0x2e71c0(0x10d)](_0x2e71c0(0x103)+(_0x40ada2 instanceof Error?_0x40ada2['message']:String(_0x40ada2)));}let _0x4cf380=0x0;for(const _0x557bd0 of _0x14eb30){try{const _0x52fcb9=IDE_CONFIGS[_0x557bd0],_0xec31bc=await installSingleIDE(_0x557bd0,_0x52fcb9,_0x53ff3f,_0x4fabc7,_0x3b87c6,_0x39d683);_0x4cf380+=_0xec31bc,_0x64a928(_0x4cf380);}catch(_0x5bb02d){console['error']('\x20\x20✗\x20安装\x20'+_0x557bd0+_0x2e71c0(0x105)+(_0x5bb02d instanceof Error?_0x5bb02d[_0x2e71c0(0xf1)]:String(_0x5bb02d)));}}_0x3b87c6&&writeGuidesToProject(_0x3b87c6,_0x53ff3f,'.lovrabet/skill/.shared/guides',_0x39d683);const _0x38be9c={'version':'2.0.0','installedAt':new Date()[_0x2e71c0(0x123)](),'platforms':_0x14eb30},_0x58b8b9=join(_0x53ff3f,'.lovrabet/skill-manifest.json'),_0x576706=join(_0x53ff3f,_0x2e71c0(0x124));await copyDir(_0x576706,_0x576706),writeFileSync(_0x58b8b9,JSON[_0x2e71c0(0x122)](_0x38be9c,null,0x2),'utf-8'),logger[_0x2e71c0(0xfe)]('skill-install','安装成功',{'projectRoot':_0x53ff3f,'ides':_0x14eb30,'foldersCount':_0x4cf380}),_0x46750a(_0x2e71c0(0xff)),setTimeout(()=>{_0x1f2e0e();},0x3e8);}return a61_0x5a98d9(Box,{'flexDirection':_0x2d94c2(0x112),'marginTop':0x1,'children':[_0x5466a1==='selecting'&&a61_0x1aba55(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x2d94c2(0xfa),'selection':_0x219158}),_0x5466a1===_0x2d94c2(0x121)&&a61_0x1aba55(InstallingStep,{'completedSteps':_0x590eef,'installingIDEs':_0x15ccb7,'installedCount':_0x578787}),_0x5466a1===_0x2d94c2(0xff)&&a61_0x1aba55(DoneStep,{'installedCount':_0x578787})]});}function InstallingStep({completedSteps:_0x4471c4,installingIDEs:_0x27c3a3,installedCount:_0x277db2}){const _0x1c6a02=a61_0x417cd5;return a61_0x5a98d9(a61_0x28546c,{'children':[_0x4471c4[_0x1c6a02(0x107)]((_0x53d4d1,_0x28ac92)=>a61_0x5a98d9(Box,{'children':[a61_0x5a98d9(Text,{'color':_0x1c6a02(0xf5),'children':['√\x20',_0x53d4d1[_0x1c6a02(0x108)],':\x20']}),a61_0x1aba55(Text,{'color':_0x1c6a02(0x11a),'children':_0x53d4d1['value']})]},_0x28ac92)),a61_0x1aba55(Box,{'marginTop':0x1,'children':a61_0x1aba55(Text,{'children':_0x1c6a02(0x11b)})}),_0x27c3a3[_0x1c6a02(0x107)](_0x4f1555=>a61_0x5a98d9(Box,{'children':[a61_0x1aba55(Text,{'color':_0x1c6a02(0xf5),'children':_0x1c6a02(0x119)}),a61_0x1aba55(Text,{'children':IDE_CONFIGS[_0x4f1555]?.['name']||_0x4f1555})]},_0x4f1555)),a61_0x1aba55(Box,{'marginTop':0x1,'children':a61_0x5a98d9(Text,{'color':_0x1c6a02(0x102),'children':[_0x1c6a02(0xf8),_0x277db2,_0x1c6a02(0x11d)]})})]});}function DoneStep({installedCount:_0x4dda05}){const _0x2325d3=a61_0x417cd5;return a61_0x5a98d9(a61_0x28546c,{'children':[a61_0x1aba55(Box,{'children':a61_0x5a98d9(Text,{'color':_0x2325d3(0xf5),'children':[_0x2325d3(0x106),_0x4dda05,'\x20个目录']})}),a61_0x1aba55(Box,{'marginTop':0x1,'children':a61_0x1aba55(Text,{'color':_0x2325d3(0x102),'children':_0x2325d3(0x117)})}),a61_0x1aba55(Box,{'marginTop':0x1,'children':a61_0x1aba55(Text,{'color':'gray','children':'按任意键退出...'})})]});}async function copyDirIfNeeded(_0x5bb6b7,_0x1ab121){try{return await copyDir(_0x5bb6b7,_0x1ab121),!![];}catch{return![];}}
1
+ const a66_0x2ded27=a66_0x3daa;(function(_0x2e10de,_0x4270c8){const _0x503a71=a66_0x3daa,_0x586ca8=_0x2e10de();while(!![]){try{const _0x2829d5=parseInt(_0x503a71(0x13a))/0x1+parseInt(_0x503a71(0x14c))/0x2*(-parseInt(_0x503a71(0x144))/0x3)+-parseInt(_0x503a71(0x127))/0x4+-parseInt(_0x503a71(0x14b))/0x5+parseInt(_0x503a71(0x149))/0x6+-parseInt(_0x503a71(0x123))/0x7*(parseInt(_0x503a71(0x153))/0x8)+parseInt(_0x503a71(0x139))/0x9;if(_0x2829d5===_0x4270c8)break;else _0x586ca8['push'](_0x586ca8['shift']());}catch(_0xd907a){_0x586ca8['push'](_0x586ca8['shift']());}}}(a66_0x40bb,0x1d68b));import{jsx as a66_0x4ac8b1,jsxs as a66_0x2bd856,Fragment as a66_0x537357}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';function a66_0x40bb(){const _0x17db68=['.lovrabet/skill-manifest.json','cyan','setErrorMsg','skill-install','toISOString','warn','installing','64377ocaGbS','skill.error.installFailed','skill.done.pressAnyKey','info','skill.cdn.fetching','730620KVDCXn','skill.cdn.fetchingExtend','729930xMtfzq','2tWsPhP','\x20✓\x20','error','keys','length','selecting','size','48ENUFYO','name','map','log','column','gray','cwd','47348UETReD','.lovrabet/skill/.shared/guides','utf-8','description','326048hemjxK','skill.cdn.fetchFailed','label','value','selectedIndexes','skill.installing.installed','setLogPath','skill.done.successInline','stringify','安装成功','.lovrabet','green','handleKeyDown','skill.select.selectedIDE','message','return','skill.select.count','../../cdn-source/skills','1305279VCtTWm','143199gAPSOj','done','skill.installing.progress'];a66_0x40bb=function(){return _0x17db68;};return a66_0x40bb();}import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';function a66_0x3daa(_0x540431,_0x514ce6){_0x540431=_0x540431-0x11e;const _0x40bbe3=a66_0x40bb();let _0x3daaae=_0x40bbe3[_0x540431];return _0x3daaae;}import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{useI18n}from'../i18n/hooks.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST['map'](_0x6a3e4=>({'key':_0x6a3e4,'name':IDE_CONFIGS[_0x6a3e4][a66_0x2ded27(0x154)],'description':IDE_CONFIGS[_0x6a3e4][a66_0x2ded27(0x126)]}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x5ced06}){const _0x28dbb9=a66_0x2ded27,{exit:_0x263251}=useApp(),{t:_0x36b8ef}=useI18n(),[_0x3a3ba9,_0x4ee461]=useState('selecting'),[_0x5b5101,_0x27df14]=useState([]),[_0x33feda,_0x3b9851]=useState([]),[_0x273a72,_0x39eb44]=useState(0x0),_0x2854e0=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x4f7be9=a66_0x3daa;preselectedIDEs[_0x4f7be9(0x150)]>0x0&&_0x2854e0[_0x4f7be9(0x12b)][_0x4f7be9(0x152)]>0x0&&_0x26db0d();},[]),useInput((_0x4e5908,_0x3bf577)=>{const _0x6c2d0e=a66_0x3daa;if(_0x3a3ba9===_0x6c2d0e(0x151)){if(_0x4e5908==='q'||_0x4e5908==='Q'){_0x263251();return;}if(_0x3bf577[_0x6c2d0e(0x136)]){if(_0x2854e0[_0x6c2d0e(0x12b)]['size']===0x0){_0x2854e0[_0x6c2d0e(0x13f)](_0x36b8ef('skill.error.selectAtLeastOne'));return;}_0x26db0d();return;}_0x2854e0[_0x6c2d0e(0x133)](_0x4e5908,_0x3bf577);}_0x3a3ba9===_0x6c2d0e(0x13b)&&_0x263251();});async function _0x26db0d(){const _0xac8b4f=a66_0x3daa,_0x2eb09e=_0x2854e0['getSelectedIDEs']();_0x3b9851(_0x2eb09e),_0x27df14([{'label':_0x36b8ef(_0xac8b4f(0x134)),'value':_0x36b8ef(_0xac8b4f(0x137),{'count':_0x2854e0[_0xac8b4f(0x12b)][_0xac8b4f(0x152)]})}]),_0x4ee461(_0xac8b4f(0x143)),await _0x5068cb(_0x2eb09e);}async function _0x5068cb(_0x1896ea){const _0xfe6bff=a66_0x3daa,_0x23b082=process[_0xfe6bff(0x122)](),_0x4708ea=resolve(__dirname,_0xfe6bff(0x138));logger[_0xfe6bff(0x12d)](_0x23b082);const _0x2511fc=_0x5ced06&&_0x5ced06[_0xfe6bff(0x150)]>0x0;console[_0xfe6bff(0x11f)](_0x2511fc?_0x36b8ef(_0xfe6bff(0x14a)):_0x36b8ef(_0xfe6bff(0x148)));let _0x4bc72d;try{_0x4bc72d=await fetchGuidesFromCDN(_0x2511fc),console[_0xfe6bff(0x11f)](_0x36b8ef('skill.cdn.fetchSuccess',{'count':Object[_0xfe6bff(0x14f)](_0x4bc72d['guides'])[_0xfe6bff(0x150)]}));}catch(_0x562888){console[_0xfe6bff(0x142)](_0x36b8ef(_0xfe6bff(0x128),{'error':_0x562888 instanceof Error?_0x562888[_0xfe6bff(0x135)]:String(_0x562888)}));}let _0xc1e6f6=0x0;for(const _0x317e21 of _0x1896ea){try{const _0x554884=IDE_CONFIGS[_0x317e21],_0x12648b=await installSingleIDE(_0x317e21,_0x554884,_0x23b082,_0x4708ea,_0x4bc72d,_0x5ced06);_0xc1e6f6+=_0x12648b,_0x39eb44(_0xc1e6f6);}catch(_0x20f446){console[_0xfe6bff(0x14e)](_0x36b8ef(_0xfe6bff(0x145),{'ide':_0x317e21,'error':_0x20f446 instanceof Error?_0x20f446[_0xfe6bff(0x135)]:String(_0x20f446)}));}}_0x4bc72d&&writeGuidesToProject(_0x4bc72d,_0x23b082,_0xfe6bff(0x124),_0x5ced06);const _0x38da2e={'version':'2.0.0','installedAt':new Date()[_0xfe6bff(0x141)](),'platforms':_0x1896ea},_0x45ddcc=join(_0x23b082,_0xfe6bff(0x13d)),_0x14f007=join(_0x23b082,_0xfe6bff(0x131));await copyDir(_0x14f007,_0x14f007),writeFileSync(_0x45ddcc,JSON[_0xfe6bff(0x12f)](_0x38da2e,null,0x2),_0xfe6bff(0x125)),logger[_0xfe6bff(0x147)](_0xfe6bff(0x140),_0xfe6bff(0x130),{'projectRoot':_0x23b082,'ides':_0x1896ea,'foldersCount':_0xc1e6f6}),_0x4ee461(_0xfe6bff(0x13b)),setTimeout(()=>{_0x263251();},0x3e8);}return a66_0x2bd856(Box,{'flexDirection':_0x28dbb9(0x120),'marginTop':0x1,'children':[_0x3a3ba9===_0x28dbb9(0x151)&&a66_0x4ac8b1(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x36b8ef('skill.installing.title'),'selection':_0x2854e0}),_0x3a3ba9===_0x28dbb9(0x143)&&a66_0x4ac8b1(InstallingStep,{'completedSteps':_0x5b5101,'installingIDEs':_0x33feda,'installedCount':_0x273a72}),_0x3a3ba9===_0x28dbb9(0x13b)&&a66_0x4ac8b1(DoneStep,{'installedCount':_0x273a72})]});}function InstallingStep({completedSteps:_0xb2fdbd,installingIDEs:_0x2348c1,installedCount:_0x974294}){const _0x553302=a66_0x2ded27,{t:_0x43d206}=useI18n();return a66_0x2bd856(a66_0x537357,{'children':[_0xb2fdbd['map']((_0x3c189a,_0x4fecf0)=>a66_0x2bd856(Box,{'children':[a66_0x2bd856(Text,{'color':_0x553302(0x132),'children':['√\x20',_0x3c189a[_0x553302(0x129)],':\x20']}),a66_0x4ac8b1(Text,{'color':_0x553302(0x13e),'children':_0x3c189a[_0x553302(0x12a)]})]},_0x4fecf0)),a66_0x4ac8b1(Box,{'marginTop':0x1,'children':a66_0x4ac8b1(Text,{'children':_0x43d206(_0x553302(0x13c))})}),_0x2348c1[_0x553302(0x11e)](_0x329e97=>a66_0x2bd856(Box,{'children':[a66_0x4ac8b1(Text,{'color':_0x553302(0x132),'children':_0x553302(0x14d)}),a66_0x4ac8b1(Text,{'children':IDE_CONFIGS[_0x329e97]?.[_0x553302(0x154)]||_0x329e97})]},_0x329e97)),a66_0x4ac8b1(Box,{'marginTop':0x1,'children':a66_0x4ac8b1(Text,{'color':_0x553302(0x121),'children':_0x43d206(_0x553302(0x12c),{'count':_0x974294})})})]});}function DoneStep({installedCount:_0x30b23b}){const _0x386b52=a66_0x2ded27,{t:_0x46b9d9}=useI18n();return a66_0x2bd856(a66_0x537357,{'children':[a66_0x4ac8b1(Box,{'children':a66_0x4ac8b1(Text,{'color':'green','children':_0x46b9d9(_0x386b52(0x12e),{'count':_0x30b23b})})}),a66_0x4ac8b1(Box,{'marginTop':0x1,'children':a66_0x4ac8b1(Text,{'color':'gray','children':_0x46b9d9('skill.done.guidesPathInline')})}),a66_0x4ac8b1(Box,{'marginTop':0x1,'children':a66_0x4ac8b1(Text,{'color':_0x386b52(0x121),'children':_0x46b9d9(_0x386b52(0x146))})})]});}async function copyDirIfNeeded(_0xc3f736,_0x55f456){try{return await copyDir(_0xc3f736,_0x55f456),!![];}catch{return![];}}