mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-30 12:50:14 +08:00
优化:初始设置页面自动创建默认配置文件
当检测到 OpenClaw CLI 已安装但 openclaw.json 不存在时: 1. 自动创建包含合理默认值的配置文件(mode:local, tools:full 等) 2. 如果自动创建失败,显示「一键初始化配置」按钮供手动操作 3. 新增 init_openclaw_config API(dev-api.js + Tauri Rust 后端) 4. 用户不再需要去终端手动执行 openclaw configure
This commit is contained in:
@@ -286,6 +286,7 @@ export const api = {
|
||||
|
||||
// 安装/部署
|
||||
checkInstallation: () => cachedInvoke('check_installation', {}, 60000),
|
||||
initOpenclawConfig: () => { invalidate('check_installation'); return invoke('init_openclaw_config') },
|
||||
checkNode: () => cachedInvoke('check_node', {}, 60000),
|
||||
checkNodeAtPath: (nodeDir) => invoke('check_node_at_path', { node_dir: nodeDir }),
|
||||
scanNodePaths: () => invoke('scan_node_paths'),
|
||||
|
||||
Reference in New Issue
Block a user