codexmate 0.0.21 → 0.0.22
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 +389 -284
- package/README.zh.md +321 -0
- package/cli/agents-files.js +224 -162
- package/cli/archive-helpers.js +446 -446
- package/cli/auth-profiles.js +359 -359
- package/cli/builtin-proxy.js +1044 -580
- package/cli/claude-proxy.js +998 -998
- package/cli/config-bootstrap.js +384 -384
- package/cli/config-health.js +338 -338
- package/cli/openai-bridge.js +950 -0
- package/cli/openclaw-config.js +629 -629
- package/cli/session-usage.concurrent.js +28 -0
- package/cli/session-usage.js +112 -0
- package/cli/session-usage.models.js +176 -0
- package/cli/skills.js +1141 -1141
- package/cli/zip-commands.js +510 -510
- package/cli.js +13214 -13129
- package/lib/cli-file-utils.js +151 -151
- package/lib/cli-models-utils.js +419 -419
- package/lib/cli-network-utils.js +164 -164
- package/lib/cli-path-utils.js +69 -69
- package/lib/cli-session-utils.js +121 -121
- package/lib/cli-sessions.js +386 -386
- package/lib/cli-utils.js +155 -155
- package/lib/download-artifacts.js +77 -77
- package/lib/mcp-stdio.js +440 -440
- package/lib/task-orchestrator.js +869 -869
- package/lib/text-diff.js +303 -303
- package/lib/workflow-engine.js +340 -340
- package/package.json +74 -74
- package/res/json5.min.js +1 -1
- package/res/logo.png +0 -0
- package/res/vue.global.prod.js +13 -13
- package/web-ui/app.js +575 -530
- package/web-ui/index.html +34 -33
- package/web-ui/logic.agents-diff.mjs +386 -386
- package/web-ui/logic.claude.mjs +168 -168
- package/web-ui/logic.mjs +5 -5
- package/web-ui/logic.runtime.mjs +128 -124
- package/web-ui/logic.sessions.mjs +614 -581
- package/web-ui/modules/api.mjs +90 -90
- package/web-ui/modules/app.computed.dashboard.mjs +126 -113
- package/web-ui/modules/app.computed.index.mjs +17 -15
- package/web-ui/modules/app.computed.main-tabs.mjs +198 -195
- package/web-ui/modules/app.computed.session.mjs +653 -507
- package/web-ui/modules/app.constants.mjs +15 -15
- package/web-ui/modules/app.methods.agents.mjs +544 -493
- package/web-ui/modules/app.methods.claude-config.mjs +174 -174
- package/web-ui/modules/app.methods.codex-config.mjs +795 -640
- package/web-ui/modules/app.methods.index.mjs +92 -88
- package/web-ui/modules/app.methods.install.mjs +161 -149
- package/web-ui/modules/app.methods.navigation.mjs +619 -619
- package/web-ui/modules/app.methods.openclaw-core.mjs +814 -814
- package/web-ui/modules/app.methods.openclaw-editing.mjs +372 -372
- package/web-ui/modules/app.methods.openclaw-persist.mjs +369 -369
- package/web-ui/modules/app.methods.providers.mjs +404 -363
- package/web-ui/modules/app.methods.runtime.mjs +323 -323
- package/web-ui/modules/app.methods.session-actions.mjs +537 -520
- package/web-ui/modules/app.methods.session-browser.mjs +626 -626
- package/web-ui/modules/app.methods.session-timeline.mjs +448 -448
- package/web-ui/modules/app.methods.session-trash.mjs +422 -422
- package/web-ui/modules/app.methods.startup-claude.mjs +405 -412
- package/web-ui/modules/app.methods.task-orchestration.mjs +471 -471
- package/web-ui/modules/config-mode.computed.mjs +126 -126
- package/web-ui/modules/config-template-confirm-pref.mjs +33 -0
- package/web-ui/modules/i18n.mjs +1609 -0
- package/web-ui/modules/plugins.computed.mjs +220 -0
- package/web-ui/modules/plugins.methods.mjs +620 -0
- package/web-ui/modules/plugins.storage.mjs +37 -0
- package/web-ui/modules/skills.computed.mjs +107 -107
- package/web-ui/modules/skills.methods.mjs +481 -481
- package/web-ui/partials/index/layout-footer.html +13 -13
- package/web-ui/partials/index/layout-header.html +461 -402
- package/web-ui/partials/index/modal-config-template-agents.html +175 -125
- package/web-ui/partials/index/modal-confirm-toast.html +32 -32
- package/web-ui/partials/index/modal-health-check.html +72 -72
- package/web-ui/partials/index/modal-openclaw-config.html +280 -280
- package/web-ui/partials/index/modal-skills.html +200 -184
- package/web-ui/partials/index/modals-basic.html +165 -156
- package/web-ui/partials/index/panel-config-claude.html +138 -126
- package/web-ui/partials/index/panel-config-codex.html +234 -237
- package/web-ui/partials/index/panel-config-openclaw.html +78 -78
- package/web-ui/partials/index/panel-docs.html +147 -130
- package/web-ui/partials/index/panel-market.html +174 -174
- package/web-ui/partials/index/panel-orchestration.html +397 -397
- package/web-ui/partials/index/panel-plugins.html +243 -0
- package/web-ui/partials/index/panel-sessions.html +292 -292
- package/web-ui/partials/index/panel-settings.html +258 -190
- package/web-ui/partials/index/panel-usage.html +353 -213
- package/web-ui/session-helpers.mjs +573 -559
- package/web-ui/source-bundle.cjs +233 -233
- package/web-ui/styles/base-theme.css +264 -271
- package/web-ui/styles/controls-forms.css +362 -360
- package/web-ui/styles/docs-panel.css +247 -182
- package/web-ui/styles/feedback.css +108 -108
- package/web-ui/styles/health-check-dialog.css +144 -144
- package/web-ui/styles/layout-shell.css +596 -376
- package/web-ui/styles/modals-core.css +464 -464
- package/web-ui/styles/navigation-panels.css +382 -348
- package/web-ui/styles/openclaw-structured.css +266 -266
- package/web-ui/styles/plugins-panel.css +518 -0
- package/web-ui/styles/responsive.css +456 -450
- package/web-ui/styles/sessions-list.css +400 -400
- package/web-ui/styles/sessions-preview.css +411 -411
- package/web-ui/styles/sessions-toolbar-trash.css +268 -243
- package/web-ui/styles/sessions-usage.css +851 -628
- package/web-ui/styles/settings-panel.css +166 -0
- package/web-ui/styles/skills-list.css +303 -296
- package/web-ui/styles/skills-market.css +396 -335
- package/web-ui/styles/task-orchestration.css +776 -776
- package/web-ui/styles/titles-cards.css +408 -408
- package/web-ui/styles.css +20 -18
- package/web-ui.html +17 -17
- package/README.en.md +0 -349
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
<!-- OpenClaw 配置模式 -->
|
|
2
|
-
<div
|
|
3
|
-
v-show="mainTab === 'config' && configMode === 'openclaw'"
|
|
4
|
-
class="mode-content mode-cards"
|
|
5
|
-
id="panel-config-openclaw"
|
|
6
|
-
role="tabpanel"
|
|
7
|
-
:aria-labelledby="'tab-config-openclaw'">
|
|
8
|
-
<div class="config-template-hint">
|
|
9
|
-
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<div class="selector-section">
|
|
13
|
-
<div class="selector-header">
|
|
14
|
-
<span class="selector-title">AGENTS.md</span>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="config-template-hint">
|
|
17
|
-
|
|
18
|
-
</div>
|
|
19
|
-
<button class="btn-tool" @click="openOpenclawAgentsEditor" :disabled="loading || !!initError || agentsLoading">
|
|
20
|
-
{{ agentsLoading ? '
|
|
21
|
-
</button>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<div class="selector-section">
|
|
25
|
-
<div class="selector-header">
|
|
26
|
-
<label class="selector-title" for="openclaw-workspace-file"
|
|
27
|
-
</div>
|
|
28
|
-
<input
|
|
29
|
-
id="openclaw-workspace-file"
|
|
30
|
-
class="form-input"
|
|
31
|
-
v-model="openclawWorkspaceFileName"
|
|
32
|
-
placeholder="
|
|
33
|
-
<div class="config-template-hint">
|
|
34
|
-
|
|
35
|
-
</div>
|
|
36
|
-
<button class="btn-tool" @click="openOpenclawWorkspaceEditor" :disabled="loading || !!initError || agentsLoading">
|
|
37
|
-
{{ agentsLoading ? '
|
|
38
|
-
</button>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="card-list">
|
|
42
|
-
<div v-for="(config, name) in openclawConfigs" :key="name"
|
|
43
|
-
:class="['card', { active: currentOpenclawConfig === name }]"
|
|
44
|
-
@click="applyOpenclawConfig(name)"
|
|
45
|
-
@keydown.enter.self.prevent="applyOpenclawConfig(name)"
|
|
46
|
-
@keydown.space.self.prevent="applyOpenclawConfig(name)"
|
|
47
|
-
tabindex="0"
|
|
48
|
-
role="button"
|
|
49
|
-
:aria-current="currentOpenclawConfig === name ? 'true' : null">
|
|
50
|
-
<div class="card-leading">
|
|
51
|
-
<div class="card-icon">{{ name.charAt(0).toUpperCase() }}</div>
|
|
52
|
-
<div class="card-content">
|
|
53
|
-
<div class="card-title">{{ name }}</div>
|
|
54
|
-
<div class="card-subtitle">{{ openclawSubtitle(config) }}</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="card-trailing">
|
|
58
|
-
<span :class="['pill', openclawHasContent(config) ? 'configured' : 'empty']">
|
|
59
|
-
{{ openclawHasContent(config) ? '
|
|
60
|
-
</span>
|
|
61
|
-
<div class="card-actions" @click.stop>
|
|
62
|
-
<button class="card-action-btn" @click="openOpenclawEditModal(name)" :aria-label="`Edit OpenClaw config ${name}`" title="
|
|
63
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
64
|
-
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
|
|
65
|
-
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
|
|
66
|
-
</svg>
|
|
67
|
-
</button>
|
|
68
|
-
<button v-if="name !== '默认配置'" class="card-action-btn delete" @click="deleteOpenclawConfig(name)" :aria-label="`Delete OpenClaw config ${name}`" title="
|
|
69
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
70
|
-
<path d="M3 6h18"/>
|
|
71
|
-
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
|
|
72
|
-
</svg>
|
|
73
|
-
</button>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
1
|
+
<!-- OpenClaw 配置模式 -->
|
|
2
|
+
<div
|
|
3
|
+
v-show="mainTab === 'config' && configMode === 'openclaw'"
|
|
4
|
+
class="mode-content mode-cards"
|
|
5
|
+
id="panel-config-openclaw"
|
|
6
|
+
role="tabpanel"
|
|
7
|
+
:aria-labelledby="'tab-config-openclaw'">
|
|
8
|
+
<div class="config-template-hint">
|
|
9
|
+
{{ t('openclaw.applyHint') }}
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="selector-section">
|
|
13
|
+
<div class="selector-header">
|
|
14
|
+
<span class="selector-title">AGENTS.md</span>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="config-template-hint">
|
|
17
|
+
{{ t('openclaw.agents.hint') }}
|
|
18
|
+
</div>
|
|
19
|
+
<button class="btn-tool" @click="openOpenclawAgentsEditor" :disabled="loading || !!initError || agentsLoading">
|
|
20
|
+
{{ agentsLoading ? t('config.modelLoading') : t('openclaw.agents.open') }}
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="selector-section">
|
|
25
|
+
<div class="selector-header">
|
|
26
|
+
<label class="selector-title" for="openclaw-workspace-file">{{ t('openclaw.workspaceFile') }}</label>
|
|
27
|
+
</div>
|
|
28
|
+
<input
|
|
29
|
+
id="openclaw-workspace-file"
|
|
30
|
+
class="form-input"
|
|
31
|
+
v-model="openclawWorkspaceFileName"
|
|
32
|
+
:placeholder="t('openclaw.workspace.placeholder')">
|
|
33
|
+
<div class="config-template-hint">
|
|
34
|
+
{{ t('openclaw.workspace.hint') }}
|
|
35
|
+
</div>
|
|
36
|
+
<button class="btn-tool" @click="openOpenclawWorkspaceEditor" :disabled="loading || !!initError || agentsLoading">
|
|
37
|
+
{{ agentsLoading ? t('config.modelLoading') : t('openclaw.workspace.open') }}
|
|
38
|
+
</button>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="card-list">
|
|
42
|
+
<div v-for="(config, name) in openclawConfigs" :key="name"
|
|
43
|
+
:class="['card', { active: currentOpenclawConfig === name }]"
|
|
44
|
+
@click="applyOpenclawConfig(name)"
|
|
45
|
+
@keydown.enter.self.prevent="applyOpenclawConfig(name)"
|
|
46
|
+
@keydown.space.self.prevent="applyOpenclawConfig(name)"
|
|
47
|
+
tabindex="0"
|
|
48
|
+
role="button"
|
|
49
|
+
:aria-current="currentOpenclawConfig === name ? 'true' : null">
|
|
50
|
+
<div class="card-leading">
|
|
51
|
+
<div class="card-icon">{{ name.charAt(0).toUpperCase() }}</div>
|
|
52
|
+
<div class="card-content">
|
|
53
|
+
<div class="card-title">{{ name }}</div>
|
|
54
|
+
<div class="card-subtitle">{{ openclawSubtitle(config) }}</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="card-trailing">
|
|
58
|
+
<span :class="['pill', openclawHasContent(config) ? 'configured' : 'empty']">
|
|
59
|
+
{{ openclawHasContent(config) ? t('openclaw.configured') : t('openclaw.notConfigured') }}
|
|
60
|
+
</span>
|
|
61
|
+
<div class="card-actions" @click.stop>
|
|
62
|
+
<button class="card-action-btn" @click="openOpenclawEditModal(name)" :aria-label="`Edit OpenClaw config ${name}`" :title="t('openclaw.action.edit')">
|
|
63
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
64
|
+
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
|
|
65
|
+
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
|
|
66
|
+
</svg>
|
|
67
|
+
</button>
|
|
68
|
+
<button v-if="name !== '默认配置'" class="card-action-btn delete" @click="deleteOpenclawConfig(name)" :aria-label="`Delete OpenClaw config ${name}`" :title="t('openclaw.action.delete')">
|
|
69
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
70
|
+
<path d="M3 6h18"/>
|
|
71
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
|
|
72
|
+
</svg>
|
|
73
|
+
</button>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
@@ -1,130 +1,147 @@
|
|
|
1
|
-
<div
|
|
2
|
-
v-show="mainTab === 'docs'"
|
|
3
|
-
class="mode-content docs-mode-content"
|
|
4
|
-
id="panel-docs"
|
|
5
|
-
role="tabpanel"
|
|
6
|
-
aria-labelledby="tab-docs">
|
|
7
|
-
<div class="selector-section docs-overview-section">
|
|
8
|
-
<div class="selector-header docs-overview-header">
|
|
9
|
-
<div>
|
|
10
|
-
<span class="selector-title">
|
|
11
|
-
<div class="skills-panel-note docs-section-note"
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<div class="docs-toolbar-grid">
|
|
16
|
-
<div class="docs-toolbar-card">
|
|
17
|
-
<label class="form-label" for="docs-install-package-manager"
|
|
18
|
-
<select id="docs-install-package-manager" class="form-input" v-model="installPackageManager">
|
|
19
|
-
<option value="npm">npm</option>
|
|
20
|
-
<option value="pnpm">pnpm</option>
|
|
21
|
-
<option value="bun">bun</option>
|
|
22
|
-
</select>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<div class="docs-toolbar-card docs-toolbar-card-wide">
|
|
26
|
-
<label class="form-label"
|
|
27
|
-
<div class="install-action-tabs">
|
|
28
|
-
<button type="button" class="btn-mini" :class="{ active: installRegistryPreset === 'default' }" @click="setInstallRegistryPreset('default')"
|
|
29
|
-
<button type="button" class="btn-mini" :class="{ active: installRegistryPreset === 'npmmirror' }" @click="setInstallRegistryPreset('npmmirror')">npmmirror</button>
|
|
30
|
-
<button type="button" class="btn-mini" :class="{ active: installRegistryPreset === 'tencent' }" @click="setInstallRegistryPreset('tencent')"
|
|
31
|
-
<button type="button" class="btn-mini" :class="{ active: installRegistryPreset === 'custom' }" @click="setInstallRegistryPreset('custom')"
|
|
32
|
-
</div>
|
|
33
|
-
<input
|
|
34
|
-
v-if="installRegistryPreset === 'custom'"
|
|
35
|
-
v-model="installRegistryCustom"
|
|
36
|
-
class="form-input install-registry-input"
|
|
37
|
-
placeholder="https://registry.example.com">
|
|
38
|
-
<div class="form-hint install-registry-hint" v-if="installRegistryPreview">
|
|
39
|
-
|
|
40
|
-
</div>
|
|
41
|
-
<div class="form-hint install-registry-hint" v-else-if="installRegistryPreset === 'custom'">
|
|
42
|
-
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div class="docs-toolbar-card docs-toolbar-card-wide">
|
|
47
|
-
<label class="form-label"
|
|
48
|
-
<div class="install-action-tabs">
|
|
49
|
-
<button type="button" class="btn-mini" :class="{ active: installCommandAction === 'install' }" @click="setInstallCommandAction('install')"
|
|
50
|
-
<button type="button" class="btn-mini" :class="{ active: installCommandAction === 'update' }" @click="setInstallCommandAction('update')"
|
|
51
|
-
<button type="button" class="btn-mini" :class="{ active: installCommandAction === 'uninstall' }" @click="setInstallCommandAction('uninstall')"
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<div class="docs-summary-strip">
|
|
57
|
-
<div class="docs-summary-item">
|
|
58
|
-
<span class="docs-summary-label"
|
|
59
|
-
<strong class="docs-summary-value">{{ installTargetCards.length }}</strong>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="docs-summary-item">
|
|
62
|
-
<span class="docs-summary-label"
|
|
63
|
-
<strong class="docs-summary-value">{{ String(installPackageManager || 'npm').toUpperCase() }}</strong>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="docs-summary-item">
|
|
66
|
-
<span class="docs-summary-label"
|
|
67
|
-
<strong class="docs-summary-value">{{ installCommandAction === 'update' ? '
|
|
68
|
-
</div>
|
|
69
|
-
<div class="docs-summary-item docs-summary-item-wide">
|
|
70
|
-
<span class="docs-summary-label"
|
|
71
|
-
<strong class="docs-summary-value">{{ installRegistryPreview || '
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<div class="selector-section docs-command-section">
|
|
77
|
-
<div class="selector-header docs-section-header">
|
|
78
|
-
<div>
|
|
79
|
-
<span class="selector-title"
|
|
80
|
-
<div class="skills-panel-note docs-section-note"
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div class="install-list docs-install-list">
|
|
85
|
-
<div
|
|
86
|
-
class="install-row docs-install-row"
|
|
87
|
-
v-for="target in installTargetCards"
|
|
88
|
-
:key="'docs-install-command-' + target.id + '-' + installCommandAction">
|
|
89
|
-
<div class="install-row-main">
|
|
90
|
-
<div class="docs-command-head">
|
|
91
|
-
<div class="install-row-title">{{ target.name }}</div>
|
|
92
|
-
<div class="docs-command-meta">
|
|
93
|
-
<span>{{ target.packageName }}</span>
|
|
94
|
-
<span
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
<div class="docs-command-row">
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
</
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1
|
+
<div
|
|
2
|
+
v-show="mainTab === 'docs'"
|
|
3
|
+
class="mode-content docs-mode-content"
|
|
4
|
+
id="panel-docs"
|
|
5
|
+
role="tabpanel"
|
|
6
|
+
aria-labelledby="tab-docs">
|
|
7
|
+
<div class="selector-section docs-overview-section">
|
|
8
|
+
<div class="selector-header docs-overview-header">
|
|
9
|
+
<div>
|
|
10
|
+
<span class="selector-title">{{ t('docs.title') }}</span>
|
|
11
|
+
<div class="skills-panel-note docs-section-note">{{ t('docs.subtitle') }}</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="docs-toolbar-grid">
|
|
16
|
+
<div class="docs-toolbar-card">
|
|
17
|
+
<label class="form-label" for="docs-install-package-manager">{{ t('common.packageManager') }}</label>
|
|
18
|
+
<select id="docs-install-package-manager" class="form-input" v-model="installPackageManager">
|
|
19
|
+
<option value="npm">npm</option>
|
|
20
|
+
<option value="pnpm">pnpm</option>
|
|
21
|
+
<option value="bun">bun</option>
|
|
22
|
+
</select>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="docs-toolbar-card docs-toolbar-card-wide">
|
|
26
|
+
<label class="form-label">{{ t('common.mirror') }}</label>
|
|
27
|
+
<div class="install-action-tabs">
|
|
28
|
+
<button type="button" class="btn-mini" :class="{ active: installRegistryPreset === 'default' }" @click="setInstallRegistryPreset('default')">{{ t('common.official') }}</button>
|
|
29
|
+
<button type="button" class="btn-mini" :class="{ active: installRegistryPreset === 'npmmirror' }" @click="setInstallRegistryPreset('npmmirror')">npmmirror</button>
|
|
30
|
+
<button type="button" class="btn-mini" :class="{ active: installRegistryPreset === 'tencent' }" @click="setInstallRegistryPreset('tencent')">{{ t('docs.registry.tencent') }}</button>
|
|
31
|
+
<button type="button" class="btn-mini" :class="{ active: installRegistryPreset === 'custom' }" @click="setInstallRegistryPreset('custom')">{{ t('common.custom') }}</button>
|
|
32
|
+
</div>
|
|
33
|
+
<input
|
|
34
|
+
v-if="installRegistryPreset === 'custom'"
|
|
35
|
+
v-model="installRegistryCustom"
|
|
36
|
+
class="form-input install-registry-input"
|
|
37
|
+
placeholder="https://registry.example.com">
|
|
38
|
+
<div class="form-hint install-registry-hint" v-if="installRegistryPreview">
|
|
39
|
+
{{ t('docs.registryHintPrefix') }} --registry={{ installRegistryPreview }}
|
|
40
|
+
</div>
|
|
41
|
+
<div class="form-hint install-registry-hint" v-else-if="installRegistryPreset === 'custom'">
|
|
42
|
+
{{ t('docs.registryHintCustom') }}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div class="docs-toolbar-card docs-toolbar-card-wide">
|
|
47
|
+
<label class="form-label">{{ t('common.action') }}</label>
|
|
48
|
+
<div class="install-action-tabs">
|
|
49
|
+
<button type="button" class="btn-mini" :class="{ active: installCommandAction === 'install' }" @click="setInstallCommandAction('install')">{{ t('common.install') }}</button>
|
|
50
|
+
<button type="button" class="btn-mini" :class="{ active: installCommandAction === 'update' }" @click="setInstallCommandAction('update')">{{ t('common.update') }}</button>
|
|
51
|
+
<button type="button" class="btn-mini" :class="{ active: installCommandAction === 'uninstall' }" @click="setInstallCommandAction('uninstall')">{{ t('common.uninstall') }}</button>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="docs-summary-strip">
|
|
57
|
+
<div class="docs-summary-item">
|
|
58
|
+
<span class="docs-summary-label">{{ t('common.targets') }}</span>
|
|
59
|
+
<strong class="docs-summary-value">{{ installTargetCards.length }}</strong>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="docs-summary-item">
|
|
62
|
+
<span class="docs-summary-label">{{ t('common.currentPm') }}</span>
|
|
63
|
+
<strong class="docs-summary-value">{{ String(installPackageManager || 'npm').toUpperCase() }}</strong>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="docs-summary-item">
|
|
66
|
+
<span class="docs-summary-label">{{ t('common.currentAction') }}</span>
|
|
67
|
+
<strong class="docs-summary-value">{{ installCommandAction === 'update' ? t('common.update') : (installCommandAction === 'uninstall' ? t('common.uninstall') : t('common.install')) }}</strong>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="docs-summary-item docs-summary-item-wide">
|
|
70
|
+
<span class="docs-summary-label">{{ t('common.mirrorActive') }}</span>
|
|
71
|
+
<strong class="docs-summary-value">{{ installRegistryPreview || t('common.defaultOfficial') }}</strong>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div class="selector-section docs-command-section">
|
|
77
|
+
<div class="selector-header docs-section-header">
|
|
78
|
+
<div>
|
|
79
|
+
<span class="selector-title">{{ t('docs.section.commands') }}</span>
|
|
80
|
+
<div class="skills-panel-note docs-section-note">{{ t('docs.section.commandsNote') }}</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div class="install-list docs-install-list">
|
|
85
|
+
<div
|
|
86
|
+
class="install-row docs-install-row"
|
|
87
|
+
v-for="target in installTargetCards"
|
|
88
|
+
:key="'docs-install-command-' + target.id + '-' + installCommandAction">
|
|
89
|
+
<div class="install-row-main">
|
|
90
|
+
<div class="docs-command-head">
|
|
91
|
+
<div class="install-row-title">{{ target.name }}</div>
|
|
92
|
+
<div class="docs-command-meta">
|
|
93
|
+
<span class="docs-meta-pill">{{ target.packageName }}</span>
|
|
94
|
+
<span class="docs-meta-pill">bin: {{ target.bin }}</span>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="docs-command-row">
|
|
98
|
+
<div class="docs-command-box" role="group" :aria-label="`${target.name} command`">
|
|
99
|
+
<code class="install-command">{{ target.command }}</code>
|
|
100
|
+
<button
|
|
101
|
+
type="button"
|
|
102
|
+
class="btn-mini docs-copy-btn"
|
|
103
|
+
:disabled="!target.command"
|
|
104
|
+
@click="copyInstallCommand(target.command)">{{ t('common.copy') }}</button>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div
|
|
108
|
+
v-if="target.id === 'codex' && target.termuxCommand && target.termuxCommand !== target.command"
|
|
109
|
+
class="docs-command-row docs-command-row-secondary">
|
|
110
|
+
<div class="docs-command-box" role="group" :aria-label="t('docs.termuxAria')">
|
|
111
|
+
<code class="install-command"><span class="docs-command-prefix">{{ t('docs.termuxLabel') }}</span>{{ target.termuxCommand }}</code>
|
|
112
|
+
<button
|
|
113
|
+
type="button"
|
|
114
|
+
class="btn-mini docs-copy-btn"
|
|
115
|
+
@click="copyInstallCommand(target.termuxCommand)">{{ t('common.copy') }}</button>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div class="selector-section docs-help-section">
|
|
124
|
+
<div class="selector-header docs-section-header">
|
|
125
|
+
<div>
|
|
126
|
+
<span class="selector-title">{{ t('docs.section.faq') }}</span>
|
|
127
|
+
<div class="skills-panel-note docs-section-note">{{ t('docs.section.faqNote') }}</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div class="docs-help-grid">
|
|
132
|
+
<div class="docs-note-card">
|
|
133
|
+
<div class="docs-note-title">{{ t('common.troubleshooting') }}</div>
|
|
134
|
+
<ul class="install-help-list docs-help-list">
|
|
135
|
+
<li v-for="tip in installTroubleshootingTips" :key="tip">{{ tip }}</li>
|
|
136
|
+
</ul>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="docs-note-card">
|
|
139
|
+
<div class="docs-note-title">{{ t('common.rules') }}</div>
|
|
140
|
+
<ul class="docs-static-list">
|
|
141
|
+
<li>{{ t('docs.rule.1') }}</li>
|
|
142
|
+
<li>{{ t('docs.rule.2') }}</li>
|
|
143
|
+
</ul>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|