create-openclaw-bot 5.8.1 → 5.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/README.vi.md +15 -5
- package/dist/server/local-server.js +2674 -2568
- package/dist/setup/shared/docker-gen.js +6 -1
- package/dist/setup.js +31 -26
- package/dist/web/app.js +47 -18
- package/package.json +40 -40
|
@@ -204,6 +204,7 @@ if(touched){console.log('[patch-9router] Applied Codex compatibility patch.');}e
|
|
|
204
204
|
is9Router,
|
|
205
205
|
isLocal,
|
|
206
206
|
isMultiBot,
|
|
207
|
+
hasBrowser = false,
|
|
207
208
|
selectedModel,
|
|
208
209
|
agentId,
|
|
209
210
|
allSkills = [],
|
|
@@ -321,6 +322,10 @@ if(touched){console.log('[patch-9router] Applied Codex compatibility patch.');}e
|
|
|
321
322
|
].join('\n'));
|
|
322
323
|
runtimeParts.push('openclaw gateway run');
|
|
323
324
|
const runtimeScript = ['#!/bin/sh', 'set -e', ...runtimeParts].join('\n');
|
|
325
|
+
let browserInstall = '';
|
|
326
|
+
if (hasBrowser) {
|
|
327
|
+
browserInstall = '\n# Install browser and system dependencies for Playwright\nRUN npx playwright install-deps chromium && npx playwright install chromium\n';
|
|
328
|
+
}
|
|
324
329
|
const dockerfile = `FROM node:22-slim
|
|
325
330
|
|
|
326
331
|
RUN apt-get update && apt-get install -y git curl python3 && rm -rf /var/lib/apt/lists/*
|
|
@@ -328,7 +333,7 @@ RUN apt-get update && apt-get install -y git curl python3 && rm -rf /var/lib/apt
|
|
|
328
333
|
ARG OPENCLAW_VER="${openClawNpmSpec}"
|
|
329
334
|
ARG CACHE_BUST=""
|
|
330
335
|
RUN echo "CACHE_BUST=$CACHE_BUST" && npm install -g $OPENCLAW_VER ${openClawRuntimePackages}${skillLines}${pluginLines}
|
|
331
|
-
${patchLine}
|
|
336
|
+
${patchLine}${browserInstall}
|
|
332
337
|
|
|
333
338
|
COPY entrypoint.sh /usr/local/bin/openclaw-entrypoint.sh
|
|
334
339
|
RUN chmod +x /usr/local/bin/openclaw-entrypoint.sh
|
package/dist/setup.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* ============================================
|
|
2
|
-
OpenClaw Setup Wizard
|
|
2
|
+
OpenClaw Setup Wizard — Logic v2
|
|
3
3
|
Multi-model, Multi-plugin, Multi-channel
|
|
4
4
|
============================================ */
|
|
5
|
-
// AUTO-GENERATED by build.mjs
|
|
5
|
+
// AUTO-GENERATED by build.mjs — edit files in src/setup/ instead
|
|
6
6
|
|
|
7
7
|
(function () {
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
//
|
|
10
|
+
// ── ── Globals: CDN logos, state, shared utils (setup/data/header.js) ──
|
|
11
11
|
// @ts-nocheck
|
|
12
12
|
/* eslint-disable no-undef, no-unused-vars */
|
|
13
13
|
/**
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
return Array.from(origins);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
//
|
|
92
|
+
// ── ── PROVIDERS object (setup/data/providers.js) ──────────────────────────────────────────
|
|
93
93
|
// @ts-nocheck
|
|
94
94
|
/* eslint-disable no-undef, no-unused-vars */
|
|
95
95
|
/**
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
};
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
//
|
|
215
|
+
// ── ── CHANNELS, system prompts, security rules (setup/data/channels.js)
|
|
216
216
|
// @ts-nocheck
|
|
217
217
|
/* eslint-disable no-undef, no-unused-vars */
|
|
218
218
|
/**
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
- ✅ Limit exposed ports (only 38789)`,
|
|
384
384
|
};
|
|
385
385
|
|
|
386
|
-
//
|
|
386
|
+
// ── ── PLUGINS list (setup/data/plugins.js) ──────────────────────────────────────────────────────
|
|
387
387
|
// @ts-nocheck
|
|
388
388
|
/* eslint-disable no-undef, no-unused-vars */
|
|
389
389
|
/**
|
|
@@ -452,7 +452,7 @@
|
|
|
452
452
|
];
|
|
453
453
|
|
|
454
454
|
|
|
455
|
-
//
|
|
455
|
+
// ── ── SKILLS list (setup/data/skills.js) ──────────────────────────────────────────────────────────
|
|
456
456
|
// @ts-nocheck
|
|
457
457
|
/* eslint-disable no-undef, no-unused-vars */
|
|
458
458
|
/**
|
|
@@ -615,7 +615,7 @@
|
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
|
|
618
|
-
//
|
|
618
|
+
// ── ── Shared runtime constants, relay helpers, auth profile builders (setup/shared/common-gen.js)
|
|
619
619
|
// @ts-nocheck
|
|
620
620
|
(function (root) {
|
|
621
621
|
const OPENCLAW_NPM_SPEC = 'openclaw@latest';
|
|
@@ -930,7 +930,7 @@ if (typeof exports !== 'undefined' && typeof globalThis !== 'undefined' && globa
|
|
|
930
930
|
Object.assign(exports, globalThis.__openclawCommon);
|
|
931
931
|
}
|
|
932
932
|
|
|
933
|
-
//
|
|
933
|
+
// ── ── Shared workspace file builders (IDENTITY, SOUL, AGENTS, TOOLS, TEAMS...) (setup/shared/workspace-gen.js)
|
|
934
934
|
/** @typedef {typeof globalThis & { __openclawWorkspace?: Record<string, Function> }} OpenClawWorkspaceRoot */
|
|
935
935
|
|
|
936
936
|
const workspaceRoot = /** @type {OpenClawWorkspaceRoot} */ (
|
|
@@ -1745,7 +1745,7 @@ if (typeof exports !== 'undefined' && workspaceRoot.__openclawWorkspace) {
|
|
|
1745
1745
|
Object.assign(exports, workspaceRoot.__openclawWorkspace);
|
|
1746
1746
|
}
|
|
1747
1747
|
|
|
1748
|
-
//
|
|
1748
|
+
// ── ── Centralized bot config builders (openclaw.json, exec-approvals, .env) (setup/shared/bot-config-gen.js)
|
|
1749
1749
|
// @ts-nocheck
|
|
1750
1750
|
/**
|
|
1751
1751
|
* @fileoverview Centralized bot configuration builders — single source of truth.
|
|
@@ -2216,7 +2216,7 @@ if (typeof exports !== 'undefined' && typeof globalThis !== 'undefined' && globa
|
|
|
2216
2216
|
Object.assign(exports, globalThis.__openclawBotConfig);
|
|
2217
2217
|
}
|
|
2218
2218
|
|
|
2219
|
-
//
|
|
2219
|
+
// ── ── Shared install artifacts: Chrome debug, uninstall, skill catalog (setup/shared/install-gen.js)
|
|
2220
2220
|
// @ts-nocheck
|
|
2221
2221
|
// install-gen.js — Build install/runtime artifacts (Chrome debug, uninstall, skill catalog)
|
|
2222
2222
|
// Workspace .md files are in workspace-gen.js (single source of truth).
|
|
@@ -2784,7 +2784,7 @@ if (typeof exports !== 'undefined' && typeof globalThis !== 'undefined' && globa
|
|
|
2784
2784
|
Object.assign(exports, globalThis.__openclawInstall);
|
|
2785
2785
|
}
|
|
2786
2786
|
|
|
2787
|
-
//
|
|
2787
|
+
// ── ── Shared Docker artifact helpers for wizard + CLI (setup/shared/docker-gen.js)
|
|
2788
2788
|
// @ts-nocheck
|
|
2789
2789
|
(function (root) {
|
|
2790
2790
|
const common = (typeof globalThis !== 'undefined' && globalThis.__openclawCommon) || {};
|
|
@@ -2991,6 +2991,7 @@ if(touched){console.log('[patch-9router] Applied Codex compatibility patch.');}e
|
|
|
2991
2991
|
is9Router,
|
|
2992
2992
|
isLocal,
|
|
2993
2993
|
isMultiBot,
|
|
2994
|
+
hasBrowser = false,
|
|
2994
2995
|
selectedModel,
|
|
2995
2996
|
agentId,
|
|
2996
2997
|
allSkills = [],
|
|
@@ -3108,6 +3109,10 @@ if(touched){console.log('[patch-9router] Applied Codex compatibility patch.');}e
|
|
|
3108
3109
|
].join('\n'));
|
|
3109
3110
|
runtimeParts.push('openclaw gateway run');
|
|
3110
3111
|
const runtimeScript = ['#!/bin/sh', 'set -e', ...runtimeParts].join('\n');
|
|
3112
|
+
let browserInstall = '';
|
|
3113
|
+
if (hasBrowser) {
|
|
3114
|
+
browserInstall = '\n# Install browser and system dependencies for Playwright\nRUN npx playwright install-deps chromium && npx playwright install chromium\n';
|
|
3115
|
+
}
|
|
3111
3116
|
const dockerfile = `FROM node:22-slim
|
|
3112
3117
|
|
|
3113
3118
|
RUN apt-get update && apt-get install -y git curl python3 && rm -rf /var/lib/apt/lists/*
|
|
@@ -3115,7 +3120,7 @@ RUN apt-get update && apt-get install -y git curl python3 && rm -rf /var/lib/apt
|
|
|
3115
3120
|
ARG OPENCLAW_VER="${openClawNpmSpec}"
|
|
3116
3121
|
ARG CACHE_BUST=""
|
|
3117
3122
|
RUN echo "CACHE_BUST=$CACHE_BUST" && npm install -g $OPENCLAW_VER ${openClawRuntimePackages}${skillLines}${pluginLines}
|
|
3118
|
-
${patchLine}
|
|
3123
|
+
${patchLine}${browserInstall}
|
|
3119
3124
|
|
|
3120
3125
|
COPY entrypoint.sh /usr/local/bin/openclaw-entrypoint.sh
|
|
3121
3126
|
RUN chmod +x /usr/local/bin/openclaw-entrypoint.sh
|
|
@@ -3357,7 +3362,7 @@ if (typeof exports !== 'undefined' && typeof globalThis !== 'undefined' && globa
|
|
|
3357
3362
|
|
|
3358
3363
|
|
|
3359
3364
|
|
|
3360
|
-
//
|
|
3365
|
+
// ── ── buildNativeScriptCtx and shared native runtime helpers (setup/generators/native-helpers-gen.js)
|
|
3361
3366
|
// @ts-nocheck
|
|
3362
3367
|
/* eslint-disable no-undef, no-unused-vars */
|
|
3363
3368
|
/**
|
|
@@ -3772,7 +3777,7 @@ setInterval(sync, INTERVAL);`;
|
|
|
3772
3777
|
};
|
|
3773
3778
|
}
|
|
3774
3779
|
|
|
3775
|
-
//
|
|
3780
|
+
// ── ── botEnvContent, botConfigContent, botWorkspaceFiles, botFiles, helpers (setup/generators/config-gen.js)
|
|
3776
3781
|
// @ts-nocheck
|
|
3777
3782
|
/* eslint-disable no-undef, no-unused-vars */
|
|
3778
3783
|
/**
|
|
@@ -4001,7 +4006,7 @@ setInterval(sync, INTERVAL);`;
|
|
|
4001
4006
|
}));
|
|
4002
4007
|
}
|
|
4003
4008
|
|
|
4004
|
-
//
|
|
4009
|
+
// ── ── generateZaloLoginBat, generateZaloLoginSh (unified) (setup/generators/zalo-login-gen.js)
|
|
4005
4010
|
// @ts-nocheck
|
|
4006
4011
|
/* eslint-disable no-undef, no-unused-vars */
|
|
4007
4012
|
/**
|
|
@@ -4114,7 +4119,7 @@ function generateZaloLoginSh(opts) {
|
|
|
4114
4119
|
];
|
|
4115
4120
|
}
|
|
4116
4121
|
|
|
4117
|
-
//
|
|
4122
|
+
// ── ── generateStartScript wizard wrapper (delegates to install-gen) (setup/generators/gateway-start-gen.js)
|
|
4118
4123
|
// @ts-nocheck
|
|
4119
4124
|
/* eslint-disable no-undef, no-unused-vars */
|
|
4120
4125
|
/**
|
|
@@ -4161,7 +4166,7 @@ function generateStartScript() {
|
|
|
4161
4166
|
return null;
|
|
4162
4167
|
}
|
|
4163
4168
|
|
|
4164
|
-
//
|
|
4169
|
+
// ── ── generateUninstallScript, setup script download helpers (setup/generators/download-gen.js)
|
|
4165
4170
|
// @ts-nocheck
|
|
4166
4171
|
/* eslint-disable no-undef, no-unused-vars */
|
|
4167
4172
|
/**
|
|
@@ -4418,7 +4423,7 @@ window.__downloadGen = {
|
|
|
4418
4423
|
updateDockerDlLabel,
|
|
4419
4424
|
};
|
|
4420
4425
|
|
|
4421
|
-
//
|
|
4426
|
+
// ── ── Windows .bat — if (state.nativeOs === "win") block (setup/os/win-bat.js)
|
|
4422
4427
|
// @ts-nocheck
|
|
4423
4428
|
/* eslint-disable no-undef, no-unused-vars */
|
|
4424
4429
|
/**
|
|
@@ -4558,7 +4563,7 @@ function generateWinBat(ctx) {
|
|
|
4558
4563
|
return { scriptName, scriptContent };
|
|
4559
4564
|
}
|
|
4560
4565
|
|
|
4561
|
-
//
|
|
4566
|
+
// ── ── macOS .sh — if (state.nativeOs === "macos") block (setup/os/macos-sh.js)
|
|
4562
4567
|
// @ts-nocheck
|
|
4563
4568
|
/* eslint-disable no-undef, no-unused-vars */
|
|
4564
4569
|
/**
|
|
@@ -4676,7 +4681,7 @@ function generateMacOsSh(ctx) {
|
|
|
4676
4681
|
return { scriptName, scriptContent };
|
|
4677
4682
|
}
|
|
4678
4683
|
|
|
4679
|
-
//
|
|
4684
|
+
// ── ── VPS/PM2 .sh — if (state.nativeOs === "vps") block (setup/os/vps-sh.js)
|
|
4680
4685
|
// @ts-nocheck
|
|
4681
4686
|
/* eslint-disable no-undef, no-unused-vars */
|
|
4682
4687
|
/**
|
|
@@ -4801,7 +4806,7 @@ GWEOF`);
|
|
|
4801
4806
|
return { scriptName, scriptContent };
|
|
4802
4807
|
}
|
|
4803
4808
|
|
|
4804
|
-
//
|
|
4809
|
+
// ── ── Linux Desktop .sh — if (state.nativeOs === "linux-desktop") block (setup/os/linux-sh.js)
|
|
4805
4810
|
// @ts-nocheck
|
|
4806
4811
|
/* eslint-disable no-undef, no-unused-vars */
|
|
4807
4812
|
/**
|
|
@@ -4864,7 +4869,7 @@ function generateLinuxSh(ctx) {
|
|
|
4864
4869
|
return { scriptName, scriptContent };
|
|
4865
4870
|
}
|
|
4866
4871
|
|
|
4867
|
-
//
|
|
4872
|
+
// ── ── UI init, language/channel/deploy controllers, form rendering (setup/ui/controller.js)
|
|
4868
4873
|
// @ts-nocheck
|
|
4869
4874
|
/* eslint-disable no-undef, no-unused-vars */
|
|
4870
4875
|
/**
|
|
@@ -5513,7 +5518,7 @@ function generateLinuxSh(ctx) {
|
|
|
5513
5518
|
envContent.textContent = lines.join('\n');
|
|
5514
5519
|
}
|
|
5515
5520
|
|
|
5516
|
-
//
|
|
5521
|
+
// ── ── Multi-bot state + UI (setup/ui/multi-bot.js) ──────────────────────────────────────
|
|
5517
5522
|
// @ts-nocheck
|
|
5518
5523
|
/* eslint-disable no-undef, no-unused-vars */
|
|
5519
5524
|
/**
|
|
@@ -5862,7 +5867,7 @@ function generateLinuxSh(ctx) {
|
|
|
5862
5867
|
|
|
5863
5868
|
// ========== Step 1: Deploy Mode + OS ==========
|
|
5864
5869
|
|
|
5865
|
-
//
|
|
5870
|
+
// ── ── Step navigation, validation (setup/ui/steps.js) ────────────────────────────────
|
|
5866
5871
|
// @ts-nocheck
|
|
5867
5872
|
/* eslint-disable no-undef, no-unused-vars */
|
|
5868
5873
|
/**
|
|
@@ -6022,7 +6027,7 @@ function generateLinuxSh(ctx) {
|
|
|
6022
6027
|
|
|
6023
6028
|
// ========== Step 2: Bot Config ==========
|
|
6024
6029
|
|
|
6025
|
-
//
|
|
6030
|
+
// ── ── generateOutput + generateNativeScript + clipboard (setup/ui/output.js)
|
|
6026
6031
|
// @ts-nocheck
|
|
6027
6032
|
/* eslint-disable no-undef, no-unused-vars */
|
|
6028
6033
|
/**
|
package/dist/web/app.js
CHANGED
|
@@ -272,6 +272,37 @@ async function pickFolderPathShared() {
|
|
|
272
272
|
return null;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
function topbarActionsHtml() {
|
|
276
|
+
const setupVer = state.system?.versions?.setup;
|
|
277
|
+
const latestSetupVer = state.system?.versions?.latestSetup;
|
|
278
|
+
const hasNewVersion = setupVer && latestSetupVer && setupVer !== latestSetupVer;
|
|
279
|
+
return `
|
|
280
|
+
<div class="seg" role="group" aria-label="theme">
|
|
281
|
+
<button class="seg__btn ${state.theme==='light'?'is-active':''}" data-pref="theme" data-value="light" style="display: inline-flex; align-items: center; gap: 6px;">
|
|
282
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="width:14px; height:14px;"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="4.22" x2="19.78" y2="5.64"/></svg>
|
|
283
|
+
<span>${ui('light')}</span>
|
|
284
|
+
</button>
|
|
285
|
+
<button class="seg__btn ${state.theme==='dark'?'is-active':''}" data-pref="theme" data-value="dark" style="display: inline-flex; align-items: center; gap: 6px;">
|
|
286
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="width:14px; height:14px;"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
|
|
287
|
+
<span>${ui('dark')}</span>
|
|
288
|
+
</button>
|
|
289
|
+
</div>
|
|
290
|
+
<div class="seg" role="group" aria-label="lang" style="display: inline-flex; align-items: center; gap: 4px;">
|
|
291
|
+
<span style="display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; color: var(--muted);">
|
|
292
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="width:15px; height:15px;"><circle cx="12" cy="12" r="10"/><path d="M2 12h20"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>
|
|
293
|
+
</span>
|
|
294
|
+
<button class="seg__btn ${state.lang==='vi'?'is-active':''}" data-pref="lang" data-value="vi">VI</button>
|
|
295
|
+
<button class="seg__btn ${state.lang==='en'?'is-active':''}" data-pref="lang" data-value="en">EN</button>
|
|
296
|
+
</div>
|
|
297
|
+
${hasNewVersion ? `
|
|
298
|
+
<button class="topbar__btn seg__btn" data-update-setup style="display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--ok); background: rgba(46, 230, 166, 0.08); color: var(--ok); font-weight: 600; cursor: pointer; transition: background 0.2s;">
|
|
299
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="width:14px; height:14px;"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>
|
|
300
|
+
<span>${t('Cập nhật', 'Update')}</span>
|
|
301
|
+
</button>
|
|
302
|
+
` : ''}
|
|
303
|
+
`;
|
|
304
|
+
}
|
|
305
|
+
|
|
275
306
|
function render() {
|
|
276
307
|
applyPrefs();
|
|
277
308
|
const tabs = [['dashboard',t('Dashboard','Dashboard')],['setup',ui('setup')],['bot',ui('bot')],['logs',ui('logs')]];
|
|
@@ -291,23 +322,7 @@ function render() {
|
|
|
291
322
|
<input aria-label="Search" placeholder="${t('T\u00ecm nhanh...', 'Quick search...')}" />
|
|
292
323
|
</div>
|
|
293
324
|
<div class="topbar__actions">
|
|
294
|
-
|
|
295
|
-
<button class="seg__btn ${state.theme==='light'?'is-active':''}" data-pref="theme" data-value="light" style="display: inline-flex; align-items: center; gap: 6px;">
|
|
296
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="width:14px; height:14px;"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="4.22" x2="19.78" y2="5.64"/></svg>
|
|
297
|
-
<span>${ui('light')}</span>
|
|
298
|
-
</button>
|
|
299
|
-
<button class="seg__btn ${state.theme==='dark'?'is-active':''}" data-pref="theme" data-value="dark" style="display: inline-flex; align-items: center; gap: 6px;">
|
|
300
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="width:14px; height:14px;"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
|
|
301
|
-
<span>${ui('dark')}</span>
|
|
302
|
-
</button>
|
|
303
|
-
</div>
|
|
304
|
-
<div class="seg" role="group" aria-label="lang" style="display: inline-flex; align-items: center; gap: 4px;">
|
|
305
|
-
<span style="display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; color: var(--muted);">
|
|
306
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="width:15px; height:15px;"><circle cx="12" cy="12" r="10"/><path d="M2 12h20"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>
|
|
307
|
-
</span>
|
|
308
|
-
<button class="seg__btn ${state.lang==='vi'?'is-active':''}" data-pref="lang" data-value="vi">VI</button>
|
|
309
|
-
<button class="seg__btn ${state.lang==='en'?'is-active':''}" data-pref="lang" data-value="en">EN</button>
|
|
310
|
-
</div>
|
|
325
|
+
${topbarActionsHtml()}
|
|
311
326
|
</div>
|
|
312
327
|
</header>
|
|
313
328
|
<header class="top"><div><p class="eyebrow">${ui('installer')}</p><h1 id="app-page-title">${title()}</h1></div></header>
|
|
@@ -334,6 +349,9 @@ function render() {
|
|
|
334
349
|
const panelEl = $('.panel');
|
|
335
350
|
if (panelEl) panelEl.innerHTML = content();
|
|
336
351
|
|
|
352
|
+
const actionsEl = $('.topbar__actions');
|
|
353
|
+
if (actionsEl) actionsEl.innerHTML = topbarActionsHtml();
|
|
354
|
+
|
|
337
355
|
document.querySelectorAll('.sidebar-nav button, .bottom-nav button').forEach(btn => {
|
|
338
356
|
const active = btn.dataset.tab === state.tab;
|
|
339
357
|
btn.classList.toggle('active', active);
|
|
@@ -915,7 +933,18 @@ document.querySelectorAll('[data-project-pick-folder]').forEach(btn => btn.oncli
|
|
|
915
933
|
showToast(t('Lỗi kết nối', 'Connection error'), err.message, 'error');
|
|
916
934
|
render();
|
|
917
935
|
}));
|
|
918
|
-
|
|
936
|
+
document.querySelectorAll('[data-update-setup]').forEach(btn => btn.onclick = () => withButtonLoading(btn, async () => {
|
|
937
|
+
state.tab = 'logs';
|
|
938
|
+
render();
|
|
939
|
+
try {
|
|
940
|
+
showToast(t('Đang cập nhật...', 'Updating...'), t('Đang tiến hành cập nhật Setup Wizard.', 'Updating Setup Wizard now.'), 'info');
|
|
941
|
+
await api('/api/setup/update', { method: 'POST' });
|
|
942
|
+
showToast(t('Khởi động cập nhật', 'Update started'), t('Đang kéo code mới và nâng cấp trong nền.', 'Pulling new code and upgrading in the background.'), 'success');
|
|
943
|
+
} catch (err) {
|
|
944
|
+
showToast(t('Cập nhật thất bại', 'Update failed'), err.message, 'error');
|
|
945
|
+
}
|
|
946
|
+
}));
|
|
947
|
+
document.querySelectorAll('[data-update-app]').forEach(btn => btn.onclick = () => withButtonLoading(btn, async () => {
|
|
919
948
|
await api('/api/runtime/update', { method: 'POST', body: { target: 'openclaw' } });
|
|
920
949
|
await loadSystem();
|
|
921
950
|
await loadStatus();
|
package/package.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-openclaw-bot",
|
|
3
|
-
"version": "5.8.
|
|
4
|
-
"description": "Interactive CLI installer for OpenClaw Bot",
|
|
5
|
-
"main": "dist/cli.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"create-openclaw-bot": "./dist/cli.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"dist"
|
|
11
|
-
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "node
|
|
14
|
-
"dev": "node
|
|
15
|
-
"start": "node dist/cli.js",
|
|
16
|
-
"test": "node
|
|
17
|
-
"bump": "node
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"openclaw",
|
|
21
|
-
"cli",
|
|
22
|
-
"bot",
|
|
23
|
-
"zalo",
|
|
24
|
-
"telegram",
|
|
25
|
-
"ai"
|
|
26
|
-
],
|
|
27
|
-
"author": "tuanminhhole",
|
|
28
|
-
"license": "MIT",
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@inquirer/prompts": "^4.3.1",
|
|
31
|
-
"chalk": "^5.3.0",
|
|
32
|
-
"fs-extra": "^11.2.0"
|
|
33
|
-
},
|
|
34
|
-
"bundleDependencies": [
|
|
35
|
-
"@inquirer/prompts",
|
|
36
|
-
"chalk",
|
|
37
|
-
"fs-extra"
|
|
38
|
-
],
|
|
39
|
-
"type": "module"
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "create-openclaw-bot",
|
|
3
|
+
"version": "5.8.2",
|
|
4
|
+
"description": "Interactive CLI installer for OpenClaw Bot",
|
|
5
|
+
"main": "dist/cli.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-openclaw-bot": "./dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "node docs_dev/tests/build.mjs --deploy",
|
|
14
|
+
"dev": "node docs_dev/tests/build.mjs --deploy --watch",
|
|
15
|
+
"start": "node dist/cli.js",
|
|
16
|
+
"test": "node docs_dev/tests/smoke-cli-logic.mjs && node docs_dev/tests/test-generation.mjs && node docs_dev/tests/test-matrix.mjs && node docs_dev/tests/test-local-server.mjs",
|
|
17
|
+
"bump": "node docs_dev/tests/bump-version.mjs"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"openclaw",
|
|
21
|
+
"cli",
|
|
22
|
+
"bot",
|
|
23
|
+
"zalo",
|
|
24
|
+
"telegram",
|
|
25
|
+
"ai"
|
|
26
|
+
],
|
|
27
|
+
"author": "tuanminhhole",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@inquirer/prompts": "^4.3.1",
|
|
31
|
+
"chalk": "^5.3.0",
|
|
32
|
+
"fs-extra": "^11.2.0"
|
|
33
|
+
},
|
|
34
|
+
"bundleDependencies": [
|
|
35
|
+
"@inquirer/prompts",
|
|
36
|
+
"chalk",
|
|
37
|
+
"fs-extra"
|
|
38
|
+
],
|
|
39
|
+
"type": "module"
|
|
40
|
+
}
|