codexmate 0.1.24 → 0.1.25
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/cli.js +4 -1
- package/package.json +1 -1
- package/plugins/prompt-templates/computed.mjs +1 -1
- package/plugins/prompt-templates/index.mjs +3 -3
- package/plugins/prompt-templates/manifest.mjs +5 -3
- package/plugins/prompt-templates/methods.mjs +9 -2
- package/plugins/registry.mjs +5 -2
- package/plugins/text-tools/computed.mjs +23 -0
- package/plugins/text-tools/index.mjs +14 -0
- package/plugins/text-tools/manifest.mjs +20 -0
- package/plugins/text-tools/methods.mjs +24 -0
- package/plugins/text-tools/overview.mjs +12 -0
- package/plugins/text-tools/ownership.mjs +7 -0
- package/web-ui/app.js +2 -2
- package/web-ui/index.html +0 -1
- package/web-ui/logic.markdown-editor.mjs +5 -57
- package/web-ui/modules/app.methods.navigation.mjs +79 -3
- package/web-ui/modules/app.methods.prompts-editor.mjs +6 -64
- package/web-ui/modules/app.methods.web-ui-preferences.mjs +7 -1
- package/web-ui/modules/i18n/locales/en.mjs +11 -0
- package/web-ui/modules/i18n/locales/ja.mjs +11 -0
- package/web-ui/modules/i18n/locales/vi.mjs +11 -0
- package/web-ui/modules/i18n/locales/zh-tw.mjs +11 -0
- package/web-ui/modules/i18n/locales/zh.mjs +11 -0
- package/web-ui/modules/plugins.computed.mjs +8 -2
- package/web-ui/modules/plugins.methods.mjs +8 -2
- package/web-ui/partials/index/layout-header.html +19 -4
- package/web-ui/partials/index/panel-plugins.html +45 -5
- package/web-ui/partials/index/panel-prompts.html +2 -17
- package/web-ui/res/web-ui-render.precompiled.js +104 -72
- package/web-ui/session-helpers.mjs +0 -1
- package/web-ui/source-bundle.cjs +1 -0
- package/web-ui/styles/prompts-editor.css +3 -66
|
@@ -386,6 +386,17 @@ const ja = Object.freeze({
|
|
|
386
386
|
'plugins.catalog.promptTemplates.title': 'プロンプトテンプレート',
|
|
387
387
|
'plugins.catalog.promptTemplates.description': '変数、コピー、エクスポートに対応した標準化テンプレート型プロンプトツール。',
|
|
388
388
|
'plugins.status.standard': '標準',
|
|
389
|
+
'plugins.catalog.textTools.title': 'テキストツール',
|
|
390
|
+
'plugins.catalog.textTools.description': '軽量なテキストユーティリティ集。最初のツールは複数行のテキストを 1 行に圧縮します。',
|
|
391
|
+
'plugins.textTools.title': 'テキストツール',
|
|
392
|
+
'plugins.textTools.tools.aria': 'テキストツールの選択',
|
|
393
|
+
'plugins.textTools.tools.compress': 'テキスト圧縮',
|
|
394
|
+
'plugins.textTools.compress.inputLabel': '入力テキスト',
|
|
395
|
+
'plugins.textTools.compress.inputPlaceholder': '圧縮するテキストを貼り付けまたは入力…',
|
|
396
|
+
'plugins.textTools.compress.inputAria': '圧縮するテキスト',
|
|
397
|
+
'plugins.textTools.compress.outputTitle': '圧縮結果',
|
|
398
|
+
'plugins.textTools.compress.outputAria': '圧縮後のテキスト結果',
|
|
399
|
+
'plugins.textTools.compress.copy': 'コピー',
|
|
389
400
|
'plugins.main.ariaWorkspace': 'プラグインワークスペース',
|
|
390
401
|
'plugins.refresh': '更新',
|
|
391
402
|
'plugins.refreshing': '更新中...',
|
|
@@ -2,6 +2,17 @@ const vi = Object.freeze({
|
|
|
2
2
|
'plugins.catalog.promptTemplates.title': 'Mẫu prompt',
|
|
3
3
|
'plugins.catalog.promptTemplates.description': 'Công cụ prompt theo mẫu, hỗ trợ biến, sao chép và xuất.',
|
|
4
4
|
'plugins.status.standard': 'tiêu chuẩn',
|
|
5
|
+
'plugins.catalog.textTools.title': 'Công cụ văn bản',
|
|
6
|
+
'plugins.catalog.textTools.description': 'Bộ công cụ văn bản nhẹ; công cụ đầu tiên nén văn bản nhiều dòng thành một dòng.',
|
|
7
|
+
'plugins.textTools.title': 'Công cụ văn bản',
|
|
8
|
+
'plugins.textTools.tools.aria': 'Chọn công cụ văn bản',
|
|
9
|
+
'plugins.textTools.tools.compress': 'Nén văn bản',
|
|
10
|
+
'plugins.textTools.compress.inputLabel': 'Nhập văn bản',
|
|
11
|
+
'plugins.textTools.compress.inputPlaceholder': 'Dán hoặc nhập văn bản cần nén…',
|
|
12
|
+
'plugins.textTools.compress.inputAria': 'Văn bản cần nén',
|
|
13
|
+
'plugins.textTools.compress.outputTitle': 'Kết quả nén',
|
|
14
|
+
'plugins.textTools.compress.outputAria': 'Kết quả văn bản đã nén',
|
|
15
|
+
'plugins.textTools.compress.copy': 'Sao chép',
|
|
5
16
|
'plugins.builtin.commentPolish.name': 'Chỉnh chú thích mã',
|
|
6
17
|
'plugins.builtin.commentPolish.desc': 'Chỉnh nhẹ các chú thích mã sau {{code}}',
|
|
7
18
|
'plugins.builtin.commentPolish.line1': 'Chỉnh nhẹ các chú thích mã sau',
|
|
@@ -384,6 +384,17 @@ const zhTw = Object.freeze({
|
|
|
384
384
|
'plugins.catalog.promptTemplates.title': '提示詞模板',
|
|
385
385
|
'plugins.catalog.promptTemplates.description': '標準化、模板驅動的提示詞工具,支持變量、複製與匯出。',
|
|
386
386
|
'plugins.status.standard': '標準',
|
|
387
|
+
'plugins.catalog.textTools.title': '文字工具',
|
|
388
|
+
'plugins.catalog.textTools.description': '一組輕量純文字小工具,首個工具可將多行文字壓縮為單行。',
|
|
389
|
+
'plugins.textTools.title': '文字工具',
|
|
390
|
+
'plugins.textTools.tools.aria': '文字工具選擇',
|
|
391
|
+
'plugins.textTools.tools.compress': '壓縮文字',
|
|
392
|
+
'plugins.textTools.compress.inputLabel': '輸入文字',
|
|
393
|
+
'plugins.textTools.compress.inputPlaceholder': '貼上或輸入需要壓縮的文字…',
|
|
394
|
+
'plugins.textTools.compress.inputAria': '輸入需要壓縮的文字',
|
|
395
|
+
'plugins.textTools.compress.outputTitle': '壓縮結果',
|
|
396
|
+
'plugins.textTools.compress.outputAria': '壓縮後的文字結果',
|
|
397
|
+
'plugins.textTools.compress.copy': '複製',
|
|
387
398
|
'plugins.main.ariaWorkspace': '插件工作區',
|
|
388
399
|
'plugins.refresh': '重新整理',
|
|
389
400
|
'plugins.refreshing': '重新整理中...',
|
|
@@ -384,6 +384,17 @@ const zh = Object.freeze({
|
|
|
384
384
|
'plugins.catalog.promptTemplates.title': '提示词模板',
|
|
385
385
|
'plugins.catalog.promptTemplates.description': '标准化、模板驱动的提示词工具,支持变量、复制与导出。',
|
|
386
386
|
'plugins.status.standard': '标准',
|
|
387
|
+
'plugins.catalog.textTools.title': '文本工具',
|
|
388
|
+
'plugins.catalog.textTools.description': '一组轻量纯文本小工具,首个工具可将多行文本压缩为单行。',
|
|
389
|
+
'plugins.textTools.title': '文本工具',
|
|
390
|
+
'plugins.textTools.tools.aria': '文本工具选择',
|
|
391
|
+
'plugins.textTools.tools.compress': '压缩文本',
|
|
392
|
+
'plugins.textTools.compress.inputLabel': '输入文本',
|
|
393
|
+
'plugins.textTools.compress.inputPlaceholder': '粘贴或输入需要压缩的文本…',
|
|
394
|
+
'plugins.textTools.compress.inputAria': '输入需要压缩的文本',
|
|
395
|
+
'plugins.textTools.compress.outputTitle': '压缩结果',
|
|
396
|
+
'plugins.textTools.compress.outputAria': '压缩后的文本结果',
|
|
397
|
+
'plugins.textTools.compress.copy': '复制',
|
|
387
398
|
'plugins.main.ariaWorkspace': '插件工作区',
|
|
388
399
|
'plugins.refresh': '刷新',
|
|
389
400
|
'plugins.refreshing': '刷新中...',
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createPromptTemplatesComputed } from '../../plugins/prompt-templates/computed.mjs';
|
|
2
|
+
import { createTextToolsComputed } from '../../plugins/text-tools/computed.mjs';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
+
export function createPluginsComputed() {
|
|
5
|
+
return {
|
|
6
|
+
...createPromptTemplatesComputed(),
|
|
7
|
+
...createTextToolsComputed()
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createPromptTemplatesMethods } from '../../plugins/prompt-templates/methods.mjs';
|
|
2
|
+
import { createTextToolsMethods } from '../../plugins/text-tools/methods.mjs';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
+
export function createPluginsMethods() {
|
|
5
|
+
return {
|
|
6
|
+
...createPromptTemplatesMethods(),
|
|
7
|
+
...createTextToolsMethods()
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -346,10 +346,11 @@
|
|
|
346
346
|
<button
|
|
347
347
|
id="side-tab-plugins"
|
|
348
348
|
data-main-tab="plugins"
|
|
349
|
-
|
|
350
|
-
:
|
|
351
|
-
|
|
352
|
-
@
|
|
349
|
+
data-plugins-id="prompt-templates"
|
|
350
|
+
:aria-current="mainTab === 'plugins' && pluginsActiveId === 'prompt-templates' ? 'page' : null"
|
|
351
|
+
:class="['side-item', { active: isPluginsIdNavActive('prompt-templates') }]"
|
|
352
|
+
@pointerdown="onPluginsTabPointerDown('prompt-templates', $event)"
|
|
353
|
+
@click="onPluginsTabClick('prompt-templates', $event)">
|
|
353
354
|
<span class="side-item-icon" aria-hidden="true">◇</span>
|
|
354
355
|
<div class="side-item-title">{{ t('side.plugins.tools') }}</div>
|
|
355
356
|
<div class="side-item-meta">
|
|
@@ -357,6 +358,20 @@
|
|
|
357
358
|
<span>{{ t('side.plugins.templatesCount', { count: promptTemplatesList.length }) }}</span>
|
|
358
359
|
</div>
|
|
359
360
|
</button>
|
|
361
|
+
<button
|
|
362
|
+
id="side-tab-plugins-text-tools"
|
|
363
|
+
data-main-tab="plugins"
|
|
364
|
+
data-plugins-id="text-tools"
|
|
365
|
+
:aria-current="mainTab === 'plugins' && pluginsActiveId === 'text-tools' ? 'page' : null"
|
|
366
|
+
:class="['side-item', { active: isPluginsIdNavActive('text-tools') }]"
|
|
367
|
+
@pointerdown="onPluginsTabPointerDown('text-tools', $event)"
|
|
368
|
+
@click="onPluginsTabClick('text-tools', $event)">
|
|
369
|
+
<span class="side-item-icon" aria-hidden="true">▤</span>
|
|
370
|
+
<div class="side-item-title">{{ t('plugins.catalog.textTools.title') }}</div>
|
|
371
|
+
<div class="side-item-meta">
|
|
372
|
+
<span>{{ t('plugins.textTools.tools.compress') }}</span>
|
|
373
|
+
</div>
|
|
374
|
+
</button>
|
|
360
375
|
</div>
|
|
361
376
|
|
|
362
377
|
<div class="side-section" role="navigation" :aria-label="t('side.system')">
|
|
@@ -11,11 +11,6 @@
|
|
|
11
11
|
<span class="selector-title">{{ t('plugins.sidebar.title') }}</span>
|
|
12
12
|
<div class="plugins-panel-note">{{ t('plugins.sidebar.note') }}</div>
|
|
13
13
|
</div>
|
|
14
|
-
<div class="settings-tab-actions">
|
|
15
|
-
<button type="button" class="btn-tool btn-tool-compact" @click="loadPluginsOverview({ forceRefresh: true, silent: false })" :disabled="loading || !!initError || pluginsLoading">
|
|
16
|
-
{{ pluginsLoading ? t('plugins.refreshing') : t('plugins.refresh') }}
|
|
17
|
-
</button>
|
|
18
|
-
</div>
|
|
19
14
|
</div>
|
|
20
15
|
|
|
21
16
|
<div class="plugins-list" role="list">
|
|
@@ -239,6 +234,51 @@
|
|
|
239
234
|
</div>
|
|
240
235
|
</div>
|
|
241
236
|
</div>
|
|
237
|
+
<div v-else-if="pluginsActiveId === 'text-tools'" class="plugins-panel">
|
|
238
|
+
<div class="plugins-panel-head">
|
|
239
|
+
<div>
|
|
240
|
+
<div class="plugins-panel-title">{{ t('plugins.textTools.title') }}</div>
|
|
241
|
+
<div v-if="pluginsActiveAttribution" class="plugins-panel-note">{{ pluginsActiveAttribution }}</div>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
<div class="prompt-templates-modebar" role="tablist" :aria-label="t('plugins.textTools.tools.aria')">
|
|
246
|
+
<button
|
|
247
|
+
v-for="tool in textToolsList"
|
|
248
|
+
:key="'text-tool-' + tool.id"
|
|
249
|
+
type="button"
|
|
250
|
+
role="tab"
|
|
251
|
+
:aria-selected="textToolsActiveToolId === tool.id"
|
|
252
|
+
:class="['mode-pill', { active: textToolsActiveToolId === tool.id }]"
|
|
253
|
+
@click="textToolsActiveToolId = tool.id">{{ tool.label }}</button>
|
|
254
|
+
</div>
|
|
255
|
+
|
|
256
|
+
<div class="prompt-compose">
|
|
257
|
+
<div class="prompt-compose-workspace">
|
|
258
|
+
<div class="prompt-compose-main">
|
|
259
|
+
<div class="prompt-compose-form">
|
|
260
|
+
<label class="form-label">{{ t('plugins.textTools.compress.inputLabel') }}</label>
|
|
261
|
+
<textarea
|
|
262
|
+
class="form-input prompt-editor-textarea"
|
|
263
|
+
v-model="textToolsInput"
|
|
264
|
+
rows="10"
|
|
265
|
+
spellcheck="false"
|
|
266
|
+
:placeholder="t('plugins.textTools.compress.inputPlaceholder')"
|
|
267
|
+
:aria-label="t('plugins.textTools.compress.inputAria')"></textarea>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
<div class="prompt-preview-block prompt-compose-preview">
|
|
271
|
+
<div class="prompt-vars-head">
|
|
272
|
+
<div>
|
|
273
|
+
<div class="prompt-vars-title">{{ t('plugins.textTools.compress.outputTitle') }}</div>
|
|
274
|
+
</div>
|
|
275
|
+
<button type="button" class="btn-mini" @click="copyTextToolsOutput" :disabled="!textToolsOutput">{{ t('plugins.textTools.compress.copy') }}</button>
|
|
276
|
+
</div>
|
|
277
|
+
<textarea class="form-input prompt-preview-textarea" :value="textToolsOutput" rows="10" readonly spellcheck="false" :aria-label="t('plugins.textTools.compress.outputAria')"></textarea>
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
242
282
|
|
|
243
283
|
<div v-else class="skills-empty-state">{{ t('plugins.promptTemplates.noPluginSelected') }}</div>
|
|
244
284
|
</section>
|
|
@@ -86,17 +86,9 @@
|
|
|
86
86
|
</button>
|
|
87
87
|
</div>
|
|
88
88
|
<div class="prompts-editor-group prompts-editor-group--workflow">
|
|
89
|
-
<button class="btn-mini" @click="loadPromptsContent" :disabled="agentsSaving || agentsDiffLoading" :title="t('common.cancel')">
|
|
89
|
+
<button class="btn-mini" @click="agentsDiffVisible ? resetAgentsDiffState() : loadPromptsContent()" :disabled="agentsSaving || agentsDiffLoading" :title="t('common.cancel')">
|
|
90
90
|
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>
|
|
91
91
|
</button>
|
|
92
|
-
<button
|
|
93
|
-
v-if="agentsDiffVisible"
|
|
94
|
-
class="btn-mini"
|
|
95
|
-
@click="resetAgentsDiffState"
|
|
96
|
-
:disabled="agentsSaving || agentsDiffLoading"
|
|
97
|
-
:title="t('common.backToEdit')">
|
|
98
|
-
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
|
|
99
|
-
</button>
|
|
100
92
|
<button class="btn-mini btn-confirm-mini" @click="applyAgentsContent" :disabled="agentsSaving || agentsLoading || agentsDiffLoading || (!agentsDiffVisible && !hasAgentsContentChanged()) || (agentsDiffVisible && !agentsDiffHasChanges)" :title="agentsDiffVisible ? t('common.save') : t('common.preview')">
|
|
101
93
|
<svg v-if="agentsDiffVisible" class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>
|
|
102
94
|
<svg v-else class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
@@ -234,7 +226,6 @@
|
|
|
234
226
|
</div>
|
|
235
227
|
<div class="prompts-editor-columns">
|
|
236
228
|
<div class="prompts-edit-pane">
|
|
237
|
-
<pre ref="promptsAgentsHighlight" class="prompts-highlight-backdrop" aria-hidden="true" v-html="agentsHighlightHtml"></pre>
|
|
238
229
|
<textarea
|
|
239
230
|
ref="promptsAgentsTextarea"
|
|
240
231
|
v-model="agentsContent"
|
|
@@ -242,7 +233,6 @@
|
|
|
242
233
|
spellcheck="false"
|
|
243
234
|
:readonly="agentsLoading || agentsSaving || agentsDiffVisible"
|
|
244
235
|
@input="onAgentsContentInput"
|
|
245
|
-
@scroll="syncPromptsOverlayScroll('agents')"
|
|
246
236
|
:placeholder="t(promptsSubTab === 'claude-project' ? 'modal.agents.placeholder.claudeProject' : 'modal.agents.placeholder')"></textarea>
|
|
247
237
|
</div>
|
|
248
238
|
<div v-if="promptsPreviewEnabled" class="prompts-preview-pane">
|
|
@@ -312,12 +302,9 @@
|
|
|
312
302
|
</button>
|
|
313
303
|
</div>
|
|
314
304
|
<div class="prompts-editor-group prompts-editor-group--workflow">
|
|
315
|
-
<button class="btn-mini" @click="cancelSysPromptEdit" :disabled="sysPromptSaving || sysPromptDiffLoading" :title="t('common.cancel')">
|
|
305
|
+
<button class="btn-mini" @click="sysPromptDiffVisible ? resetSysPromptDiffState() : cancelSysPromptEdit()" :disabled="sysPromptSaving || sysPromptDiffLoading" :title="t('common.cancel')">
|
|
316
306
|
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>
|
|
317
307
|
</button>
|
|
318
|
-
<button v-if="sysPromptDiffVisible" class="btn-mini" @click="resetSysPromptDiffState" :disabled="sysPromptSaving || sysPromptDiffLoading" :title="t('common.backToEdit')">
|
|
319
|
-
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
|
|
320
|
-
</button>
|
|
321
308
|
<button class="btn-mini btn-confirm-mini" @click="applySystemPrompt" :disabled="sysPromptSaving || sysPromptLoading || sysPromptDiffLoading || (!sysPromptDiffVisible && !hasSysPromptContentChanged()) || (sysPromptDiffVisible && !sysPromptDiffHasChangesValue)" :title="sysPromptDiffVisible ? t('common.save') : t('common.preview')">
|
|
322
309
|
<svg v-if="sysPromptDiffVisible" class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>
|
|
323
310
|
<svg v-else class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
@@ -392,14 +379,12 @@
|
|
|
392
379
|
</div>
|
|
393
380
|
<div class="prompts-editor-columns">
|
|
394
381
|
<div class="prompts-edit-pane">
|
|
395
|
-
<pre ref="promptsSysHighlight" class="prompts-highlight-backdrop" aria-hidden="true" v-html="sysPromptHighlightHtml"></pre>
|
|
396
382
|
<textarea
|
|
397
383
|
ref="promptsSysTextarea"
|
|
398
384
|
v-model="sysPromptContent"
|
|
399
385
|
class="form-input template-editor"
|
|
400
386
|
spellcheck="false"
|
|
401
387
|
:readonly="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible"
|
|
402
|
-
@scroll="syncPromptsOverlayScroll('sys')"
|
|
403
388
|
:placeholder="t('sysPrompt.placeholder')"></textarea>
|
|
404
389
|
</div>
|
|
405
390
|
<div v-if="promptsPreviewEnabled" class="prompts-preview-pane">
|
|
@@ -485,10 +485,11 @@ return function render(_ctx, _cache) {
|
|
|
485
485
|
_createElementVNode("button", {
|
|
486
486
|
id: "side-tab-plugins",
|
|
487
487
|
"data-main-tab": "plugins",
|
|
488
|
-
"
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
488
|
+
"data-plugins-id": "prompt-templates",
|
|
489
|
+
"aria-current": _ctx.mainTab === 'plugins' && _ctx.pluginsActiveId === 'prompt-templates' ? 'page' : null,
|
|
490
|
+
class: _normalizeClass(['side-item', { active: _ctx.isPluginsIdNavActive('prompt-templates') }]),
|
|
491
|
+
onPointerdown: $event => (_ctx.onPluginsTabPointerDown('prompt-templates', $event)),
|
|
492
|
+
onClick: $event => (_ctx.onPluginsTabClick('prompt-templates', $event))
|
|
492
493
|
}, [
|
|
493
494
|
_createElementVNode("span", {
|
|
494
495
|
class: "side-item-icon",
|
|
@@ -499,6 +500,24 @@ return function render(_ctx, _cache) {
|
|
|
499
500
|
_createElementVNode("span", null, _toDisplayString(_ctx.t('side.plugins.tools.meta')), 1 /* TEXT */),
|
|
500
501
|
_createElementVNode("span", null, _toDisplayString(_ctx.t('side.plugins.templatesCount', { count: _ctx.promptTemplatesList.length })), 1 /* TEXT */)
|
|
501
502
|
])
|
|
503
|
+
], 42 /* CLASS, PROPS, NEED_HYDRATION */, ["aria-current", "onPointerdown", "onClick"]),
|
|
504
|
+
_createElementVNode("button", {
|
|
505
|
+
id: "side-tab-plugins-text-tools",
|
|
506
|
+
"data-main-tab": "plugins",
|
|
507
|
+
"data-plugins-id": "text-tools",
|
|
508
|
+
"aria-current": _ctx.mainTab === 'plugins' && _ctx.pluginsActiveId === 'text-tools' ? 'page' : null,
|
|
509
|
+
class: _normalizeClass(['side-item', { active: _ctx.isPluginsIdNavActive('text-tools') }]),
|
|
510
|
+
onPointerdown: $event => (_ctx.onPluginsTabPointerDown('text-tools', $event)),
|
|
511
|
+
onClick: $event => (_ctx.onPluginsTabClick('text-tools', $event))
|
|
512
|
+
}, [
|
|
513
|
+
_createElementVNode("span", {
|
|
514
|
+
class: "side-item-icon",
|
|
515
|
+
"aria-hidden": "true"
|
|
516
|
+
}, "▤"),
|
|
517
|
+
_createElementVNode("div", { class: "side-item-title" }, _toDisplayString(_ctx.t('plugins.catalog.textTools.title')), 1 /* TEXT */),
|
|
518
|
+
_createElementVNode("div", { class: "side-item-meta" }, [
|
|
519
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('plugins.textTools.tools.compress')), 1 /* TEXT */)
|
|
520
|
+
])
|
|
502
521
|
], 42 /* CLASS, PROPS, NEED_HYDRATION */, ["aria-current", "onPointerdown", "onClick"])
|
|
503
522
|
], 8 /* PROPS */, ["aria-label"]),
|
|
504
523
|
_createElementVNode("div", {
|
|
@@ -6330,14 +6349,6 @@ return function render(_ctx, _cache) {
|
|
|
6330
6349
|
_createElementVNode("div", null, [
|
|
6331
6350
|
_createElementVNode("span", { class: "selector-title" }, _toDisplayString(_ctx.t('plugins.sidebar.title')), 1 /* TEXT */),
|
|
6332
6351
|
_createElementVNode("div", { class: "plugins-panel-note" }, _toDisplayString(_ctx.t('plugins.sidebar.note')), 1 /* TEXT */)
|
|
6333
|
-
]),
|
|
6334
|
-
_createElementVNode("div", { class: "settings-tab-actions" }, [
|
|
6335
|
-
_createElementVNode("button", {
|
|
6336
|
-
type: "button",
|
|
6337
|
-
class: "btn-tool btn-tool-compact",
|
|
6338
|
-
onClick: $event => (_ctx.loadPluginsOverview({ forceRefresh: true, silent: false })),
|
|
6339
|
-
disabled: _ctx.loading || !!_ctx.initError || _ctx.pluginsLoading
|
|
6340
|
-
}, _toDisplayString(_ctx.pluginsLoading ? _ctx.t('plugins.refreshing') : _ctx.t('plugins.refresh')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6341
6352
|
])
|
|
6342
6353
|
]),
|
|
6343
6354
|
_createElementVNode("div", {
|
|
@@ -6845,10 +6856,83 @@ return function render(_ctx, _cache) {
|
|
|
6845
6856
|
])
|
|
6846
6857
|
]))
|
|
6847
6858
|
]))
|
|
6848
|
-
: (
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6859
|
+
: (_ctx.pluginsActiveId === 'text-tools')
|
|
6860
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6861
|
+
key: 3,
|
|
6862
|
+
class: "plugins-panel"
|
|
6863
|
+
}, [
|
|
6864
|
+
_createElementVNode("div", { class: "plugins-panel-head" }, [
|
|
6865
|
+
_createElementVNode("div", null, [
|
|
6866
|
+
_createElementVNode("div", { class: "plugins-panel-title" }, _toDisplayString(_ctx.t('plugins.textTools.title')), 1 /* TEXT */),
|
|
6867
|
+
(_ctx.pluginsActiveAttribution)
|
|
6868
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6869
|
+
key: 0,
|
|
6870
|
+
class: "plugins-panel-note"
|
|
6871
|
+
}, _toDisplayString(_ctx.pluginsActiveAttribution), 1 /* TEXT */))
|
|
6872
|
+
: _createCommentVNode("v-if", true)
|
|
6873
|
+
])
|
|
6874
|
+
]),
|
|
6875
|
+
_createElementVNode("div", {
|
|
6876
|
+
class: "prompt-templates-modebar",
|
|
6877
|
+
role: "tablist",
|
|
6878
|
+
"aria-label": _ctx.t('plugins.textTools.tools.aria')
|
|
6879
|
+
}, [
|
|
6880
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.textToolsList, (tool) => {
|
|
6881
|
+
return (_openBlock(), _createElementBlock("button", {
|
|
6882
|
+
key: 'text-tool-' + tool.id,
|
|
6883
|
+
type: "button",
|
|
6884
|
+
role: "tab",
|
|
6885
|
+
"aria-selected": _ctx.textToolsActiveToolId === tool.id,
|
|
6886
|
+
class: _normalizeClass(['mode-pill', { active: _ctx.textToolsActiveToolId === tool.id }]),
|
|
6887
|
+
onClick: $event => (_ctx.textToolsActiveToolId = tool.id)
|
|
6888
|
+
}, _toDisplayString(tool.label), 11 /* TEXT, CLASS, PROPS */, ["aria-selected", "onClick"]))
|
|
6889
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
6890
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
6891
|
+
_createElementVNode("div", { class: "prompt-compose" }, [
|
|
6892
|
+
_createElementVNode("div", { class: "prompt-compose-workspace" }, [
|
|
6893
|
+
_createElementVNode("div", { class: "prompt-compose-main" }, [
|
|
6894
|
+
_createElementVNode("div", { class: "prompt-compose-form" }, [
|
|
6895
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('plugins.textTools.compress.inputLabel')), 1 /* TEXT */),
|
|
6896
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
6897
|
+
class: "form-input prompt-editor-textarea",
|
|
6898
|
+
"onUpdate:modelValue": $event => ((_ctx.textToolsInput) = $event),
|
|
6899
|
+
rows: "10",
|
|
6900
|
+
spellcheck: "false",
|
|
6901
|
+
placeholder: _ctx.t('plugins.textTools.compress.inputPlaceholder'),
|
|
6902
|
+
"aria-label": _ctx.t('plugins.textTools.compress.inputAria')
|
|
6903
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "placeholder", "aria-label"]), [
|
|
6904
|
+
[_vModelText, _ctx.textToolsInput]
|
|
6905
|
+
])
|
|
6906
|
+
])
|
|
6907
|
+
]),
|
|
6908
|
+
_createElementVNode("div", { class: "prompt-preview-block prompt-compose-preview" }, [
|
|
6909
|
+
_createElementVNode("div", { class: "prompt-vars-head" }, [
|
|
6910
|
+
_createElementVNode("div", null, [
|
|
6911
|
+
_createElementVNode("div", { class: "prompt-vars-title" }, _toDisplayString(_ctx.t('plugins.textTools.compress.outputTitle')), 1 /* TEXT */)
|
|
6912
|
+
]),
|
|
6913
|
+
_createElementVNode("button", {
|
|
6914
|
+
type: "button",
|
|
6915
|
+
class: "btn-mini",
|
|
6916
|
+
onClick: _ctx.copyTextToolsOutput,
|
|
6917
|
+
disabled: !_ctx.textToolsOutput
|
|
6918
|
+
}, _toDisplayString(_ctx.t('plugins.textTools.compress.copy')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6919
|
+
]),
|
|
6920
|
+
_createElementVNode("textarea", {
|
|
6921
|
+
class: "form-input prompt-preview-textarea",
|
|
6922
|
+
value: _ctx.textToolsOutput,
|
|
6923
|
+
rows: "10",
|
|
6924
|
+
readonly: "",
|
|
6925
|
+
spellcheck: "false",
|
|
6926
|
+
"aria-label": _ctx.t('plugins.textTools.compress.outputAria')
|
|
6927
|
+
}, null, 8 /* PROPS */, ["value", "aria-label"])
|
|
6928
|
+
])
|
|
6929
|
+
])
|
|
6930
|
+
])
|
|
6931
|
+
]))
|
|
6932
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
6933
|
+
key: 4,
|
|
6934
|
+
class: "skills-empty-state"
|
|
6935
|
+
}, _toDisplayString(_ctx.t('plugins.promptTemplates.noPluginSelected')), 1 /* TEXT */))
|
|
6852
6936
|
], 8 /* PROPS */, ["aria-label"])
|
|
6853
6937
|
], 2 /* CLASS */)
|
|
6854
6938
|
], 512 /* NEED_PATCH */), [
|
|
@@ -7055,7 +7139,7 @@ return function render(_ctx, _cache) {
|
|
|
7055
7139
|
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
|
|
7056
7140
|
_createElementVNode("button", {
|
|
7057
7141
|
class: "btn-mini",
|
|
7058
|
-
onClick: _ctx.loadPromptsContent,
|
|
7142
|
+
onClick: $event => (_ctx.agentsDiffVisible ? _ctx.resetAgentsDiffState() : _ctx.loadPromptsContent()),
|
|
7059
7143
|
disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
|
|
7060
7144
|
title: _ctx.t('common.cancel')
|
|
7061
7145
|
}, [
|
|
@@ -7069,25 +7153,6 @@ return function render(_ctx, _cache) {
|
|
|
7069
7153
|
_createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7070
7154
|
]))
|
|
7071
7155
|
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7072
|
-
(_ctx.agentsDiffVisible)
|
|
7073
|
-
? (_openBlock(), _createElementBlock("button", {
|
|
7074
|
-
key: 0,
|
|
7075
|
-
class: "btn-mini",
|
|
7076
|
-
onClick: _ctx.resetAgentsDiffState,
|
|
7077
|
-
disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
|
|
7078
|
-
title: _ctx.t('common.backToEdit')
|
|
7079
|
-
}, [
|
|
7080
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7081
|
-
class: "btn-icon-sm",
|
|
7082
|
-
viewBox: "0 0 24 24",
|
|
7083
|
-
fill: "none",
|
|
7084
|
-
stroke: "currentColor",
|
|
7085
|
-
"stroke-width": "2"
|
|
7086
|
-
}, [
|
|
7087
|
-
_createElementVNode("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
7088
|
-
]))
|
|
7089
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"]))
|
|
7090
|
-
: _createCommentVNode("v-if", true),
|
|
7091
7156
|
_createElementVNode("button", {
|
|
7092
7157
|
class: "btn-mini btn-confirm-mini",
|
|
7093
7158
|
onClick: _ctx.applyAgentsContent,
|
|
@@ -7425,12 +7490,6 @@ return function render(_ctx, _cache) {
|
|
|
7425
7490
|
: _createCommentVNode("v-if", true),
|
|
7426
7491
|
_createElementVNode("div", { class: "prompts-editor-columns" }, [
|
|
7427
7492
|
_createElementVNode("div", { class: "prompts-edit-pane" }, [
|
|
7428
|
-
_createElementVNode("pre", {
|
|
7429
|
-
ref: "promptsAgentsHighlight",
|
|
7430
|
-
class: "prompts-highlight-backdrop",
|
|
7431
|
-
"aria-hidden": "true",
|
|
7432
|
-
innerHTML: _ctx.agentsHighlightHtml
|
|
7433
|
-
}, null, 8 /* PROPS */, ["innerHTML"]),
|
|
7434
7493
|
_withDirectives(_createElementVNode("textarea", {
|
|
7435
7494
|
ref: "promptsAgentsTextarea",
|
|
7436
7495
|
"onUpdate:modelValue": $event => ((_ctx.agentsContent) = $event),
|
|
@@ -7438,9 +7497,8 @@ return function render(_ctx, _cache) {
|
|
|
7438
7497
|
spellcheck: "false",
|
|
7439
7498
|
readonly: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7440
7499
|
onInput: _ctx.onAgentsContentInput,
|
|
7441
|
-
onScroll: $event => (_ctx.syncPromptsOverlayScroll('agents')),
|
|
7442
7500
|
placeholder: _ctx.t(_ctx.promptsSubTab === 'claude-project' ? 'modal.agents.placeholder.claudeProject' : 'modal.agents.placeholder')
|
|
7443
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "readonly", "onInput", "
|
|
7501
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "readonly", "onInput", "placeholder"]), [
|
|
7444
7502
|
[_vModelText, _ctx.agentsContent]
|
|
7445
7503
|
])
|
|
7446
7504
|
]),
|
|
@@ -7616,7 +7674,7 @@ return function render(_ctx, _cache) {
|
|
|
7616
7674
|
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
|
|
7617
7675
|
_createElementVNode("button", {
|
|
7618
7676
|
class: "btn-mini",
|
|
7619
|
-
onClick: _ctx.cancelSysPromptEdit,
|
|
7677
|
+
onClick: $event => (_ctx.sysPromptDiffVisible ? _ctx.resetSysPromptDiffState() : _ctx.cancelSysPromptEdit()),
|
|
7620
7678
|
disabled: _ctx.sysPromptSaving || _ctx.sysPromptDiffLoading,
|
|
7621
7679
|
title: _ctx.t('common.cancel')
|
|
7622
7680
|
}, [
|
|
@@ -7630,25 +7688,6 @@ return function render(_ctx, _cache) {
|
|
|
7630
7688
|
_createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7631
7689
|
]))
|
|
7632
7690
|
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7633
|
-
(_ctx.sysPromptDiffVisible)
|
|
7634
|
-
? (_openBlock(), _createElementBlock("button", {
|
|
7635
|
-
key: 0,
|
|
7636
|
-
class: "btn-mini",
|
|
7637
|
-
onClick: _ctx.resetSysPromptDiffState,
|
|
7638
|
-
disabled: _ctx.sysPromptSaving || _ctx.sysPromptDiffLoading,
|
|
7639
|
-
title: _ctx.t('common.backToEdit')
|
|
7640
|
-
}, [
|
|
7641
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7642
|
-
class: "btn-icon-sm",
|
|
7643
|
-
viewBox: "0 0 24 24",
|
|
7644
|
-
fill: "none",
|
|
7645
|
-
stroke: "currentColor",
|
|
7646
|
-
"stroke-width": "2"
|
|
7647
|
-
}, [
|
|
7648
|
-
_createElementVNode("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
7649
|
-
]))
|
|
7650
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"]))
|
|
7651
|
-
: _createCommentVNode("v-if", true),
|
|
7652
7691
|
_createElementVNode("button", {
|
|
7653
7692
|
class: "btn-mini btn-confirm-mini",
|
|
7654
7693
|
onClick: _ctx.applySystemPrompt,
|
|
@@ -7892,21 +7931,14 @@ return function render(_ctx, _cache) {
|
|
|
7892
7931
|
: _createCommentVNode("v-if", true),
|
|
7893
7932
|
_createElementVNode("div", { class: "prompts-editor-columns" }, [
|
|
7894
7933
|
_createElementVNode("div", { class: "prompts-edit-pane" }, [
|
|
7895
|
-
_createElementVNode("pre", {
|
|
7896
|
-
ref: "promptsSysHighlight",
|
|
7897
|
-
class: "prompts-highlight-backdrop",
|
|
7898
|
-
"aria-hidden": "true",
|
|
7899
|
-
innerHTML: _ctx.sysPromptHighlightHtml
|
|
7900
|
-
}, null, 8 /* PROPS */, ["innerHTML"]),
|
|
7901
7934
|
_withDirectives(_createElementVNode("textarea", {
|
|
7902
7935
|
ref: "promptsSysTextarea",
|
|
7903
7936
|
"onUpdate:modelValue": $event => ((_ctx.sysPromptContent) = $event),
|
|
7904
7937
|
class: "form-input template-editor",
|
|
7905
7938
|
spellcheck: "false",
|
|
7906
7939
|
readonly: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible,
|
|
7907
|
-
onScroll: $event => (_ctx.syncPromptsOverlayScroll('sys')),
|
|
7908
7940
|
placeholder: _ctx.t('sysPrompt.placeholder')
|
|
7909
|
-
}, null,
|
|
7941
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "readonly", "placeholder"]), [
|
|
7910
7942
|
[_vModelText, _ctx.sysPromptContent]
|
|
7911
7943
|
])
|
|
7912
7944
|
]),
|
|
@@ -186,7 +186,6 @@ export function switchMainTab(tab) {
|
|
|
186
186
|
void Promise.resolve(marketOverviewLoad).catch(() => {});
|
|
187
187
|
}
|
|
188
188
|
if (enteringPluginsTab && typeof this.loadPluginsOverview === 'function') {
|
|
189
|
-
this.pluginsActiveId = 'prompt-templates';
|
|
190
189
|
this.promptComposerPickerVisible = false;
|
|
191
190
|
let pluginsLoad = null;
|
|
192
191
|
try {
|
package/web-ui/source-bundle.cjs
CHANGED
|
@@ -248,6 +248,7 @@ function transformJavaScriptModuleSource(source, options = {}) {
|
|
|
248
248
|
});
|
|
249
249
|
transformed = transformed.replace(/^[ \t]*export\s+\*\s+from\s+['"]\.[^'"]+['"]\s*;?\s*$/gm, '');
|
|
250
250
|
if (!preserveExports) {
|
|
251
|
+
transformed = transformed.replace(/^[ \t]*export\s*\{[^{}\n]*\}\s*;?\s*$/gm, '');
|
|
251
252
|
transformed = transformed.replace(/(^|\n)([ \t]*)export\s+(?=(?:async\s+function|const|let|class|function)\b)/g, '$1$2');
|
|
252
253
|
}
|
|
253
254
|
return transformed.trimEnd();
|