codexmate 0.1.7 → 0.1.9
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/system-prompt-files.js +177 -0
- package/cli.js +27 -0
- package/package.json +1 -1
- package/web-ui/app.js +22 -0
- package/web-ui/modules/app.computed.session.mjs +1 -1
- package/web-ui/modules/app.methods.agents.mjs +5 -12
- package/web-ui/modules/app.methods.index.mjs +2 -0
- package/web-ui/modules/app.methods.session-actions.mjs +161 -11
- package/web-ui/modules/app.methods.session-browser.mjs +26 -1
- package/web-ui/modules/app.methods.system-prompt.mjs +294 -0
- package/web-ui/modules/i18n/locales/en.mjs +24 -0
- package/web-ui/modules/i18n/locales/ja.mjs +24 -0
- package/web-ui/modules/i18n/locales/vi.mjs +24 -0
- package/web-ui/modules/i18n/locales/zh-tw.mjs +24 -0
- package/web-ui/modules/i18n/locales/zh.mjs +24 -0
- package/web-ui/modules/request-token.mjs +9 -0
- package/web-ui/partials/index/panel-prompts.html +96 -1
- package/web-ui/partials/index/panel-sessions.html +30 -2
- package/web-ui/res/web-ui-render.precompiled.js +633 -288
- package/web-ui/session-helpers.mjs +3 -0
- package/web-ui/styles/responsive.css +18 -0
- package/web-ui/styles/sessions-list.css +96 -0
- package/web-ui/styles/sessions-usage.css +20 -1
- package/web-ui/styles/system-prompt.css +23 -0
- package/web-ui/styles.css +1 -0
|
@@ -3292,7 +3292,63 @@ return function render(_ctx, _cache) {
|
|
|
3292
3292
|
type: "button",
|
|
3293
3293
|
onClick: _ctx.clearSessionFilters,
|
|
3294
3294
|
disabled: _ctx.sessionsLoading
|
|
3295
|
-
}, _toDisplayString(_ctx.t('common.resetFilters')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3295
|
+
}, _toDisplayString(_ctx.t('common.resetFilters')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
3296
|
+
(!_ctx.sessionBatchSelectMode)
|
|
3297
|
+
? (_openBlock(), _createElementBlock("button", {
|
|
3298
|
+
key: 0,
|
|
3299
|
+
class: "btn-tool btn-tool-compact btn-tool-batch",
|
|
3300
|
+
type: "button",
|
|
3301
|
+
onClick: _ctx.enterSessionBatchSelectMode,
|
|
3302
|
+
disabled: _ctx.sessionsLoading,
|
|
3303
|
+
title: _ctx.t('sessions.batch.select')
|
|
3304
|
+
}, [
|
|
3305
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
3306
|
+
viewBox: "0 0 24 24",
|
|
3307
|
+
fill: "none",
|
|
3308
|
+
stroke: "currentColor",
|
|
3309
|
+
"stroke-width": "2"
|
|
3310
|
+
}, [
|
|
3311
|
+
_createElementVNode("polyline", { points: "3 6 5 6 21 6" }),
|
|
3312
|
+
_createElementVNode("path", { d: "M7 6V4a2 2 0 012-2h6a2 2 0 012 2v2M10 11v6M14 11v6" }),
|
|
3313
|
+
_createElementVNode("path", { d: "M5 6l1 14a2 2 0 002 2h8a2 2 0 002-2l1-14" })
|
|
3314
|
+
])),
|
|
3315
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('sessions.batch.select')), 1 /* TEXT */)
|
|
3316
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]))
|
|
3317
|
+
: (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
|
|
3318
|
+
_createElementVNode("button", {
|
|
3319
|
+
class: "btn-tool btn-tool-compact",
|
|
3320
|
+
type: "button",
|
|
3321
|
+
onClick: _ctx.toggleSelectAllVisibleForBatch,
|
|
3322
|
+
disabled: _ctx.sessionsLoading,
|
|
3323
|
+
title: _ctx.isAllVisibleBatchSelected() ? _ctx.t('sessions.batch.unselectAll') : _ctx.t('sessions.batch.selectAll')
|
|
3324
|
+
}, _toDisplayString(_ctx.isAllVisibleBatchSelected() ? _ctx.t('sessions.batch.unselectAll') : _ctx.t('sessions.batch.selectAll')), 9 /* TEXT, PROPS */, ["onClick", "disabled", "title"]),
|
|
3325
|
+
_createElementVNode("button", {
|
|
3326
|
+
class: "btn-tool btn-tool-compact btn-tool-batch-delete",
|
|
3327
|
+
type: "button",
|
|
3328
|
+
onClick: _ctx.deleteSelectedSessions,
|
|
3329
|
+
disabled: _ctx.sessionsLoading || _ctx.sessionDeletingSelected || _ctx.getSelectedBatchCount() === 0,
|
|
3330
|
+
title: _ctx.getSelectedBatchCount() > 0 ? _ctx.t('sessions.batch.deleteSelectedN', { count: _ctx.getSelectedBatchCount() }) : _ctx.t('sessions.batch.emptySelection')
|
|
3331
|
+
}, [
|
|
3332
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
3333
|
+
viewBox: "0 0 24 24",
|
|
3334
|
+
fill: "none",
|
|
3335
|
+
stroke: "currentColor",
|
|
3336
|
+
"stroke-width": "2"
|
|
3337
|
+
}, [
|
|
3338
|
+
_createElementVNode("polyline", { points: "3 6 5 6 21 6" }),
|
|
3339
|
+
_createElementVNode("path", { d: "M7 6V4a2 2 0 012-2h6a2 2 0 012 2v2M10 11v6M14 11v6" }),
|
|
3340
|
+
_createElementVNode("path", { d: "M5 6l1 14a2 2 0 002 2h8a2 2 0 002-2l1-14" })
|
|
3341
|
+
])),
|
|
3342
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.sessionDeletingSelected ? _ctx.t('sessions.batch.deletingSelected') : (_ctx.getSelectedBatchCount() > 0 ? _ctx.t('sessions.batch.deleteSelectedN', { count: _ctx.getSelectedBatchCount() }) : _ctx.t('sessions.batch.deleteSelected'))), 1 /* TEXT */)
|
|
3343
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
3344
|
+
_createElementVNode("button", {
|
|
3345
|
+
class: "btn-tool btn-tool-compact",
|
|
3346
|
+
type: "button",
|
|
3347
|
+
onClick: _ctx.exitSessionBatchSelectMode,
|
|
3348
|
+
disabled: _ctx.sessionDeletingSelected,
|
|
3349
|
+
title: _ctx.t('sessions.batch.exit')
|
|
3350
|
+
}, _toDisplayString(_ctx.t('sessions.batch.exit')), 9 /* TEXT, PROPS */, ["onClick", "disabled", "title"])
|
|
3351
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
3296
3352
|
])
|
|
3297
3353
|
]),
|
|
3298
3354
|
(_ctx.hasActiveSessionFilters())
|
|
@@ -3339,7 +3395,7 @@ return function render(_ctx, _cache) {
|
|
|
3339
3395
|
onScrollPassive: _ctx.onSessionListScroll
|
|
3340
3396
|
}, [
|
|
3341
3397
|
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.visibleSessionsList, (session, __, ___, _cached) => {
|
|
3342
|
-
const _memo = ([_ctx.activeSessionExportKey === _ctx.getSessionExportKey(session), session.messageCount, session.updatedAt, session.title, session.sourceLabel, session.cwd, _ctx.isSessionPinned(session), _ctx.sessionsLoading, session.match && session.match.count])
|
|
3398
|
+
const _memo = ([_ctx.activeSessionExportKey === _ctx.getSessionExportKey(session), session.messageCount, session.updatedAt, session.title, session.sourceLabel, session.cwd, _ctx.isSessionPinned(session), _ctx.sessionsLoading, session.match && session.match.count, _ctx.sessionBatchSelectMode, _ctx.isSessionSelectedForBatch(session)])
|
|
3343
3399
|
if (_cached && _cached.el && _cached.key === session.source + '-' + session.sessionId + '-' + session.filePath && _isMemoSame(_cached, _memo)) return _cached
|
|
3344
3400
|
const _item = (_openBlock(), _createElementBlock("div", {
|
|
3345
3401
|
key: session.source + '-' + session.sessionId + '-' + session.filePath,
|
|
@@ -3347,7 +3403,9 @@ return function render(_ctx, _cache) {
|
|
|
3347
3403
|
'session-item',
|
|
3348
3404
|
{
|
|
3349
3405
|
active: _ctx.activeSessionExportKey === _ctx.getSessionExportKey(session),
|
|
3350
|
-
pinned: _ctx.isSessionPinned(session)
|
|
3406
|
+
pinned: _ctx.isSessionPinned(session),
|
|
3407
|
+
'batch-selected': _ctx.sessionBatchSelectMode && _ctx.isSessionSelectedForBatch(session),
|
|
3408
|
+
'batch-selectable': _ctx.sessionBatchSelectMode
|
|
3351
3409
|
}
|
|
3352
3410
|
]),
|
|
3353
3411
|
onClick: $event => (_ctx.selectSession(session)),
|
|
@@ -3360,6 +3418,24 @@ return function render(_ctx, _cache) {
|
|
|
3360
3418
|
"aria-current": _ctx.activeSessionExportKey === _ctx.getSessionExportKey(session) ? 'true' : null
|
|
3361
3419
|
}, [
|
|
3362
3420
|
_createElementVNode("div", { class: "session-item-header" }, [
|
|
3421
|
+
(_ctx.sessionBatchSelectMode)
|
|
3422
|
+
? (_openBlock(), _createElementBlock("label", {
|
|
3423
|
+
key: 0,
|
|
3424
|
+
class: "session-batch-check",
|
|
3425
|
+
onClick: _withModifiers(() => {}, ["stop"]),
|
|
3426
|
+
"data-session-key": _ctx.getSessionExportKey(session)
|
|
3427
|
+
}, [
|
|
3428
|
+
_createElementVNode("input", {
|
|
3429
|
+
type: "checkbox",
|
|
3430
|
+
checked: _ctx.isSessionSelectedForBatch(session),
|
|
3431
|
+
disabled: _ctx.sessionsLoading || _ctx.sessionDeletingSelected || _ctx.sessionDeleting[_ctx.getSessionExportKey(session)] || !_ctx.isSessionBatchSelectable(session),
|
|
3432
|
+
onChange: $event => (_ctx.toggleSessionSelectionForBatch(session)),
|
|
3433
|
+
onClick: _withModifiers(() => {}, ["stop"]),
|
|
3434
|
+
"aria-label": _ctx.t('sessions.batch.select')
|
|
3435
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["checked", "disabled", "onChange", "onClick", "aria-label"]),
|
|
3436
|
+
_createElementVNode("span", { class: "session-batch-check-mark" })
|
|
3437
|
+
], 8 /* PROPS */, ["onClick", "data-session-key"]))
|
|
3438
|
+
: _createCommentVNode("v-if", true),
|
|
3363
3439
|
_createElementVNode("div", { class: "session-item-main" }, [
|
|
3364
3440
|
_createElementVNode("div", { class: "session-item-title" }, _toDisplayString(session.title || session.sessionId), 1 /* TEXT */),
|
|
3365
3441
|
_createElementVNode("span", { class: "session-count-badge" }, _toDisplayString(session.messageCount == null ? '...' : session.messageCount), 1 /* TEXT */),
|
|
@@ -7003,7 +7079,14 @@ return function render(_ctx, _cache) {
|
|
|
7003
7079
|
role: "tab",
|
|
7004
7080
|
"aria-selected": _ctx.promptsSubTab === 'claude-project',
|
|
7005
7081
|
onClick: $event => (_ctx.switchPromptsSubTab('claude-project'))
|
|
7006
|
-
}, _toDisplayString(_ctx.t('prompts.subTab.project')), 11 /* TEXT, CLASS, PROPS */, ["aria-selected", "onClick"])
|
|
7082
|
+
}, _toDisplayString(_ctx.t('prompts.subTab.project')), 11 /* TEXT, CLASS, PROPS */, ["aria-selected", "onClick"]),
|
|
7083
|
+
_createElementVNode("button", {
|
|
7084
|
+
type: "button",
|
|
7085
|
+
class: _normalizeClass(['prompts-md-tab', { active: _ctx.promptsSubTab === 'system' }]),
|
|
7086
|
+
role: "tab",
|
|
7087
|
+
"aria-selected": _ctx.promptsSubTab === 'system',
|
|
7088
|
+
onClick: $event => (_ctx.switchPromptsSubTab('system'))
|
|
7089
|
+
}, _toDisplayString(_ctx.t('prompts.subTab.system')), 11 /* TEXT, CLASS, PROPS */, ["aria-selected", "onClick"])
|
|
7007
7090
|
], 8 /* PROPS */, ["aria-label"]),
|
|
7008
7091
|
(_ctx.promptsSubTab === 'claude-project')
|
|
7009
7092
|
? (_openBlock(), _createElementBlock("div", {
|
|
@@ -7041,103 +7124,25 @@ return function render(_ctx, _cache) {
|
|
|
7041
7124
|
: _createCommentVNode("v-if", true)
|
|
7042
7125
|
]))
|
|
7043
7126
|
: _createCommentVNode("v-if", true),
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
:
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
}, [
|
|
7060
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7061
|
-
class: "btn-icon-sm",
|
|
7062
|
-
viewBox: "0 0 24 24",
|
|
7063
|
-
fill: "none",
|
|
7064
|
-
stroke: "currentColor",
|
|
7065
|
-
"stroke-width": "2"
|
|
7066
|
-
}, [
|
|
7067
|
-
_createElementVNode("path", { d: "M12 3v12M8 11l4 4 4-4M4 17v2h16v-2" })
|
|
7068
|
-
]))
|
|
7069
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7070
|
-
_createElementVNode("button", {
|
|
7071
|
-
class: "btn-mini",
|
|
7072
|
-
onClick: _ctx.copyAgentsContent,
|
|
7073
|
-
disabled: _ctx.agentsLoading,
|
|
7074
|
-
title: _ctx.t('modal.agents.copy')
|
|
7075
|
-
}, [
|
|
7076
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7077
|
-
class: "btn-icon-sm",
|
|
7078
|
-
viewBox: "0 0 24 24",
|
|
7079
|
-
fill: "none",
|
|
7080
|
-
stroke: "currentColor",
|
|
7081
|
-
"stroke-width": "2"
|
|
7082
|
-
}, [
|
|
7083
|
-
_createElementVNode("rect", {
|
|
7084
|
-
x: "9",
|
|
7085
|
-
y: "9",
|
|
7086
|
-
width: "13",
|
|
7087
|
-
height: "13",
|
|
7088
|
-
rx: "2"
|
|
7089
|
-
}),
|
|
7090
|
-
_createElementVNode("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
7091
|
-
]))
|
|
7092
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7093
|
-
_createElementVNode("button", {
|
|
7094
|
-
class: "btn-mini",
|
|
7095
|
-
onClick: _ctx.pasteAgentsContent,
|
|
7096
|
-
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7097
|
-
title: _ctx.t('common.paste')
|
|
7098
|
-
}, [
|
|
7099
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7100
|
-
class: "btn-icon-sm",
|
|
7101
|
-
viewBox: "0 0 24 24",
|
|
7102
|
-
fill: "none",
|
|
7103
|
-
stroke: "currentColor",
|
|
7104
|
-
"stroke-width": "2"
|
|
7105
|
-
}, [
|
|
7106
|
-
_createElementVNode("rect", {
|
|
7107
|
-
x: "8",
|
|
7108
|
-
y: "2",
|
|
7109
|
-
width: "8",
|
|
7110
|
-
height: "4",
|
|
7111
|
-
rx: "1"
|
|
7112
|
-
}),
|
|
7113
|
-
_createElementVNode("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" })
|
|
7114
|
-
]))
|
|
7115
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7116
|
-
]),
|
|
7117
|
-
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
|
|
7118
|
-
_createElementVNode("button", {
|
|
7119
|
-
class: "btn-mini",
|
|
7120
|
-
onClick: _ctx.loadPromptsContent,
|
|
7121
|
-
disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
|
|
7122
|
-
title: _ctx.t('common.cancel')
|
|
7123
|
-
}, [
|
|
7124
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7125
|
-
class: "btn-icon-sm",
|
|
7126
|
-
viewBox: "0 0 24 24",
|
|
7127
|
-
fill: "none",
|
|
7128
|
-
stroke: "currentColor",
|
|
7129
|
-
"stroke-width": "2"
|
|
7130
|
-
}, [
|
|
7131
|
-
_createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7132
|
-
]))
|
|
7133
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7134
|
-
(_ctx.agentsDiffVisible)
|
|
7135
|
-
? (_openBlock(), _createElementBlock("button", {
|
|
7136
|
-
key: 0,
|
|
7127
|
+
(_ctx.promptsSubTab !== 'system')
|
|
7128
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7129
|
+
key: 1,
|
|
7130
|
+
class: "prompts-editor"
|
|
7131
|
+
}, [
|
|
7132
|
+
_createElementVNode("div", { class: "prompts-editor-toolbar" }, [
|
|
7133
|
+
_createElementVNode("div", { class: "form-hint" }, [
|
|
7134
|
+
_createTextVNode(_toDisplayString(_ctx.agentsPath || _ctx.t('common.notLoaded')) + " ", 1 /* TEXT */),
|
|
7135
|
+
(_ctx.agentsPath)
|
|
7136
|
+
? (_openBlock(), _createElementBlock("span", { key: 0 }, " (" + _toDisplayString(_ctx.agentsExists ? _ctx.t('common.exists') : _ctx.t('common.notExistsWillCreateOnSave')) + ") ", 1 /* TEXT */))
|
|
7137
|
+
: _createCommentVNode("v-if", true)
|
|
7138
|
+
]),
|
|
7139
|
+
_createElementVNode("div", { class: "prompts-editor-actions" }, [
|
|
7140
|
+
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--secondary" }, [
|
|
7141
|
+
_createElementVNode("button", {
|
|
7137
7142
|
class: "btn-mini",
|
|
7138
|
-
onClick: _ctx.
|
|
7139
|
-
disabled: _ctx.
|
|
7140
|
-
title: _ctx.t('
|
|
7143
|
+
onClick: _ctx.exportAgentsContent,
|
|
7144
|
+
disabled: _ctx.agentsLoading,
|
|
7145
|
+
title: _ctx.t('modal.agents.export')
|
|
7141
7146
|
}, [
|
|
7142
7147
|
(_openBlock(), _createElementBlock("svg", {
|
|
7143
7148
|
class: "btn-icon-sm",
|
|
@@ -7146,223 +7151,563 @@ return function render(_ctx, _cache) {
|
|
|
7146
7151
|
stroke: "currentColor",
|
|
7147
7152
|
"stroke-width": "2"
|
|
7148
7153
|
}, [
|
|
7149
|
-
_createElementVNode("path", { d: "
|
|
7154
|
+
_createElementVNode("path", { d: "M12 3v12M8 11l4 4 4-4M4 17v2h16v-2" })
|
|
7150
7155
|
]))
|
|
7151
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
(_ctx.agentsDiffVisible)
|
|
7160
|
-
? (_openBlock(), _createElementBlock("svg", {
|
|
7161
|
-
key: 0,
|
|
7156
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7157
|
+
_createElementVNode("button", {
|
|
7158
|
+
class: "btn-mini",
|
|
7159
|
+
onClick: _ctx.copyAgentsContent,
|
|
7160
|
+
disabled: _ctx.agentsLoading,
|
|
7161
|
+
title: _ctx.t('modal.agents.copy')
|
|
7162
|
+
}, [
|
|
7163
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7162
7164
|
class: "btn-icon-sm",
|
|
7163
7165
|
viewBox: "0 0 24 24",
|
|
7164
7166
|
fill: "none",
|
|
7165
7167
|
stroke: "currentColor",
|
|
7166
7168
|
"stroke-width": "2"
|
|
7167
7169
|
}, [
|
|
7168
|
-
_createElementVNode("
|
|
7170
|
+
_createElementVNode("rect", {
|
|
7171
|
+
x: "9",
|
|
7172
|
+
y: "9",
|
|
7173
|
+
width: "13",
|
|
7174
|
+
height: "13",
|
|
7175
|
+
rx: "2"
|
|
7176
|
+
}),
|
|
7177
|
+
_createElementVNode("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
7169
7178
|
]))
|
|
7170
|
-
|
|
7171
|
-
|
|
7179
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7180
|
+
_createElementVNode("button", {
|
|
7181
|
+
class: "btn-mini",
|
|
7182
|
+
onClick: _ctx.pasteAgentsContent,
|
|
7183
|
+
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7184
|
+
title: _ctx.t('common.paste')
|
|
7185
|
+
}, [
|
|
7186
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7172
7187
|
class: "btn-icon-sm",
|
|
7173
7188
|
viewBox: "0 0 24 24",
|
|
7174
7189
|
fill: "none",
|
|
7175
7190
|
stroke: "currentColor",
|
|
7176
7191
|
"stroke-width": "2"
|
|
7177
7192
|
}, [
|
|
7178
|
-
_createElementVNode("
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7193
|
+
_createElementVNode("rect", {
|
|
7194
|
+
x: "8",
|
|
7195
|
+
y: "2",
|
|
7196
|
+
width: "8",
|
|
7197
|
+
height: "4",
|
|
7198
|
+
rx: "1"
|
|
7199
|
+
}),
|
|
7200
|
+
_createElementVNode("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" })
|
|
7184
7201
|
]))
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
class: "form-input prompt-presets-select",
|
|
7194
|
-
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible || !_ctx.promptPresets.length,
|
|
7195
|
-
title: _ctx.t('prompts.presets.title'),
|
|
7196
|
-
onChange: $event => (_ctx.applyPromptPresetSelection($event))
|
|
7197
|
-
}, [
|
|
7198
|
-
_createElementVNode("option", { value: "" }, _toDisplayString(_ctx.t('prompts.presets.selectPlaceholder')), 1 /* TEXT */),
|
|
7199
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptPresets, (preset) => {
|
|
7200
|
-
return (_openBlock(), _createElementBlock("option", {
|
|
7201
|
-
key: preset.id,
|
|
7202
|
-
value: preset.id
|
|
7203
|
-
}, _toDisplayString(preset.name), 9 /* TEXT, PROPS */, ["value"]))
|
|
7204
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
7205
|
-
], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onChange"])
|
|
7206
|
-
]),
|
|
7207
|
-
_createElementVNode("div", { class: "prompt-presets-inline-group prompt-presets-inline-group--save" }, [
|
|
7208
|
-
_withDirectives(_createElementVNode("input", {
|
|
7209
|
-
type: "text",
|
|
7210
|
-
class: "form-input prompt-presets-name-input",
|
|
7211
|
-
"onUpdate:modelValue": $event => ((_ctx.promptPresetNameDraft) = $event),
|
|
7212
|
-
placeholder: _ctx.t('prompts.presets.namePlaceholder'),
|
|
7213
|
-
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7214
|
-
onKeydown: _withKeys(_withModifiers(_ctx.saveCurrentPromptAsPreset, ["prevent"]), ["enter"])
|
|
7215
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "placeholder", "disabled", "onKeydown"]), [
|
|
7216
|
-
[_vModelText, _ctx.promptPresetNameDraft]
|
|
7217
|
-
]),
|
|
7218
|
-
_createElementVNode("button", {
|
|
7219
|
-
type: "button",
|
|
7220
|
-
class: "btn-mini btn-confirm-mini",
|
|
7221
|
-
onClick: _ctx.saveCurrentPromptAsPreset,
|
|
7222
|
-
disabled: _ctx.promptPresetSaving || _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7223
|
-
title: _ctx.t('prompts.presets.saveCurrent')
|
|
7224
|
-
}, _toDisplayString(_ctx.t('prompts.presets.saveCurrent')), 9 /* TEXT, PROPS */, ["onClick", "disabled", "title"])
|
|
7225
|
-
])
|
|
7226
|
-
]),
|
|
7227
|
-
_createElementVNode("details", { class: "prompt-presets-panel" }, [
|
|
7228
|
-
_createElementVNode("summary", { class: "prompt-presets-summary" }, [
|
|
7229
|
-
_createElementVNode("span", null, _toDisplayString(_ctx.t('prompts.presets.title')), 1 /* TEXT */),
|
|
7230
|
-
_createElementVNode("small", null, _toDisplayString(_ctx.t('prompts.presets.hint')), 1 /* TEXT */)
|
|
7231
|
-
]),
|
|
7232
|
-
_createElementVNode("div", { class: "form-group prompt-presets-body" }, [
|
|
7233
|
-
_createElementVNode("div", { class: "editor-frame prompt-presets-frame" }, [
|
|
7234
|
-
(!_ctx.promptPresets.length)
|
|
7235
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
7236
|
-
key: 0,
|
|
7237
|
-
class: "state-message prompt-presets-empty"
|
|
7238
|
-
}, _toDisplayString(_ctx.t('prompts.presets.empty')), 1 /* TEXT */))
|
|
7239
|
-
: (_openBlock(), _createElementBlock("div", {
|
|
7240
|
-
key: 1,
|
|
7241
|
-
class: "prompt-presets-list"
|
|
7202
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7203
|
+
]),
|
|
7204
|
+
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
|
|
7205
|
+
_createElementVNode("button", {
|
|
7206
|
+
class: "btn-mini",
|
|
7207
|
+
onClick: _ctx.loadPromptsContent,
|
|
7208
|
+
disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
|
|
7209
|
+
title: _ctx.t('common.cancel')
|
|
7242
7210
|
}, [
|
|
7243
|
-
(_openBlock(
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7211
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7212
|
+
class: "btn-icon-sm",
|
|
7213
|
+
viewBox: "0 0 24 24",
|
|
7214
|
+
fill: "none",
|
|
7215
|
+
stroke: "currentColor",
|
|
7216
|
+
"stroke-width": "2"
|
|
7217
|
+
}, [
|
|
7218
|
+
_createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7219
|
+
]))
|
|
7220
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7221
|
+
(_ctx.agentsDiffVisible)
|
|
7222
|
+
? (_openBlock(), _createElementBlock("button", {
|
|
7223
|
+
key: 0,
|
|
7224
|
+
class: "btn-mini",
|
|
7225
|
+
onClick: _ctx.resetAgentsDiffState,
|
|
7226
|
+
disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
|
|
7227
|
+
title: _ctx.t('common.backToEdit')
|
|
7247
7228
|
}, [
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7229
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7230
|
+
class: "btn-icon-sm",
|
|
7231
|
+
viewBox: "0 0 24 24",
|
|
7232
|
+
fill: "none",
|
|
7233
|
+
stroke: "currentColor",
|
|
7234
|
+
"stroke-width": "2"
|
|
7235
|
+
}, [
|
|
7236
|
+
_createElementVNode("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
7237
|
+
]))
|
|
7238
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]))
|
|
7239
|
+
: _createCommentVNode("v-if", true),
|
|
7240
|
+
_createElementVNode("button", {
|
|
7241
|
+
class: "btn-mini btn-confirm-mini",
|
|
7242
|
+
onClick: _ctx.applyAgentsContent,
|
|
7243
|
+
disabled: _ctx.agentsSaving || _ctx.agentsLoading || _ctx.agentsDiffLoading || (!_ctx.agentsDiffVisible && !_ctx.hasAgentsContentChanged()) || (_ctx.agentsDiffVisible && !_ctx.agentsDiffHasChanges),
|
|
7244
|
+
title: _ctx.agentsDiffVisible ? _ctx.t('common.save') : _ctx.t('common.preview')
|
|
7245
|
+
}, [
|
|
7246
|
+
(_ctx.agentsDiffVisible)
|
|
7247
|
+
? (_openBlock(), _createElementBlock("svg", {
|
|
7248
|
+
key: 0,
|
|
7249
|
+
class: "btn-icon-sm",
|
|
7250
|
+
viewBox: "0 0 24 24",
|
|
7251
|
+
fill: "none",
|
|
7252
|
+
stroke: "currentColor",
|
|
7253
|
+
"stroke-width": "2"
|
|
7254
|
+
}, [
|
|
7255
|
+
_createElementVNode("path", { d: "M20 6L9 17l-5-5" })
|
|
7256
|
+
]))
|
|
7257
|
+
: (_openBlock(), _createElementBlock("svg", {
|
|
7258
|
+
key: 1,
|
|
7259
|
+
class: "btn-icon-sm",
|
|
7260
|
+
viewBox: "0 0 24 24",
|
|
7261
|
+
fill: "none",
|
|
7262
|
+
stroke: "currentColor",
|
|
7263
|
+
"stroke-width": "2"
|
|
7264
|
+
}, [
|
|
7265
|
+
_createElementVNode("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
7266
|
+
_createElementVNode("circle", {
|
|
7267
|
+
cx: "12",
|
|
7268
|
+
cy: "12",
|
|
7269
|
+
r: "3"
|
|
7270
|
+
})
|
|
7271
|
+
]))
|
|
7272
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7273
|
+
])
|
|
7274
|
+
])
|
|
7275
|
+
]),
|
|
7276
|
+
_createElementVNode("div", { class: "prompt-presets-inline-row" }, [
|
|
7277
|
+
_createElementVNode("div", { class: "prompt-presets-inline-group" }, [
|
|
7278
|
+
_createElementVNode("label", { class: "prompt-presets-inline-label" }, _toDisplayString(_ctx.t('prompts.presets.title')), 1 /* TEXT */),
|
|
7279
|
+
_createElementVNode("select", {
|
|
7280
|
+
class: "form-input prompt-presets-select",
|
|
7281
|
+
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible || !_ctx.promptPresets.length,
|
|
7282
|
+
title: _ctx.t('prompts.presets.title'),
|
|
7283
|
+
onChange: $event => (_ctx.applyPromptPresetSelection($event))
|
|
7284
|
+
}, [
|
|
7285
|
+
_createElementVNode("option", { value: "" }, _toDisplayString(_ctx.t('prompts.presets.selectPlaceholder')), 1 /* TEXT */),
|
|
7286
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptPresets, (preset) => {
|
|
7287
|
+
return (_openBlock(), _createElementBlock("option", {
|
|
7288
|
+
key: preset.id,
|
|
7289
|
+
value: preset.id
|
|
7290
|
+
}, _toDisplayString(preset.name), 9 /* TEXT, PROPS */, ["value"]))
|
|
7291
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7292
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onChange"])
|
|
7293
|
+
]),
|
|
7294
|
+
_createElementVNode("div", { class: "prompt-presets-inline-group prompt-presets-inline-group--save" }, [
|
|
7295
|
+
_withDirectives(_createElementVNode("input", {
|
|
7296
|
+
type: "text",
|
|
7297
|
+
class: "form-input prompt-presets-name-input",
|
|
7298
|
+
"onUpdate:modelValue": $event => ((_ctx.promptPresetNameDraft) = $event),
|
|
7299
|
+
placeholder: _ctx.t('prompts.presets.namePlaceholder'),
|
|
7300
|
+
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7301
|
+
onKeydown: _withKeys(_withModifiers(_ctx.saveCurrentPromptAsPreset, ["prevent"]), ["enter"])
|
|
7302
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "placeholder", "disabled", "onKeydown"]), [
|
|
7303
|
+
[_vModelText, _ctx.promptPresetNameDraft]
|
|
7304
|
+
]),
|
|
7305
|
+
_createElementVNode("button", {
|
|
7306
|
+
type: "button",
|
|
7307
|
+
class: "btn-mini btn-confirm-mini",
|
|
7308
|
+
onClick: _ctx.saveCurrentPromptAsPreset,
|
|
7309
|
+
disabled: _ctx.promptPresetSaving || _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7310
|
+
title: _ctx.t('prompts.presets.saveCurrent')
|
|
7311
|
+
}, _toDisplayString(_ctx.t('prompts.presets.saveCurrent')), 9 /* TEXT, PROPS */, ["onClick", "disabled", "title"])
|
|
7312
|
+
])
|
|
7313
|
+
]),
|
|
7314
|
+
_createElementVNode("details", { class: "prompt-presets-panel" }, [
|
|
7315
|
+
_createElementVNode("summary", { class: "prompt-presets-summary" }, [
|
|
7316
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('prompts.presets.title')), 1 /* TEXT */),
|
|
7317
|
+
_createElementVNode("small", null, _toDisplayString(_ctx.t('prompts.presets.hint')), 1 /* TEXT */)
|
|
7318
|
+
]),
|
|
7319
|
+
_createElementVNode("div", { class: "form-group prompt-presets-body" }, [
|
|
7320
|
+
_createElementVNode("div", { class: "editor-frame prompt-presets-frame" }, [
|
|
7321
|
+
(!_ctx.promptPresets.length)
|
|
7322
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7323
|
+
key: 0,
|
|
7324
|
+
class: "state-message prompt-presets-empty"
|
|
7325
|
+
}, _toDisplayString(_ctx.t('prompts.presets.empty')), 1 /* TEXT */))
|
|
7326
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
7327
|
+
key: 1,
|
|
7328
|
+
class: "prompt-presets-list"
|
|
7329
|
+
}, [
|
|
7330
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptPresets, (preset) => {
|
|
7331
|
+
return (_openBlock(), _createElementBlock("article", {
|
|
7332
|
+
key: preset.id,
|
|
7333
|
+
class: "prompt-preset-row"
|
|
7334
|
+
}, [
|
|
7335
|
+
_createElementVNode("div", { class: "prompt-preset-main" }, [
|
|
7336
|
+
_createElementVNode("input", {
|
|
7337
|
+
type: "text",
|
|
7338
|
+
class: "form-input prompt-preset-name",
|
|
7339
|
+
value: _ctx.getPromptPresetRenameDraft(preset),
|
|
7340
|
+
onInput: $event => (_ctx.setPromptPresetRenameDraft(preset.id, $event.target.value)),
|
|
7341
|
+
onKeydown: _withKeys(_withModifiers($event => (_ctx.renamePromptPreset(preset)), ["prevent"]), ["enter"]),
|
|
7342
|
+
"aria-label": _ctx.t('prompts.presets.renameAria')
|
|
7343
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["value", "onInput", "onKeydown", "aria-label"]),
|
|
7344
|
+
_createElementVNode("div", { class: "form-hint" }, _toDisplayString(_ctx.t('prompts.presets.updatedAt', { time: _ctx.formatPromptPresetTime(preset.updatedAt) })), 1 /* TEXT */),
|
|
7345
|
+
_createElementVNode("pre", { class: "prompt-preset-preview" }, _toDisplayString(preset.content), 1 /* TEXT */)
|
|
7346
|
+
]),
|
|
7347
|
+
_createElementVNode("div", { class: "prompts-editor-actions prompt-preset-actions" }, [
|
|
7348
|
+
_createElementVNode("button", {
|
|
7349
|
+
type: "button",
|
|
7350
|
+
class: "btn-mini",
|
|
7351
|
+
onClick: $event => (_ctx.renamePromptPreset(preset))
|
|
7352
|
+
}, _toDisplayString(_ctx.t('common.save')), 9 /* TEXT, PROPS */, ["onClick"]),
|
|
7353
|
+
_createElementVNode("button", {
|
|
7354
|
+
type: "button",
|
|
7355
|
+
class: "btn-mini",
|
|
7356
|
+
onClick: $event => (_ctx.applyPromptPresetToEditor(preset))
|
|
7357
|
+
}, _toDisplayString(_ctx.t('common.paste')), 9 /* TEXT, PROPS */, ["onClick"]),
|
|
7358
|
+
_createElementVNode("button", {
|
|
7359
|
+
type: "button",
|
|
7360
|
+
class: "btn-mini btn-danger-mini",
|
|
7361
|
+
onClick: $event => (_ctx.deletePromptPreset(preset))
|
|
7362
|
+
}, _toDisplayString(_ctx.t('common.delete')), 9 /* TEXT, PROPS */, ["onClick"])
|
|
7363
|
+
])
|
|
7364
|
+
]))
|
|
7365
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7277
7366
|
]))
|
|
7278
|
-
|
|
7367
|
+
])
|
|
7368
|
+
])
|
|
7369
|
+
]),
|
|
7370
|
+
_createElementVNode("div", { class: "form-group" }, [
|
|
7371
|
+
(_ctx.agentsDiffVisible)
|
|
7372
|
+
? (_openBlock(), _createElementBlock("div", { key: 0 }, [
|
|
7373
|
+
(!_ctx.agentsDiffLoading && !_ctx.agentsDiffError && !_ctx.agentsDiffTruncated && (_ctx.agentsDiffStats.added || _ctx.agentsDiffStats.removed))
|
|
7374
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7375
|
+
key: 0,
|
|
7376
|
+
class: "agents-diff-summary"
|
|
7377
|
+
}, [
|
|
7378
|
+
_createElementVNode("span", { class: "agents-diff-stat add" }, "+" + _toDisplayString(_ctx.agentsDiffStats.added), 1 /* TEXT */),
|
|
7379
|
+
_createElementVNode("span", { class: "agents-diff-stat del" }, "-" + _toDisplayString(_ctx.agentsDiffStats.removed), 1 /* TEXT */)
|
|
7380
|
+
]))
|
|
7381
|
+
: _createCommentVNode("v-if", true),
|
|
7382
|
+
(_ctx.agentsDiffLoading)
|
|
7383
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7384
|
+
key: 1,
|
|
7385
|
+
class: "state-message"
|
|
7386
|
+
}, _toDisplayString(_ctx.t('diff.generating')), 1 /* TEXT */))
|
|
7387
|
+
: (_ctx.agentsDiffError)
|
|
7388
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7389
|
+
key: 2,
|
|
7390
|
+
class: "state-message error"
|
|
7391
|
+
}, _toDisplayString(_ctx.agentsDiffError), 1 /* TEXT */))
|
|
7392
|
+
: (_ctx.agentsDiffTruncated)
|
|
7393
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7394
|
+
key: 3,
|
|
7395
|
+
class: "agents-diff-empty"
|
|
7396
|
+
}, _toDisplayString(_ctx.t('diff.tooLargeSkip')), 1 /* TEXT */))
|
|
7397
|
+
: (!_ctx.agentsDiffHasChanges)
|
|
7398
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7399
|
+
key: 4,
|
|
7400
|
+
class: "agents-diff-empty"
|
|
7401
|
+
}, _toDisplayString(_ctx.t('diff.noChanges')), 1 /* TEXT */))
|
|
7402
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
7403
|
+
key: 5,
|
|
7404
|
+
class: "agents-diff-view agents-diff-editor"
|
|
7405
|
+
}, [
|
|
7406
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.agentsDiffLines, (line, index) => {
|
|
7407
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
7408
|
+
key: line.key || (line.type + '-' + index),
|
|
7409
|
+
class: _normalizeClass(['agents-diff-line', line.type])
|
|
7410
|
+
}, [
|
|
7411
|
+
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ')), 1 /* TEXT */),
|
|
7412
|
+
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
7413
|
+
], 2 /* CLASS */))
|
|
7414
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7415
|
+
]))
|
|
7279
7416
|
]))
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
? (_openBlock(), _createElementBlock("div", { key: 0 }, [
|
|
7286
|
-
(!_ctx.agentsDiffLoading && !_ctx.agentsDiffError && !_ctx.agentsDiffTruncated && (_ctx.agentsDiffStats.added || _ctx.agentsDiffStats.removed))
|
|
7417
|
+
: _createCommentVNode("v-if", true),
|
|
7418
|
+
_createElementVNode("div", {
|
|
7419
|
+
class: _normalizeClass(['editor-frame', { 'editor-frame--loading': _ctx.agentsLoading }])
|
|
7420
|
+
}, [
|
|
7421
|
+
(_ctx.agentsLoading)
|
|
7287
7422
|
? (_openBlock(), _createElementBlock("div", {
|
|
7288
7423
|
key: 0,
|
|
7289
|
-
class: "
|
|
7424
|
+
class: "editor-skeleton"
|
|
7290
7425
|
}, [
|
|
7291
|
-
|
|
7292
|
-
|
|
7426
|
+
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(6, (i) => {
|
|
7427
|
+
return _createElementVNode("div", {
|
|
7428
|
+
class: "skeleton-line",
|
|
7429
|
+
key: i
|
|
7430
|
+
})
|
|
7431
|
+
}), 64 /* STABLE_FRAGMENT */))
|
|
7293
7432
|
]))
|
|
7294
7433
|
: _createCommentVNode("v-if", true),
|
|
7295
|
-
(
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
:
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7434
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
7435
|
+
"onUpdate:modelValue": $event => ((_ctx.agentsContent) = $event),
|
|
7436
|
+
class: "form-input template-editor",
|
|
7437
|
+
spellcheck: "false",
|
|
7438
|
+
readonly: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7439
|
+
onInput: _ctx.onAgentsContentInput,
|
|
7440
|
+
placeholder: _ctx.t(_ctx.promptsSubTab === 'claude-project' ? 'modal.agents.placeholder.claudeProject' : 'modal.agents.placeholder')
|
|
7441
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "readonly", "onInput", "placeholder"]), [
|
|
7442
|
+
[_vModelText, _ctx.agentsContent]
|
|
7443
|
+
])
|
|
7444
|
+
], 2 /* CLASS */),
|
|
7445
|
+
(_ctx.promptsContextHint)
|
|
7446
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7447
|
+
key: 1,
|
|
7448
|
+
class: _normalizeClass(['prompts-context-hint', { 'prompts-context-hint--warn': _ctx.promptsContextHint.warn }])
|
|
7449
|
+
}, _toDisplayString(_ctx.promptsContextHint.text), 3 /* TEXT, CLASS */))
|
|
7450
|
+
: _createCommentVNode("v-if", true)
|
|
7451
|
+
])
|
|
7452
|
+
]))
|
|
7453
|
+
: _createCommentVNode("v-if", true),
|
|
7454
|
+
(_ctx.promptsSubTab === 'system')
|
|
7455
|
+
? (_openBlock(), _createElementBlock("div", { key: 2 }, [
|
|
7456
|
+
_createElementVNode("div", { class: "sys-prompt-controls" }, [
|
|
7457
|
+
_createElementVNode("div", { class: "sys-prompt-control-group" }, [
|
|
7458
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('sysPrompt.scope.label')), 1 /* TEXT */),
|
|
7459
|
+
_createElementVNode("select", {
|
|
7460
|
+
class: "form-input sys-prompt-select",
|
|
7461
|
+
value: _ctx.sysPromptScope,
|
|
7462
|
+
onChange: $event => (_ctx.switchSysPromptScope($event.target.value)),
|
|
7463
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible
|
|
7464
|
+
}, [
|
|
7465
|
+
_createElementVNode("option", { value: "global" }, _toDisplayString(_ctx.t('sysPrompt.scope.global')), 1 /* TEXT */),
|
|
7466
|
+
_createElementVNode("option", { value: "project" }, _toDisplayString(_ctx.t('sysPrompt.scope.project')), 1 /* TEXT */)
|
|
7467
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["value", "onChange", "disabled"])
|
|
7468
|
+
]),
|
|
7469
|
+
_createElementVNode("div", { class: "sys-prompt-control-group" }, [
|
|
7470
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('sysPrompt.mode.label')), 1 /* TEXT */),
|
|
7471
|
+
_createElementVNode("select", {
|
|
7472
|
+
class: "form-input sys-prompt-select",
|
|
7473
|
+
value: _ctx.sysPromptMode,
|
|
7474
|
+
onChange: $event => (_ctx.switchSysPromptMode($event.target.value)),
|
|
7475
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible
|
|
7476
|
+
}, [
|
|
7477
|
+
_createElementVNode("option", { value: "append" }, _toDisplayString(_ctx.t('sysPrompt.mode.append')), 1 /* TEXT */),
|
|
7478
|
+
_createElementVNode("option", { value: "system" }, _toDisplayString(_ctx.t('sysPrompt.mode.system')), 1 /* TEXT */)
|
|
7479
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["value", "onChange", "disabled"])
|
|
7480
|
+
])
|
|
7481
|
+
]),
|
|
7482
|
+
_createElementVNode("div", { class: "prompts-editor" }, [
|
|
7483
|
+
_createElementVNode("div", { class: "prompts-editor-toolbar" }, [
|
|
7484
|
+
_createElementVNode("div", { class: "form-hint" }, [
|
|
7485
|
+
_createTextVNode(_toDisplayString(_ctx.sysPromptPath || _ctx.t('common.notLoaded')) + " ", 1 /* TEXT */),
|
|
7486
|
+
(_ctx.sysPromptPath)
|
|
7487
|
+
? (_openBlock(), _createElementBlock("span", { key: 0 }, " (" + _toDisplayString(_ctx.sysPromptExists ? _ctx.t('common.exists') : _ctx.t('common.notExistsWillCreateOnSave')) + ") ", 1 /* TEXT */))
|
|
7488
|
+
: _createCommentVNode("v-if", true)
|
|
7489
|
+
]),
|
|
7490
|
+
_createElementVNode("div", { class: "prompts-editor-actions" }, [
|
|
7491
|
+
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--secondary" }, [
|
|
7492
|
+
_createElementVNode("button", {
|
|
7493
|
+
class: "btn-mini",
|
|
7494
|
+
onClick: _ctx.exportSysPromptContent,
|
|
7495
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || !_ctx.sysPromptContent,
|
|
7496
|
+
title: _ctx.t('modal.agents.export')
|
|
7497
|
+
}, [
|
|
7498
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7499
|
+
class: "btn-icon-sm",
|
|
7500
|
+
viewBox: "0 0 24 24",
|
|
7501
|
+
fill: "none",
|
|
7502
|
+
stroke: "currentColor",
|
|
7503
|
+
"stroke-width": "2"
|
|
7504
|
+
}, [
|
|
7505
|
+
_createElementVNode("path", { d: "M12 3v12M8 11l4 4 4-4M4 17v2h16v-2" })
|
|
7506
|
+
]))
|
|
7507
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7508
|
+
_createElementVNode("button", {
|
|
7509
|
+
class: "btn-mini",
|
|
7510
|
+
onClick: _ctx.copySysPromptContent,
|
|
7511
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || !_ctx.sysPromptContent,
|
|
7512
|
+
title: _ctx.t('modal.agents.copy')
|
|
7513
|
+
}, [
|
|
7514
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7515
|
+
class: "btn-icon-sm",
|
|
7516
|
+
viewBox: "0 0 24 24",
|
|
7517
|
+
fill: "none",
|
|
7518
|
+
stroke: "currentColor",
|
|
7519
|
+
"stroke-width": "2"
|
|
7520
|
+
}, [
|
|
7521
|
+
_createElementVNode("rect", {
|
|
7522
|
+
x: "9",
|
|
7523
|
+
y: "9",
|
|
7524
|
+
width: "13",
|
|
7525
|
+
height: "13",
|
|
7526
|
+
rx: "2"
|
|
7527
|
+
}),
|
|
7528
|
+
_createElementVNode("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
7529
|
+
]))
|
|
7530
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7531
|
+
_createElementVNode("button", {
|
|
7532
|
+
class: "btn-mini",
|
|
7533
|
+
onClick: _ctx.pasteSysPromptContent,
|
|
7534
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible,
|
|
7535
|
+
title: _ctx.t('common.paste')
|
|
7536
|
+
}, [
|
|
7537
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7538
|
+
class: "btn-icon-sm",
|
|
7539
|
+
viewBox: "0 0 24 24",
|
|
7540
|
+
fill: "none",
|
|
7541
|
+
stroke: "currentColor",
|
|
7542
|
+
"stroke-width": "2"
|
|
7543
|
+
}, [
|
|
7544
|
+
_createElementVNode("rect", {
|
|
7545
|
+
x: "8",
|
|
7546
|
+
y: "2",
|
|
7547
|
+
width: "8",
|
|
7548
|
+
height: "4",
|
|
7549
|
+
rx: "1"
|
|
7550
|
+
}),
|
|
7551
|
+
_createElementVNode("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" })
|
|
7552
|
+
]))
|
|
7553
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7554
|
+
]),
|
|
7555
|
+
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
|
|
7556
|
+
_createElementVNode("button", {
|
|
7557
|
+
class: "btn-mini",
|
|
7558
|
+
onClick: _ctx.cancelSysPromptEdit,
|
|
7559
|
+
disabled: _ctx.sysPromptSaving || _ctx.sysPromptDiffLoading,
|
|
7560
|
+
title: _ctx.t('common.cancel')
|
|
7561
|
+
}, [
|
|
7562
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7563
|
+
class: "btn-icon-sm",
|
|
7564
|
+
viewBox: "0 0 24 24",
|
|
7565
|
+
fill: "none",
|
|
7566
|
+
stroke: "currentColor",
|
|
7567
|
+
"stroke-width": "2"
|
|
7568
|
+
}, [
|
|
7569
|
+
_createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7570
|
+
]))
|
|
7571
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7572
|
+
(_ctx.sysPromptDiffVisible)
|
|
7573
|
+
? (_openBlock(), _createElementBlock("button", {
|
|
7574
|
+
key: 0,
|
|
7575
|
+
class: "btn-mini",
|
|
7576
|
+
onClick: _ctx.resetSysPromptDiffState,
|
|
7577
|
+
disabled: _ctx.sysPromptSaving || _ctx.sysPromptDiffLoading,
|
|
7578
|
+
title: _ctx.t('common.backToEdit')
|
|
7579
|
+
}, [
|
|
7580
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7581
|
+
class: "btn-icon-sm",
|
|
7582
|
+
viewBox: "0 0 24 24",
|
|
7583
|
+
fill: "none",
|
|
7584
|
+
stroke: "currentColor",
|
|
7585
|
+
"stroke-width": "2"
|
|
7586
|
+
}, [
|
|
7587
|
+
_createElementVNode("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
7588
|
+
]))
|
|
7589
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]))
|
|
7590
|
+
: _createCommentVNode("v-if", true),
|
|
7591
|
+
_createElementVNode("button", {
|
|
7592
|
+
class: "btn-mini btn-confirm-mini",
|
|
7593
|
+
onClick: _ctx.applySystemPrompt,
|
|
7594
|
+
disabled: _ctx.sysPromptSaving || _ctx.sysPromptLoading || _ctx.sysPromptDiffLoading || (!_ctx.sysPromptDiffVisible && !_ctx.hasSysPromptContentChanged()) || (_ctx.sysPromptDiffVisible && !_ctx.sysPromptDiffHasChangesValue),
|
|
7595
|
+
title: _ctx.sysPromptDiffVisible ? _ctx.t('common.save') : _ctx.t('common.preview')
|
|
7596
|
+
}, [
|
|
7597
|
+
(_ctx.sysPromptDiffVisible)
|
|
7598
|
+
? (_openBlock(), _createElementBlock("svg", {
|
|
7599
|
+
key: 0,
|
|
7600
|
+
class: "btn-icon-sm",
|
|
7601
|
+
viewBox: "0 0 24 24",
|
|
7602
|
+
fill: "none",
|
|
7603
|
+
stroke: "currentColor",
|
|
7604
|
+
"stroke-width": "2"
|
|
7605
|
+
}, [
|
|
7606
|
+
_createElementVNode("path", { d: "M20 6L9 17l-5-5" })
|
|
7607
|
+
]))
|
|
7608
|
+
: (_openBlock(), _createElementBlock("svg", {
|
|
7609
|
+
key: 1,
|
|
7610
|
+
class: "btn-icon-sm",
|
|
7611
|
+
viewBox: "0 0 24 24",
|
|
7612
|
+
fill: "none",
|
|
7613
|
+
stroke: "currentColor",
|
|
7614
|
+
"stroke-width": "2"
|
|
7615
|
+
}, [
|
|
7616
|
+
_createElementVNode("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
7617
|
+
_createElementVNode("circle", {
|
|
7618
|
+
cx: "12",
|
|
7619
|
+
cy: "12",
|
|
7620
|
+
r: "3"
|
|
7621
|
+
})
|
|
7622
|
+
]))
|
|
7623
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7624
|
+
])
|
|
7625
|
+
])
|
|
7626
|
+
]),
|
|
7627
|
+
_createElementVNode("div", { class: "form-group" }, [
|
|
7628
|
+
(_ctx.sysPromptDiffVisible)
|
|
7629
|
+
? (_openBlock(), _createElementBlock("div", { key: 0 }, [
|
|
7630
|
+
(!_ctx.sysPromptDiffLoading && !_ctx.sysPromptDiffError && !_ctx.sysPromptDiffTruncated && (_ctx.sysPromptDiffStats.added || _ctx.sysPromptDiffStats.removed))
|
|
7311
7631
|
? (_openBlock(), _createElementBlock("div", {
|
|
7312
|
-
key:
|
|
7313
|
-
class: "agents-diff-
|
|
7314
|
-
}, _toDisplayString(_ctx.t('diff.noChanges')), 1 /* TEXT */))
|
|
7315
|
-
: (_openBlock(), _createElementBlock("div", {
|
|
7316
|
-
key: 5,
|
|
7317
|
-
class: "agents-diff-view agents-diff-editor"
|
|
7632
|
+
key: 0,
|
|
7633
|
+
class: "agents-diff-summary"
|
|
7318
7634
|
}, [
|
|
7319
|
-
(
|
|
7320
|
-
|
|
7321
|
-
key: line.key || (line.type + '-' + index),
|
|
7322
|
-
class: _normalizeClass(['agents-diff-line', line.type])
|
|
7323
|
-
}, [
|
|
7324
|
-
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ')), 1 /* TEXT */),
|
|
7325
|
-
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
7326
|
-
], 2 /* CLASS */))
|
|
7327
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
7635
|
+
_createElementVNode("span", { class: "agents-diff-stat add" }, "+" + _toDisplayString(_ctx.sysPromptDiffStats.added), 1 /* TEXT */),
|
|
7636
|
+
_createElementVNode("span", { class: "agents-diff-stat del" }, "-" + _toDisplayString(_ctx.sysPromptDiffStats.removed), 1 /* TEXT */)
|
|
7328
7637
|
]))
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7638
|
+
: _createCommentVNode("v-if", true),
|
|
7639
|
+
(_ctx.sysPromptDiffLoading)
|
|
7640
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7641
|
+
key: 1,
|
|
7642
|
+
class: "state-message"
|
|
7643
|
+
}, _toDisplayString(_ctx.t('diff.generating')), 1 /* TEXT */))
|
|
7644
|
+
: (_ctx.sysPromptDiffError)
|
|
7645
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7646
|
+
key: 2,
|
|
7647
|
+
class: "state-message error"
|
|
7648
|
+
}, _toDisplayString(_ctx.sysPromptDiffError), 1 /* TEXT */))
|
|
7649
|
+
: (_ctx.sysPromptDiffTruncated)
|
|
7650
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7651
|
+
key: 3,
|
|
7652
|
+
class: "agents-diff-empty"
|
|
7653
|
+
}, _toDisplayString(_ctx.t('diff.tooLargeSkip')), 1 /* TEXT */))
|
|
7654
|
+
: (!_ctx.sysPromptDiffHasChangesValue)
|
|
7655
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7656
|
+
key: 4,
|
|
7657
|
+
class: "agents-diff-empty"
|
|
7658
|
+
}, _toDisplayString(_ctx.t('diff.noChanges')), 1 /* TEXT */))
|
|
7659
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
7660
|
+
key: 5,
|
|
7661
|
+
class: "agents-diff-view agents-diff-editor"
|
|
7662
|
+
}, [
|
|
7663
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sysPromptDiffLines, (line, index) => {
|
|
7664
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
7665
|
+
key: 'sys-prompt-diff-' + index,
|
|
7666
|
+
class: _normalizeClass(['agents-diff-line', line.type])
|
|
7667
|
+
}, [
|
|
7668
|
+
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ')), 1 /* TEXT */),
|
|
7669
|
+
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
7670
|
+
], 2 /* CLASS */))
|
|
7671
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7672
|
+
]))
|
|
7673
|
+
]))
|
|
7674
|
+
: _createCommentVNode("v-if", true),
|
|
7675
|
+
_createElementVNode("div", {
|
|
7676
|
+
class: _normalizeClass(['editor-frame', { 'editor-frame--loading': _ctx.sysPromptLoading }])
|
|
7338
7677
|
}, [
|
|
7339
|
-
(
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7678
|
+
(_ctx.sysPromptLoading)
|
|
7679
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7680
|
+
key: 0,
|
|
7681
|
+
class: "editor-skeleton"
|
|
7682
|
+
}, [
|
|
7683
|
+
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(6, (i) => {
|
|
7684
|
+
return _createElementVNode("div", {
|
|
7685
|
+
class: "skeleton-line",
|
|
7686
|
+
key: i
|
|
7687
|
+
})
|
|
7688
|
+
}), 64 /* STABLE_FRAGMENT */))
|
|
7689
|
+
]))
|
|
7690
|
+
: _createCommentVNode("v-if", true),
|
|
7691
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
7692
|
+
"onUpdate:modelValue": $event => ((_ctx.sysPromptContent) = $event),
|
|
7693
|
+
class: "form-input template-editor",
|
|
7694
|
+
spellcheck: "false",
|
|
7695
|
+
readonly: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible,
|
|
7696
|
+
placeholder: _ctx.t('sysPrompt.placeholder')
|
|
7697
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "readonly", "placeholder"]), [
|
|
7698
|
+
[_vModelText, _ctx.sysPromptContent]
|
|
7699
|
+
])
|
|
7700
|
+
], 2 /* CLASS */),
|
|
7701
|
+
(_ctx.sysPromptContextHint())
|
|
7702
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7703
|
+
key: 1,
|
|
7704
|
+
class: _normalizeClass(['prompts-context-hint', { 'prompts-context-hint--warn': _ctx.sysPromptContextHint().warn }])
|
|
7705
|
+
}, _toDisplayString(_ctx.sysPromptContextHint().text), 3 /* TEXT, CLASS */))
|
|
7706
|
+
: _createCommentVNode("v-if", true)
|
|
7707
|
+
])
|
|
7356
7708
|
])
|
|
7357
|
-
]
|
|
7358
|
-
|
|
7359
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
7360
|
-
key: 1,
|
|
7361
|
-
class: _normalizeClass(['prompts-context-hint', { 'prompts-context-hint--warn': _ctx.promptsContextHint.warn }])
|
|
7362
|
-
}, _toDisplayString(_ctx.promptsContextHint.text), 3 /* TEXT, CLASS */))
|
|
7363
|
-
: _createCommentVNode("v-if", true)
|
|
7364
|
-
])
|
|
7365
|
-
])
|
|
7709
|
+
]))
|
|
7710
|
+
: _createCommentVNode("v-if", true)
|
|
7366
7711
|
]))
|
|
7367
7712
|
: _createCommentVNode("v-if", true),
|
|
7368
7713
|
_createCommentVNode(" 加载状态 "),
|