codexmate 0.0.32 → 0.0.33
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 +147 -363
- package/README.zh.md +147 -371
- package/cli/agents-files.js +224 -224
- package/cli/archive-helpers.js +446 -446
- package/cli/auth-profiles.js +375 -375
- package/cli/builtin-proxy.js +1725 -1725
- package/cli/claude-proxy.js +1022 -1022
- package/cli/config-bootstrap.js +402 -402
- package/cli/config-health.js +454 -454
- package/cli/doctor-core.js +903 -903
- package/cli/import-skills-url.js +356 -356
- package/cli/local-bridge.js +551 -324
- package/cli/openai-bridge.js +1653 -1653
- package/cli/openclaw-config.js +629 -629
- package/cli/session-convert-args.js +69 -69
- package/cli/session-convert-io.js +82 -82
- package/cli/session-convert.js +150 -150
- package/cli/session-usage.concurrent.js +28 -28
- package/cli/session-usage.js +118 -118
- package/cli/session-usage.models.js +176 -176
- package/cli/skills.js +1141 -1141
- package/cli/update.js +162 -0
- package/cli/zip-commands.js +510 -510
- package/cli.js +16023 -15829
- package/lib/automation.js +404 -404
- package/lib/cli-file-utils.js +151 -151
- package/lib/cli-models-utils.js +440 -440
- package/lib/cli-network-utils.js +190 -190
- package/lib/cli-path-utils.js +85 -85
- package/lib/cli-session-utils.js +121 -121
- package/lib/cli-sessions.js +427 -426
- package/lib/cli-utils.js +155 -155
- package/lib/cli-webhook.js +126 -126
- package/lib/download-artifacts.js +92 -92
- package/lib/mcp-stdio.js +453 -453
- package/lib/task-orchestrator.js +869 -869
- package/lib/text-diff.js +303 -303
- package/lib/win-tray.js +119 -0
- package/lib/workflow-engine.js +340 -340
- package/package.json +76 -76
- package/plugins/README.md +20 -20
- package/plugins/README.zh-CN.md +20 -20
- package/plugins/prompt-templates/comment-polish/index.mjs +25 -25
- package/plugins/prompt-templates/computed.mjs +253 -253
- package/plugins/prompt-templates/index.mjs +8 -8
- package/plugins/prompt-templates/manifest.mjs +15 -15
- package/plugins/prompt-templates/methods.mjs +553 -553
- package/plugins/prompt-templates/overview.mjs +91 -91
- package/plugins/prompt-templates/ownership.mjs +19 -19
- package/plugins/prompt-templates/rule-ack/index.mjs +21 -21
- package/plugins/prompt-templates/storage.mjs +64 -64
- package/plugins/registry.mjs +16 -16
- package/web-ui/app.js +650 -647
- package/web-ui/index.html +36 -36
- package/web-ui/logic.agents-diff.mjs +386 -386
- package/web-ui/logic.claude.mjs +168 -168
- package/web-ui/logic.codex.mjs +69 -69
- package/web-ui/logic.mjs +5 -5
- package/web-ui/logic.runtime.mjs +128 -128
- package/web-ui/logic.session-convert.mjs +70 -70
- package/web-ui/logic.sessions.mjs +781 -781
- package/web-ui/modules/api.mjs +90 -90
- package/web-ui/modules/app.computed.dashboard.mjs +248 -248
- package/web-ui/modules/app.computed.index.mjs +17 -17
- package/web-ui/modules/app.computed.main-tabs.mjs +205 -205
- package/web-ui/modules/app.computed.session.mjs +735 -693
- package/web-ui/modules/app.constants.mjs +15 -15
- package/web-ui/modules/app.methods.agents.mjs +651 -651
- package/web-ui/modules/app.methods.claude-config.mjs +269 -200
- package/web-ui/modules/app.methods.codex-config.mjs +861 -861
- package/web-ui/modules/app.methods.index.mjs +94 -94
- package/web-ui/modules/app.methods.install.mjs +205 -205
- package/web-ui/modules/app.methods.navigation.mjs +774 -774
- 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 +575 -529
- package/web-ui/modules/app.methods.runtime.mjs +345 -345
- package/web-ui/modules/app.methods.session-actions.mjs +591 -591
- package/web-ui/modules/app.methods.session-browser.mjs +1012 -1012
- package/web-ui/modules/app.methods.session-timeline.mjs +479 -479
- package/web-ui/modules/app.methods.session-trash.mjs +438 -438
- package/web-ui/modules/app.methods.startup-claude.mjs +538 -537
- package/web-ui/modules/app.methods.task-orchestration.mjs +556 -556
- package/web-ui/modules/app.methods.webhook.mjs +79 -79
- package/web-ui/modules/config-mode.computed.mjs +124 -124
- package/web-ui/modules/config-template-confirm-pref.mjs +33 -33
- package/web-ui/modules/i18n.dict.mjs +3192 -3177
- package/web-ui/modules/i18n.mjs +62 -62
- package/web-ui/modules/plugins.computed.mjs +3 -3
- package/web-ui/modules/plugins.methods.mjs +3 -3
- package/web-ui/modules/plugins.storage.mjs +11 -11
- package/web-ui/modules/provider-url-display.mjs +17 -17
- package/web-ui/modules/sessions-filters-url.mjs +85 -85
- package/web-ui/modules/skills.computed.mjs +107 -107
- package/web-ui/modules/skills.methods.mjs +482 -482
- package/web-ui/partials/index/layout-footer.html +13 -13
- package/web-ui/partials/index/layout-header.html +499 -503
- package/web-ui/partials/index/modal-config-template-agents.html +185 -185
- package/web-ui/partials/index/modal-confirm-toast.html +32 -32
- package/web-ui/partials/index/modal-health-check.html +45 -45
- package/web-ui/partials/index/modal-openclaw-config.html +280 -280
- package/web-ui/partials/index/modal-skills.html +200 -200
- package/web-ui/partials/index/modals-basic.html +173 -162
- package/web-ui/partials/index/panel-config-claude.html +166 -136
- package/web-ui/partials/index/panel-config-codex.html +190 -196
- package/web-ui/partials/index/panel-config-codex.html.bak +337 -0
- package/web-ui/partials/index/panel-config-openclaw.html +83 -83
- package/web-ui/partials/index/panel-dashboard.html +186 -219
- package/web-ui/partials/index/panel-docs.html +114 -114
- package/web-ui/partials/index/panel-market.html +177 -177
- package/web-ui/partials/index/panel-orchestration.html +391 -391
- package/web-ui/partials/index/panel-plugins.html +253 -253
- package/web-ui/partials/index/panel-sessions.html +319 -313
- package/web-ui/partials/index/panel-settings.html +190 -190
- package/web-ui/partials/index/panel-trash.html +82 -82
- package/web-ui/partials/index/panel-usage.html +137 -137
- package/web-ui/res/json5.min.js +1 -1
- package/web-ui/res/vue.global.prod.js +13 -13
- package/web-ui/session-helpers.mjs +591 -591
- package/web-ui/source-bundle.cjs +233 -233
- package/web-ui/styles/base-theme.css +281 -281
- package/web-ui/styles/bridge-pool.css +197 -197
- package/web-ui/styles/controls-forms.css +433 -433
- package/web-ui/styles/dashboard.css +406 -406
- package/web-ui/styles/docs-panel.css +245 -245
- 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 +628 -638
- package/web-ui/styles/modals-core.css +499 -466
- package/web-ui/styles/navigation-panels.css +391 -391
- package/web-ui/styles/openclaw-structured.css +266 -266
- package/web-ui/styles/plugins-panel.css +564 -564
- package/web-ui/styles/responsive.css +392 -392
- package/web-ui/styles/sessions-list.css +683 -647
- package/web-ui/styles/sessions-preview.css +407 -407
- package/web-ui/styles/sessions-toolbar-trash.css +518 -518
- package/web-ui/styles/sessions-usage.css +588 -588
- package/web-ui/styles/settings-panel.css +349 -349
- package/web-ui/styles/skills-list.css +305 -305
- package/web-ui/styles/skills-market.css +429 -429
- package/web-ui/styles/task-orchestration.css +822 -822
- package/web-ui/styles/titles-cards.css +472 -472
- package/web-ui/styles/trash-panel.css +90 -90
- package/web-ui/styles/webhook.css +81 -81
- package/web-ui/styles.css +24 -24
- package/web-ui.html +17 -17
|
@@ -1,185 +1,185 @@
|
|
|
1
|
-
<div v-if="showConfigTemplateModal" class="modal-overlay" @click.self="!configTemplateApplying && closeConfigTemplateModal()">
|
|
2
|
-
<div class="modal modal-wide" role="dialog" aria-modal="true" aria-labelledby="config-template-modal-title">
|
|
3
|
-
<div class="modal-header modal-editor-header">
|
|
4
|
-
<div class="modal-title" id="config-template-modal-title">{{ t('modal.configTemplate.title') }}</div>
|
|
5
|
-
<div class="modal-header-actions">
|
|
6
|
-
<button class="btn-mini btn-modal-copy" @click="pasteConfigTemplateContent" :disabled="configTemplateApplying || configTemplateDiffLoading || configTemplateDiffVisible">{{ t('common.paste') }}</button>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div class="form-group">
|
|
11
|
-
<label class="form-label">{{ t('modal.configTemplate.label') }}</label>
|
|
12
|
-
<div v-if="configTemplateDiffVisible" class="agents-diff-container">
|
|
13
|
-
<div class="agents-diff-header">
|
|
14
|
-
<div class="agents-diff-title">
|
|
15
|
-
{{ t('diff.title.configTemplate') }}
|
|
16
|
-
<span v-if="configTemplateDiffLoading" class="agents-diff-subtitle">{{ t('diff.generating') }}</span>
|
|
17
|
-
<span v-else-if="configTemplateDiffError" class="agents-diff-subtitle">{{ t('diff.failed') }}</span>
|
|
18
|
-
<span v-else-if="!configTemplateDiffHasChanges" class="agents-diff-subtitle">{{ t('diff.noChanges') }}</span>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="agents-diff-stats">
|
|
21
|
-
<span class="agents-diff-stat add">+{{ configTemplateDiffStats.added || 0 }}</span>
|
|
22
|
-
<span class="agents-diff-stat del">-{{ configTemplateDiffStats.removed || 0 }}</span>
|
|
23
|
-
<span class="agents-diff-stat">={{ configTemplateDiffStats.unchanged || 0 }}</span>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<div v-if="configTemplateDiffError" class="agents-diff-error">
|
|
27
|
-
{{ configTemplateDiffError }}
|
|
28
|
-
</div>
|
|
29
|
-
<div v-else class="agents-diff-lines">
|
|
30
|
-
<div
|
|
31
|
-
v-for="(line, index) in configTemplateDiffLines"
|
|
32
|
-
:key="line.key || (line.type + '-' + index)"
|
|
33
|
-
:class="['agents-diff-line', line.type]">
|
|
34
|
-
<span class="agents-diff-line-sign">
|
|
35
|
-
{{ line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ') }}
|
|
36
|
-
</span>
|
|
37
|
-
<span class="agents-diff-line-text">{{ line.value }}</span>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
<textarea
|
|
42
|
-
v-else
|
|
43
|
-
v-model="configTemplateContent"
|
|
44
|
-
class="form-input template-editor"
|
|
45
|
-
spellcheck="false"
|
|
46
|
-
:readonly="configTemplateApplying || configTemplateDiffLoading"
|
|
47
|
-
@input="onConfigTemplateContentInput"
|
|
48
|
-
:placeholder="t('modal.configTemplate.placeholder')"></textarea>
|
|
49
|
-
<div class="template-editor-warning">
|
|
50
|
-
<template v-if="configTemplateDiffConfirmEnabled">
|
|
51
|
-
{{ t('modal.configTemplate.mode.twoStep') }}
|
|
52
|
-
</template>
|
|
53
|
-
<template v-else>
|
|
54
|
-
{{ t('modal.configTemplate.mode.oneStep') }}
|
|
55
|
-
</template>
|
|
56
|
-
<div v-if="configTemplateDiffVisible && (configTemplateDiffLoading || configTemplateApplying)" class="agents-diff-hint">{{ t('diff.hint.busy') }}</div>
|
|
57
|
-
<div v-else-if="configTemplateDiffVisible && configTemplateDiffError" class="agents-diff-hint">{{ t('diff.hint.failedBack') }}</div>
|
|
58
|
-
<div v-else-if="configTemplateDiffVisible && !configTemplateDiffHasChanges" class="agents-diff-hint">{{ t('diff.hint.noChangesBack') }}</div>
|
|
59
|
-
<div v-else-if="configTemplateDiffVisible" class="agents-diff-hint">{{ t('diff.hint.previewMode') }}</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
<div class="btn-group">
|
|
64
|
-
<button class="btn btn-cancel" @click="closeConfigTemplateModal" :disabled="configTemplateApplying || configTemplateDiffLoading">{{ t('common.cancel') }}</button>
|
|
65
|
-
<button
|
|
66
|
-
v-if="configTemplateDiffVisible"
|
|
67
|
-
class="btn"
|
|
68
|
-
@click="resetConfigTemplateDiffState"
|
|
69
|
-
:disabled="configTemplateApplying || configTemplateDiffLoading">
|
|
70
|
-
{{ t('common.backToEdit') }}
|
|
71
|
-
</button>
|
|
72
|
-
<button class="btn btn-confirm" @click="applyConfigTemplate" :disabled="configTemplateApplying || configTemplateDiffLoading || (configTemplateDiffVisible && !configTemplateDiffHasChanges)">
|
|
73
|
-
{{ configTemplateApplying
|
|
74
|
-
? (configTemplateDiffVisible || !configTemplateDiffConfirmEnabled ? t('common.applying') : t('common.confirming'))
|
|
75
|
-
: (configTemplateDiffVisible || !configTemplateDiffConfirmEnabled ? t('common.apply') : t('common.confirm'))
|
|
76
|
-
}}
|
|
77
|
-
</button>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<div v-if="showAgentsModal" class="modal-overlay" @click.self="closeAgentsModal">
|
|
83
|
-
<div class="modal modal-wide modal-editor agents-modal" role="dialog" aria-modal="true" aria-labelledby="agents-modal-title">
|
|
84
|
-
<div class="modal-header modal-editor-header">
|
|
85
|
-
<div class="modal-title" id="agents-modal-title">{{ agentsModalTitle }}</div>
|
|
86
|
-
<div class="modal-header-actions">
|
|
87
|
-
<button
|
|
88
|
-
class="btn-mini btn-modal-copy"
|
|
89
|
-
@click="exportAgentsContent"
|
|
90
|
-
:disabled="agentsLoading">
|
|
91
|
-
{{ t('modal.agents.export') }}
|
|
92
|
-
</button>
|
|
93
|
-
<button
|
|
94
|
-
class="btn-mini btn-modal-copy"
|
|
95
|
-
@click="copyAgentsContent"
|
|
96
|
-
:disabled="agentsLoading">
|
|
97
|
-
{{ t('modal.agents.copy') }}
|
|
98
|
-
</button>
|
|
99
|
-
<button
|
|
100
|
-
class="btn-mini btn-modal-copy"
|
|
101
|
-
@click="pasteAgentsContent"
|
|
102
|
-
:disabled="agentsLoading || agentsSaving || agentsDiffVisible">
|
|
103
|
-
{{ t('common.paste') }}
|
|
104
|
-
</button>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<div class="modal-editor-body">
|
|
109
|
-
<div class="form-group">
|
|
110
|
-
<label class="form-label">{{ t('modal.agents.targetFile') }}</label>
|
|
111
|
-
<div class="form-hint">
|
|
112
|
-
{{ agentsPath || t('common.notLoaded') }}
|
|
113
|
-
<span v-if="agentsPath">
|
|
114
|
-
({{ agentsExists ? t('common.exists') : t('common.notExistsWillCreateOnSave') }})
|
|
115
|
-
</span>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<div class="form-group">
|
|
121
|
-
<label class="form-label">{{ t(agentsContext === 'claude-md' ? 'modal.agents.contentLabel.claudeMd' : 'modal.agents.contentLabel') }}</label>
|
|
122
|
-
<div
|
|
123
|
-
v-if="!agentsLoading && (hasAgentsContentChanged() || agentsDiffVisible)"
|
|
124
|
-
class="agents-diff-save-alert">
|
|
125
|
-
{{ agentsDiffVisible ? t('modal.agents.unsaved.previewModeHint') : t('modal.agents.unsaved.detectedHint') }}
|
|
126
|
-
</div>
|
|
127
|
-
<div v-if="agentsDiffVisible">
|
|
128
|
-
<div
|
|
129
|
-
v-if="!agentsDiffLoading && !agentsDiffError && !agentsDiffTruncated && (agentsDiffStats.added || agentsDiffStats.removed)"
|
|
130
|
-
class="agents-diff-summary">
|
|
131
|
-
<span class="agents-diff-stat add">+{{ agentsDiffStats.added }}</span>
|
|
132
|
-
<span class="agents-diff-stat del">-{{ agentsDiffStats.removed }}</span>
|
|
133
|
-
</div>
|
|
134
|
-
<div v-if="agentsDiffLoading" class="state-message">{{ t('diff.generating') }}</div>
|
|
135
|
-
<div v-else-if="agentsDiffError" class="state-message error">{{ agentsDiffError }}</div>
|
|
136
|
-
<div v-else-if="agentsDiffTruncated" class="agents-diff-empty">{{ t('diff.tooLargeSkip') }}</div>
|
|
137
|
-
<div v-else-if="!agentsDiffHasChanges" class="agents-diff-empty">{{ t('diff.noChanges') }}</div>
|
|
138
|
-
<div v-else class="agents-diff-view agents-diff-editor">
|
|
139
|
-
<div
|
|
140
|
-
v-for="(line, index) in agentsDiffLines"
|
|
141
|
-
:key="line.key || (line.type + '-' + index)"
|
|
142
|
-
:class="['agents-diff-line', line.type]">
|
|
143
|
-
<span class="agents-diff-line-sign">
|
|
144
|
-
{{ line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ') }}
|
|
145
|
-
</span>
|
|
146
|
-
<span class="agents-diff-line-text">{{ line.value }}</span>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
<textarea
|
|
151
|
-
v-model="agentsContent"
|
|
152
|
-
class="form-input template-editor"
|
|
153
|
-
spellcheck="false"
|
|
154
|
-
:readonly="agentsLoading || agentsSaving || agentsDiffVisible"
|
|
155
|
-
@input="onAgentsContentInput"
|
|
156
|
-
:placeholder="t(agentsContext === 'claude-md' ? 'modal.agents.placeholder.claudeMd' : 'modal.agents.placeholder')"></textarea>
|
|
157
|
-
<div class="template-editor-warning">
|
|
158
|
-
{{ agentsModalHint }}
|
|
159
|
-
<div class="agents-diff-hint">{{ t('modal.agents.hint.shortcuts') }}</div>
|
|
160
|
-
<div v-if="!agentsDiffVisible" class="agents-diff-hint">{{ t('modal.agents.hint.twoStepSave') }}</div>
|
|
161
|
-
<div v-else-if="agentsDiffLoading || agentsSaving" class="agents-diff-hint">{{ t('diff.hint.busy') }}</div>
|
|
162
|
-
<div v-else-if="agentsDiffError" class="agents-diff-hint">{{ t('diff.hint.failedBack') }}</div>
|
|
163
|
-
<div v-else-if="!agentsDiffHasChanges" class="agents-diff-hint">{{ t('diff.hint.noChangesBack') }}</div>
|
|
164
|
-
<div v-else-if="agentsDiffTruncated" class="agents-diff-hint">{{ t('diff.viewHint.truncated') }}</div>
|
|
165
|
-
<div v-else class="agents-diff-hint">{{ t('diff.viewHint.preview') }}</div>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
<div class="btn-group modal-editor-footer">
|
|
172
|
-
<button class="btn btn-cancel" @click="closeAgentsModal" :disabled="agentsSaving || agentsDiffLoading">{{ t('common.cancel') }}</button>
|
|
173
|
-
<button
|
|
174
|
-
v-if="agentsDiffVisible"
|
|
175
|
-
class="btn"
|
|
176
|
-
@click="resetAgentsDiffState"
|
|
177
|
-
:disabled="agentsSaving || agentsDiffLoading">
|
|
178
|
-
{{ t('common.backToEdit') }}
|
|
179
|
-
</button>
|
|
180
|
-
<button class="btn btn-confirm" @click="applyAgentsContent" :disabled="agentsSaving || agentsLoading || agentsDiffLoading || (agentsDiffVisible && !agentsDiffHasChanges)">
|
|
181
|
-
{{ agentsSaving ? (agentsDiffVisible ? t('common.applying') : t('common.confirming')) : (agentsDiffVisible ? t('common.apply') : t('common.confirm')) }}
|
|
182
|
-
</button>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
1
|
+
<div v-if="showConfigTemplateModal" class="modal-overlay" @click.self="!configTemplateApplying && closeConfigTemplateModal()">
|
|
2
|
+
<div class="modal modal-wide" role="dialog" aria-modal="true" aria-labelledby="config-template-modal-title">
|
|
3
|
+
<div class="modal-header modal-editor-header">
|
|
4
|
+
<div class="modal-title" id="config-template-modal-title">{{ t('modal.configTemplate.title') }}</div>
|
|
5
|
+
<div class="modal-header-actions">
|
|
6
|
+
<button class="btn-mini btn-modal-copy" @click="pasteConfigTemplateContent" :disabled="configTemplateApplying || configTemplateDiffLoading || configTemplateDiffVisible">{{ t('common.paste') }}</button>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="form-group">
|
|
11
|
+
<label class="form-label">{{ t('modal.configTemplate.label') }}</label>
|
|
12
|
+
<div v-if="configTemplateDiffVisible" class="agents-diff-container">
|
|
13
|
+
<div class="agents-diff-header">
|
|
14
|
+
<div class="agents-diff-title">
|
|
15
|
+
{{ t('diff.title.configTemplate') }}
|
|
16
|
+
<span v-if="configTemplateDiffLoading" class="agents-diff-subtitle">{{ t('diff.generating') }}</span>
|
|
17
|
+
<span v-else-if="configTemplateDiffError" class="agents-diff-subtitle">{{ t('diff.failed') }}</span>
|
|
18
|
+
<span v-else-if="!configTemplateDiffHasChanges" class="agents-diff-subtitle">{{ t('diff.noChanges') }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="agents-diff-stats">
|
|
21
|
+
<span class="agents-diff-stat add">+{{ configTemplateDiffStats.added || 0 }}</span>
|
|
22
|
+
<span class="agents-diff-stat del">-{{ configTemplateDiffStats.removed || 0 }}</span>
|
|
23
|
+
<span class="agents-diff-stat">={{ configTemplateDiffStats.unchanged || 0 }}</span>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-if="configTemplateDiffError" class="agents-diff-error">
|
|
27
|
+
{{ configTemplateDiffError }}
|
|
28
|
+
</div>
|
|
29
|
+
<div v-else class="agents-diff-lines">
|
|
30
|
+
<div
|
|
31
|
+
v-for="(line, index) in configTemplateDiffLines"
|
|
32
|
+
:key="line.key || (line.type + '-' + index)"
|
|
33
|
+
:class="['agents-diff-line', line.type]">
|
|
34
|
+
<span class="agents-diff-line-sign">
|
|
35
|
+
{{ line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ') }}
|
|
36
|
+
</span>
|
|
37
|
+
<span class="agents-diff-line-text">{{ line.value }}</span>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<textarea
|
|
42
|
+
v-else
|
|
43
|
+
v-model="configTemplateContent"
|
|
44
|
+
class="form-input template-editor"
|
|
45
|
+
spellcheck="false"
|
|
46
|
+
:readonly="configTemplateApplying || configTemplateDiffLoading"
|
|
47
|
+
@input="onConfigTemplateContentInput"
|
|
48
|
+
:placeholder="t('modal.configTemplate.placeholder')"></textarea>
|
|
49
|
+
<div class="template-editor-warning">
|
|
50
|
+
<template v-if="configTemplateDiffConfirmEnabled">
|
|
51
|
+
{{ t('modal.configTemplate.mode.twoStep') }}
|
|
52
|
+
</template>
|
|
53
|
+
<template v-else>
|
|
54
|
+
{{ t('modal.configTemplate.mode.oneStep') }}
|
|
55
|
+
</template>
|
|
56
|
+
<div v-if="configTemplateDiffVisible && (configTemplateDiffLoading || configTemplateApplying)" class="agents-diff-hint">{{ t('diff.hint.busy') }}</div>
|
|
57
|
+
<div v-else-if="configTemplateDiffVisible && configTemplateDiffError" class="agents-diff-hint">{{ t('diff.hint.failedBack') }}</div>
|
|
58
|
+
<div v-else-if="configTemplateDiffVisible && !configTemplateDiffHasChanges" class="agents-diff-hint">{{ t('diff.hint.noChangesBack') }}</div>
|
|
59
|
+
<div v-else-if="configTemplateDiffVisible" class="agents-diff-hint">{{ t('diff.hint.previewMode') }}</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div class="btn-group">
|
|
64
|
+
<button class="btn btn-cancel" @click="closeConfigTemplateModal" :disabled="configTemplateApplying || configTemplateDiffLoading">{{ t('common.cancel') }}</button>
|
|
65
|
+
<button
|
|
66
|
+
v-if="configTemplateDiffVisible"
|
|
67
|
+
class="btn"
|
|
68
|
+
@click="resetConfigTemplateDiffState"
|
|
69
|
+
:disabled="configTemplateApplying || configTemplateDiffLoading">
|
|
70
|
+
{{ t('common.backToEdit') }}
|
|
71
|
+
</button>
|
|
72
|
+
<button class="btn btn-confirm" @click="applyConfigTemplate" :disabled="configTemplateApplying || configTemplateDiffLoading || (configTemplateDiffVisible && !configTemplateDiffHasChanges)">
|
|
73
|
+
{{ configTemplateApplying
|
|
74
|
+
? (configTemplateDiffVisible || !configTemplateDiffConfirmEnabled ? t('common.applying') : t('common.confirming'))
|
|
75
|
+
: (configTemplateDiffVisible || !configTemplateDiffConfirmEnabled ? t('common.apply') : t('common.confirm'))
|
|
76
|
+
}}
|
|
77
|
+
</button>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div v-if="showAgentsModal" class="modal-overlay" @click.self="closeAgentsModal">
|
|
83
|
+
<div class="modal modal-wide modal-editor agents-modal" role="dialog" aria-modal="true" aria-labelledby="agents-modal-title">
|
|
84
|
+
<div class="modal-header modal-editor-header">
|
|
85
|
+
<div class="modal-title" id="agents-modal-title">{{ agentsModalTitle }}</div>
|
|
86
|
+
<div class="modal-header-actions">
|
|
87
|
+
<button
|
|
88
|
+
class="btn-mini btn-modal-copy"
|
|
89
|
+
@click="exportAgentsContent"
|
|
90
|
+
:disabled="agentsLoading">
|
|
91
|
+
{{ t('modal.agents.export') }}
|
|
92
|
+
</button>
|
|
93
|
+
<button
|
|
94
|
+
class="btn-mini btn-modal-copy"
|
|
95
|
+
@click="copyAgentsContent"
|
|
96
|
+
:disabled="agentsLoading">
|
|
97
|
+
{{ t('modal.agents.copy') }}
|
|
98
|
+
</button>
|
|
99
|
+
<button
|
|
100
|
+
class="btn-mini btn-modal-copy"
|
|
101
|
+
@click="pasteAgentsContent"
|
|
102
|
+
:disabled="agentsLoading || agentsSaving || agentsDiffVisible">
|
|
103
|
+
{{ t('common.paste') }}
|
|
104
|
+
</button>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div class="modal-editor-body">
|
|
109
|
+
<div class="form-group">
|
|
110
|
+
<label class="form-label">{{ t('modal.agents.targetFile') }}</label>
|
|
111
|
+
<div class="form-hint">
|
|
112
|
+
{{ agentsPath || t('common.notLoaded') }}
|
|
113
|
+
<span v-if="agentsPath">
|
|
114
|
+
({{ agentsExists ? t('common.exists') : t('common.notExistsWillCreateOnSave') }})
|
|
115
|
+
</span>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
<div class="form-group">
|
|
121
|
+
<label class="form-label">{{ t(agentsContext === 'claude-md' ? 'modal.agents.contentLabel.claudeMd' : 'modal.agents.contentLabel') }}</label>
|
|
122
|
+
<div
|
|
123
|
+
v-if="!agentsLoading && (hasAgentsContentChanged() || agentsDiffVisible)"
|
|
124
|
+
class="agents-diff-save-alert">
|
|
125
|
+
{{ agentsDiffVisible ? t('modal.agents.unsaved.previewModeHint') : t('modal.agents.unsaved.detectedHint') }}
|
|
126
|
+
</div>
|
|
127
|
+
<div v-if="agentsDiffVisible">
|
|
128
|
+
<div
|
|
129
|
+
v-if="!agentsDiffLoading && !agentsDiffError && !agentsDiffTruncated && (agentsDiffStats.added || agentsDiffStats.removed)"
|
|
130
|
+
class="agents-diff-summary">
|
|
131
|
+
<span class="agents-diff-stat add">+{{ agentsDiffStats.added }}</span>
|
|
132
|
+
<span class="agents-diff-stat del">-{{ agentsDiffStats.removed }}</span>
|
|
133
|
+
</div>
|
|
134
|
+
<div v-if="agentsDiffLoading" class="state-message">{{ t('diff.generating') }}</div>
|
|
135
|
+
<div v-else-if="agentsDiffError" class="state-message error">{{ agentsDiffError }}</div>
|
|
136
|
+
<div v-else-if="agentsDiffTruncated" class="agents-diff-empty">{{ t('diff.tooLargeSkip') }}</div>
|
|
137
|
+
<div v-else-if="!agentsDiffHasChanges" class="agents-diff-empty">{{ t('diff.noChanges') }}</div>
|
|
138
|
+
<div v-else class="agents-diff-view agents-diff-editor">
|
|
139
|
+
<div
|
|
140
|
+
v-for="(line, index) in agentsDiffLines"
|
|
141
|
+
:key="line.key || (line.type + '-' + index)"
|
|
142
|
+
:class="['agents-diff-line', line.type]">
|
|
143
|
+
<span class="agents-diff-line-sign">
|
|
144
|
+
{{ line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ') }}
|
|
145
|
+
</span>
|
|
146
|
+
<span class="agents-diff-line-text">{{ line.value }}</span>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
<textarea
|
|
151
|
+
v-model="agentsContent"
|
|
152
|
+
class="form-input template-editor"
|
|
153
|
+
spellcheck="false"
|
|
154
|
+
:readonly="agentsLoading || agentsSaving || agentsDiffVisible"
|
|
155
|
+
@input="onAgentsContentInput"
|
|
156
|
+
:placeholder="t(agentsContext === 'claude-md' ? 'modal.agents.placeholder.claudeMd' : 'modal.agents.placeholder')"></textarea>
|
|
157
|
+
<div class="template-editor-warning">
|
|
158
|
+
{{ agentsModalHint }}
|
|
159
|
+
<div class="agents-diff-hint">{{ t('modal.agents.hint.shortcuts') }}</div>
|
|
160
|
+
<div v-if="!agentsDiffVisible" class="agents-diff-hint">{{ t('modal.agents.hint.twoStepSave') }}</div>
|
|
161
|
+
<div v-else-if="agentsDiffLoading || agentsSaving" class="agents-diff-hint">{{ t('diff.hint.busy') }}</div>
|
|
162
|
+
<div v-else-if="agentsDiffError" class="agents-diff-hint">{{ t('diff.hint.failedBack') }}</div>
|
|
163
|
+
<div v-else-if="!agentsDiffHasChanges" class="agents-diff-hint">{{ t('diff.hint.noChangesBack') }}</div>
|
|
164
|
+
<div v-else-if="agentsDiffTruncated" class="agents-diff-hint">{{ t('diff.viewHint.truncated') }}</div>
|
|
165
|
+
<div v-else class="agents-diff-hint">{{ t('diff.viewHint.preview') }}</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<div class="btn-group modal-editor-footer">
|
|
172
|
+
<button class="btn btn-cancel" @click="closeAgentsModal" :disabled="agentsSaving || agentsDiffLoading">{{ t('common.cancel') }}</button>
|
|
173
|
+
<button
|
|
174
|
+
v-if="agentsDiffVisible"
|
|
175
|
+
class="btn"
|
|
176
|
+
@click="resetAgentsDiffState"
|
|
177
|
+
:disabled="agentsSaving || agentsDiffLoading">
|
|
178
|
+
{{ t('common.backToEdit') }}
|
|
179
|
+
</button>
|
|
180
|
+
<button class="btn btn-confirm" @click="applyAgentsContent" :disabled="agentsSaving || agentsLoading || agentsDiffLoading || (agentsDiffVisible && !agentsDiffHasChanges)">
|
|
181
|
+
{{ agentsSaving ? (agentsDiffVisible ? t('common.applying') : t('common.confirming')) : (agentsDiffVisible ? t('common.apply') : t('common.confirm')) }}
|
|
182
|
+
</button>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<div v-if="showConfirmDialog" class="modal-overlay" @click.self="closeConfirmDialog">
|
|
2
|
-
<div
|
|
3
|
-
class="modal confirm-dialog"
|
|
4
|
-
role="alertdialog"
|
|
5
|
-
aria-modal="true"
|
|
6
|
-
aria-describedby="confirm-dialog-message"
|
|
7
|
-
:aria-labelledby="confirmDialogTitle ? 'confirm-dialog-title' : null"
|
|
8
|
-
:aria-label="confirmDialogTitle ? null : t('confirm.aria')">
|
|
9
|
-
<div id="confirm-dialog-title" class="modal-title">{{ confirmDialogTitle }}</div>
|
|
10
|
-
<div id="confirm-dialog-message" class="confirm-dialog-message">{{ confirmDialogMessage }}</div>
|
|
11
|
-
<div class="btn-group confirm-dialog-actions">
|
|
12
|
-
<button class="btn btn-cancel" @click="closeConfirmDialog">{{ confirmDialogCancelText }}</button>
|
|
13
|
-
<button
|
|
14
|
-
:class="['btn', 'btn-confirm', confirmDialogDanger ? 'btn-danger' : '']"
|
|
15
|
-
:disabled="isConfirmDialogDisabled()"
|
|
16
|
-
@click="resolveConfirmDialog(true)">
|
|
17
|
-
{{ confirmDialogConfirmText }}
|
|
18
|
-
</button>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<!-- Toast通知 -->
|
|
24
|
-
|
|
25
|
-
<!-- Toast -->
|
|
26
|
-
<div
|
|
27
|
-
v-if="message"
|
|
28
|
-
:class="['toast', messageType]"
|
|
29
|
-
role="status"
|
|
30
|
-
aria-live="polite"
|
|
31
|
-
aria-atomic="true">{{ message }}</div>
|
|
32
|
-
</div>
|
|
1
|
+
<div v-if="showConfirmDialog" class="modal-overlay" @click.self="closeConfirmDialog">
|
|
2
|
+
<div
|
|
3
|
+
class="modal confirm-dialog"
|
|
4
|
+
role="alertdialog"
|
|
5
|
+
aria-modal="true"
|
|
6
|
+
aria-describedby="confirm-dialog-message"
|
|
7
|
+
:aria-labelledby="confirmDialogTitle ? 'confirm-dialog-title' : null"
|
|
8
|
+
:aria-label="confirmDialogTitle ? null : t('confirm.aria')">
|
|
9
|
+
<div id="confirm-dialog-title" class="modal-title">{{ confirmDialogTitle }}</div>
|
|
10
|
+
<div id="confirm-dialog-message" class="confirm-dialog-message">{{ confirmDialogMessage }}</div>
|
|
11
|
+
<div class="btn-group confirm-dialog-actions">
|
|
12
|
+
<button class="btn btn-cancel" @click="closeConfirmDialog">{{ confirmDialogCancelText }}</button>
|
|
13
|
+
<button
|
|
14
|
+
:class="['btn', 'btn-confirm', confirmDialogDanger ? 'btn-danger' : '']"
|
|
15
|
+
:disabled="isConfirmDialogDisabled()"
|
|
16
|
+
@click="resolveConfirmDialog(true)">
|
|
17
|
+
{{ confirmDialogConfirmText }}
|
|
18
|
+
</button>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<!-- Toast通知 -->
|
|
24
|
+
|
|
25
|
+
<!-- Toast -->
|
|
26
|
+
<div
|
|
27
|
+
v-if="message"
|
|
28
|
+
:class="['toast', messageType]"
|
|
29
|
+
role="status"
|
|
30
|
+
aria-live="polite"
|
|
31
|
+
aria-atomic="true">{{ message }}</div>
|
|
32
|
+
</div>
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
<div v-if="showHealthCheckModal" class="modal-overlay" @click.self="showHealthCheckModal = false">
|
|
2
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="health-check-modal-title">
|
|
3
|
-
<div class="modal-title" id="health-check-modal-title">{{ t('config.health.title') }}</div>
|
|
4
|
-
|
|
5
|
-
<div v-if="!healthCheckResult" class="state-message">{{ t('common.notLoaded') }}</div>
|
|
6
|
-
<template v-else>
|
|
7
|
-
<div class="form-hint">
|
|
8
|
-
{{ healthCheckResult.ok ? t('config.health.ok') : t('config.health.fail') }}
|
|
9
|
-
<span v-if="healthCheckResult.issues">({{ t('config.health.issues', { count: healthCheckResult.issues.length }) }})</span>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<div v-if="healthCheckResult.remote && healthCheckResult.remote.type === 'remote-health-check'" class="form-hint">
|
|
13
|
-
{{ healthCheckResult.remote.endpoint || '' }}
|
|
14
|
-
<span v-if="healthCheckResult.remote.statusCode"> · {{ healthCheckResult.remote.statusCode }}</span>
|
|
15
|
-
<span v-if="healthCheckResult.remote.message"> · {{ healthCheckResult.remote.message }}</span>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div v-if="healthCheckResult.remote && healthCheckResult.remote.speedTests" class="model-list">
|
|
19
|
-
<div
|
|
20
|
-
v-for="(result, name) in healthCheckResult.remote.speedTests"
|
|
21
|
-
:key="'health-speed-' + name"
|
|
22
|
-
class="model-item"
|
|
23
|
-
>
|
|
24
|
-
<span>{{ name }}</span>
|
|
25
|
-
<span v-if="result && result.ok" class="latency ok">{{ formatLatency(result) }}</span>
|
|
26
|
-
<span v-else class="latency error">{{ (result && result.error) ? result.error : t('config.health.fail') }}</span>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div v-if="healthCheckResult.issues && healthCheckResult.issues.length" class="model-list">
|
|
31
|
-
<div
|
|
32
|
-
v-for="(issue, index) in healthCheckResult.issues"
|
|
33
|
-
:key="issue.code || ('health-issue-' + index)"
|
|
34
|
-
class="model-item"
|
|
35
|
-
>
|
|
36
|
-
<span>{{ issue.message || issue.code || '' }}</span>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<div class="btn-group">
|
|
42
|
-
<button class="btn btn-confirm" @click="showHealthCheckModal = false">{{ t('common.close') }}</button>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
1
|
+
<div v-if="showHealthCheckModal" class="modal-overlay" @click.self="showHealthCheckModal = false">
|
|
2
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="health-check-modal-title">
|
|
3
|
+
<div class="modal-title" id="health-check-modal-title">{{ t('config.health.title') }}</div>
|
|
4
|
+
|
|
5
|
+
<div v-if="!healthCheckResult" class="state-message">{{ t('common.notLoaded') }}</div>
|
|
6
|
+
<template v-else>
|
|
7
|
+
<div class="form-hint">
|
|
8
|
+
{{ healthCheckResult.ok ? t('config.health.ok') : t('config.health.fail') }}
|
|
9
|
+
<span v-if="healthCheckResult.issues">({{ t('config.health.issues', { count: healthCheckResult.issues.length }) }})</span>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div v-if="healthCheckResult.remote && healthCheckResult.remote.type === 'remote-health-check'" class="form-hint">
|
|
13
|
+
{{ healthCheckResult.remote.endpoint || '' }}
|
|
14
|
+
<span v-if="healthCheckResult.remote.statusCode"> · {{ healthCheckResult.remote.statusCode }}</span>
|
|
15
|
+
<span v-if="healthCheckResult.remote.message"> · {{ healthCheckResult.remote.message }}</span>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div v-if="healthCheckResult.remote && healthCheckResult.remote.speedTests" class="model-list">
|
|
19
|
+
<div
|
|
20
|
+
v-for="(result, name) in healthCheckResult.remote.speedTests"
|
|
21
|
+
:key="'health-speed-' + name"
|
|
22
|
+
class="model-item"
|
|
23
|
+
>
|
|
24
|
+
<span>{{ name }}</span>
|
|
25
|
+
<span v-if="result && result.ok" class="latency ok">{{ formatLatency(result) }}</span>
|
|
26
|
+
<span v-else class="latency error">{{ (result && result.error) ? result.error : t('config.health.fail') }}</span>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div v-if="healthCheckResult.issues && healthCheckResult.issues.length" class="model-list">
|
|
31
|
+
<div
|
|
32
|
+
v-for="(issue, index) in healthCheckResult.issues"
|
|
33
|
+
:key="issue.code || ('health-issue-' + index)"
|
|
34
|
+
class="model-item"
|
|
35
|
+
>
|
|
36
|
+
<span>{{ issue.message || issue.code || '' }}</span>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<div class="btn-group">
|
|
42
|
+
<button class="btn btn-confirm" @click="showHealthCheckModal = false">{{ t('common.close') }}</button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|